Just have a quick question. I've looked around the internet quite a bit  and I've found a few solutions but none of them have worked yet. Looking at converting a string to an int and I don't mean ASCII codes.  For a quick run-down, we are passed in an equation as a string. We are to break it down, format it correctly and solve the linear equations. Now, in saying that, I'm not able to convert a string to an int.  I know that the string will be in either the format (-5) or (25) etc. so it's definitely an int. But how do we extract that from a string?  One way I was thinking is running a for/while loop through the string, check for a digit, extract all the digits after that and then look to see if there was a leading '-', if there is, multiply the int by -1.  It seems a bit over complicated for such a small problem though. Any ideas?
What's the C++ way of parsing a string (given as char *) into an int? Robust and clear error handling is a plus (instead of ).
How can I connect the top loop to the down loop with faces Hey I want to connect the bottom loop with the top loop so that it forms a solid.  I have tried selecting multiple vertices and pressing F but that just creates a large face which I do not want. I have tried using grid fill bu that doesn't work either. The solution that seems to work is by selecting four vertices and pressing F and then selecting the next 4 and pressing F and on and on. That just takes too long. grub issues message at boot - "error - can't find command hwmatch" This question  is exactly what I'm asking but was closed as non reproducible. Mine is very reproducible.  Ubuntu 18.04 freshly installed on a 64-bit UEFI machine. Default grub boot options work fine, but I wanted to add a brief countdown (my normal config).  After editing /etc/default/grub as normal and running sudo update-grub, the countdown works, but I get the error shown in the question title.  I tried the solution (copying files) in the closed question but it didn't seem to fit my configuration. Frankly I found the answer confusing.  I also tried editing /etc/grub.d/10_linux to comment out the IF-THEN structure that uses hwmatch. After that I did a sudo update-grub but I still got the error.  How can I get my countdown and not see this error?  Edit per comments -  Stock grub as installed (all non-commented-out lines shown)  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2&gt; /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""   Edited grub to give countdown (all non-commented-out lines shown)  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=countdown GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=`lsb_release -i -s 2&gt; /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" How can I restrict the Normal user to run the only limited set of commands in RHEL? I have the following prompt in bash which shows the current git branch:  PS1+="$(git_prompt)" #git_prompt is a function in my .bashrc   which works when I source the .bashrc, but not when I change the branch, so the PS1 var gets only evaluated when I source the .bashrc, but it should be evaluated every time a new prompt is displayed. How can this be accomplished with bash 4.3 ? I have seen many programs consisting of structures like the one below  typedef struct  {     int i;     char k; } elem;  elem user;   Why is it needed so often? Any specific reason or applicable area? Does addition imply an order? Consider any integer, suppose a number 3. We can break any such integer down into a sequence of 1's. So, we can write: $$ 3\equiv1+1+1 $$ 3 represents what we get when we add 1 to 1 to another 1. Conceptually, what I am getting confused with, is the fact that notionally, at least according to this definition, there is one unit at the beginning, to which we add another, and yet a third. There seems to be a sequence here, which would imply there being an order. Am I missing something obvious? Follow up: instance control in Java without enum What is the name of the depiction of concentration with raised eyebrow called? Save Illustrator as PDF with transparent background $\lfloor x\rfloor + \lfloor y\rfloor \leq \lfloor x+y\rfloor$ for every pair of numbers of $x$ and $y$ Give a convincing argument that $\lfloor x\rfloor + \lfloor y\rfloor \leq \lfloor x+y\rfloor$ for every pair of numbers $x$ and $y$. Could someone please explain how to prove this? I attempted to say that the largest values that could be added to $x$ and $y$ is $0.99$ and that doing so still made $\lfloor x\rfloor + \lfloor y\rfloor &lt; \lfloor x+y\rfloor$. However, my answer was not accepted. Is everything in .NET an object? How does apt-get really work? Okay, I understand how I may use apt-get {install|upgrade|remove} mypackages to install, upgrade, or remove binaries as well as their configuration data files and dependencies (actually, remove will only remove the binaries unless additional flags are provided).  I am not looking for how it is used as the man describes this, but high level what it is doing.  My end goal is to create a means for me to install and manage some custom software (created by a make file) on multiple remote machines, and I need to learn more about the process.  If answers to this question are based on which distribution is used, please tailor to Debian.  In addition to generally how it works, I have the following specific questions:   How does the client that is accessing the apt repository keep track of the files? Must the repository be hosted on the same operating system (i.e. can apt repository be hosted on redhat)? How are the locations to install files specified?  Is this specified by the .deb file? How is a remote machine accessing the repository?  Is it just ftp(s) or http(s)? Is the machine that is hosting the repository running special software (like gitlab for a git repository), or is it just some structured file system? Finding the limit of $(1-\cos x)/x^2$ Prove that $\sum^{n}_{r=0}(-1)^r\cdot \large\frac{\binom{n}{r}}{\binom{r+3}{r}} = \frac{3!}{2(n+3)}$ Who are responsible for pushing out the OTA updates? There are many parties involved in an Android phone. My question is who is responsible for the OTA updates of my phone. Is it the manufacturer, the phone service provider or Google?  I thought this answer could be answered generally but maybe not. My phone is the Galaxy Nexus i9250 witch is manufactured by Samsung. I'm having the same problem as it was questioned   I can't get throught the step where I need to show that $\nabla_{E_i}E_j (p)=0$. It only leads to $$ \nabla_{E_i}E_j(p)=\sum_{lk}^n a_{il}(0)\dfrac{\partial b_jk}{\partial x_l}(0)\partial x_k(p) $$ which I can't show that equals zero.  On the linked question, there is also the indication that $\nabla_{E_i}E_j (E_k)=\Gamma^k_{ij}$. This could lead that $\nabla_{E_i}E_j (E_k)(p)=\Gamma^k_{ij}(p)=0$, but $\nabla_{E_i}E_j (E_k)(p)$ is not equal to $\nabla_{E_i}E_j (p)$ which is the one I need.  Can someone help me? number of edges induction proof Proof by induction that the complete graph $K_{n}$ has $n(n-1)/2$ edges.   I know how to do the induction step I'm just a little confused on what the left side of my equation should be. $E = n(n-1)/2$  It's been a while since I've done induction. I just need help determining both sides of the equation. Does anybody know which files I need to save in order to have a simple backup?   Reason for my question is, that my Galaxy Android smartphone lost all calendar data without any interaction. I found tons of apps, tons of sync stuff, but NO simple list of files to save. I do NOT want to save my data remotely on Google.  There must be at least one local file (database?) on my phone containing the synced calendar file (on my server, using ICSSync) Cruising the old questions I came across juantheron asking for $\int \frac {\sec x\tan x}{3x+5}\,dx$ He tried using $(3x+5)^{-1}$ for $U$ and $\sec x \tan x$ for $dv$while integrating by parts.  below is his work.  How can I calculate $$ \int {\sec\left(x\right)\tan\left(x\right)  \over 3x + 5}\,{\rm d}x $$  My Try:: $\displaystyle \int \frac{1}{3x+5}\left(\sec x\tan x \right)\,\mathrm dx$  Now Using Integration by Parts::  We get  $$= \frac{1}{3x+5}\sec x +\int  \frac{3}{(3x+5)^2}\sec x\,\mathrm  dx$$  Here he hit his road block.   I tried the opposite tactic   Taking the other approach by parts.   let $$U= \sec x \tan x$$ then$$ du= \tan^2 x \sec x +\sec^3 x$$ and $$dv=(3x+5)^{-1}$$ then $$v=\frac 1 3 \ln(3x+5)$$ Thus $$\int \frac {\sec x \tan x}{3x+5}\,dx= \frac {\ln(3x+5)\sec x \tan x}{3} - \int \frac {\ln(3x+5) [\tan^2 x \sec x +\sec^3 x]}{3} \,dx$$    As you can see I got no further than he did.   So how many times do you have to complete integration by parts to get the integral of the original $\frac {\sec x \tan x}{3x+5} \, dx$ or is there a better way? What rules say that summoning undead is evil, and what rules say why?