How to get latest timestamped result from time series in a join table
Get rows with most recent date for each different item
How do I check to see if a text file is empty or does not exist in c++? How to put terms in lexicographic order? According to :     By looking for trades that take place in between the bid and ask, you   can tell when a strong trend is about to come to an end. This is   because these trades are often placed by large traders who take a   small loss in order to make sure that they get out of the stock in   time.   A trader when buying needs to buy at the ask price and when selling needs to sell at the bid price. So how can a trade happen 'in between' the bid and ask? ${!FOO} performs a double substitution in bash, meaning it takes the (string) value of FOO and uses it as a variable name. zsh doesn’t support this feature.  Is there a way to make this work the same in bash and zsh?  Background:  I’ve got a list of environment variables, like  PATH MAIL EDITOR   and want to first print the variable names and afterwards their values.  This works in bash but not zsh:    for VAR in LIST do         echo $VAR         echo ${!VAR} done   It should be somehow possible “the old way” with eval, but I can’t get it to work:  for VAR in LIST do         echo $VAR         echo `eval \$$VAR` done   I’m never going to understand why I can’t simply do arbitrary deep substitutions like ${${VAR}} or even ${${${VAR}}} if need be, so an explanation for that would be nice, too. How to show $\lim_{n \to \infty} \sqrt[n]{a^n+b^n}=\max \{a,b\}$? Let $a\geq 0$ and $ b\geq 0$. Prove that $\lim_{n \to \infty} \sqrt[n]{a^n+b^n}=\max \{a,b\}$. [Hint: Use the identity $(a^n -b^n)=(a-b)(\sum_{i=0}^{n-1}a^ib^{n-1-i})$]    I need some help! I cannot do it even with the hint... :( I have started a long process through a terminal. Is it possible to make the Ubuntu terminal make a sound once the process is complete? This way, I don’t need to keep checking, but will instead be notified through a sound. Why didn't the Hobbits get frostbite? This is a question that's been bothering me for the last couple of days:  How is it that the hobbits of the Fellowship were able to survive such cold temperatures throughout their travels without having any foot protection?   I know it's said that they have thick "leather like" soles, with ample amounts of hair for warmth but still, I don't understand how that could provide much more warmth than for instance a regular leather shoe. On top of this I know that multiple days (or even weeks) of their journey was spent crossing mountain ranges, which, near a summit would have a temperature far below freezing. This combined with the assumption that they only have the warmth of shoes on there feet would have presumably resulted in some level of frostbite. But to my knowledge there is no such mention of these problems in the novels or movies aside from the odd "It's cold".  Anyways, I'm just wondering if anyone has some form of explanation to this phenomenon or do hobbits just have really durable feet? I have encountered the definition of Cantor set and its property. Cantor set is constructed by removing the middle third open set of each interval .So each time we get some union of closed sets. As $F_0=[0,1]$ $F_1=[0,1/3]\cup [2/3,1]$ $F_2=[0,1/9]\cup [2/9,1/3]\cup [2/3,7/9]\cup [8/9,1]$ So on , That for $F_n$ we get the Union of $2^n$ closed interval . I know that finite union of closed interval is closed, but this is not true for arbitarly union. As I had a counterexample:  $\cup$ {{1/n}|for $n$ $\in N$} as this is not closed as $0$ is not in  that union. So what is the argument here to say that $F_n$ is closed for any $ n$ . As we are using this fact to prove the Cantor set to be closed as $F=\cap_{n\to \infty} F_n$ i.e arbitarly intersection of closed set is closed . Where am I misunderstanding? Any help will be appreciated. Value of Vandermonde type determinant Let $x_1,...,x_n $ are distinct real numbers.  Is it a formula for the Vandermonde type determinant $V(x_1, \cdots,x_n)$  whose last column is $x_1^k,\ \cdots,\ x_n^k$, where $k \geq n$, instead of $x_1^{n-1},\ \cdots,\ x_n^{n-1}$?  Thanks Can the expression $\sqrt{n} + \sqrt{m}$ be rational if neither $n,m \in \mathbb{N}$ are perfect squares? It doesn't seem likely, the only way that could happen is if for example $\sqrt{m} = a-\sqrt{n}, \ \ a \in \mathbb{Q}$, which I don't think is possible, but how to show it? Why not use development provisioning instead of ad hoc? TP-LINK TL-WN823N Unable to connect to network I have purchased a TP-LINK TL-WN823N (EU) V2.0 device, which is a USB device that should work as a Network Interface Card, allowing me to connect my computer to wireless networks. Unfortunately, I am unable to find any wireless networks using this device using either wicd or network-manager (no networks appear in the list of networks supplied by either application).  A CD came with the device claiming "Linux support". The CD contained a URL to a corrupted archive file for downloading installation resources. I try to mask my immense frustration.  Here is the additional dmesg output I receive when I connect the device to my computer (similar content is present when I boot the computer with the device connected):  [17096.009912] usb 2-1.2: new high-speed USB device number 4 using ehci-pci [17096.103501] usb 2-1.2: New USB device found, idVendor=2357, idProduct=0109 [17096.103513] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [17096.103527] usb 2-1.2: Product: 802.11n NIC [17096.103529] usb 2-1.2: Manufacturer: Realtek [17096.103530] usb 2-1.2: SerialNumber: 00e04c000001   This is my lsusb, where the offending device corresponds to Bus 002 Device 004:  Bus 002 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor Bus 002 Device 004: ID 2357:0109   Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 0c45:6433 Microdia  Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   As lsusb -v:   It seems the device is working to me, but no new interface is found in 'ifconfig':  docker0   Link encap:Ethernet  HWaddr 02:42:6e:bf:92:16             inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0           UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  enp0s31f6 Link encap:Ethernet  HWaddr 30:5a:3a:e1:96:b1             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)           Interrupt:16 Memory:df200000-df220000   lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:412 errors:0 dropped:0 overruns:0 frame:0           TX packets:412 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1           RX bytes:31876 (31.8 KB)  TX bytes:31876 (31.8 KB)   Running 'lshw -class network' as root contains only information about the 'enp0s31f6' interface.  Additionally for sanity, my 'uname -a':  Linux home-z170a-ubuntu 4.4.0-22-generic #39=Ubuntu SMP Thu May 5 16:53:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux   I am using Ubuntu 16.04.  My questions are:   Why are no networks present in the list for wicd or network-manager? Why is there no additional network interface created when I plug in the USB device? Is it possible to create this network interface?   Thanks for reading. How to calculate what this power series converges against? (double factorials) PHP syntax for dereferencing function result Can't run "dpkg --add-architecture i386" on 12.04 64-bit to run eclipse ADT Study path to Bayesian thinking? I am six years into a business role and have a bachelor's in physics and applied math/stats. Sean Carroll's (Caltech physicist)  opened me to the idea that Bayesian statistics is one useful way of thinking about anything - inevitably you hold a prior and you should update your credence as additional information becomes available.   Is there a path to training your intuition to thinking this way? Critically, it would require repeated practice with verifiable answers through either a course, or self study that includes many problems and solutions. I do not believe simply reading will do.  Possible resources, having read every related question on this site I could find:   "Probability Theory" by Jaynes. Pro: analytic; intuitive explanation of bayesian statistics. Con: prerequisites; missing problems/solutions. "Doing Bayesian Data Analysis" by Kruschke. Pro: includes problems &amp; solutions; requires only "algebra and rusty calculus". Con: works in R, which I think provides for less intuitive learning than the analytical (I may be wrong).   If it is a multi-year path I need to take, starting elsewhere, I am happy to do so! Ideally, I would avoid the frequentist methods, as I have no use for them.  My goal is not to be a scientist, but to leverage insight into how reality works to go above and beyond the established thinking in business.  Many thanks for any suggestions! Is the $\sum\sin(n)/n$ convergent or divergent? Possible Duplicate:          So, in my calculus class (one I'm teaching, not taking), the sum $\sum_{n=1}^\infty \frac{\sin(n)}{n}$ has come up a few times.  Unfortunately, as someone not exactly an expert in the convergence of sums, it seems to resist the few techniques I know.  Certain none of the usual first year calculus tricks (integral test, alternating series test, ratio test, etc.) work, and the only more tricky technique, partial summation, I can think of doesn't seem to work either (one would need that $\sum_{n=1}^N\sin(n)$ is bounded, which I believe is false).  It seems like it should converge, since it switches sign quite often, but on the other hand, the harmonic series can mess with your intuition, so I don't have much trust in that.  So, I ask to you:     Does this series converge? I am trying to understand model vs. interpretation of sentences vs. theories, with respect to a propositional calculus.  Is a model of a wff just a sentence that is true under some interpretation?   Or a set of wffs that are all true under some interpretation?   Or when an interpretation satisfies a wff (or set of wffs)?   Does it make sense to say that an interpretation is a model if all valid propositions are true? Or an interpretation being a model iff all theorems from the theory are still valid under the interpretation? I know that taking the derivative of position with respect to time defines what we call velocity, but I've never heard of physicist going in the opposite direction with position. Is there any application for the integral of position with respect to time?  Maybe with respect to something else? How can I disable the Windows 8 charms bar? Can someone please tell me how to disable the annoying effect that pops up when you drag cursor to top- or bottom-right corners?