SQL Server join results as comma separated list
How to create a SQL Server function to "join" multiple rows from a subquery into a single delimited field?
How to extend WIFI from ethernet Equation of a rectangle I need to graph a rectangle on the Cartesian coordinate system. Is there an equation for a rectangle? I can't find it anywhere. What is the easiest way to superscript text outside of math mode?  For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th.  And what if I still want the n to be in math mode, but the th outside? Manually clear saved question drafts I've seen lately that new question editing is stored somewhere for later use if we wander off the new question without posting it and then return back to the page. Which is a good functionality addition in it's own right.  What I'd like to also have is the Discard this draft functionality that would clear form data and forget it. Somehow we find an answer in the meantime and the question isn't valid any more.  So having a Discard saved draft or something similar would be a nice contra-functionality to auto-save to remove stored data. The way it's implemented now seems too hidden hidden and unpredictable to users.  Additional edit  When adding hidden auto functionality usually means creating the opposite as well by either giving the possibility to preference of not having automatism at all or giving the possibility to clear what's been auto saved.  Let's see how GMail doesn't work (and I think we all agree that from UX perspective it does the job as expected:   User clicks Compose message User starts writing a new email message User decides to not send the message and checks their inbox User clicks Compose message again A clean form is presented to user (old one being part of drafts)   I'm not suggesting we should have something like Saved drafts but we surely should have the possibility to clear previous question draft.  Since this new functionality was introduced I should point out that I would use the discard functionality more frequently than the saved one. I do welcome saving messages, but discarding of saved drafts is anything but a rare situation one might want to do. It wouldn't be a problem if this was a 1% against 99%. To me it's more like 50/50.  Best possible solution  When providing saved drafts there should (from the UX perspective) be the opposite functionality as well. Namely discarding of it. But first thing we should be asking ourselves is:    do users more frequently need pre-filled saved question draft or do users more frequently need empty form with the possibility to populate it with a saved draft   User testing should provide the usage frequency between the two and the one that's more likely to happen (my guess is that there would be a big difference between the two) should be implemented. So one of these:   Pre-populate question fields with saved draft on question form load, while also providing a button to clear the draft and start writing anew without the need to manually clear all the fields (which would be the optimal solution in case of a single field form) Question form should always load empty while also having a button that would pre-populate it with a saved draft.   I think this would be the best consensus related to saved question drafts and their usage. But as we've seen this issue has been swept under the rug for an indefinite time. The simplistic undergrad explanation aside, I've never really understood what energy really is. I've been told that it's something when converted from one kind of something to another kind, or does some "work", as defined by us, but what is that something?  Moreover, if the total amount of energy in the universe is finite and we cannot create energy. Then, where did it come from? I've learned from thermodynamics where it goes, but where does it come from?  I know this sounds like something trivially simple, but there is so much going on in the physical universe and I just can't grasp what it is. Maybe it is because I lack the mathematical understanding that I can't grasp the subtle things the universe is doing. Still, I want to understand what it is doing.  How do I get to the point of understanding what it's doing?  (Note: What prompted me to ask this was . I'm afraid that it just puzzled me further and I sat there staring at the screen for a good 10 minutes.) Question about the Riemann-Lebesgue Lemma proof Ok, so one of the formulations of the Riemann-Lebesgue Lemma says: $$ f\in L^1(\mathbb{R}) \implies \hat{f}(\omega)\to 0\;\mbox{ when } \;|\omega|\to\infty.$$  I get all the steps of the proof, except the one which says that if $f$ is an arbitrary integrable function, it may be approximated in the $L^1$ norm by a compactly supported smooth function $g\in L^1$. My question is: Why? How do you know that for all $\epsilon&gt;0$, and for all arbitrary function $f\in L^1$ exists a compactly supported smooth function $g$ so that $||f-g||_{L^1}&lt;\epsilon$? The "proof" can be found in many places, but this step can be found in Wikipedia Show that $a^n \mid b^n$ implies $a \mid b$ I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2. $N$-body simulation in General Relativity How would one perform an $N$-body simulation in General Relativity (GR) for something like galaxy formation or galactic dynamics?  Suppose one wants to simulate the rotation curve $v(r)$ for galaxies with an $N$-body simulation, and wants to do it in the framework of GR / the Einstein equations. Sort on a string that may contain a number I need to write a Java Comparator class that compares Strings, however with one twist.  If the two strings it is comparing are the same at the beginning and end of the string are the same, and the middle part that differs is an integer, then compare based on the numeric values of those integers.  For example, I want the following strings to end up in order they're shown:   aaa bbb 3 ccc bbb 12 ccc ccc 11 ddd eee 3 ddd jpeg2000 eee eee 12 ddd jpeg2000 eee   As you can see, there might be other integers in the string, so I can't just use regular expressions to break out any integer.  I'm thinking of just walking the strings from the beginning until I find a bit that doesn't match, then walking in from the end until I find a bit that doesn't match, and then comparing the bit in the middle to the regular expression "[0-9]+", and if it compares, then doing a numeric comparison, otherwise doing a lexical comparison.  Is there a better way?  Update I don't think I can guarantee that the other numbers in the string, the ones that may match, don't have spaces around them, or that the ones that differ do have spaces. How can I use "." as the delimiter with String.split() in java Do Stack Exchange sites allow editing of comments and posts from other users? I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]  When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}] If $x_1=5$, $x_{n+1}=x_n^2-2$, find $\lim x_{n+1}/(x_1\cdots x_n)$ Explicit formula for Bernoulli numbers by using only the recurrence relation It is not hard to show, by induction on $m\in\mathbb N$, that there exist a sequence $(B_n)_{n\geq0}$ of rational numbers such that  $$\sum_{k=1}^nk^m=\frac1{m+1}\sum_{k=0}^m\binom{m+1}kB_k\,n^{m+1-k},\ \style{font-family:inherit;}{\text{for all}}\ n\geq1\,.$$  These are the Bernoulli numbers of the second kind, that is, $B_1=+1/2$. A corollary of the proof (by induction) of the fact above is a recurrence formula for such numbers $B_n$, which are known as Bernoulli numbers:  $$\sum_{k=0}^{n-1}\binom nkB_k=0\,.\tag{$\ast$}$$  On the other hand, there are a number of explicit formulae for $B_n$, which are obtained using the equality $\frac x{e^x-1}=\sum_{n=0}^\infty B_n\,\frac{x^n}{n!}$; see  and . For example:  $$B_n=\sum_{k=0}^n\frac1{k+1}\sum_{r=0}^k(-1)^r\binom krr^n\,.\tag{$\ast\ast$}$$  Is there some clever way to manipulate the recurrence $(\ast)$ in order to obtain $(\ast\ast)$? Open an app on startup/after booting I need to force a selected application to start up each time my Android-based device is (re)started.  Is there anything I can use (configuration setting, external application etc.) to accomplish this task? Or is this kind of behavior limited to home screen managers only? Why is it sensical for a proposition with a false antecedent to validate to true? Is the standard Canon 18-55 lens the same as 5 years ago? What is the difference between a function decorated with  and one decorated with ? Bug in editor for numbered lists? I noticed what seemed to be a bug in the way the stackoverflow editor handles numbered lists. I did a search on meta for this and it didn't come up, but if it is a duplicate, I'll delete the question.  Consider the following code:  Here are some points:  1. One 2. Two 3. Three  Here are some more points which continue the theme:  4. Four 5. Five   When you actually type this into the text editor, this is the result:  Here are some points:   One Two Three   Here are some more points which continue the theme:   Four Five   In this case, the ordered list resets after the break. This is probably just an edge case (and not necessarily worth fixing), but I ran into the problem today and figured this would be a good place to raise the topic! My workaround was to use back-ticks around the numeral, but then you lose the hanging indent. (ie, 1. One)  Might this be worth fixing? Is it expected behavior? Or am I doing it wrong?