File size: 291,360 Bytes
db7d675
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{"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_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": "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": "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": "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_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_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": "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": "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": "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": "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": "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": "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": "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_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": "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": "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": "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_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": "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_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": "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_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": "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": "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_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": "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": "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": "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_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": "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": "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": "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": "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": "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": "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": "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_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": "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": "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_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": "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": "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": "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"}
{"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": "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": "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": "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": "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": "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": "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": "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": "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_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": "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": "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_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": "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": "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_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": "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_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_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": "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": "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": "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": "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": "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": "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_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_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": "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": "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": "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": "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": "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": "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": "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": "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"}