I have a db file in asset folder how can I use it. I must be able to read and write the database file  If I use      SqliteDatabase.open(context.openassest().open(filrname),null);   Exception db file not found    Don't check. The syntax I have done correctly in my lap see the content
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.
Any open subset of $\Bbb R$ is a countable union of disjoint open intervals I know that there exists at least one solution, because $ax \equiv b \mod m \implies ax - b = qm$  Rearranging terms gives $ax - qm = b$, and since $d | a$ and $d | m$, so $d | b$ it can be said that $b \equiv 0 \mod d$.  I implemented Euclid's extended algorithm and have been able to experimentally verify that the claim holds, but I do not see a pattern or how I can begin to show there are exactly $d$ solutions.  def euclid_extended(x, y, i=0):   if y == 0:     print("iteration {0} returns ({1}, {2}, {3}) - base case hit with ({4}, {5})".format(i, x, 1, 0, x, y))     return (x, 1, 0)   else:     (d, a, b) = euclid_extended(y, x % y, i + 1)     print("iteration {0}. ({4}, {5}) =&gt; ({1}, {2}, {3})".format(i, d, b, a - b * (x//y), x, y))     return (d, b, a - b * (x//y)) Is Con modifier × level added to HP every level-up? How can I prohibit putting figure after the footnote? I have pretty simple LaTeX code that has a lot of figure environments, and I see the figure is inserted after the footnote.   \documentclass[10pt, onepage]{article}  \usepackage{graphics,graphicx} \usepackage{hyperref}  ... dependent code\footnote{You should use at least JRE 1.5 or later, but I highly recommend using JRE 1.6 or later}, you can safely use the JRE 1.5 or later.   \begin{figure} \centering \includegraphics[width=0.5\textwidth]{pic_install/4_configure_build_path.png} \caption{Configuration menu} \label{fig:config_build} \end{figure} Let's get rid of the 10K flag queue are pretty cool... You get a birds-eye view of activity on the site, a &quot;dashboard&quot; view of what's happening. Some of the individual tools haven't scaled particularly well with Stack Overflow's growth, but the concept behind them is still sound: we trust you to enough to be a bee watcher now.  ...and then there's . What a let-down! Once upon a time, this queue contained spam and offensive flags, which one might reasonably assume were important enough to put in front of the more trusted members of the site. Re-flagging them brought them that much closer to deletion, while editing them offered salvation to some hapless author. Nowadays, it's a bunch of Not an Answer flags and a smattering of assorted cruft. 10K users can't even vote to delete these; only 20K users have that privilege. Re-flagging them does nothing but increase their priority in the moderator flag queue, where they frequently outrank more pressing issues;  has . Also, it's , and the behavior has diverged far enough from that of the moderator flag queue on which it is based that it has become an active hindrance to further development of the tooling there. Worst of all, we have  that's available to anyone with the editing privilege. It even has logic built in to prioritize answers likely to be deleted for users with . It's like we gave you a car for your 10th birthday, and then replaced it with a rusty bicycle when you turned 16. It was a nice idea, but it has outlived its usefulness. Proposed changes The /tools/flagged route goes away. Period. No replacement. The rest of the 10K tools stick around as informational pages. Not an Answer flags go into /review/low-quality, . Then we beef up the Low Quality review process to make better use of more experienced reviewers and solve this whole &quot;declined / helpful / disputed&quot; flag debate once and for all:  Effective # of reviews required == ReviewsRequired + # of applicable flags (where ReviewsRequired is 2 on Stack Overflow, 1 everywhere else). So 1 VLQ or NAA flag means EffectiveReviewsRequired=3. LQ tasks are not dequeued until one of the following conditions is met:  Post is edited from within review. Outcome: flags are marked &quot;helpful&quot; (current behavior). Post accumulates 3 Delete votes (can only happen when post scores &lt;= 0 and reviewers have &gt;= 20K rep). Outcome: post is deleted, flags are marked &quot;helpful&quot;. Task accumulates EffectiveReviewsRequired &quot;Looks Good&quot; reviews. Outcome: if the number of (Recommend)Delete reviews is &gt;= the number of Looks Good reviews, mark flags &quot;disputed&quot; and raise DisputedLowQuality mod flag. Otherwise, mark flags &quot;declined&quot;. Task accumulates 6* RecommendDelete + Delete reviews. Outcome: mark flags &quot;helpful&quot;. If the post scores &gt; 0 then raise DisputedLowQuality mod flag, else just delete post (current behavior).   As under the current system, flags on posts that've already completed one full review cycle without being deleted should skip /review and go directly into the mod queue.  End result  Flags get handled faster, more accurately, and with less wasted effort from 10K reviewers. Moderators are free to focus on situations that can't be handled by the community - the ! Developers are free to make enhancements to the moderator tooling without having to work around 10K user restrictions.  Questions Am I forgetting anything here? I haven't really spent much time in the 10K flag queue since back when it was filled with spam flags and therefore useful - is there a use-case that you depend on that would be lost with its removal? Post 'em below. *: on Stack Overflow, only . I have a string which is like this:  this is "a test"   I'm trying to write something in Python to split it up by space while ignoring spaces within quotes. The result I'm looking for is:  ['this','is','a test']   PS. I know you are going to ask "what happens if there are quotes within the quotes, well, in my application, that will never happen. It's really hard to get started on Stack Overflow I have been on Stack Overflow for some time.  It is an AMAZING resource and don't know if I would've got through the past 18 months without it.  I love it!  Problem is that I have "1" reputation.  All of my questions have already been asked and answered.  My "new user restrictions" mean: - I can't vote up answers that were helpful. - I can't comment on answers.  I sometimes have a question to ask one of the users that answered someone else's question but I can't.  This is hard!  How do I get a break?  Do I have to troll for a couple of days/weeks/months to answer enough questions in the hope someone votes some of them up just so I can do some basic functions?  Perhaps the number of site visits and length of membership could count for something? I have a background in QFT, GR and differential geometry at the level of a master student in theoretical physics. I would like to touch the area of CFT. I know the textbook of Philippe Di Francesco. It may be too big for the beginner like me. Are there some good introductory lectures or textbooks adapted to the needs of beginners? I'm running into trouble trying to mount a large iso:  dev@dev-OptiPlex-745:~$ sudo mount -o loop /home/dev/Hämtningar/matlab2011a_64.iso /cdrom mount: warning: /cdrom seems to be mounted read-only. dev@dev-OptiPlex-745:~$    Can you tell me how I should do it? Is there a simple method of parsing XML files in C#? If so, what? SQL Server 2016 memory optimised table: Precreated files constantly growing I have a memory optimised table in SQL Server 2016, with file durability enabled. The table is only 100MB. SQL Server is constantly creating new files on disk, which start off at a few hundred MB, but then grow constantly until the drive runs out of space then they clear down and the process starts again. The files are growing at about 900MB an hour. Running the SQL below shows that all the space is in Precreated Data - so it's not even actually storing large amounts of data, just allocating space to use later.  SELECT state_desc, file_type_desc, COUNT(*) AS [count],    SUM(file_size_in_bytes) / 1024 / 1024 AS [on-disk size MB]    FROM sys.dm_db_xtp_checkpoint_files   GROUP BY state, state_desc, file_type, file_type_desc   ORDER BY state, file_type     File growth on the file group is set to unlimited, so I'm assuming I can set a value on this and stop it growing, but I can't find anything to say why it's allocating so much space in the first place. The data in the table does change very rapidly (a lot of inserts and deletes as the data is constantly processed, but it the data that isn't Precreated never gets over 4GB.  Is there a setting in SQL Server that controls this file precreation? Is it safe to set a limit on the autogrowth for the file group? Let $f$ be an entire function such that $\mid f(z) \mid \leq A \mid z \mid$ for all $z$, where $A$ is a fixed number. Show that $f(z)=a_1z$, where $a_1$ is a complex constant. Can we have a red/status tag for "obsolete"? Given the changes that have been rolled out on Meta for the new close hold reasons, we've lost "too localized" here on meta.  However, "too localized" has a genuine use on meta (which is part change management system) to indicate those things which are truly obsolete (as evidenced by the text of the old close reason "refers to a specific point in time").  That said, there are things that are obsolete on meta, but we have no way of indicating that other than an "off topic" closure, which really sends the wrong message.  To mitigate that, I'd like a status-obsolete tag for meta sites which meta diamonds can apply to posts that have been made obsolete by other changes that were made to the system afterward. Proof of Divergence for a Sequence How should "do my homework" questions be closed? (Missing "demonstrate minimal understanding") Just recently,  question was posted. Here's the body of the question:     Write a function called highlight() that prompts the user for a string. Your code should ensure that the string is all lower case. Next, prompt the user for a smaller 'substring' of one or more characters. Then replace every occurrence of the substring in the first string with an upper case. Finally, report to the user how many changes were made (i.e., how many occurrences of the substring there were).      What would a script for this be?   This is basically a "do my homework for me" style question. In the past, I would have voted to close this question for lacking minimal understanding and moved on. However, it looks like this close reason was removed, and I'm having difficulty figuring out which alternative to use (if at all).  Here were some of the close reasons I was considering, and ultimately decided against since they didn't seem to precisely match:   Duplicate of    I sort of doubt there exists a precise duplicate of this question -- the question is a fairly specific request for some code. I could maybe link to a duplicate question that answers a part of the original (for example, checking if the string is lowercase), but it wouldn't answer every aspect of the problem. Problem that can't be reproduced/typographical error    This sort of matches, since it asks the user to produce a SSCCEE, but doesn't really match since there isn't even a problem to begin with (and closing a question because I couldn't "reproduce" a non-existent problem feels a bit silly to me) Unclear what you're asking    It's pretty obvious what the user is asking -- I could produce a 5 line script in about 20 seconds that precisely matches his spec. Too broad    The text for "Too broad" states that "There are either too many possible answers, or good answers would be too long for this format". This doesn't apply to this question -- once again, the answer I could give would be fairly short and would closely resemble solutions other people would give.   So, what should I do here? Am I misunderstanding how the close reasons should now be used? Should I use the "other" close reason and explain that the OP should have put in more effort? Should I simply downvote, perhaps leave a comment, and move on? Or is the new policy to embrace these kinds of questions and just post an answer? What does $\sum_{k=0}^\infty \frac{k}{2^k}$ converge to? This problem comes from another equation on another question (. I tried to split it in half but I found out that $$\sum_{k=0}^\infty \frac{k}{2^k}$$ can't be divided. Knowing that $$\sum_{k=0}^\infty x^k=\frac{1}{1-x}$$ I wrote that $$\sum_{k=0}^\infty \frac{k}{2^k}=\sum_{k=0}^\infty \left(\frac{\sqrt[k] k}{2}\right)^k=\frac{1}{1-\frac{\sqrt k}{2}}=\frac{2}{2-\sqrt[k] k}$$ But that's not what I wanted. Could anyone help me? Suppose $a_n \ge 0$ for all natural numbers $\Bbb{N}$ and $\sum{a_n}$ converges. Is it necessarily true that $\sum{(a_n)^2}$ converges?  I think yes.  Clearly as $a_n \ge 0$ it follows $(a_1+a_2+\dots+a_n)^2 \ge a_1^2+a_2^2+\dots+a_n^2 \ge 0$ and so $(\sum_{n=1}^{\infty}{a_n})^2 \ge \sum_{n=1}^{\infty}{a_n^2} \ge 0$.  As we are told $\sum{a_n}$ converges to say $L$ where $L$ is a real number it follows $L^2 \ge \sum_{n=1}^{\infty}{a_n^2} \ge 0$ and so therefore $\sum{(a_n)^2}$ converges.  Is this correct? I was working on a userscript today, which had a goal of displaying chat pings immediately at the main site. This would allow me to respond more quicker-like to chat pings.  However, I was met by this fearsome warrior:     Can we please set some decent header things? I want to be able to do this really bad. Alternative to Adobe Illustrator Can you recommend a good alternative to Adobe Illustrator?   I am learning vector based graphic design, but I am not ready to make such a large investment as to purchase a copy of Adobe Illustrator. Also, Illustrator might be a little more power than I need at the moment. I am using a Macintosh. Function on $[a,b]$ that satisfies a Hölder condition of order $\alpha > 1 $ is constant I want to show that if a function $f:[a,b]\rightarrow \mathbb R$ satisfies a Hölder condition of order $\alpha &gt; 1 $ then it is constant.  The way I think of it is as follows:  $$|f(x) - f(y)| &lt; K|x-y|^\alpha$$  $$\frac{|f(x) - f(y)|} {|x-y]}  &lt; K|x-y|^{\alpha -1}$$  $$\lim_{y\rightarrow x} \frac{|f(x) - f(y)|} {|x-y]} \le \lim_{y\rightarrow x}  K|x-y|^{\alpha -1} =0 $$ As the limit is $0$, we can remove the modulus, so we get:  $$\lim_{y\rightarrow x} \frac{f(x) - f(y)} {x-y} = 0$$ So $f$ is derivable and $f'(x) = 0$ for all $x$ in $[a,b]$. Note that the reason we can add the limit $y\rightarrow x$ is because $[a,b]$ is closed in $\mathbb R$.  However, the question gives as a hint using the mean value theorem. I am not sure why one should do that. You would first have to prove that $f$ is derivable in a similar manner to what I did, and then prove that $f$ is constant. Or is there a simpler way to do it and I am missing it?  Also please inform me of any mistakes I did in the proof (if any)/ Thank you!