I have not been able to find a working example in QT creator or gallery to use SQLite offline storage API for an Ubuntu touch application.
I'm working on a small game and i'd like to know how can i write/read a user settings file in ubuntu touch?
The migration is from the local environment to the production environment. The production environment has run some time and created a lot of articles.   In order to add new things to my site, I added a custom theme and installed CCK, Views and other modules in my local test environment. Now that the local test environment is finished, how do I migrate it to the production environment, without destroying the content of its database? Creating Two Executable Jars Using maven-assembly-plugin Solve for $x$ in the $80^\circ$-$80^\circ$-$20^\circ$ triangle I've been solving this for days but I still I couldn't solve this. Can I know how to solve $x$ ? This is something that has long bothered me, and I have asked a few physicists and chemists and never gotten a very satisfying answer. Why are particles charged? And I'm not asking (and this is the answer you often get) why some molecule might be negatively charged because the answer to that is simply is that there was one more negatively charged particle than positively charged particle. That doesn't answer my question, however, of why there are charged particles at all?  So, on a fundamental level, what makes one particle charged and another one neutral.  For instance, protons and neutrons have almost exactly the same mass, which I'm assuming that means they have very similar internal compositions, yet one is positively charged and the other neutral. What is going on that makes these particles different?  On a similar note, and I'd really like to know this, how is it that a proton and an electron have exactly equal and opposite charge, yet an electron is about 1000 times less massive than a proton?  I have particular trouble with this question because if the answer were something along the lines of "particle X which composes protons all have partial positive charges of n amount..." I would just ask why particle X has any charge and we'd be in the same predicament.  I'm sure there is a satisfactory answer to my question, I just can't find it and don't know what resources are reliable or detailed enough to be satisfactory. Torus and Elliptic curves In a conference on elliptic curves (an introduction to the subject), the speaker said that an elliptic curve (I.e. an equation of the form $y^2=x^3+ax+b $ where the RHS has distinct roots) is, in the complex space, a torus/Riemann surface of genus 1.  What is meant by that? Are we talking about a 2-dimensional manifold the 4D space? Preface: Every couple of days there comes a question of this type, which is easy to solve with sed, but takes time to explain. I'm writing this question and answer, so I can later refer to this generic solution and only explain the adaption for the specific case. Feel free to contribute.  I have files with variable definitions. Variables consist of uppercase letters or underscore _ and their values follow after the :=. The values can contain other variables. This is Gnom.def:  NAME:=Gnom FULL_NAME:=$FIRST_NAME $NAME FIRST_NAME:=Sman STREET:=Mainstreet 42 TOWN:=Nowhere BIRTHDAY:=May 1st, 1999   Then there is another file form.txt with a template form:  $NAME Full name: $FULL_NAME Address: $STREET in $TOWN Birthday: $BIRTHDAY Don't be confused by $NAMES   Now I want a script which replaces the variables (marked with $ and the identifier) in the form by the definitions in the other file, recursively, if necessary, so I get this text back:  Gnom Full name: Sman Gnom Address: Mainstreet 42 in Nowhere Birthday: May 1st, 1999 Don't be confused by $NAMES   The last line is to ensure that no substrings of variables get replaced accidentally. Does 10 heads in a row increase the chance of the next toss being a tail? I assume the following is true: assuming a fair coin, getting 10 heads in a row whilst tossing a coin does not increase the chance of the next coin toss being a tail, no matter what amount of probability and/or statistical jargon is tossed around (excuse the puns).   Assuming that is the case, my question is this: how the hell do I convince someone that is the case?   They are smart and educated but seem determined not to consider that I might be in the right on this (argument). Recently, my iPhone 5 was stolen, and while I have a new iPhone 6, I received a message from a number of someone claiming to be in possession of the device, with a new number.   All images, contacts, Outlook mail, you name it, are still on the device.  While I realize it's my fault for not having it connected to iCloud to wipe manually, is there anything I can do to have this sensitive information wiped from the device? Do I need a transit visa for a layover in the United Arab Emirates? Do I need a transit visa for a layover via airports in the UAE, such as Dubai International Airport or Abu Dhabi International Airport? If so, what are the requirements for such a visa? Can I get the transit visa on arrival? line segment joining two centers of circles is perpendicular to line segment joining two intersection point of the circles Slow SoapHttpClientProtocol constructor Is there a missing definite article before caliph in 'the group's leader, XYZ, as (the) caliph'? Centering vertically in table cell I'm new with LaTeX and I'm trying to make a table with the elements centered vertically and horizontally. I've searched for this question, it seems like most people were trying to do things a little more complicated than this, resulting in complicated answers I couldn't understand. The table below is already centered horizontally, but the elements are aligned to the top of the cells instead of the center. How do I fix this?      \begin{tabular}{*{5}{|c}|}         \hline         $p$ &amp; $q$ &amp; $p \land q$ &amp; $p \lor q$ &amp; $p \to q$\\         \hline         T &amp; T &amp; T &amp; T &amp; T\\         \hline         T &amp; F &amp; F &amp; T &amp; F\\         \hline         F &amp; T &amp; F &amp; T &amp; T\\         \hline         F &amp; F &amp; F &amp; F &amp; T\\         \hline     \end{tabular} This question is about an efficient way to compute principal components.   Many texts on linear PCA advocate using singular-value decomposition of the casewise data. That is, if we have data $\bf X$ and want to replace the variables (its columns) by principal components, we do SVD: $\bf X=USV'$, singular values (sq. roots of the eigenvalues) occupying the main diagonal of $\bf S$, right eigenvectors $\bf V$ are the orthogonal rotation matrix of axes-variables into axes-components, left eigenvectors $\bf U$ are like $\bf V$, only for cases. We can then compute component values as $ \bf C=XV=US$. Another way to do PCA of variables is via decomposition of $\bf R=X'X$ square matrix (i.e. $\bf R$  correlations or covariances etc., between the variables ). The decomposition may be eigen-decomposition or singular-value decomposition: with square symmetric positive semidefinite matrix, they will give the same result $\bf R=VLV'$ with eigenvalues as the diagonal of $\bf L$, and $\bf V$ as described earlier. Component values will be $\bf C=XV$.   Now, my question: if data $\bf X$ is a big matrix, and number of cases is (which is often a case) much greater than the number of variables, then way (1) is expected to be much slower than way (2), because way (1) applies a quite expensive algorithm (such as SVD) to a big matrix; it computes and stores huge matrix $\bf U$ which we really doesn't need in our case (the PCA of variables). If so, then why so many texbooks seem to advocate or just mention only way (1)? Maybe it is efficient and I'm missing something? At the end of the movie we are shown      a bowl with berries in it and Seneca Crane looked like he was locked in a room with them and was supposed to eat them. Did he eat them?   Why did that happen? Problem with option border of class standalone I tested a MWE given in question . Following the documentation (page 9) I used the class option border={left right bottom top} with left=right=top=0pt and bottom=20pt (20pt only to show the effect here).  With the version 2012/09/15 v1.1b of standalone and the following MWE I get no 20 pt margin at the bottom of my picture.  What is the problem?  MWE:  \documentclass[% % border=1pt   border={0pt 0pt 20pt 0pt} %left right bottom top ]{standalone}% http://ctan.org/pkg/standalone \begin{document} $2^5 = x_5 \times y^8$ \end{document} Prime dividing the binomial coefficients It is quite easy to show that for every prime $p$ and $0&lt;i&lt;p$ we have that $p$ divides the binomial coefficient $\large p\choose i$; one simply notes that in $\large \frac{p!}{i!(p-i)!}$ the numerator is divisible by $p$ whereas the denominator is not (since it is a product of numbers smaller than $p$ and $p$ is prime).  My problem is with generalizing this argument for $q=p^n$. I'm looking for the most elegant and simple way to prove that $p$ still divides $\large q\choose i$. Markdown + Mathjax => PDF I've used LaTeX a lot in the past, but now, when comparing with StackExchange's great , I find it tedious, for short documents (&lt; 2 pages), to have to use pure LaTeX. For a short document, instead of having 30 lines as introduction: \begin{document} \documentclass[11pt,a4paper]{article} \usepackage[frenchb]{babel} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts}  + &lt;lots of other things&gt; ...  I'd like to write my short document with MarkDown + Math, like on . Question: Is there an offline compiler such that compilemarkdown exercice.tex  would produce a PDF from this: #Title  Here is a *short document* including Markdown and Math, here is the equation:  $$f(x)=x^2$$  ___  Proof: ...   This is **bold**. I'm using pdfLatex (with --shell-escape option) and I had a problem of compilation with TexWorks that was successfully solved with the help of other post in this site: .  After correcting that error the code compiles smoothly but just displays the logarithmic grids, not the function. The gnuplot files are created in the right place, but the graphic doesn't come out in the PDF.  Code from :  \documentclass{article}  \usepackage{tikz} \usepackage{bodegraph}  \begin{document}  \begin{tikzpicture}[     gnuplot def/.append style={prefix={}}, % Fixed the issue (prefix was 'gnuplot/\jobname/' before) ] \begin{scope} \UnitedB \semilog{-1}{2}{-50}{60}  \BodeAmp{-1:1.35}{\POAmpAsymp{4}{2.0}+\IntAmp{1}}  \end{scope} \end{tikzpicture} \end{document}   Any clues? Best practice for Rails App to run a long task in the background? I have a Rails application that unfortunately after a request to a controller, has to do some crunching that takes awhile.  What are the best practices in Rails for providing feedback or progress on a long running task or request?  These controller methods usually last 60+ seconds.    I'm not concerned with the client side... I was planning on having an Ajax request every second or so and displaying a progress indicator.  I'm just not sure on the Rails best practice, do I create an additional controller?  Is there something clever I can do?  I want answers to focus on the server side using Rails only.  Thanks in advance for your help.  Edit:  If it matters, the http request are for PDFs.  I then have Rails in conjunction with Ruport generate these PDFs.  The problem is, these PDFs are very large and contain a lot of data.  Does it still make sense to use a background task?  Let's assume an average PDF takes about one minute to two minutes, will this make my Rails application unresponsive to any other server request during this time?  Edit 2:  Ok, after further investigation, it seems my Rails application is indeed unresponsive to any other HTTP requests after a request comes in for a large PDF.  So, I guess the question now becomes: What is the best threading/background mechanism to use?  It must be stable and maintained.  I'm very surprised Rails doesn't have something like this built in.  Edit 3:  I have read this page: .  I would love to read about various experiences with these tools.  Edit 4:  I'm using Passenger Phusion "modrails", if it matters.  Edit 5:  I'm using Windows Vista 64 bit for my development machine; however, my production machine is Ubuntu 8.04 LTS.  Should I consider switching to Linux for my development machine?  Will the solutions presented work on both?