I have a database that stores a bunch of custom fields using hstore. In order to merge it into another database that doesn't support hstore, I'd like to split the keys into extra columns.  Users can add new custom fields and so I can't rely on knowledge of the keys ahead of time. Which makes the answer at  not applicable for my problem.  Where a record doesn't have a key present in other records, it should get the same column with a null value.  How do I do this?
Let's assume we have a table where it has two columns, one an ID and one an hstore column, which stores key/value pairs.  You could query that column as such:  SELECT name, attributes-&gt;'device' as device FROM products WHERE attributes-&gt;'edition'= 'ebook'   Can you create a view for this table where the keys/values appear as columns in the view instead of all in the hstore column?  Example: I have an hstore key where it might have the key of amenity.  I want to create a view showing the the ID and the amenity values in a new view.
Why is it called the Millennium Falcon? I'm particularly interested in how the "Millennium" part pertains to the ship itself. It wouldn't hurt to explain the "Falcon" part either though. Flex: Database driven DataGrid: arrows disappearing Dollar Sign corrupts question In  my question () contains a "$" in a quoted section of the question.  Originally I had a second "$" in a second quoted  section of the same question.    However when I did this the second $ seemed to trigger a style that made the text italic and lost spacing between words.  I took out the second "$" and instead emphasized it with the word "dollars" which solved the immediate problem.  However, in the listing of the question, (not the question itself) the same thing happens after the first "$".  The summary shows the text without spaces between words and in italic.  Seems like a bug.  Below is a verbatim copy/paste of the original issue (two dollar signs):    I was able to find a small ESC for about $12 off of ebay.  If you were designing a robot, would you see that and think?       $12 bucks for an ESC that connects to simple pulse-wave interface -   sign me up!   Or would you think:     $12 just to control a motor? I could throw together an H-bridge for   $0.50 and be done with it.   My robot in particular actually has two motors and therefor $24 to control the two of them.  But the interface is really easy (plus has the added advantage of being R/C vs computer controlled with a simple change of connectors.  Which way would you go? How to find perpendicular vector to another vector? How do I find a vector perpendicular to a vector like this: $$3\mathbf{i}+4\mathbf{j}-2\mathbf{k}?$$ Could anyone explain this to me, please?  I have a solution to this when I have $3\mathbf{i}+4\mathbf{j}$, but could not solve if I have $3$ components...  When I googled, I saw the direct solution but did not find a process or method to follow. Kindly let me know the way to do it. Thanks. All my college years I have been using public, and would like to know the difference between public, private, and protected?  Also what does static do as opposed to having nothing? What's the difference between 'allow' and 'allow for'? Write18: capturing shell (script) output as command/variable? Let's say I compile the following file with pdflatex -shell-escape test.tex:   \documentclass{minimal}  \begin{document}  File listing is:  \immediate\write18{ls /usr}  \end{document}   This will send the output of the command ls /usr to report/log of pdflatex (primarily to stdout).   There are then two cases I'd like to utilize:    The output of ls /usr being included directly in the document (LaTeX stream). The output of ls /usr becoming the contents of a \newcommand (by this I mean, that I'd like the script to be executed when the \newcommand is executed first - and upon subsequent calls to the new command, the shell code should not be executed anew).    I have read through , but I'm not sure if this "pipe input" can be applied to \newcommand.   I have also read through  - and it seems that Tex' file I/O should be used; but I'm quite disliking the fact that I'd still have to redirect the script output (actually, in this case, the ls /usr output) to a file, and then read it in, to have it as contents of a command.   So, is there an easier way to achieve what I'd want (hopefully, illustrated through an example based on the above code)?     EDIT: Ehm, I should have asked one more question earlier :) I'll try with an edit here, although it will probably get missed .. :)   I originally asked for a \newcommand that will execute shell code only upon its definition (i.e., in a sense it is "cached"); and the answer from @egreg does exactly that. But then - would it be possible to have a different \newcommand definition, such that each time this newcommand is called, the shell command is executed anew? I.e. executing something like \@@input|"cat tempfile" (which cannot be executed as such), where tempfile changes between calls? List all columns for a specified table Do I keep my Windows installation if I install Ubuntu with Wubi, the Windows installer? I'm currently writing an import script/addon.  The file format is one vertex per line: x, y, z, u, v With 3 lines for each triangle (no quads).  So far I've got vertex's, edges and faces all importing correctly.  Now I just need to import the UV coordinates for each vertex.  However I'm having trouble trying to find a way to do this.  The best result so far was copying code from the UV operator template, which gave me a UV Map, but it puts the whole model at one point. In the textbook, it said a wave in the form $y(x, t) = A\cos(\omega t + \beta x + \varphi)$ propagates along negative $x$ direction and $y(x, t) = A\cos(\omega t - \beta x + \varphi)$ propagates along positive $x$ direction. This statement looks really confusing because when it says the wave is propagating along $\pm$ x direction, to my understanding, we can drop the time term and ignore the initial phase $\varphi$ while analyzing the direction, i.e. $y(x, 0) = A\cos(\pm\beta x)$, however, because of the symmetry of the cosine function, $\cos(\beta x)\equiv \cos(-\beta x)$, so how can we determine the direction of propagation from that?  I know my reasoning must be incorrect but I don't know how to determine the direction. So if we don't go over the math, how to figure out the direction of propagation from the physical point of view? Why $-\beta x$ corresponding to the propagation on positive x direction but not the opposite? Can we create a subsection of the References Cited section with different reference numbering? I need to add some more publications. I do not want to change the previous reference numbers, so I need to create new citations with difference reference numbering like [p1], [p2], etc. Can LaTeX do that? Show that $(L^{p},\|\|_{p})$ is a Banach space.  My approach: I prove the statement for $(L^{1},\|\|_{1})$, of the following way, first all, is easy show that $\|\|_{1}$ is a norm. So,  $(L^{1},\|\|_{1})$ is vector space. To show that is a Banach space, note that  Prop. 1: Let $(f_{n})_{n\in\mathbb{N}}\subset\mathcal{L}^{1}$ (where $\mathcal{L}^{1}=\mathcal{L}^{1}(X,\tau,\mu)$ is the space of all integrals function), such that $\sum_{i}{\|f_{n}\|}_{1}&lt;\infty$, then the sequences $\left(\sum_{n=1}^{N}{f_{n}}\right)_{n\in\mathbb{N}}$ converges almost everywhere to the integral function, that we called $\sum_{n\in\mathbb{N}}{f_{n}}$. Furthermore $$\sum_{n\in\mathbb{N}}{\int{f_{n}d\mu}}=\int{\sum_{n\in\mathbb{N}}{f_{n}d\mu}}\quad\lim_{N\to\infty}{\|\sum_{n=1}^{N}{f_{n}}-\sum_{n\in\mathbb{N}}{f_{n}}\|_{1}}=0$$ Prop. 2: Let $(E,\|\|)$ a normed vector space. Then $E$  is a Banach space if and only if for all $(e_{k})_{k\in\mathbb{N}}\subset E$ such that $\sum_{k\in\mathbb{N}}{\|e_{k}\|}&lt;\infty$, $\left(\sum_{k=1}^{n}{e_{k}}\right)_{n\in\mathbb{N}}$ converges in $E$  We take the proposition 2. Let $(f_{n})_{n\in\mathbb{N}}\subset L^{1}$ such that $\sum_{n}{\|\hat{f}_{n}\|_{1}}&lt;\infty$. Let $f_{n}\in\hat{f}_{n}$, then $\|f_{n}\|_{1}=\|\hat{f}_{n}\|_{1}$ and then $\sum_{n}{\|f_{n}\|_{1}}&lt;\infty$, by prop. 1, there exist $F\in\mathcal{L}^{1}$ such that $\|\sum_{n=1}^{N}{f_{n}-F\|_{1}}\to 0$, and then $\|\sum_{n=1}^{N}{\hat{f}_{n}-F\|_{1}}\to 0$. Finally note that $\hat{F}\in L^{1}$ is a Banach space. This was my answer for  $L^{1}$ space, but how I prove the general statement for $L^{p}$ (I want to do a similar response). Edit: I'm stuck in the problem, any idea or hint is appreciated.Thanks!! Earth Engine convert list with coordinates and values into a feature collection for export I need to create a feature collection from a list containing coordinates and band values.  These are extracted from a landsat image as shown in this linked script.    I'm unable to find a solution in creating a feature collection.  Here is the tail end code.  var valuesList = joinedImage.reduceRegion({   reducer: ee.Reducer.toList(4),   geometry: myGeometry }).values().get(0);  var feature = ee.Feature(null, valuesList);   // Wrap the Feature in a FeatureCollection for export. var myFeatures = ee.FeatureCollection([feature]);   // Export the image, specifying scale and region. Export.table.toDrive(myFeatures, "data", "myData", "B4-B5",  "CSV");   This doesn't work, because it is clearly the wrong way to create the feature collection.  I've tried to create it similar to Rodrigo E. Principe's solution of mapping a Feature Collection but I can't seem to create the initial feature collection to start with. Determining ethnicity according to ancestry? My sister, cousins, and other relatives speculate that my mom's grandmother was Jewish (for various reasons). I've heard people say at times things like, for example, "I'm 50% German" or "I'm 25% Swedish." This has to do with their ancestry. But, how exactly is this calculated? Say for example that my mother's paternal grandmother was indeed 100% Jewish, what would that make me and my siblings, and how is it calculated? Shell command to sum integers, one per line? I am looking for a command that will accept (as input) multiple lines of text, each line containing a single integer, and output the sum of these integers.  As a bit of background, I have a log file which includes timing measurements. Through grepping for the relevant lines and a bit of sed reformatting I can list all of the timings in that file.  I would like to work out the total. I can pipe this intermediate output to any command in order to do the final sum.  I have always used expr in the past, but unless it runs in RPN mode I do not think it is going to cope with this (and even then it would be tricky).  How can I get the summation of integers? How to get a drive formatted with exfat working? In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work.  So my question is how do I enable exfat support? Allow the author to delete their own question after closure, if other rules permit it I've read through a few "I want to delete my own question" threads on  already, and haven't found any that particularly cover this case.  I asked a question recently on :    This was voted closed as a duplicate of this question:    Since the latter question was obviously an appropriate duplicate, and my question had no votes or answers whatsoever, I decided I would just delete it.  But then, I was greeted by this error:     To allow for possible reopening, you may delete in 2 days     This all happened within hardly 20 minutes of me posting the question in the first place.  I fail to understand the point of this.  Perhaps if there were some up-votes or answers to the question, it might make sense.  However, as it stands, we now have a question with:   No votes whatsoever (up or down). No answers. Only a single (and largely irrelevant) comment not made by the OP. Five 3k+ rep users agreeing it is duplicate and therefore superfluous. The OP expressly desiring the question to be deleted, implying:   The OP has probably reviewed the duplicate question, and found their answer there. The question holds no further value to the OP. The OP agrees (with the close-voters) that the question provides no added value to the community.    At this point, what good reason could there be for disallowing the OP to delete their own question?  Could the system be modified to permit this? How to add sysadmin to user in SQL Server 2008 when no sysadmin accounts exist I have a SQL server 2008 instance running. Unfortunately during testing I deselected the sysadmin rights for my login and now can't readd it (because I don't have sysadmin rights).  There are no other sysadmin accounts for the instance except SA.  I was set up for just Windows Authentication so I hacked the LoginMode in the registry to 2 so I could login as SA using Sql Authentication. This does indeed set the login mode to Mixed, however the SA user is disabled by default and I can't reenable it because I am don't have sysadmin rights.  How do I enable the SA login so I can get in and reassign the sysadmin to my normal account? Is there a registry setting for this too or is it stored in the master database? Footnote, non-inline syntax? I would like to use footnotes without cluttering the container paragraph. Something like:  This is a very long complex\footnote[a] sentence.  \foottext[a]{So complex that I would prefer to pull out the footnote text.}   The idea comes from the [linktext][1], [1]: http://url.com markdown syntax.