ERROR in sqlite database connectivity
What is a NullPointerException, and how do I fix it?
How to arrive at $\int_{0}^{1} f^3(x) \, dx < (\int_{0}^{1} f(x) \, dx)^2$? Define $f : [0,1] \to \mathbb{R} $ differentiable satisfying $f(0)=0$ and $0&lt;f'(x)&lt;1$. Prove:  $\displaystyle\int_{0}^{1} f^3(x) \, dx &lt; \left(\displaystyle\int_{0}^{1} f(x) \, dx\right)^2$ I found the following answer,  Define $F(x)=\displaystyle\int_{0}^{x} f^3(t) \, dt - \left(\displaystyle\int_{0}^{x} f(t) \, dt\right)^2$ We have $$F'(x)=f^3(x)-2 \left(\displaystyle\int_{0}^{x} f(t) \, dt\right)f(x)=f(x)\left[f^2(x)-2 \left(\displaystyle\int_{0}^{x} f(t) \, dt\right)\right]$$ and $$\left[f^2(x)-2 \left(\displaystyle\int_{0}^{x} f(t) \, dt\right)\right]'=2f(x)\left[f'(x)-1\right]$$ from which we can arrive at the conclusion.  But I felt a little confused. In the past I usually proved the inequality by classical inequalities and something like Taylor expansion to use the condition about derivative. But this answer is little out of my expectation. Do we have other proofs or ideas to arrive at $\displaystyle\int_{0}^{1} f^3(x) \, dx &lt; \left(\displaystyle\int_{0}^{1} f(x) \, dx\right)^2$? And other thoughts about solving these types of issues? I think when we talk about $\left(\displaystyle\int_{0}^{1} f(x) \, dx\right)^2 &gt;\ldots \,$ it's a little difficult to deal with. I don't quite know what tools to use. WHERE IN (array of IDs) I have webservice which is passed an array of ints. I'd like to do the select statement as follows but keep getting errors. Do I need to change the array to a string?  [WebMethod] public MiniEvent[] getAdminEvents(int buildingID, DateTime startDate) {         command.CommandText = @"SELECT id,                             startDateTime, endDateTime From                             tb_bookings WHERE buildingID IN                             (@buildingIDs) AND startDateTime &lt;=                             @fromDate";      SqlParameter buildID = new SqlParameter("@buildingIDs", buildingIDs); } I have a 8 GB pendrive. I used to write raw data into the pendrive (without creating filesystem) using the dd command.    Today, when I inserted the pen drive, the I am unable to write anything on to it.  When I open gparted it is showing the total space on the pen drive as 500 MB. I am unable to create a new partition table or a partition on the pen drive now.   Here is the fdisk -l output.   Disk /dev/sdb: 0 MB, 512000 bytes 255 heads, 63 sectors/track, 0 cylinders, total 1000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00095df6   What's wrong with the pen drive? How can I recover the lost space?   Device Boot      Start         End      Blocks   Id  System   When I open gnome-disks, it shows the total space as 8 GB but when I try to create a new partition using it, it shows the following error:  Error creating partition on /dev/sdb: Command-line parted --align optimal --script "/dev/sdb" "mkpart primary ext2 1MiB 7969177599b"' exited with non-zero exit status 1: Error: The location 7969177599b is outside of the device /dev/sdb.  (udisks-error-quark, 0) I am having a lot of trouble with these series questions. Up until this point, I had relatively little trouble with all the questions in the book. These seem to require knowledge about approximations of functions and other external experience-based knowledge, which I just don't have yet.  Determine convergence or divergence of the given series. In the case of convergence, determine whether the series converges absolutely or conditionally.  $$\sum_{n=1}^\infty (-1)^n\left[e-\left(1+\frac 1 n \right)^n\right]$$  It's easy to see that  $$\lim_{n\to\infty}\left[e-\left(1+\frac 1 n\right)^n\right]=0$$  however, in order to apply Leibniz's Rule and show conditional convergence I need to show that the sequence is monotonically decreasing. This doesn't seem doable with straight inequalities, so I tried taking the derivative, which just resulted in an uninterpretable mess. This doesn't even begin to address the question of absolute convergence/divergence.  There are 54 of these questions... I must be missing something really fundamental if they all take this long. In Windows there’re perhaps only a couple of important folders (by important I mean important in my logical picture of the Windows file system) in the installation drive (in my case C:\). Namely Program Files and Windows. I simply stay away from Windows folder and the “add remove program files” is good enough to handle the program files folder of Windows. Of course there’s a folder named Users where the users (who are not admins) can access only their folders.  Thus there’s a clear picture at some level in my mind of the Windows file system. In Ubuntu, when I reach the location /, there’s a huge list of folders, most of which I have no clue as to what they contain. The /bin folder seems to be the equivalent of the Windows folder in windows. The /usr folder seems like it’s the equivalent of the Users folder in Windows. But even the /home folder looks like it can fit the bill.  Please understand that I do understand, that Ubuntu (Linux) has a different character than that of Windows, i.e., there need not be exact equivalent of Windows functions, in Ubuntu. All I am looking for is a bit more clearer picture of the Ubuntu file system.   This question is a part of a bigger question which I am splitting up to make it more answerable. The original question can be found here: Is there local file manipulation that's been done with JavaScript? I'm looking for a solution that can be accomplished with no install footprint like requiring .  Specifically, I'd like to read the contents from a file and write those contents to another file. At this point I'm not worried about gaining permissions and am just assuming I already have full permissions to these files. Correct formula for LED current-limiting resistor? Windows 7 / 8 stop modal dialogue flash on parent focus Is there some setting in Windows where I can change the default behavior that causes the border and title of a modal dialogue box to flash like 6 or 7 times when I click on the parent window?  Simply focusing it would be plenty to let me know what I did was wrong.   I don't feel the need for all the sirens and bull horns and strobe lights to let me know I clicked in the wrong place. I came across a phrase for a type of question which is designed to discover someone's religious background, particularly in the context of sectarianism and divided societies but can't for the life of me remember it.   For example, if you are in Scotland and I ask you what football team you support, that may reveal your religion. Or in N.Ireland, if I ask what school you attend, likewise that may do the same.  It's like a 'veiled question' only that's not the term I'm looking for. Any help appreciated.  I've a feeling that the second part of the phrase is (question) as in, a INSERT TERM question, but not 100% sure. future or present with when I just would like to know if this sentence would be grammatically correct and in which cases should I use it:  I don't know when he is back instead of he will be back . I know the rule with when "no will" in most cases but we can say" please let me know when it will be available or when it is available"  If that's not correct let me know why please Auto revision summary has wrong plural: "added 1 characters in body" As seen at:           Update: I'm 101% sure the down votes were due to the lack of free hands.    Update 2: likes me, like me not, like me, likes me not... yeah ! Number of isosceles triangle. Why is there no 32 bit ISO for the new Ubuntu 18.04? Why does $PSL(2,\mathbb C)\cong PGL(2,\mathbb C)$ but $PSL(2,\mathbb R) \not\cong PGL(2,\mathbb R)$? Why does $PSL(2,\mathbb C)\cong PGL(2,\mathbb C)$ but $PSL(2,\mathbb R) \not\cong PGL(2,\mathbb R)$? Forcing SSL and www in .htaccess I'm looking for a way to force SSL and www.  I've been able to force both separately but together I keep running into redirection issues. The following code works when handling a URL in this format: http://example.com and properly redirects to https://www.example.com but when the incoming URL is https://example.com it will not forward to https://www.example.com - Any suggestions?  EDIT: it should also send http://www.example.com to https://www.example.com.  RewriteCond %{REMOTE_ADDR} !127\.0\.0\.0 RewriteCond %{SERVER_PORT} 80 RewriteCond %{HTTP_HOST} !^www.example\.com$ RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] Reverse (parse the output) of Arrays.toString(int[]) Solve $x^2+5x+6 \equiv 187 \mod 187$ Solution $$x^2+5x+6 \equiv 187 \mod 187$$ $$ (x+\frac{5}{2})^2 \equiv \frac{1}{4}$$ $$ 4(x+\frac{5}{2})^2 \equiv 1$$ $$ y:= x+\frac{5}{2} $$ $$ 4y^2 \equiv 1 \mod 11 \wedge 4y^2 \equiv 1 \mod 17  $$ $$ ( 2y \equiv 1 \mod 11 \vee 2y \equiv 10 \mod 11 ) \wedge ( 2y \equiv 1 \mod 17  \vee 2y \equiv 13 \mod 17)  $$ $$ ( y \equiv 6 \mod 11 \vee y \equiv 5 \mod 11 ) \wedge ( y \equiv 9 \mod 17  \vee y \equiv 15 \mod 17)  $$ Combining that from CRT I got: $$ y \in \left\{49, 60,83,94 \right\} $$ and for example: $$ x+\frac{5}{2}  \equiv 94 \mod 187$$ $$ 2x  \equiv 183 \mod 187$$ some calculus and get... $$x \equiv 185 $$ And the same thing for each other case. Question Is there any faster (or smarter) way to solve equations like that? What is the usage of Zero Ohm & MiliOhm Resistor? I am new to PCB design and I noticed that some schematics use 0Ω or 100mΩ resistors. What is their purpose and why do we need to use them in our PCB design?  Normally if we wish to probe how much current the load is taking, we put a jumper pin across the PCB trace (then measure current across the pin using a multimeter). Adding resistors for this purpose seems like it would waste a lot of PCB real-estate. Is this the sole reason why 100mΩ resistors are being placed (since I = V/0.1Ω) instead of a jumper pin?   If so, is there any consideration we should take when placing such a mΩ resistor on board so it doesn't affect the signal or behaviour of the circuit? How can I define a custom listing environment? I am trying to define an enviroment for a specific programming language, F#. Here's my code:  \definecolor{bluekeywords}{rgb}{0.13,0.13,1} \definecolor{greencomments}{rgb}{0,0.5,0} \definecolor{turqusnumbers}{rgb}{0.17,0.57,0.69} \definecolor{redstrings}{rgb}{0.5,0,0}  \lstdefinelanguage{FSharp}     {morekeywords={let, new, match, with, rec, open, module, namespace, type, of, member, and, for, in, do, begin, end, fun, function, try, mutable, if, then, else},     keywordstyle=\color{bluekeywords},     sensitive=false,     morecomment=[l][\color{greencomments}]{///},     morecomment=[l][\color{greencomments}]{//},     morecomment=[s][\color{greencomments}]{{(*}{*)}},     morestring=[b]",     stringstyle=\color{redstrings}     }  \newenvironment{fslisting}   {     \lstset{         language=FSharp,         basicstyle=\ttfamily,         breaklines=true,         columns=fullflexible}     \begin{lstlisting}   }   {     \end{lstlisting}   }   Then I'm trying to use it as such:  \begin{fslisting} type 'a Process = 'a Signal IObservable \end{fslisting}   But it doesn't work. The output log says that the listing is not terminated - or is terminated by the document. So the rest of the document is also formatted as a listing, which is of course not the intention.  What am I doing wrong here? Best way to draw matchstick pictures I want to draw various matchstick pictures like this:    or like this    or other figures from:   I want to use TikZ for this and have two questions about this:   How do I get the path decoration with the matchsticks? What's the (syntactically) easiest way to draw pictures like this or how would a TikZ expert do this (to be flexible enough to draw such kind of figures but to have an easy syntax)?