I am trying to convert a string into time format. As I read here on stackoverflow, the discussion of converting a string into time format. The function strptime() has been used for the same. I am also using the strptime() in my program in C, in windows. I tried to copy the open source strptime code from the following link in my program, but there are too many headerfiles missing. I created those headerfiles too, but still the code is not working and giving many warnings.  Please help.    Thanks much.
Is there a good equivalent implementation of strptime() available for Windows?  Unfortunately, this POSIX function does not appear to be available.   - summary: it converts a text string such as "MM-DD-YYYY HH:MM:SS" into a tm struct, the opposite of strftime().
What is a StackOverflowError, what causes it, and how should I deal with them? Proof of an inequality by induction: $(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + x_1 + x_2 + ... + x_n$ Let $n \in \mathbb N^+$. Show that if $x_1, x_2, ... , x_n$ are $n$ real numbers such that $-1 \le x_i \le 0$ for each $1 \le i \le n$, then $$(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + x_1 + x_2 + ... + x_n$$  I am using a proof by induction, but I am unable to complete it. I would appreciate any tips on how I could finish the proof.   Incomplete Proof Let $P(n)$ be the proposition that $(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + \sum_{i = 1} ^ n x_i$. When $n = 1$, LHS = RHS = $1 + x_i$. Clearly $1 + x_i \ge 1 + x_i$ and so $P(1)$ is true. Assume that $P(k)$ is true, i.e. $(1 + x_1)(1 + x_2)...(1 + x_k) \ge 1 + \sum_{i=1}^k x_i$. Case 1 Suppose $x_{k + 1}  = -1$. Then $1 + x_{k + 1} = 0$, hence LHS = $(1 + x_1)(1 + x_2)...(1 + x_k)(1 + x_{k+1}) = 0$. RHS = $1 + x_1 + x_2 + ... + x_k - 1 = x_1 + x_2 + ... + x_k$ which is always nonpositive since each $x_i$ is nonpositive. Hence RHS $\le 0$ and so LHS $\ge$ RHS. Case 2 Suppose $x_{k+1} = 0$. Then $1 + x_{k+1} = 1$, hence multiplying it to LHS does not change anything. Also, adding $x_{k+1}$ to RHS does not change anything. Therefore, LHS $\ge$ RHS still holds. Case 3 Suppose $-1 &lt; x_{k+1} &lt; 0$. Then $0 &lt; 1 + x_{k+1} &lt; 1$. Adding $x_{k+1}$ to RHS makes the RHS smaller since $x_{k+1}$ is negative. If LHS $= 0$, then multiplying $1 + x_{k+1}$ to LHS does not change anything, and so LHS $\ge$ RHS holds. If LHS > $0$, then multiplying $1 + x_{k+1}$ to LHS makes the LHS smaller since $0 &lt; 1 + x_{k+1} &lt; 1$. In this case LHS $\ge$ RHS does not necessarily hold? ... how to read xml file from url using php TeXnicCenter & Adobe Reader DC How to configure TeXnicCenter to work with Adobe Reader DC? When I building and view current file .tex the following error "Can not execute the command" shows up and the PDF is not generated.    If there are any related post, could help. Thanks a lot! How did Harry, Ron and Hermione buy presents for each other? I have been re-reading the Harry Potter books again and I noticed that Harry, Ron and Hermione have been giving each other Christmas presents each year at Hogwarts. How have they been able to buy each other presents if they are not allowed to go out of Hogwarts?   From their third year on they could visit the village and buy presents there, but what about the first two years? Did they give their personal belongings? Or did they just happen to have boxes of chocolates or books to give each other? Console flashes on launching, then closes (ms-windows) Where does gravitational waves' energy go? What is a glue record? This is a  about DNS glue records.   What exactly (but briefly) is a DNS glue record?  Why are they needed and how do they work? Let $f: \mathbb R^2 \to \mathbb R$ defined as   $f(x,y)=(x^2+y^2)\sin(\dfrac{1}{\sqrt{x^2+y^2}})$ if $(x,y) \neq (0,0)$, $f(x,y)=(0,0)$ if $(x,y)=(0,0)$  Prove that $f$ is differentiable at $(0,0)$ but that the partial derivatives of $f$ are not continuous at the origin.  The attempt at a solution:  I had some problems at the first part of the exercise:  I've calculated $\dfrac{\partial f}{\partial x}(0,0)$ and $\dfrac{\partial f}{\partial y}(0,0)$, both exist and are equal to $1$.  So, to prove $f$ is differentiable at the origin, I have to show that   $\lim_{(x,y) \to (0,0)} \dfrac{|f(x,y)-(f(0,0)+&lt;\nabla f(0,0),(x,y)&gt;)|}{\|(x,y)\|}=0$ But $\lim_{(x,y) \to (0,0)} \dfrac{|f(x,y)-(f(0,0)+&lt;\nabla f(0,0),(x,y)&gt;)|}{\|(x,y)\|}$ equals  $\lim_{(x,y) \to (0,0)} \dfrac{|(x^2+y^2)\sin(\dfrac{1}{\sqrt{x^2+y^2}})-(x+y)|}{\|(x,y)\|}$. I don't know how to show this limit equals $0$.  For the second part (I've only analyzed $\dfrac{\partial f}{\partial x}$ since both cases are the same), what I did was try to show that $\lim_{(x,y) \to (0,0)} \dfrac{\partial f}{\partial x}(x,y) \neq \dfrac{\partial f}{\partial x}(0,0)$   I thought of considering the curve $\phi(t)=(t,0)$, so   $\lim_{t \to 0} (f\circ \phi)(t)=\lim_{t \to 0} 2t\sin(|t|^{-1})-\dfrac{t\cos(|t|^{-1})}{|t|^{-1}}$. But $\lim_{t \to 0^{+}} \dfrac{t\cos(|t|^{-1})}{|t|^{-1}}=\lim_{t \to 0^{+}} \cos(\dfrac{1}{t})$ and this limit doesn't exist, so the original limit doesn't exist. This shows the partial derivative with respect to $x$ at the point $(0,0)$ is not continuous.   I would appreciate if someone could help me to finish the first part and tell me if what I did in the second part of the problem is correct. How do you round a number to two decimal places in C#? I have a bash script that makes a cURL request and writes the output to a file called resp.txt.  I need to create an exclusive lock so that I can write to that file and not worry about multiple users running the script and editing the text file at the same time. Here is the code that I expect to lock the file, perform the request, and write to the text file: ( flock -e 200 curl 'someurl' -H 'someHeader' &gt; resp.txt ) 200&gt;/home/user/ITS/resp.txt  Is this the correct way to go about this?  My actual script is a bit longer than this, but it seems to break when I add the flock syntax to the bash script. If someone could explain how these file descriptors work and let me know if I am locking the file correctly that would be awesome! Accelerating particles to speeds infinitesimally close to the speed of light? How do you test that a Python function throws an exception? How does one write a unittest that fails only if a function doesn't throw an expected exception? Looks like there is something wrong with reputation calculation:        +2*5 -6*2 = -2...   why there is +6 in reputation popup?  As @Catija said in comment calculation is OK in the profile:        Perhaps the issue is in the top-bar. Sum of First $n$ Squares Equals $\frac{n(n+1)(2n+1)}{6}$ I have a Java bean like this:  class Person {   int age;   String name; }   I'd like to iterate over a collection of these beans in a JSP, showing each person in a HTML table row, and in the last row of the table I'd like to show the total of all the ages.  The code to generate the table rows will look something like this:  &lt;c:forEach var="person" items="${personList}"&gt;   &lt;tr&gt;&lt;td&gt;${person.name}&lt;td&gt;&lt;td&gt;${person.age}&lt;/td&gt;&lt;/tr&gt; &lt;/c:forEach&gt;   However, I'm struggling to find a way to calculate the age total that will be shown in the final row without resorting to scriptlet code, any suggestions? Get files in a directory sorted by last modified? If every polynomial of degree 2 is reducible then $K$ is algebraically closed? Is there a free or open source library to read Excel files (.xls) directly from a C# program?   It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited) file, but I'd like to eliminate the manual step. I just upgraded linux-firmware package and after that I used $ sudo update-initramfs -u -k all but I got some errors:  $ sudo update-initramfs -u -k all [sudo] password for piotrek:  update-initramfs: Generating /boot/initrd.img-4.4.0-34-generic Warning: No support for locale: en_US.utf8 update-initramfs: Generating /boot/initrd.img-4.4.0-31-generic Warning: No support for locale: en_US.utf8 update-initramfs: Generating /boot/initrd.img-4.4.0-13-generic WARNING: missing /lib/modules/4.4.0-13-generic Ensure all necessary drivers are built into the linux image! depmod: ERROR: could not open directory /lib/modules/4.4.0-13-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory Warning: No support for locale: en_US.utf8 depmod: WARNING: could not open /var/tmp/mkinitramfs_LJbkti/lib/modules/4.4.0-13-generic/modules.order: No such file or directory depmod: WARNING: could not open /var/tmp/mkinitramfs_LJbkti/lib/modules/4.4.0-13-generic/modules.builtin: No such file or directory   I'm sure I don't have kernel 4.4.0-13. I might have had it some time ago but removed it:   $ apt list --installed | grep linux-  WARNING: apt does not have a stable CLI interface. Use with caution in scripts.  linux-base/xenial,xenial,now 4.0ubuntu1 all [installed,automatic] linux-firmware/now 1.159 all [installed,local] linux-headers-4.4.0-31/xenial-updates,xenial-updates,xenial-security,xenial-security,now 4.4.0-31.50 all [installed] linux-headers-4.4.0-31-generic/xenial-updates,xenial-security,now 4.4.0-31.50 amd64 [installed] linux-headers-4.4.0-34/xenial-updates,xenial-updates,xenial-security,xenial-security,now 4.4.0-34.53 all [installed] linux-headers-4.4.0-34-generic/xenial-updates,xenial-security,now 4.4.0-34.53 amd64 [installed] linux-image-4.4.0-31-generic/xenial-updates,xenial-security,now 4.4.0-31.50 amd64 [installed] linux-image-4.4.0-34-generic/xenial-updates,xenial-security,now 4.4.0-34.53 amd64 [installed] linux-image-extra-4.4.0-31-generic/xenial-updates,xenial-security,now 4.4.0-31.50 amd64 [installed] linux-image-extra-4.4.0-34-generic/xenial-updates,xenial-security,now 4.4.0-34.53 amd64 [installed] linux-libc-dev/xenial-updates,xenial-security,now 4.4.0-34.53 amd64 [installed] linux-sound-base/xenial,xenial,now 1.0.25+dfsg-0ubuntu5 all [installed] syslinux-common/xenial,xenial,now 3:6.03+dfsg-11ubuntu1 all [installed] syslinux-legacy/xenial,now 2:3.63+dfsg-2ubuntu8 amd64 [installed]   How to fix those update-initramfs errors?