Can someone explain the outcome to the follow scenario:  Buyer A places a limit order to buy 100 shares at $8.00, Seller B places a sale limit order at 7.50 for 40 shares.  What price would Seller B receive for his shares?  I suspect $8.00, is that correct?  B was the last to place the order so I presume $8.00.  Whereas if the placement of the orders was reversed and B placed sale order at $7.50 and A placed a buy order at $8.00 that A would received 40 shares at $7.50.  Clarification anyone?
Say a security has been trading at under $20.10, and there are limit orders selling at $20.10 and $20.21. Then Simon issues a limit order to buy at $20.21. According to , Simon would end up buying shares at $20.10.  Why does the exchange favor the buyer here?  I.e., why does the transaction execute at the seller's limit of $20.10 instead of the buyer's limit of $20.21?  (I.e., why don't Inara/River get to sell at $20.21 / above their limit, but Simon gets to buy at $20.10 / below his limit?)  Is the example flawed?  If it makes a difference, I'm mainly curious about NASDAQ and NYSE.  I tried Googling for specs (e.g. ), but couldn't find anything.  Only found that some  implementation executes the average of the buy/ask.  Just curious how the system works.
I'm currently reading a little deeper into the Axiom of Choice, and I'm pleasantly surprised to find it makes the arithmetic of infinite cardinals seem easy. With AC follows the Absorption Law of Cardinal Arithmetic, which states that for $\kappa$ and $\lambda$ cardinal numbers, the larger infinite and the smaller nonzero, then $\kappa+\lambda=\kappa\cdot\lambda=\max(\kappa,\lambda)$.  I was playing around with the equation $k+\aleph_0=\mathfrak{c}$ for some cardinal $k$. From the above, it follows that $\mathfrak{c}=k+\aleph_0=\max(k,\aleph_0)$, which implies $k=\mathfrak{c}$.  I'm curious, can we still show $k=\mathfrak{c}$ without the Axiom of Choice? Is it maybe possible to bound $\mathfrak{c}-\aleph_0$ above and below by $\mathfrak{c}$? But then I'm not quite sure such algebraic manipulations even mean anything, or work like that here. Certainly normal arithmetic does not! Thanks. How do I disable the guest session? What does the Y capacitor in a SMPS do? How do you run a 32-bit program on a 64-bit version of Ubuntu? I have a 64-bit version of Ubuntu 13.10.  I want to run a 32-bit version of a program.  However I see ia32-libs is not included in 13.10.  Is there a replacement package for this or what? Winforms issue - Error creating window handle We are seeing this error in a Winform application.  Can anyone help on why you would see this error, and more importantly how to fix it or avoid it from happening.   System.ComponentModel.Win32Exception: Error creating window handle.    at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)    at System.Windows.Forms.Control.CreateHandle()    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)    at System.Windows.Forms.Control.CreateControl()    at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)    at System.Windows.Forms.ButtonBase.OnVisibleChanged(EventArgs e) Return matched elements' attribute ar array using jQuery Chaining the Imperius curse What would happen if a wizard w successfully casts the Imperius curse on a equally powerful wizard a and then order him to cast the same curse back on w?  Follow-up questions.  It is established that casting the curse can be done .  What would happen in the case of a chain of casts that would hit back the original wizard? w-&gt;a-&gt;b-&gt;c-&gt;w  The original wizard could rather command the last wizard c, in the chain, to curse his first target instead. w-&gt;a-&gt;b-&gt;c-&gt;a wich would create a loop of a-&gt;b-&gt;c-&gt;a...  In what kind of limbo would wizards a, b and c exist in?  ( for the sake of simplicity, we can assume that every curse target is not very good at resisting the curse ) How can I get bold math symbols? To make Latin-letter variables bold I can use e.g. \mathbf{a}, but while putting Greek letters or symbols such as \nabla inside \mathbf doesn't cause any errors or warnings, it also doesn't do anything else.  What is the best way to make bold math symbols, in particular Greek letters and \nabla? Why split the  tag when writing it with document.write()? Why do some sites (or advertisers that give clients javascript code) employ a technique of splitting the &lt;script&gt; and/or &lt;/script&gt; tags up within document.write() calls?  I noticed that Amazon does this as well, for example:  &lt;script type='text/javascript'&gt;   if (typeof window['jQuery'] == 'undefined') document.write('&lt;scr'+'ipt type="text/javascript" src="http://z-ecx.images-amazon.com/images/G/01/javascripts/lib/jquery/jquery-1.2.6.pack._V265113567_.js"&gt;&lt;/sc'+'ript&gt;'); &lt;/script&gt; Namespaces and Operator Overloading in C++ When authoring a library in a particular namespace, it's often convenient to provide overloaded operators for the classes in that namespace.  It seems (at least with g++) that the overloaded operators can be implemented either in the library's namespace:  namespace Lib { class A { };  A operator+(const A&amp;, const A&amp;); } // namespace Lib   or the global namespace  namespace Lib { class A { }; } // namespace Lib  Lib::A operator+(const Lib::A&amp;, const Lib::A&amp;);   From my testing, they both seem to work fine.  Is there any practical difference between these two options?  Is either approach better? How to specify that search should be between two dates in technical specification I'm writing an integration manual that specifies how to use our WCF service for mobile messages and responses. The part in question needs to specify that the search results will be filtered between the start and end dates.  My aim is to make it clear that the time portion of the two dates will be discarded and the result will include everything from the start date to the end date. (In practice the code truncates the dates, adds one day to the end date, and returns the data that conforms to a query something like:  SELECT * FROM Table WHERE DateCreated >= @StartDate AND DateCreated &lt; @EndDate)  But my paragraph looks verbose and clumsy. It doesn't feel right. I feel kind of like John Cleese telling the kids when to put their clothes onto a lower peg. How can I make this less verbose?  Or maybe I'm over-thinking this?     When searching for responses, the search is performed between the supplied dates, after truncating the time portion thereof. The results will include responses with a date-time greater than equal to the start date, and less than one day after the end date. So passing the same value for start and end date will retrieve all responses received on that date, for messages previously sent by that user. Shows "unable to locate package unzip" error I have installed Ubuntu 12.04 server , shows    E:unable to locate the package unzip   the above error is also shown, if I try to install packages also. Can any one help me out to get out from this error. Design a custom Beamer theme from scratch I am trying to evaluate the following:  $\displaystyle \int_{0}^{\infty} \frac{1}{1+x^a}dx$, where $a&gt;1$ and $a \in \mathbb{R}$  Any help will be much appreciated. Should I use the first or last bits from a SHA-256 hash? I'd like to install a  client for Xubuntu (12.04).  I'm getting non-English Google results, and I didn't find  in the Xubuntu repositories.   Does anyone know of a client that works well for Ubuntu or it's supported derivates (or installation instructions for grive?) Disable UpdateOrchestrator Reboot task Windows 10 Asks me to Enter a Password I am using Windows 10 Pro x64 on my personal laptop on which I have a single user account with no password. For some reason however, Windows 10 has started asking me to enter a password whenever I boot up my machine. All I have to do is press the button without entering anything, and I log in, but I would much rather skip this step in favor of an automatic sign-in. Why has this started happening only now? What can I do to stop this behavior? Wireframe iOS design apps for iPad? Is there an app for iPad to assist in wireframe design for iPad and iPhone apps?  I don't mean actual development, just placing standard widgets and the things you usually do with photoshop and associated kits. How to change the date format?