I've seen anonymous functions like:  @(eta) 30*eta^2;   but they mostly are one liners. Is it possible to have them have more than one line like:  @(eta) (x =eta^2; y=eta^3; return x+y; )   where one has more lines and variables defined in the anonymous function but let it remain as an anonymous function?
I'd like to do something like this:  &gt;&gt; foo = @() functionCall1() functionCall2()   So that when I said:  &gt;&gt; foo()   It would execute functionCall1() and then execute functionCall2().  (I feel that I need something like the )  EDIT:  functionCall1 and functionCall2 are not necessarily functions that return values.
I've removed the poll style answers in favour of open discussion.  I realise now this isn't the best way to have a proper discussion about this issue - sorry to anyone who commented/voted.    This is mostly a followup on this question:    As I've answered, the reason this is happening is that the root database (in the production Stack Exchange database server) is still called StackExchange.Programmers - a database name that propagates to SEDE and through it to the data dump.  The question here is what to do about it - the current situation is somewhat broken for users of the data dump.  These are the options we have:   Do nothing Update the root database name (requires downtime - so very undesirable) Update the update scripts so the SEDE database name is the new name, change will flow to the data dump export (breaks any queries using the old name) Update the export to the data dump so only it gets the new name Something else we haven't thought about   I have added all of these options as answers below - please vote on the one you most prefer, we will try to accommodate the top voted answer. What is the difference between Halt and Shutdown commands? What is the difference between the halt and shutdown commands? I have a dedicated server with 2 TB storage.   My problem is that the whole storage is allotted to the root partition.   Whenever I try to resize it using lvresize, the root partition gets corrupted and then I have to reprovision the server.   Is there any option to resize the root partition without unmounting in lvm?  I am trying to reduce the root partition to 100GB.  Vgs  root@s93079:/home/customer# vgs   VG        #PV #LV #SN Attr   VSize VFree   s93079-vg   1   2   0 wz--n- 1.82t    0   Lvs  LV     VG        Attr       LSize  Pool Origin Data%  Meta %  Move Log Cpy%Sync Convert   root   s93079-vg -wi-ao----  1.79t    swap_1 s93079-vg -wi-ao---- 32.00g   Fdisk - l  Device     Boot  Start        End    Sectors  Size Id Type /dev/sda1  *      2048     499711     497664  243M 83 Linux /dev/sda2       501758 3907028991 3906527234  1.8T  5 Extend /dev/sda5       501760 3907028991 3906527232  1.8T 8e Linux  Disk /dev/mapper/s93079--vg-root: 1.8 TiB, 1965782204416 byt es, 3839418368 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mapper/s93079--vg-swap_1: 32 GiB, 34355544064 byte s, 67100672 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes   Vgdisplay   --- Volume group ---   VG Name               s93079-vg   System ID   Format                lvm2   Metadata Areas        1   Metadata Sequence No  3   VG Access             read/write   VG Status             resizable   MAX LV                0   Cur LV                2   Open LV               2   Max PV                0   Cur PV                1   Act PV                1   VG Size               1.82 TiB   PE Size               4.00 MiB   Total PE              476870   Alloc PE / Size       476870 / 1.82 TiB   Free  PE / Size       0 / 0   VG UUID               dPrEwA-77pM-pGai-9jZB-ldMZ-iL20-HAe9 Dj   lvdisplay /dev/s93079-vg/root   --- Logical volume ---   LV Path                /dev/s93079-vg/root   LV Name                root   VG Name                s93079-vg   LV UUID                bpGNau-XirV-P7PA-8d6k-OCOy-TAwN-HXl FVI   LV Write Access        read/write   LV Creation host, time s93079, 2016-08-27 09:22:05 -0500   LV Status              available   # open                 1   LV Size                1.79 TiB   Current LE             468679   Segments               1   Allocation             inherit   Read ahead sectors     auto   - currently set to     256   Block device           254:0   Lvdisplay /dev/s93079-vg/swap_1  --- Logical volume ---  LV Path                /dev/s93079-vg/swap_1  LV Name                swap_1  VG Name                s93079-vg  LV UUID                j74PLZ-E9gK-9Bbb-EkKq-xRJv-TuU4-FgH gm  LV Write Access        read/write  LV Creation host, time s93079, 2016-08-27 09:22:05 -0500  LV Status              available  # open                 2  LV Size                32.00 GiB  Current LE             8191  Segments               1  Allocation             inherit  Read ahead sectors     auto  - currently set to     256  Block device           254:1   Df - h  /dev/dm-0       1.8T  923M  1.7T   1% / udev             10M     0   10M   0% /dev tmpfs           3.2G  8.5M  3.2G   1% /run tmpfs           7.9G     0  7.9G   0% /dev/shm tmpfs           5.0M     0  5.0M   0% /run/lock tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup /dev/sda1       236M   33M  191M  15% /boot My understanding of the Stern–Gerlach experiment is that neutral (0 total charge) particles are sent through a non-homogeneous magnetic field, with the expectation that the field will push that particle's path higher or lower on a detector because of the collective spin of that particle. While the detector can detect particles in a two-dimensional surface, the results of the experiment are that particles appear in only two localized areas directly above the path of the particle stream, or directly below the path of the particle stream - spin up or spin down. The conclusions from these measurements are that the particle, when measured, will always have about the same magnitude.  Why does this not follow from classical mechanical theory related to magnetism? If you shot a magnet through a similar apparatus, I would expect the magnet to be rotated to align with the magnetic field in some way which, at high enough field strengths relative to the mass of the magnet, would cause us to measure basically the same magnitude as if the magnet entered the apparatus pre-aligned with the field.  How is my explanation incorrect? Can I set the start point of a bezier curve? What does my internet provider know about my online activities? What does my internet service provider know about my online activites in these cases?   plain server (www, ftp, whatever) connection and provider's DNS secured (e.g. TLS) server connection and provider's DNS plain server (www, ftp, whatever) connection and an non-provider non-logging DNS secured (e.g. TLS) server (www, ftp, whatever) connection and non-provider non-logging DNS   In case 4) does my provider know anything more about my online behaviour than "IP w.x.y.z was assigned to Foo Bar between connect-time and disconnect-time" (i.e. only the duration my router was connected)?  What traffic does need to go through the provider's infrastructure to make my connection work at all? Can you determine a formula for this problem? I have a question about the corollary to theorem 5.12 in Rudin's Principles of Mathematical Analysis (page 108):  Suppose $f$ is a real differentiable function on $[a,b]$ and suppose $f'(a)&lt; \lambda &lt; f'(b)$ then there is a point $x \in (a,b)$ such that $f'(x) = \lambda$ Corollary: If $f$ is differentiable on $[a,b]$ then $f'$ cannot have any simple discontinuities on $[a,b]$.  Can someone help me to show how he uses the result in the &quot;main theorem&quot; in the corollary?  (There are two cases of simple discontinuities  $f(x+) = f(x-) \neq f(x)$ and $f(x +) \neq f(x-)$ Is there any connection between a matrix being invertible and being diagonalizable? Let $A$ be an $n\times n$ matrix.  If $A$ is invertible then one of it's eigenvalues is 0.  If $A$ is diagonalizable then it has $n$ linearly independent eigenvectors.   Are these two statements true? Is there any connection between them? May I infer one from the other? Do creatures that enter the battlefield at the same time see each other enter? Transit visa requirements at Narita Airport general solution sum of two uniform random variables aY+bX=Z? is there a general solution to that? I have seen simple examples for Y+X=Z but I was wondering how this would be with rescaling? I already know how to do it on Mac OS X (plenty of instructions online).  But is it possible to do it on Ubuntu? If yes, how? How do I get an Intel Wireless 3168 802.11ac wireless card to work? I have a Redstone Power loop that connects to a Command Block that is set to kill all entities except for myself (/kill @e[type=!Player]), because I'm building a creative map, but don't want slimes all over the place. Problem is if I want to place an Item Frame than the Command Block kills it.  So, is there anyway to exclude items from getting deleted, or make it so it will only target mobs? Add the ability to ignore users $|p(z)| \leq M$ for $|z| \leq 1$ Show that $|p(z)| \leq M|z|^n$ for $|z| \geq 1$ Let $p(z)= \sum_{k=0}^n a_k z^k$ ,  $a_n \neq 0$ , be a polynomial of degree $n$ such that $|p(z)| \leq M$ for $|z| \leq 1$.  Show that $|p(z)| \leq M|z|^n$ for $|z| \geq 1$  This was an exam question. Part (a) of this question asked the converse: if $|p(z)| \leq M|z|^n$ and $|z|$ is sufficiently large, then $p(z)$ is a polynomial. This question came straight out of Ahlfors' Complex Analysis, which I solved by showing, using the Cauchy Estimate,  $|p^n (z)|  \leq \frac{n!M|z|^k}{R^n} = 0$ as $R \to \infty$.   I would like to work backwards with this.   May I do this, or similar:   $p(z) = \frac{1}{2\pi i} \int_{c} \frac{f(\zeta)d\zeta}{\zeta-z}$  $\Rightarrow  |p(z)| \leq \frac{2\pi M|z|^n}{1(2\pi)}= M|z|^n$ Opacity problem over white object in Illustrator I have a problem. I'm working with an object at 50% opacity. When it's over the artboard itself the color looks great, but when I put a white object behind it I get this weird color that doesn't look accurate.  This happens with every object and only in CMYK. I'm pretty sure this never happened to me before so maybe I changed something in the settings or I don't know.  Does anyone have any idea? Implementing a PIVOT query How can I pivot the following SELECT statement:           SELECT sc.CID,                 sc.CodeName     as OverviewText,                 scRAG.CodeName  as RAGStatusText             FROM StatusCode      sc LEFT OUTER JOIN ProjectOverview po               ON sc.CID          = po.ProjectOverviewCID              AND po.ProjectId    = 180 LEFT OUTER JOIN StatusCode      scRAG               ON po.RAGStatusCID = scRAG.CID           WHERE sc.SCID         = 18   Such statement yields the result set that follows:  CID OverviewText    RAGStatusText --- ------------    ------------- 153 Cost            Green 154 Requirements    Yellow 155 Schedule        NULL 156 Technical       NULL 157 Testing         NULL   But, I want it to return one single row with 10 values, as shown bellow:   ----------------------------------------------------------------------------------------------  | Cost | Green | Requirements | Yellow | Schedule | NULL | Technical | NULL | Testing | NULL |  ----------------------------------------------------------------------------------------------   Can I pivot on CID? How to reinstall kernels after accidental deletion with a separate boot partition and an encrypted LVM volume? My installation is a Ubuntu 12.04 64 bits (Classic "legacy" MBR - No  EFI/UEFI here) with two partition :   A separate boot partition An encrypted LUKS volume that contains the system Logical Volumes   I seems I accidentaly deleted all the current kernel files with:  sudo apt-get purge 'linux-image-3.8*'    I applied the updates with Ubuntu Software Update, rebooted and then: Ubuntu can't boot.  I tried to boot on a live DVD with a 14.04.1 Ubuntu and can still see my partitions (described later):  /dev/sda1 (boot) /dev/sda2 (Encrypted volume) /dev/sda5 (Logical Volume container)  What are the steps to recover/reinstall the kernel files and dependencies in order to cleanly reboot my installed system?  Thanks in advance