Say I have a table with ProductID and OrderNumber. There are multiple products each with multiple orders.   What I'm trying to do is turn:   +-----------+-------------+ | ProductID | OrderNumber | +-----------+-------------+ |         1 |           1 | |         1 |           2 | |         1 |           3 | |         2 |           4 | |         2 |           5 | |         3 |           6 | |         3 |           7 | +-----------+-------------+   into:  +-----------+-------------+ | ProductID | OrderNumber | +-----------+-------------+ |         1 |     1, 2, 3 | |         2 |        4, 5 | |         3 |        6, 7 | +-----------+-------------+   It's easy enough to create a comma separated list of all the order numbers like shown here: .   What I have not been able to figure out is how to create the array from rows while still keeping the ProductID information intact.
I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)
How do I install pepper-flash on Chromium? I have Chromium web browser on my Lubuntu 13.04 (pre-installed).  I use LX Terminal (pre-installed) to write commands. I am trying to download flash player on Chromium using instructions on this :  sudo add-apt-repository ppa:skunk/pepper-flash   After typing in my password, this worked. Now   sudo apt-get update   I didn't need to type in my password, as I continued on the same terminal, but got W:/ and E:/ fetch file errors  sudo apt-get install pepflashplugin-installer   I continued on the same terminal despite the fetch file errors... and they said pepflashplugin-installer could not be found.  Is the last error because of fetch file errors, or because I need to download pepflash-plugin-installer somewhere? Or is it because of something else?  I cannot download the Chrome browser, and not looking to use flash player on my Firefox web browser (installed using lubuntu software center). What are the differences between a pointer variable and a reference variable in C++? I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable? Latexmk can't see a dependency on a .fmt format file I'm a complete layperson. As I understand, dark matter theoretically only interacts with the gravitational force, and doesn't interact with the other three fundamental forces: weak nuclear force, strong nuclear force, and electromagnetism.  Those are my understandings going in. If I'm wrong, please correct me. I've done some googling, and I haven't found anything confirming or denying that dark matter is affected by either of the fundamental nuclear forces.  So since dark matter only interacts with gravity, what causes any dark matter particle to be repelled from another? If they can pass freely through each other, and they are gravitationaly attracted to each other, why don't such particles clump together in a single 'point' in space?   It seems to me that particles occupying a single 'space' are philosophically not distinct particles, but I don't know how actual physics would play into this.  Edit , author's credentials unknown, but implicitly claims to be a physicist or astronomer, says "...[P]hysicists generally take all dark matter to be composed of a single type of particle that essentially interacts only through gravity."  Edit 2 The author is this , "Professor of Science on the physics faculty of Harvard University." Proving that the tangent to a convex function is always below the function Can I bind a (large) block of addresses to an interface? I know that the ip tool lets you bind multiple addresses to an interface (eg, ). Right now, though, I'm trying to build something on top of IPv6, and it would be really useful to have an entire block of addresses (say, a /64) available, so that programs could pick any address from the range and bind to that. Needless to say, attaching every IP from this range to an interface would take a while.  Does Linux support binding a whole block of addresses to an interface? Does the order of declaration matter in Java/C#? Show that an integer of the form $8k + 7$ cannot be written as the sum of three squares. I have figured out a (long, and tedious) way to do it. But I was wondering if there is some sort of direct correlation or another path that I completely missed.  My attempt at the program was as follows:   A number of the form, $8k + 7 = 7 (mod 8)$. That is, we are looking for integers a, b, c such that $a^2 + b^2 + c^2 = 7 (mod 8)$.   LONG and TEDIOUS way: $$(8k)^2 = 0 (mod 8)$$ $$(8k+1)^2 = 1 (mod 8)$$ $$(8k+2)^2 = 4 (mod 8)$$ $$(8k+3)^2 = 1 (mod 8)$$ $$(8k+4)^2 = 0 (mod 8)$$ $$(8k+5)^2 = 1 (mod 8)$$ $$(8k+6)^2 = 4 (mod 8)$$ $$(8k+7)^2 = 1 (mod 8)$$  That is, using three of these modulo there is no way to arrive at  $$a^2 + b^2 + c^2 = 7 (mod 8)$$ I created a simple service layer polygon in network analyst (ArcGIS Desktop 10.2) with no hierarchies set in the street network. Now I don't understand why is this polygon created along some particular streets?   Why isn't is properly spread out? For example, why doesn't the polygon cover the areas/streets I have marked in red? Obviously those marked areas are also within 1 km.  The impedance is 1 km and 2 km respectively.   The streets are also well connected individual line elements as you can see the junctions. Grub does not show a Windows 8 option after dual boot My input file is,  ami21 ami65 ami67 ami66 ami88 ami76 ami29 ami55  ami54 ami32   Using a single command line I need the output as,  ami22 ami66 ami68 ami67 ami89 ami77 ami30 ami56 ami55 ami33   I used the command  awk -vRS=ami '{$0=$0+1;ORS=RT}++n' inputfile &gt; outputfile   but I got the outputfile as ami21ami65ami67ami66ami88ami76ami29ami55ami54ami32  i.e. all strings are written in same line and without space. Could anyone suggext me some better command line. Do reroll and dice-adding abilities work on critical hits and critical failures? Would a female Jedi be referred to as Jedi Mistress instead of Jedi Master? Likewise would a Sith female be referred to as a Sith Lady instead of a Sith Lord? How to open a PDF file from terminal? I used to work on the Mac terminal before and I used:   open file2open.pdf   and the PDF file would be opened on preview or whatever my default viewer was. When I use it in the terminal in Ubuntu I get this error message:   Couldn't get a file descriptor referring to the console Can a warlock use one of their Thirsting Blade attacks to grapple or shove? @track vs @api (Lightning Web Components) Let's say we have this code for a LWC:  &lt;!-- helloExpressions.html --&gt; &lt;template&gt;     &lt;div class="slds-m-around_medium"&gt;         &lt;lightning-input name='firstName' label="First Name" onchange={handleChange}&gt;&lt;/lightning-input&gt;         &lt;lightning-input name='lastName' label="Last Name" onchange={handleChange}&gt;&lt;/lightning-input&gt;         &lt;p class="slds-m-top_medium"&gt;Uppercased Full Name: {uppercasedFullName}&lt;/p&gt;     &lt;/div&gt; &lt;/template&gt;   and this is the JS file:  // helloExpressions.js import { LightningElement, track } from 'lwc';  export default class HelloExpressions extends LightningElement {     @track firstName = '';     @track lastName = '';      handleChange(event) {         const field = event.target.name;         if (field === 'firstName') {             this.firstName = event.target.value;         } else if (field === 'lastName') {             this.lastName = event.target.value;         }     }      get uppercasedFullName() {         return `${this.firstName} ${this.lastName}`.toUpperCase();     } }   firstName and lastName have been decorated with @track. Now as per the documentation, decorating a property with @track makes it private and reactive, while to mark a property public and reactive, use @api.  So if I just change the decorator to @api for both these variables, it should work. I am referring these from the same component only. But it's not working.  UPDATE: 27th Feb -------------------- Somehow it's working today. I just changed the decorator of the variables to api.  import { LightningElement, api } from 'lwc';  export default class HelloExpressions extends LightningElement {     @api firstName = '';     @api lastName = '';      handleChange(event) {         const field = event.target.name;         if (field === 'firstName') {             this.firstName = event.target.value;         } else if (field === 'lastName') {             this.lastName = event.target.value;         }     }      get uppercasedFullName() {         return `${this.firstName} ${this.lastName}`.toUpperCase();     } }   So it's working. Continuity $\iff$ Preimage is closed whenever set is closed I'm trying to do the following:     Prove that a function $f : S\rightarrow T$ between two topological spaces is continuous iff $f^{-1}(C)$ is closed whenever $C\subset T$ is closed.   To show that the closed-set relationship implies continuity, notice that $T-C$ is open. The preimage of this open set is $f^{-1}\left(T-C\right)=S-f^{-1}(C)$, which is open by assumption ($f^{-1}(C)$ is closed). Of course, any open set $G\subset T$ can be written in the form $T-C$ by letting $C=T-G$. Thus, for every open set $G\subset T$, the preimage is open.  To show the implication in the other way, consider a closed set $C\subset T$. $T-C$ is open, so $f^{-1}(T-C)=S-f^{-1}(C)$ is open as well ($f$ is continuous), which means that $f^{-1}(C)$ is closed. Do I need to pay in full for hostel reservation to show proof of accommodation for a Schengen visa? I am applying for a Schengen visa to travel to Germany and one of the requirements is showing proof of accommodation. I booked all my hostels via hostelworld.com, but only paid the non-refundable deposit (a couple of dollars for each place) instead of the entire amount. I intend to pay the rest of it on arrival at the hostel (or cancel it and go CouchSurfing, thus saving money).  But for the visa application, will the non-refundable deposit be enough to show proof of accommodation?  The reason I ask is, I emailed one of the hostels requesting a document showing my name and accommodation confirmation, and they replied saying they could only give me such a document once I pay in FULL.  Is this how I'm supposed to book for all places?  Have I been doing it wrong all this while (by only paying the tiny non-refundable deposit instead of full hostel fare)? Proof: $\det\pmatrix{\langle v_i , v_j \rangle}\neq0$ $\iff \{v_1,\dots,v_n\}~\text{l.i.}$ The method format(String, Object[]) in the type String is not applicable for the arguments (...)