Does a comma have to be used before a quotation? If before the quote the word "saying" or "said" is used, does a comma always have to be used before it? When does a comma not have to be used?
Is there a comma needed before quotation? Sam developed an annual sweepstakes promotion entitled “The Free Gas Punt Return Game”.    Do I need a comma after entitled or not?
Should I declare chocolate as "food" when entering the US? It is being customary we bring a few authentic Russian chocolate bars/sweets to the US but we are always struggling whether we should check that "food" checkbox in the "Customs Declaration" form?  It is under the following entry in the form (yeah, together with insects, right):     I am (We are) bringing:      fruits, vegetables, plants, seeds, food, insects   I've been always checking it but that just gets us into more lines and triggers extra questions after getting to the baggage check. What should I do when my neural network doesn't learn? I am able to produce a standard length \sim with a tiny S above it, but I would like the \sim tilde to be longer (maybe one and half times as wide as a capital letter).  Any tips on how to change the width/length of \sim? I want to insert something into a STL list in C++, but I only have a reverse iterator. What is the usual way to accomplish this?  This works: (of course it does)  std::list&lt;int&gt; l; std::list&lt;int&gt;::iterator forward = l.begin(); l.insert(forward, 5);   This doesn't work: (what should I do instead?)  std::list&lt;int&gt; l; std::list&lt;int&gt;::reverse_iterator reverse = l.rbegin(); l.insert(reverse, 10); Sampling with replacement or without replacement I'm writing a program in R that simulates bank losses on car loans.  Here is the questions I'm trying to solve:  You run a bank that has a history of identifying potential homeowners that can be trusted to make payments. In fact, historically, in a given year, only 2% of your customers default. You want to use stochastic models to get an idea of what interest rates you should charge to guarantee a profit this upcoming year.  A. Your bank gives out 1,000 loans this year. Create a sampling model and use the function sample() to simulate the number of foreclosure in a year with the information that 2% of customers default. Also suppose your bank loses $120,000 on each foreclosure. Run the simulation for one year and report your loss.  B. Note that the loss you will incur is a random variable. Use Monte Carlo simulation to estimate the distribution of this random variable. Use summaries and visualization to describe your potential losses to your board of trustees.   C. The 1,000 loans you gave out were for 180,000. The way your bank can give out loans and not lose money is by charging an interest rate. If you charge an interest rate of, say, 2% you would earn 3,600 for each loan that doesn't foreclose. At what percentage should you set the interest rate so that your expected profit totals 100,000. Hint: Create a sampling model with expected value 100 so that when multiplied by the 1,000 loans you get an expectation of 100,000. Corroborate your answer with a Monte Carlo simulation.  I'm confused about how to set up this simulation up from a high level point of view and have the following questions: 1. For part A, Should I create a pool of 1000 customers or should I create a larger pool of customers? 2. For part A, when sampling, do I sample with or without replacement? 3. For part B, I'm confused about how to set up the monte carlo simulation.  Am I varying the size of the customer pool? 4. For part C, I'm not sure how to set up a sampling model that involves the interest rate.  Any advice or guidance would be appreciated.  I'm also thinking that if I fully understood the high level concepts for parts A and B, part C might not be such a mystery. Intersection Number of $B = Y^2 - X^3 + X$ and $F = (X^2 + Y^2)^3 - 4X^2Y^2$ using the fact $I(P,F \cap B) = ord_P^B(F) $. How can I list references from BibTeX file in-line with commentary? I would like to take the full citation of a reference in my BibTeX file and write commentary in-line after it.  A \fullcitation{id} command would be perfect.  I would like to use it as:  \fullcitation{id1}   This paper talks about A with applications to B.  \fullcitation{id2}   This paper considers how C affects A.  Whenever the \fullcitation{id} command appears, I want it to be replaced with the full reference, including authors, title, journal, and date.  Is this possible? Using WFS-T in OpenLayers? How can I use WFS-T in openlayers-2?  I'm using  in server side. long long implementation in 32 bit machine As per c99 standard, size of long long should be minimum 64 bits. How is this implemented in a 32 bit machine (eg. addition or multiplication of 2 long longs). Also, What is the equivalent of long long in C++. How to run Windows 10 from an external hard drive? I am currently able to boot from an external drive or multiboot USB. Taking this concept one step further, I have 3 questions:   1) Is it possible to install and run Windows 10 on a portable external hard drive or USB card with the same functionality of being installed on the internal drive?   2) Is it considered legal to do so or will it affect Windows updates in any way?   3) What are the steps to do that? (please outline steps I can follow so I don't lose a drive in the process). :)  EDIT: My question deals specifically with Windows 10, the legality and method of making it a standalone OS running from an external device and what effect if any it has on Windows Update; questions not dealt with in the other question. Why do some websites show the company name next to the URL? Some websites show the company name next to the URL (in Chrome) and some don't.  How do I set this up for my website? Is there a reason why or why I wouldn't want to do this? How does accepting an answer work? What does it mean to accept an answer? How do I accept an answer, and what are the rules? Can I accept my own self-answer? What are the reputation benefits? Which answer should I accept? Should I upvote the accepted answer? What should I do if none of the answers are suitable?      For more information, see "" in the . SELECT * EXCEPT Is there any RDBMS that implements something like SELECT * EXCEPT?  What I'm after is getting all of the fields except a specific TEXT/BLOB field, and I'd like to just select everything else.  Almost daily I complain to my coworkers that someone should implement this...  It's terribly annoying that it doesn't exist.  Edit: I understand everyone's concern for SELECT *.  I know the risks associated with SELECT *.  However, this, at least in my situation, would not be used for any Production level code, or even Development level code; strictly for debugging, when I need to see all of the values easily.  As I've stated in some of the comments, where I work is strictly a commandline shop, doing everything over ssh.  This makes it difficult to use any gui tools (external connections to the database aren't allowed), etc etc.  Thanks for the suggestions though. How does one attack a two-time pad (i.e. one time pad with key reuse)? My question might appear the same as the question , but actually I did read all the answers and none of them helped me with the details I need.  I am new to cryptography and my problem is with two time pad attacks on OTP. The problem I had in my course was that I have 10 ciphertexts encrypted with the same key $K$. I am then given another ciphertext that I should decrypt.  I know that XOR-ing two ciphers gives me the XOR of their original messages.  My question is what is the correct thing to do after that?  I tried to take 3 ciphertexts $C_1, C_2$ and $C_3$.  Then get $S_1 = C_1 \oplus C_2  \oplus $' ', also get $S_2 = C_1 \oplus C_3 \oplus$ ' '.  After that I compared all corresponding characters in $S_1$ and $S_2$,  and if $S_1[i] = S_2[i]$ then I calculate $S_1[i] \oplus C_2[i]$ to get $K[i]$.  I tried this on paper before coding and it worked, but I might be missing something.  Is this the right approach? Why does it work? EJB Transactions in local method-calls In the following setup, does method B run in a (new) transaction?  An EJB, having two methods, method A and method B  public class MyEJB implements SessionBean     public void methodA() {        doImportantStuff();        methodB();        doMoreImportantStuff();     }      public void methodB() {        doDatabaseThing();     } }   The EJB is container managed, with methodB in requires_new transaction, and method A in required transaction. thus:  &lt;container-transaction id="MethodTransaction_1178709616940"&gt;   &lt;method id="MethodElement_1178709616955"&gt;     &lt;ejb-name&gt;MyName&lt;/ejb-name&gt;     &lt;method-name&gt;*&lt;/method-name&gt;   &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;   &lt;/method&gt;   &lt;method id="MethodElement_1178709616971"&gt;     &lt;ejb-name&gt;MyName&lt;/ejb-name&gt;     &lt;method-name&gt;methodB&lt;/method-name&gt;   &lt;/method&gt;   &lt;trans-attribute&gt;RequiresNew&lt;/trans-attribute&gt; &lt;/container-transaction&gt;   Now let another EJB call methodA with an EJB method call. methodA now runs in an transaction. Will the subsequent call to methodB from methodA run in the same transaction, or does it run in a new transaction? (mind, it's the actual code here. There is no explicit ejb-call to method B) Sensor for ultralow (to -85°C) freezer monitor I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &amp;= i \\\\\ \frac1{\sqrt{-1}} &amp;= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &amp;= \frac1i \\\\  \sqrt{\frac1{-1}} &amp;= \frac1i \\\\  \sqrt{\frac{-1}1} &amp;= \frac1i \\\\  \sqrt{-1} &amp;= \frac1i \\\\  i &amp;= \frac1i \\\\  i^2 &amp;= 1 \\\\  -1 &amp;= 1 \quad !!? \end{align} How should the "and/or" text of a card be interpreted? How should the "and/or" text of a card be interpreted? For example on a card like  the text reads:     Nahiri's Wrath deals damage equal to the total converted mana cost of the discarded cards to each of up to X target creatures and/or planeswalkers.   For the remainder of this question, let's fix X at 2 to keep things simple.  Should the "and/or" be interpreted such that the effect is applied to a combination of targets the player chooses. That is to say for Nahiri's Wrath the player could perform one of the following options:   Nahiri's Wrath deals damage to each of two target creatures. Nahiri's Wrath deals damage to each of two target planeswalkers. Nahiri's Wrath deals damage to each of one target creature and one target planeswalker.   Or should the card's effect be expanded and applied to both sides of the "and/or". With this interpretation the player would have to the following two options when playing Nahiri's Wrath:   Nahiri's Wrath deals damage to each of X target creatures and Nahiri's Wrath deals damage to each of X target planeswalkers Nahiri's Wrath deals damage to each of X target creatures or Nahiri's Wrath deals damage to each of X target planeswalkers   The confusion stems from  (which was formerly formerly worded using the same phrasing) where some commenters have said things like:     So this lets you do a total of 12 damage? 3 each to 2 target creatures AND 3 each to 2 target players, one of which could be a planeswalker? That's how the "and/or" works, right? You can choose. Otherwise it would just be "or"... Cannot add a NOT NULL column with default value NULL in Sqlite3 Is the gradient a surface normal vector or does it point in the direction of maximum increase of f I'm having some trouble trying to visualize and physically understand what's happening with the gradient.  I understand that the following is true:   The gradient of f (grad(f)) points in the direction of maximum increase of f   However, later on, we are told that a gradient of a surface f (grad(f)) gives us the surface normal vector (i.e pointing away). How can that be? From the first statement, I thought that the gradient must be pointing in the direction of maximum increase of f - surely the direction of maximum increase of f should be a vector pointing in some direction on f itself. How can it be pointing outward as a surface normal vector?