I recently merged two sets of data in a single attributes table. To my surprise I can not opperate the variables or observations because, for some reason, it recognized the numbers in different columns as text entries. How can I change the type of data from text to rational number?
I want it to know how to convert string field values to integer values in QGIS Dufour... there are numbers and strings in the same field, when I use toreal(string) it stops and it won´t create the field.
How do you clear a stringstream variable? I've tried several things already,  std::stringstream m; m.empty(); m.clear();   both of which don't work. Are there names for consonant-shifts when suffixes are added? How can I handle the warning of file_get_contents() function in PHP? 24% tax on first pay in the UK? Quite a similar thread to others I've seen here - hope I'm not repeating the same questions again!   I just got my first payslip after arriving in the UK and noticed that the tax is far higher than the HMRC rate for my salary bracket.     I did some research but couldn't find any reason why I would be taxed at 24.23% of my gross this month AND then an additional amount for NI.    I have about £640 back pay from April that is only being paid now,but even so, it doesn't explain the rather large discrepancy between the HMRC rate and what I'm seeing here.   Any ideas? Why shouldn't we allow NULLs? I remember reading this one article about database design and I also remember it said you should have field properties of NOT NULL.  I don't remember why this was the case though.  All I can seem to think of is that, as an application developer, you wouldn't have to test for NULL and a possible nonexistent data value (for instance, an empty string for strings).  But what do you do in the case of dates, datetime, and time (SQL Server 2008)?  You'd have to use some historic or bottomed-out date.  Any ideas on this? As I understand it Q&amp;A style questions are  but a self answered question should be judged independently of the answer. Often after I've solved a problem I would like to share the question and answer on stack overflow (and have on a couple of occasions) but how to show &quot;minimal understanding of the problem&quot; is always challenging. For example I have been looking into the following question  How can I plot a straight line in the JMonkey Engine library I'm trying to plot straight lines between vertices that I specify using the JMonkey Engine 3D graphics library. So for example if I was to try to plot between: (2,0,0) (-1,0,1) (0,1,1) (1,1,1) (1,4,0) Then I would get:   This is something I do (and forget how to do) relatively often and the answer is harder to find than you'd imagine ( provides everything needed to figure it out but its spread out over several posts and isn't a complete solution on its own). Therefore I want to provide a Q&amp;A for it but at present this question feels like it would fail the minimal understanding test  Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work  Should I make up some imaginary problem? (Probably the final source code messed up a bit) Or mention in the question that I’m self answering to assuage some of the normal &quot;This is not a do your work for you site&quot; comments. Opening a file from terminal When we want to open an application or file from the terminal, we type, say,  okular file.dvi   This opens the application, but also shows the status of the application. We cannot close the terminal, because it kills the process. Unfortunately, if you're trying to, for example, create a LaTeX file, you will need one tab for the text editor, one for the dvi file, and so on. And if you're trying to open all windows from the terminal, you can forget it. I'm trying use the terminal as much as possible, and while I have Yakuake, it is still a bother having so many tabs and seeing which of those have an application I've killed and so on.  So, is there a way to open an application/file from the terminal so that the status doesn't show and immediately gives the prompt so that we can use it to open more applications? Schengen visa in US without H1B stamp Is a block of cotton heavier than a block of iron? if i have a block of cotton and a block of iron each containing a weight of 100 kg when measured on a weighing machine, in reality which one is heaver than the other, which one is heavier and why?  This question was in my physics worksheet. The teacher gave the following answer: the apparent weight of both of them is the same, but the buoyant force of cotton is high since the volume of cotton is more than iron. Therefore, true weight of cotton is more. Does this answer make sense? What is the right answer? How do I remove duplicate "Open With" context menu items in Finder.app? For whatever reason, the "Open With" context menu in Finder is always listing every app four times (exactly).     I've read about (and tried) rebuilding the Launch Services database to restore the context menu to its initial state, but nothing seems to work. I've also used Onyx.app to clear user and system caches, but I'm still left with four repetitions of each app under the "Open With" service. I have restarted the system a few times just to be sure it was not some temporary corruption of the list.  I'm running OS X 10.6.6 on a 2011 17" MacBook Pro with a fresh install of OS X (i.e. I didn't use Migration Assistant.app or a Time Machine backup). I did, however, sync all my preferences and other files using MobileMe like I always do, so I imagine it's feasible that a preference file somewhere is causing problems? I didn't notice whether this was happening before or after my MobileMe sync.  How can I fix this so one app shows? Batch renaming files Proving a vector space is infinite-dimensional Let $S$ be a vector space. Suppose that for any positive integer $n$, there exists a linearly independent subset $S_n ⊆ V$ of size $n$.   How do you show that $S$ is not finite dimensional but infinite-dimensional.  I understand that to be finite dimensional then it must have a finite then  there exists a finite set that such at $\operatorname{Span}(T)=S$. So would it be right to prove by contradiction that there is not a finite spanning set that satisfies $\operatorname{Span}(T)=S$, and hence I could argue that the vector space $S$ is infinite dimensional.  How would I show that $S$ does not have a spanning set $T$, such that $\operatorname{Span}(T)=S$? When does $120$ divide $n^5 - n$ Find n such that $n^5 - n$ is divisible by $120$. (*Here $n$ belongs to the natural number set)  Seems a trivial problem, but the answer mentioned in the text book seemed incomplete to me so I'm here just to ensure whether approach to this problem is correct or not.  So my approach is as follows: We know that $n^5 - n$ can be written as $n^5-n = n(n-1)(n+1)(n^2 + 1)$  Now since it's product of three consecutive natural numbers so it's divisible by $3! = 6$. Now using Fermat's Little theorem we can prove that $n^5= n \mod5$ hence $n^5 - n$ is divisible by $5$ as well. So $n^5 - n$ is divisible by $30$. Now to ensure their is another factor of $4$ in the term we need to ensure that $n^5 - n$ is divisible by $8$. I found that all odd natural numbers and multiples of $8$ makes $n^5 - n$ divisible by $8$, hence $n^5 - n$ is divisible by $120$. But in the text book they have only mentioned odd natural numbers as answer, which seemed incomplete to me.  Thanking everyone in advance:P Am I going to have trouble flying with a reversed name on the ticket? I'm flying to Peru with my girlfriend next week and I realized that her name is incorrect on the reservation.  Instead of Sally Marie Jones it's Jones Marie Sally.  We're flying into Houston, then Lima, and in Lima we switch airlines for our flight to Cajamarca.  I booked the ticket with Orbitz who made the reservation with United. United booked the flight with LAN air, the Peruvian airline.  Both companies say that they are unable to change the name because of TSA restrictions not allowing a name change. I asked if I could just cancel and re-book, but United said they could not do this because there are multiple airlines involved.  A note has been attached to the reservation explaining the issue, and the United rep said that they would be able to print her boarding pass with the correct name. However, he said there are no guarantees that she'll be able to fly because although the boarding pass will be correct, the ticket will still have the reversed name.  I was prepared to just take the chance that it will all work out, seeing how it's really obvious the name is just backwards, but with recent events I'm worried that US airport security is going to be extra strict for the next little while.  Is this something I need to worry about, or are chances good that this will work out fine?  The United rep said there's a chance we could cancel the United flights and get a new ticket with the correct name for no cost, but we'd have to pay for new tickets within Peru ($500 out of the total $1300 ticket cost). I'd rather not do this unless there's a reasonable chance we'll have trouble at the airport. Why are Flash applications so sluggish/crashy? I've noticed that Flash applications tend to be more sluggish under Ubuntu than they do under Windows on the same machine. This is particularly noticeable when watching HD video or playing graphics/physics-heavy games. Are there any ways of improving the performance of Flash under Ubuntu, or is this just an issue with the Linux version that I will have to live with?  Currently I'm just cutting down on the number of tabs open, blocking flash ads, and closing other programs, but I'm looking for ways to affect Flash itself.  Other things I have already been doing include using Youtube's HTML5 feature and playing videos straight from /tmp in VLC. I was wondering if there was some way of streamlining Flash itself though. Perhaps not.  More Specific Question: Is there anything I can do in mms.cfg to boost performance? Why is there no option to login as root? Why does Ubuntu not allow the GUI users to login as root at the time of system start up like administrator in Windows?  Why they are restricting us to login only through the terminal? Calculate difference between two dates (number of days)? It was nice to discover the option for a room owner to add any user to a room, even if their rep is too low.     ...so I notified the user in question, and as instructed on the next screen, I had them got to chat.stackoverflow.com so that I'd be able to add them.    ...but when they did their part, and I did my part, I got the message:    Obviously both frustrated, the user's next logical question was:  "So I just have ask a couple questions and get someone to upvote them, right?"    Needless to say, we don't want to encourage new users to post questions for the sole purpose of bypassing a frustrating, misdocumented rule.  I realize this will likely quickly get closed since it has at least one  - which hasn't been touched in 5½ years.  However it would be nice if the issue was revisited:  Ideally, it would be cool if RO's did have the option of deciding who had access to the room they "own", but short of that, is it possible to remove the 6 "misleading" words from that page? Continuous function preserving rational difference. Find all the continuous functions $f:\mathbb{R}\rightarrow \mathbb{R}$ such that if $x-y\in \mathbb{Q}$ then $f(x)-f(y)\in \mathbb{Q}$.   Can somebody give me some hint to solve this problem. I think that the functions are $f(x)=mx+b$ where $m\in\mathbb{Q}$.  Thanks! I have been attempting this problem for a while, it is an assignment problem so I don't want somebody to just post the answer, I'm just looking for hints.  Let $\mathfrak{u}(n,\mathbb{C})$ be the Lie algebra of strictly upper triangular $n\times n$ matrices over $\mathbb{C}$.  I am trying to show that $\mathfrak{u}(n,\mathbb{C})$ is a nilpotent Lie algebra for $n\geq 2$.  This is what I have looked at so far.  I have done some explicit calculations (I shall omit the bulk of them and just summarise below) for $n=2,3,4$ and have come up with some ideas.  Let $L=\mathfrak{u}(n, \mathbb{C})$.  If $n=2$,  $L^1 = [L, L] = &lt;0&gt;_{\mathbb{C}}$  So $L$ is nilpotent.  If $n=3$,  $L^1 = [L, L] = &lt;e_{13}&gt;_{\mathbb{C}}$  $L^2 = [L, L^1] = &lt;0&gt;_{\mathbb{C}} = \left\{ 0 \right\}$  So, $L$ is nilpotent.  If $n=3$  $L^1 = [L,L] = &lt;e_{13},e_{14},e_{24}&gt;_\mathbb{C}$  $L^2 = [L,L^1] = &lt;e_{14}&gt;_{\mathbb{C}}$  $L^3 = [L, L^2] = &lt;0&gt;_{\mathbb{C}} = \left\{ 0 \right\}$  So, $L$ is nilpotent.  So my hypothesis so far is that for an arbitrary $m\in\mathbb{N}$, $L^{m-1}=\{0\}$  My instinct is to do this by induction. My base case, $n=2$ has already been shown. Now I assume that $\mathfrak{u}(n,\mathbb{C})$ is nilpotent for $n=k$ ($k\in\mathbb{N}$) and consider the case for n=k+1.  However, I have no idea how to link these two cases together. I have read in Introduction to Lie Algebras and Representation Theory - J.E. Humphreys that $L^k$ should be spanned by basis vectors $e_{ij}$ where $j-i=k+1$ - however in my calculations for $L^1$, I obtain an $e_{14}$ which does not satisfy 4-1=2.  Am I missing something completely obvious? Or have I made a mistake somewhere? (I have checked my calculations numerous times, but cannot find any errors!)  Thanks,  Andy.