Consider two infinite circular cylinders of equal radius whose axes meet in a right angle.  (a) What is the volume of their intersection?  (b) What is the area cut out of one by the other?  How to start this question?
Find the volume common to two circular cylinders, each with radius r, if the axes of the cylinders intersect at right angles. (using disk/washer)  I saw no example of this problem anywhere.. I saw an example how to solve it without calculus but I'm afraid that'll be deductions on my test.. I have the volume of a cylinder and the method of area between two curves but this is out of my reach.... I don't know what I can try...
How do I grant sudo privileges to an existing user? I want to grant a newly created user sudo privileges in Ubuntu.  I tried  sudo adduser hduser admin   but it says no admin group exists. How can I do it? Proving a binomial sum identity $\sum _{k=0}^n \binom nk \frac{(-1)^k}{2k+1} = \frac{(2n)!!}{(2n+1)!!}$ jquery mobile external panel not taking on styling Shell script throws a not found error when run from a sh file. But if entered manually the commands work I'm trying to use the following script to generate a sitemap for my website. When I run it as sh thsitemap.sh I get an error like this and creates an empty sitemap.xml file:  thsitemap.sh: 22: thsitemap.sh: [[: not found thsitemap.sh: 42: thsitemap.sh: [[: not found thsitemap.sh: 50: thsitemap.sh: Syntax error: "(" unexpected   But as the same user root when I manually copy and paste these lines on the terminal, it works without any error and the sitemap.xml file have all the urls. What's the problem? How can I fix this?  #!/bin/bash ############################################## # modified version of original http://media-glass.es/ghost-sitemaps/ # for ghost.centminmod.com # http://ghost.centminmod.com/ghost-sitemap-generator/ ############################################## url="techhamlet.com" webroot='/home/leafh8kfns/techhamlet.com' path="${webroot}/sitemap.xml" user='leafh8kfns'       # web server user group='leafh8kfns'      # web server group  debug='n' # disable debug mode with debug='n' ############################################## date=`date +'%FT%k:%M:%S+00:00'` freq="daily" prio="0.5" reject='.rss, .gif, .png, .jpg, .css, .js, .txt, .ico, .eot, .woff, .ttf, .svg, .txt' ############################################## # create sitemap.xml file if it doesn't exist and give it same permissions # as nginx server user/group if [[ ! -f "$path" ]]; then     touch $path     chown ${user}:${group} $path fi  # check for robots.txt defined Sitemap directive # if doesn't exist add one # https://support.google.com/webmasters/answer/183669 if [ -f "${webroot}/robots.txt" ]; then SITEMAPCHECK=$(grep 'Sitemap:' ${webroot}/robots.txt)     if [ -z "$SITEMAPCHECK" ]; then     echo "Sitemap: http://${url}/sitemap.xml" &gt;&gt; ${webroot}/robots.txt     fi fi ############################################## echo "" &gt; $path  # grab list of site urls list=`wget -r --delete-after $url --reject=${reject} 2&gt;&amp;1 |grep "\-\-"  |grep http | grep -v 'normalize\.css' | awk '{ print $3 }'`  if [[ "$debug" = [yY] ]]; then     echo "------------------------------------------------------"     echo "Following list of urls will be submitted to Google"     echo $list     echo "------------------------------------------------------" fi  # put list into an array array=($list)  echo "------------------------------------------------------" echo ${#array[@]} "pages detected for $url"  echo "------------------------------------------------------"  # formatted properly according to # https://support.google.com/webmasters/answer/35738 echo "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt; &lt;urlset xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9  http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"&gt;" &gt; $path  echo '     ' &gt;&gt; $path;    for ((i=0;i&lt;${#array[*]};i++)); do echo "&lt;url&gt;     &lt;loc&gt;${array[$i]:0}&lt;/loc&gt;     &lt;lastmod&gt;$date&lt;/lastmod&gt;     &lt;changefreq&gt;$freq&lt;/changefreq&gt;     &lt;priority&gt;$prio&lt;/priority&gt; &lt;/url&gt;" &gt;&gt; $path    done echo "" &gt;&gt; $path echo "&lt;/urlset&gt;" &gt;&gt; $path  # notify Google # URL encode urls as per https://support.google.com/webmasters/answer/183669 if [[ "$debug" = [nN] ]]; then     wget  -q --delete-after http://www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2F${url}%2Fsitemap.xml      rm -rf ${url} else     echo "wget  -q --delete-after http://www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2F${url}%2Fsitemap.xml"      echo "rm -rf ${url}" fi echo "------------------------------------------------------"  exit 0 Deriving Chinese Remainder Theorem from gcd Bezout identity Why are these estimates to the German tank problem different? Suppose that I observe $k=4$ tanks with serial numbers $2,6,7,14$.   What is the best estimate for the total number of tanks $n$?   I assume the observations are drawn from a discrete uniform distribution with the interval $[1,n]$. I know that for a $[0,1]$ interval the expected maximum draw $m$ for $k$ draws is  $1 - (1/(1+k))$. So I estimate $\frac {k}{k+1}$$(n-1)≈$ $m$, rearranged so $n≈$ $\frac {k+1 }{k}$$m+1$.  But the frequentist estimate from  is defined as:  $n ≈ m-1 + $$\frac {m}{k}$  I suspect there is some flaw in the way I have extrapolated from one interval to another, but I would welcome an explanation of why I have gone wrong! Is it possible to see cp speed and percent copied? I'm having problems when copying large files using nautilus (it gets stuck). I need to copy, using cp. I would like to know if there are any parameters that shows the % copied and also the transfer speed. I found the following proof arguing for the irrationality of $\sqrt{2}$.     Suppose for the sake of contradiction that $\sqrt{2}$ is rational, and choose the least integer $q &gt; 0$ such that $(\sqrt{2} - 1)q$ is a nonnegative integer. Let $q'::= (\sqrt{2} - 1)q$. Clearly $0 &lt; q' &lt; q$. But an easy computation shows that $(\sqrt{2} - 1)q'$ is a nonnegative integer, contradicting the minimality of $q$.   Clearly, this is a vague proof in that it expects the reader to work out the math involved on his own. I took that as an exercise and worked out the following:  Assuming $\sqrt{2}$ to be rational, let $$\sqrt{2} = \frac{p}{q}$$ where $p$ and $q$ are least possible integers.  Clearly then, $\sqrt{2} - 1$ would also be rational, $$\sqrt{2} - 1 = \frac{p-q}{q}$$ where both $(p-q)$ and $q$ are also integers.  Multiplying both sides by $q$, we get $$(\sqrt{2} - 1)q = (p-q) = q'$$ where $q'$ is an integer. Using, $2&gt;\sqrt{2} &gt; 1$ , we get $$1&gt;\sqrt{2}-1&gt;0$$ proving that $q'$ is a non-negative integer.  As stated in the proof, computing $(\sqrt{2}-1)q'$ we get, $$(\sqrt{2}-1)q' = \frac{(p-q)^2}{q}$$which is not necessarily an integer (in fact necessarily not an integer). However, the proof claims it to be.  Am I missing something or something is wrong with how I proceeded?  Here is a link to the textbook where I found this proof: , (p 32, problem 1.14).  P.S. This is my first post here and my first time with TeX. I'd also like to know if there is anything wrong with the way my question is presented. For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f. Filter log file entries based on date range I'm wanting to parse a string into a nullable int in C#.  ie. I want to get back either the int value of the string or null if it can't be parsed.  I was kind of hoping that this would work  int? val = stringVal as int?;   But that won't work, so the way I'm doing it now is I've written this extension method  public static int? ParseNullableInt(this string value) {     if (value == null || value.Trim() == string.Empty)     {         return null;     }     else     {         try         {             return int.Parse(value);         }         catch         {             return null;         }     } }      Is there a better way of doing this?  EDIT:  Thanks for the TryParse suggestions, I did know about that, but it worked out about the same.  I'm more interested in knowing if there is a built-in framework method that will parse directly into a nullable int? I have a BA degree in Biochemistry.  I worked at a research lab for 5 yrs before I quit my job to be a stay at home.  Now I want to change my career and get into the field of QA.  I don't have much knowledge as to what the best way is to get into this field.  I cant afford to take online courses, so I want to self teach it to me.  Any suggestions and help would be greatly appreciated. How do I backup my Stackexchange favorites for offline use? I have seen other similar questions but they don't seem to be what I want, please correct me if I'm wrong.  For simplicity: delete the default cube, NumPad7, add cylinder, rotate X 90, then add torus with ext/int 1/0.75 and raise it above the cylinder. It should look like this:.  What I want is to deform the torus against the cylinder, but make it as if it's a projection. This means that, when looked from above, it will look like a normal, undeformed torus (volume changes), but when viewed with NumPad1, it will look like a round-end tube following the curvature of the cylinder, while still having the same round cross-section. To make it worse, my object needs to be deformed by a more complex surface, such as sin(x).  If I'd use soft body, it will look shrinked when looking from above, i.e. it will preserve the volume. If I use shrinkwrap, it either does a projection with its circumference intact, but all flat, or it will project it (similar to what I want), but only the bottom side vertices, like a curtain.  Mesh modifier gets me nowhere since I have to manually tweak the surrounding mesh, and curve modifier also preserves the length/volume, while also squishing the section of the torus at the bending points.  My question(s): is there a way to project (mold) the torus onto the cylinder while preserving it's cross-section? Can this be extended for more complex meshes to be projected or to be projected on?    This is, roughly, what the side view (along Y axis in the 1st pic) would look like after the deforming of the torus:    The unselected shape above is the torus (as it is in the first picture), and the selected shape is what it would look like after the deform, or molding, whatever you want to call it.  And here is what it would look like when seen from above (top view, along Z axis)): i.stack.imgur.com/HVOCo.png (can't add more than 2 pics)  The view would be the same before and after the torus is deformed. Flowchart using Tikz I'm trying to create a fine flowchart that is a bit complicated. Therefore I need a block for a predefined process and a connector block as well as a data block. Can someone help me? In comment is what I'd like to see in my code to keep my code nicely arranged. The rest of the code is a simple example for the Tikz site.  \documentclass{article}  \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \pagestyle{empty}   % Define block styles \tikzstyle{decision} = [diamond, draw, fill=blue!20,      text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt] \tikzstyle{block} = [rectangle, draw, fill=blue!20,      text width=5em, text centered, rounded corners, minimum height=4em] \tikzstyle{line} = [draw, -latex'] \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,     minimum height=2em]  %\tikzstyle{subroutine} = [draw,rectangle split, rectangle split         horizontal,rectangle split parts=3,minimum height=1cm]  %\tikzstyle{connector} = [draw,circle,...] %\tikzstyle{data} = [draw, trapezium, ...]  \begin{tikzpicture}[node distance = 2cm, auto]     % Place nodes     \node [block] (init) {initialize model};     \node [cloud, left of=init] (expert) {expert};     \node [cloud, right of=init] (system) {system};     \node [block, below of=init] (identify) {identify candidate models};     \node [block, below of=identify] (evaluate) {evaluate candidate models};     \node [block, left of=evaluate, node distance=3cm] (update) {update     model};     \node [decision, below of=evaluate] (decide) {is best candidate     better?};     \node [block, below of=decide, node distance=3cm] (stop) {stop};     % Draw edges     \path [line] (init) -- (identify);     \path [line] (identify) -- (evaluate);     \path [line] (evaluate) -- (decide);     \path [line] (decide) -| node [near start] {yes} (update);     \path [line] (update) |- (identify);     \path [line] (decide) -- node {no}(stop);     \path [line,dashed] (expert) -- (init);     \path [line,dashed] (system) -- (init);     \path [line,dashed] (system) |- (evaluate); \end{tikzpicture}   \end{document} Creation parameters menu greyed out When adding a UV Sphere mesh in Blender 2.8, the creation parameters menu on the bottom left of the attached image for this UV Sphere seems to be greyed out. Any idea why this might be? Thanks. Sort order issue I'm having an issue sorting data in ascending order.   Right now the sort order is: 1.0.0  10.0.0 10.0.1 11.0.0 2.0.0 2.0.1 3.0.0 3.0.1 3.1.0  What I want is: 1.0.0 2.0.0 2.0.1 3.0.0 3.0.1 3.1.0 10.0.0 10.0.1 11.0.0  How can I achieve this? The datatype can't be number or currency because of the 2 decimals, so I used text-field. Today I bought an ibook G4 from a garage sale. The people who sold it to me didn't know the password for the 2 accounts on it. Apparently it was the guys late father's laptop. Any suggestions on how to get into the laptop and set a new admin account and password? What are the badges I can earn on each site, and what are the exact criteria for earning each badge? Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a &quot;(retired)&quot; next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type. Instantiate a class with or without parentheses?