I created a project on Eclipse with SQLite Database. It is a data entry system in which the user enters the login credentials and if the credentials match with the data stored in the database he is allowed to login and insert or update information.  This is working perfectly fine with the Emulator device, but when I transferred the .apk file to my Android mobile, it throws an exception "No such table". I want to know how the database which is present on Eclipse be transferred to my phone along with the apk file. Thanks in advance. PS: I am using DB Browser for SQLite to create tables.
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.
What is the physical significance of the imaginary part when plane waves are represented as $e^{i(kx-\omega t)}$? I've read that plane wave equations can be represented in various forms, like sine or cosine curves, etc. What is the part of the imaginary unit $i$ when plane waves are represented in the form $$f(x) = Ae^{i (kx - \omega t)},$$ using complex exponentials? As a new user without much rep, what should I do if someone else has already asked a question I have, but it has no answers? Suppose you had a question, and you really want a good answer that would solve your problem, but noticed it was already asked by someone else. However, no one has posted any answers. The question is technically considered "unanswered", but a lot of users who would otherwise bother to give a correct answer probably skip the question completely for some reason.  What should I do in this case?  One idea is to ask a new, completely identical question, in the hope users will notice the new question and post an answer there. But would that go against SE policy?     Note: This is adapted from , but that doesn't cover the case where the original question is unanswered. Also, it is not a duplicate of , as that question asks about getting attention for one's own questions, while this one and the one linked above ask about getting an answer if someone else has already posted the same thing. Error on Ubuntu boot up - "recovering journal" Trying to figure out what this means:    I got into the GRUB menu, chose Advanced Options, boot in recovery mode, login as root, and I did:  root@xps:~# sudo fsck -f / fsck from util-linux 2.27.1 e2fsck 1.42.13 (17-May-2015) /dev/nvme0n1p2 is mounted. e2fsck: Cannot continue, aborting.   Coincidentally, I am also seeing this fuzzy rainbow thing on the outside of desktop windows:    But now the machine won't even boot up at all. Access parent's parent from javascript object I wonder is it legal to register a domain name that contains a company name. For example cococola.cc (considering that this domain name is available). Can I buy and use any domain names that contain a name of a trademark? Is $\exists x(x=a)$ a valid formula in first order logic with equality? Under , is $\exists x(x=a)$ true in every interpretation in first order logic (FOL) with equality? If so, could $\exists x(x=a)$ be considered a tautology? This question was motivated by  which was closed for lacking clarity. Here I have attempted to add that clarity myself so that the same question can be useful to others who are wondering a similar thing. This is a self answer question. Comments saying "thank you" remind OP to accept answer How can I upload files asynchronously with jQuery? I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); }); &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"&gt;&lt;/script&gt; &lt;span&gt;File&lt;/span&gt; &lt;input type="file" id="file" name="file" size="10"/&gt; &lt;input id="uploadbutton" type="button" value="Upload"/&gt;     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem? So I had  closed within eight minutes of asking.  Is this a little fast? Not only do I object to the reason it was closed (not a real question, come on I'm asking for decent books!), but it was closed insanely fast. Should there be a grace period for questions (diamond mods exempt if so) before they can be voted on to be closed? How to contact professors for PhD vacancies? I know many master's students who get an opportunity to talk to their potential PhD advisors well before applying. In most cases this opportunity is available by the professors with whom they worked for their master's. Moreover, there are many others who establish a contact with professors by mailing them and enquiring about PhD vacancies.   My questions are:   How important is knowing an advisor prior to applying for PhD?  Does an email interaction play a vital role when the department makes its admit decisions? If email contact is important, can a student send out mails to 2-3 professors (working in the same area) in case one of them does not bother to reply? To sum up, is applying of any use (especially in top universities) when you have no contacts and only your credentials to bank on? Damage reduction and damage resistance: how to calculate? Assume a character has both damage reduction and damage resistance vs an incoming attack.  One example of damage reduction is the Heavy Armor Master feat:     While you are wearing heavy armor, bludgeoning, piercing, and slashing damage that you take from non magical weapons is reduced by 3.   One example of damage resistance is the blade ward cantrip:     You extend your hand and trace a sigil of warding in the air. Until the end of your next turn, you have resistance against bludgeoning, piercing, and slashing damage dealt by weapon attacks.    Let's assume a character with both effects above is hit by a nonmagical weapon attack dealing slashing damage. The attack deals 10 damage. What happens:   Damage reduction applies reducing damage to 7, then damage resistance (rounds down). Character takes 3 damage. Damage resistance applies, halving to 5, then damage reduction takes it to 2 damage. Enable or check Chatter Feed Tracking programatically Can a character in the middle of a move action alter his movement based on a change in his surroundings? For example:      A player (speed 6) moves two squares towards a human bandit (pg. 162 MM) becoming adjacent to him, then proceeds to move around him to the right, provoking an opportunity attack. The bandit hits with his basic melee attack (+4 vs. AC; 1d8+1 damage, and the human bandit shifts 1 square), shifting one square to the left immediately.    This free shift makes it so that the PC would no longer flank the bandit at the END of his move. Can the player adjust his remaining three squares of movement so that he can once again flank the now-shifted bandit, or does he have to stick with his earlier movement designation?  This question boils down to: Is movement counted as you go, or do you say, "I am moving to here, it is within my range, and on the way to my destination 'blah' happens?" Can you ready an action for "immediately before my next turn"? ls -la symbolics... what does that last symbol mean? problems installing mathtools There have been a few questions regarding installing this package in the past, but they now seem to be out of date. I'm using MiKTeX 2.9 and TexMaker. When I try \usepackage{mathtools} in TexMaker it will try to install the package for me but will fail. I took the advice given in this thread:   As suggested I tried installing the mh package using the MiKTeX Package Manager, unfortunately I get the "unknown archive size" error, which I have read means that the package no longer exists. Another thread (lost the link) said you can use the MiKTeX Package Manager to directly install mathtools, however I do not see mathtools listed anywhere in the MiKTeX Package Manager...   So I ask, is the package under a different name? Are there any other ways to install this package? Pacman option to assume "yes" to every question? How to fix the MBR for Windows 7? I have installed Ubuntu as dualboot with Windows 7. Now I'm no longer using Ubuntu so i removed the Ubuntu partition and added the unallocated space to my Windows 7 partition. But after I restart my computer it goes directly to the error:   error: unknown filesystem grub rescue &gt;   I don't have the original Windows CD to fix the MBR. Is there a way to fix this error without using the Windows CD? Expected number of games played in a game with 'win by two' rule. Calvin and Hobbes play a match consisting of a series of games, where Calvin has probability p of winning each game (independently). They play with a “win by two”” rule: the first player to win two games more than his opponent wins the match. What is the expected number of games played? My attempt: I use Markov chains. Let $S$ denote that starting state, $W$ and $L$ denote the states where Calvin and Hobbes win respectively. Then, I have $$\mu_S = 1+ p\mu_W+q\mu_L $$ $$\mu_W = 1+ q\mu_S $$ $$\mu_L = 1+ p\mu_S $$ where $\mu_j$ denote the expected number of games from state $j$. Solving the system, I get the solution $\mu_S = \frac{2}{1-2pq}$ which I think is correct. I however would like to know how to approach it with geometric distribution instead of Markov chains. I read one solution where the number of games is given as $1+\text{Geom}(p^2+q^2)$ but I do not understand it. My understanding is that for the game to stop, the required probability is $p^2 + q^2$ since this is the probability that either Calvin or Hobbes win two games in a row. How to use this information in a Geometric random variable? Thanks. Integral of $ 1 \, / \, (1 + a \, \cos(x) )$