Assign a lambda expression using the conditional (ternary) operator
How can I assign a Func conditionally between lambdas using the conditional ternary operator?
Product and Box Topologies I am having a hard time understanding why the box topology is finer the the product topology. Of course I know that with finite product, the two are the same. With product topology, the basis elements are defined so that the $U_{\alpha}=X_\alpha$ except for finitely many $\alpha$. So how can this topology be contained in the box topology which has only the product of the  $U_{\alpha}$ as basis. I think it should have been the other way round. Am I missing something here? I need help with this because I have been confused over it for a long time. How do I handle casting a spell with a cost of X when the casting cost is reduced? Does Calculate Value (Model Only Tool) work correctly in tools run in Batch? Am I correct that if my model has a model-only tool (Calculate Value), and then I run the model as a batched process, it will not run the Calculate Value expression?   I wrote a model to upload, define, project (and clip) XY data from excel files. I had thought to use iterate tables, but it wasn't working. (I assume due to having to choose which worksheet within xlxs). So I thought to do a batch, but this seems to leave that annoying $ that arc appends to table names (and is an invalid character in most tools...)  My guess is that the Calculate value that removes my $ is not being run in the batch. Ideas? Confirmations? I searched around, and currently there are two methods suggested; installing an enhancement for Windows Subsystem for Linux and installing an XServer.  I want to know which method is the most hassle-free (easy to install AND to use), and which one is less memory-heavy.  I just want Synaptic and CMake. Why couldn't that be a builtin feature? Command with percent symbols not running in crontab The following crontab does not work:  # TEST LINE DOES DOT RUN */1 * * * * /bin/echo 'test '`/bin/date +%Y-%m-%d` &gt;&gt; /tmp/test   I also tried starting it with:  SHELL=/bin/bash   Update: I thought the backtick characters ` were the villains, but as the answer below clarifies the percentage % was the culprit! I was wondering if quantum particles do actually  exists in two different states simultaneously and if it has been proven they do indeed exists in a superposition of states.  How has it been figured out since observing it would collapse the wave-function into one single state (two superposition of states into one ) as it has been mentioned in the Schrodinger's cat experiment? \mathcal(O) and font size I use the following mystic TeX so as to display the Landau's notations for big and small O.  There is one partial solution to improve the scriptscriptstyle so as to not use a small o : see the secund answer below. The problemen with \smallOBis is the wrong spacing, contrary to \smallO. How can I do this ?  % Sources : %     1) http://forum.mathematex.net/latex-f6/bonnes-commandes-de-base-t12278.html %     2) http://tex.stackexchange.com/questions/30944/mathcalo-and-font-size  \documentclass{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}      \usepackage{graphicx}      \newcommand{\bigO}[1]{\ensuremath{\mathop{}\mathopen{}\mathcal{O}\mathopen{}\left(#1\right)}}      \newcommand\smallO[1]{         \mathchoice             {% \displaystyle                 \ensuremath{\mathop{}\mathopen{}{\scriptstyle\mathcal{O}}\mathopen{}\left(#1\right)}             }             {% \textstyle                 \ensuremath{\mathop{}\mathopen{}{\scriptstyle\mathcal{O}}\mathopen{}\left(#1\right)}             }             {% \scriptstyle                 \ensuremath{\mathop{}\mathopen{}{\scriptscriptstyle\mathcal{O}}\mathopen{}\left(#1\right)}             }             {% \scriptscriptstyle                   \ensuremath{\mathop{}\mathopen{}{o}\mathopen{}\left(#1\right)}             }     }      \newcommand\smallOBis[1]{         \mathchoice         {% \displaystyle             \scriptstyle\mathcal{O}\left(#1\right)         }         {% \textstyle         \scriptstyle\mathcal{O}\left(#1\right)         }         {% \scriptstyle         \scriptscriptstyle\mathcal{O}\left(#1\right)         }         {% \scriptscriptstyle         \scalebox{0.8}{$\scriptscriptstyle\mathcal{O}$}\left(#1\right)         }     }   \begin{document}  \[     \renewcommand{\arraystretch}{1.2}%     \begin{array}{llll}          \textbf{Style}            &amp; \verb!\bigO!         &amp; \verb!\smallO!                          &amp; \verb!\smallOBis!         \\ \hline         \verb!\displaystyle!      &amp; \displaystyle      \bigO{\frac{1}{n}}         &amp; \displaystyle      1 + \smallO{\frac{1}{n}} - 2 &amp; \displaystyle      1 + \smallOBis{\frac{1}{n}} - 2         \\         \verb!\textstyle!         &amp; \textstyle         \bigO{\frac{1}{n}}         &amp; \textstyle         1 + \smallO{\frac{1}{n}} - 2 &amp; \textstyle         1 + \smallOBis{\frac{1}{n}} - 2         \\         \verb!\scriptstyle!       &amp; \scriptstyle       \bigO{\frac{1}{n}}         &amp; \scriptstyle       1 + \smallO{\frac{1}{n}} - 2 &amp; \scriptstyle       1 + \smallOBis{\frac{1}{n}} - 2         \\         \verb!\scriptscriptstyle! &amp; \scriptscriptstyle \bigO{\frac{1}{n}}         &amp; \scriptscriptstyle 1 + \smallO{\frac{1}{n}} - 2 &amp; \scriptscriptstyle 1 + \smallOBis{\frac{1}{n}} - 2     \end{array} \]  \end{document} Scroll to bottom of div? I am creating a chat using Ajax requests and I'm trying to get messages div to scroll to the bottom without much luck. I am wrapping everything in this div: #scroll {     height:400px;     overflow:scroll; }  Is there a way to keep it scrolled to the bottom by default using JS? Is there a way to keep it scrolled to the bottom after an ajax request? Find the set of $n\in\Bbb Z^+$ with $M=\{n,n+1,n+2,n+3,n+4,n+5\}$ partitionable into two sets Find the set of all positive integers $n$ with the property that the set $M=\{n, n + 1,n + 2,n + 3,n + 4,n + 5\}$ can be partitioned into two sets such that the product of the numbers in one set equals the product of the numbers in the other set.   If $n=1$ them $M=\{1,2,3,4,5,6\}$ and there is no such partition, so $n \ge 2$.  If the prime $p|n$ then either $p|2$ or $p|3$ or $p|5$ which means either $p=2$ or $p=3$ or $p=5$.  Suppose $n=2k$. Then $M=\{2k, 2k + 1,2k + 2,2k + 3,2k + 4,2k + 5\}$. I have no idea how to proceed. Why don't we allow low reputation users to insert more than two images in their posts? I was searching for privileges one can get after a certain amount of reputation, and I ended up with this question in my mind: Why don't we allow users with low reputation to insert more than two images or links in their posts?  Is it good to make restrictions for them? Let's say someone is going to post a good question and he/she needs to insert three images to explain it properly; because this can't be done the question may become vague or incomplete to answer, and ultimately be flagged by others. Is this a rational decision for those users?  Yes, I believe that restrictions should be there to make a control over new users like for voting privileges but is it good to make restrictions on Questions and Answers?  Here is my question:  Is it decent to restrict new users in such a manner? In Windows 7, I know you can do Windows + Left to put a window in the left half of the screen.  Is there a feature that will do top and bottom? How to *quickly* get a list of files that have bad sectors/blocks/clusters/whatever? My wife's Windows 7 (64-bit) box has suddenly developed a SMART "disk is bad" status.  I'm attempting to copy everything off (no admonishments about lacking a backup regimen, please, I know already  :(  ) by creating a System Image across the network to a different machine, but it gets to a certain point and starts taking forever.  Doing a chkdsk reveals that certain files cause this by having many bad blocks (like dozens of thousands in a row, if the event log is any indication) and causing the system to do its standard try-to-recover-and-relocate-upon-access thing.  But this is taking so long, I'm afraid the disk will fail completely before I can get the damned thing copied.  However, several of the files so far have been ones that she has copies of elsewhere, so I am able to just delete them prior to retrying the backup to speed things up considerably.  So:  is there some tool or procedure that will try reading each file, and upon hitting a bad block, just tell me about it and skip to the next file?  So I can see which ones I can just dump and which I need to let it try to recover? Rectangle with cross on title bar I have installed Ubuntu 14.04 and I think that I have found a bug. When I open terminal and  go to edit profile preferences I get a rectangle with a cross on the title bar. It happened with other applications too. Here are the screen shots: The timeout period elapsed prior to obtaining a connection from the pool I'm getting this error every few days. I won't see the error for a few days then I'll get a flurry of 20 or so all with in a minute or so.  I've been very thorough going throw my code so that I'm using this basic setup for my DB access.  try {   myConnection.Open();   mySqlDataAdapter.Fill(myDataTable);   myConnection.Close(); } Catch (Exception err) {   if (myConnection.State != ConnectionState.Closed) myConnection.Close();   throw err; }   The way I understand it this should execute my queries and immediately release the connection back to the pool but if something goes wrong with the query then I catch the excpetion close my connection then throw the error up, which eventually gets trapped at the application level and logs and emails me the error.  Even using this throughout my code I'm still running across the issue. What can I do to diagnose the root cause of the issue? I have a table that is very wide. Now I want to force it into one landscape page. I already set the page orientation to landscape but now I don't know how to force it into one page with scaling. Any hints? Make an object invisible to a specific camera? (Cycles) I'm trying to set up multiple cameras for a scene set in a room. Is there a way to link object visibility to a specific camera? Ideally, a wall or ceiling would not render if it were in the way of the specified camera.  I've tried to get around this by keyframing Restrict Rendering, but that gets difficult to keep track of. I've also tried adjusting the clipping plane, but that clips too much and would also need to be keyframed if the camera moves.   Thanks! In episode 10 of Full Metal Alchemist: Brotherhood, during the events in the Research Lab 5, Edward Elric is severely hurt. Later in the hospital, he writes down everything he had come to know, and he discusses with Alphonse, Hughes, and Armstrong about what to do with the information to continue the investigation.  At this point, King Bradley arrives with lemon into the room. He finds out what they are doing but acts very calm and chilled out and allows them to continue investigation while being careful.  Why did he not get Hughes and Armstrong killed at that point? Or at least tell them to not investigate at all? Single supply op amp to convert 0-5VDC to +/-2VDC (microcontroller to line level) I am generating a 0-5 volt sine wave using an arduino with a DAC. I would like to level shift this signal (DC bias?) by -2.5 volts and have a gain of .8, so that I end up with a line level sine wave.  Thus I am trying to design a single supply op amp with the following equation:  $$V_{\text{o}} = (V_{\text{i}}-2.5) \times 0.8$$  I found this white paper that is supposed to describe a way to do this but I'm having trouble following as I am new to op-amps.    Does anyone know of a way to do this with a single op amp or IC?  The frequency range of 20Hz to 20KHz must be preserved. Consider the curve $\frac{1}{x}$  where $x \geq 1$. Rotate this curve around the x-axis.   One Dimension - Clearly this structure is infinitely long.  Two Dimensions - Surface Area = $2\pi\int_∞^1\frac{1}{x}dx = 2\pi(\ln ∞ - \ln 1) = ∞$   Three Dimensions -  Volume = $\pi\int_∞^1{x}^{-2}dx = \pi(-\frac{1}{∞} + \frac{1}{1}) = \pi$   So this structure has infinite length and infinite surface area. However it has finite volume, which just does not make sense.  Even more interesting, the "walls" of this structure are infinitely thin. Since the volume is finite, we could fill this structure with a finite amount of paint. To fill the structure the paint would need to cover the complete surface area of the inside of this structure. Since the "walls" are infinitely thin, why would a finite amount of paint not be able to cover the outside of the "walls" too?  Please help me make sense of this whole thing. How do you use plural or singular form of an adjective? So I was taught that you should almost always use singular form of an adjective instead of plural form. But recently, I've seen people using plural form and it sounds quite weird and I don't know if it is correct.  For example,   "Salary tax" instead of "Salaries tax" "Office supplies" instead of "Offices supplies" "Product demo" instead of "Product demo"   In the above cases, the word "Salary" is used as an adjective to describe the type of "tax", so it will be in singular form. But I saw people using salaries tax and not sure if it is grammatical.  So my question is if there are any general rules on how to use the singular/plural form of an adjective?