I am trying to make an android application that requires a database (the database has only one table). How can I ship this database along with the android application?
If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.
Divergent infinite series $n!e^n/n^n$ - simpler proof of divergence? $$ \sum_{n=1}^\infty \frac{n!e^n}{n^n} $$ Where $e$ is Euler's number.  Recently on calculus class we were covering convergence tests and my group got stuck with this infinite series. Our calculus teacher told us that it diverges but he doesn't see any elementary way or simple test to prove it. He told us something about Euler's Gamma function and said that he knows it diverges because of Stirling's formula but this is not quite our level yet.  I tried to think about it myself but I established only that this  is some kind of an edge case. We could generalize the problem to series of $\frac{n!a^n}{n^n}$. Then, from the ratio test we know that it converges for $a &lt;e$ and diverges for $a&gt;e$. For $a=e$ the test is inconclusive. I've also tried to compare it with various divergent series, but nothing worked...  Does anybody have any idea for a simple solution? Finder windows just show screen artefacts On our Macbook Air (Mid-2011 11", OS X 10.9.5 Mavericks), starting a few days ago, every time we open Finder windows, the right side just shows screen artifacts/cheese. File Open dialogs in MS Word work fine - it is just the Finder windows with the problem.  Can someone help?  I have tried rebooting, and Verify Disk in Disk Utility. Neither helped. Maybe I should upgrade to El Capitan? But why would this start happening all of a sudden? Sequence of differentiable functions Let $f_n$ be a sequence of differentaible functions on $[0,1]$ to $\mathbb{R}$ converging uniformly to a function $f$ on $[0,1]$, Then    $f$ is differentiable and Riemann integrable there $f$ is uniformly continuous and R-integrable $f$ is continuous, need not be differentiable on $(0,1)$ and need not be R-integrable on $ [0,1]$, $f$ need not be continuous.   Well I think 2 is only correct statement  as every $f_n$ are differentiable on $[0,1]$ hence uniformly contnous, and as they converge uniformly to $f$ on $[0,1]$ so $f$ is uniformly continuous and every continuous function is rieman integrable..Am I correct? I have created the custom setting with the hierarchy type    I have added some fields to the custom settings  phone field is added to the custom settings  custom setting Name:Order_Configuration__c  Phone :12345 - one profile  phone:456798 - another profile   Is it possible to access the different values for different profiles in custom settings using apex trigger code How to read an already existing NgSpice raw file This has taken me a couple of days to solve. I have a set of NgSpice raw files that I would like to exploit so as to visualize the voltage distributions in different circuits. What is the python command to use or python package to import in order for me to achieve this. Note: I am a bit familiar with the PySpice python package, but from what I have read and understood it works when you use it to create your netlist and run it, by using the already stored variables in its memory. In my case however, raw files are already generated... Hope I was clear enough. URLs are linked despite being inside a code span Markdown source:  `http://google.com`  - `http://google.com`     - `http://google.com`   Rendered result:  http://google.com   http://google.com   http://google.com    Note that the third code span is a link. Adding a newline before the list item makes the link disappear. How to add CSS and JS files on node pages from theme's template.php I am trying to add JavaScript and CSS files to one node type page from my template.php file but it is not working.  Here is my template.php code:   &lt;?php // $Id: template.php,v 1.13 2010/12/14 01:04:27 dries Exp $  function mttheme_preprocess_html(&amp;$variables) {   $node = node_load(arg(1));   if ($node-&gt;type = 'sales_team_page') {     drupal_add_css('misc/jquery.fancybox-1.3.4.css');     drupal_add_js('misc/jquery.mousewheel-3.0.4.pack.js',       array('type' =&gt; 'file', 'scope' =&gt; 'header')     );     drupal_add_js('misc/jquery.fancybox-1.3.4.pack.js',       array('type' =&gt; 'file', 'scope' =&gt; 'header')     );     drupal_add_js('misc/jquery.fancybox-calls.js',       array('type' =&gt; 'file', 'scope' =&gt; 'header')     );   } }   Does anyone know why it is not working? Does walking fast prevent eggs hatching? I have a problem understanding the proof of Rencontres numbers (Derangements) I understand the whole concept of Rencontres numbers but I can't understand how to prove this equation  $$D_{n,0}=\left[\frac{n!}{e}\right]$$  where $[\cdot]$ denotes the rounding function (i.e., $[x]$ is the integer nearest to $x$). This equation that I wrote comes from solving the following recursion, but I don't understand how exactly the author calculated this recursion.  $$\begin {align*}  D_{n+2,0} &amp; =(n+1)(D_{n+1,0}+D_{n,0}) \\ D_{0,0} &amp; = 1 \\ D_{1,0} &amp; = 0  \end {align*} $$ Solving Keplerian two-body problem numerically? I'm trying to solve the two-body problem numerically, setting up G, m1 and m2 =1.0.  The masses are placed at the positions -10 and 10 respectively along the x-axis and gave them both 0 on the y-axis. I am having some real issue with the initial conditions fitting for a keplerian orbit with a given eccentricity (e=0.9)! Also how would the initial condition change for different mass ratios? 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? Running 64 bit programs on a 32 bit system Admob SMART_BANNER size I've always managed my iPhone/iPad/iPod Manually, I recently updated to iTunes 11 and now I can see no way to get my music onto my device.  I used to be able to just drag songs from my library to my device, now there is seemingly no way to do this.  I can view the music on my device by clicking on it on the top right corner of iTunes, but I can't seem to get to a state where I can drag music from my computer onto my device.  I'm using iTunes 11.0.1.12 for Windows if that makes a difference. CPU on Ubuntu running high In the terminal I used "top" to check the processes and how much of the CPU was being used as I thought max was 100%, so I restored 292,000 photos with recoverjpeg on my sda1 HDD, I opened the folder and the Nautalis is  fluctuating between 130% and 170% , should I close the program and am I at risk of my gpu locking up ? Trying to understand what happens with a brokerage firm's customers when it goes bankrupt (case of study: Lehman Brothers) I'm trying to understand how secure it is to own mutual funds/ETFs, not in terms of market volatility etc., but in terms of judicial security (i.e. what happens to your holdings if the firm goes bankrupt). To understand it, I have read this article about the bankruptcy of Lehman Brothers:  Note: From now on, I'm always referring to investors who own funds/ETFs managed by Lehman Brothers, not by investors who invested in Lehman Brothers or subprime mortgages (e.g. S&amp;P 500 ETF investors). From the above article, what I have understood is that the funds/ETFs managed by Lehman Bros. were shifted to other brokerage firms to be managed by them. Is this what actually happened? Still, what happens with the investors if, hypothetically, no brokerage firm in the world wants to manage these financial products? To prove in a Group Left identity and left inverse implies right identity and right inverse Let $G$ be a nonempty set closed under an associative product, which in addition satisfies :      A. There exists an $e$ in $G$ such that $a \cdot e=a$ for all $a \in G$.      B. Given $a \in G$, there exists an element $y(a) \in G$ such that $a \cdot y(a) =e$.      Prove that $G$ must be a group under this product.   Attempt -Since Associativity is given and Closure also, also the right identity and right inverse is given .So i just have to prove left identity and left inverse.  Now as $ae=a$ post multiplying by a, $aea=aa$. Now pre multiply by a^{-1} I get hence $ea=a$. And doing same process for inverse Is this Right? I was pondering a bit more about  question regarding being able to &quot;omit&quot; the base case in a proof by strong induction due to vacuous truth. The post states:  Strong induction proves a sequence of statements $P(0), P(1), …$ by proving the implication &quot;If $P(m)$ is true for all nonnegative integers $m$ less than $n$, then $P(n)$ is true.&quot; for every nonnegative integer $n$. There is no need for a separate base case, because the $n=0$ instance of the implication is the base case, vacuously.  However, if we consider $n=0$, we would have that the statement is vacuously true, which I would take to mean that the implication is true regardless of the validity of $P(0)$. However, clearly it's necessary for $P(0)$ to hold for an induction proof to be valid. So I'm confused on how, by omitting the base case, $n=0$ isn't just a tautology, making the implication true regardless of whether $P(0)$ actually holds. Unable to understand the syntax of the command find The find command seems to differ from other Unix commands.  Why is there the empty curly brackets and a backward flash at the end of the following command?  find * -perm 777 -exec chmod 770 {} \;   I found one reason for the curly brackets but not for the backward flash.   The curly brackets are apparently for the path     Same as -exec, except that ``{}'' is   replaced with as many pathnames as   possible for each invocation of   utility Raise bounty on question