I have a string in oracle column example emp.id=100&amp;empHelper.userTab=2 I want to use REPLACE function to replace '&amp;empHelper.userTab=2' with empty string.  &amp; symbol is creating problem , I want to use escape char to consider '&amp;empHelper.userTab=2' as text to replace in replace function instead of using set define off .
I have a SQL script that creates a package with a comment containing an ampersand (&amp;). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &amp;. How do I disable this feature so that SQL Plus ignores the ampersand?
Leave newlines intact in bounty messages Here is the quadratic matrix equation I've been looking at lately:  $$ Q_{r,r}=A_{r,r}X_{r,r}^2+B_{r,r}X_{r,r}+C_{r,r}=0_{r,r} $$  Note that $A, B, C,$ and $X$ are $r \times r$ matrices. $A$ contains known elements, $B$ contains known elements, $C$ contains known elements, and $X$ contains the unknown elements that you are solving for. $ 0_{r,r} $ is just the $r \times r$ null matrix.  Is there any solution for $X$ in terms of $A, B,$ and $C$ (making no easy assumptions)? (e.g. $X$ is a diagonal matrix, $A=B=C$, or anything of that sort.)  I have tried to solve this and nothing has worked out. I attempted solving it generally by manipulating the matrices in variable form (i.e. actually writing out the matrices $A, B, C,$ and $X$ in variables) and finding a unique solution for all of the elements of $X$ in terms of the elements of $A, B,$ and $C$. That didn't work out beyond the case of $r=1$.  Trying to solve it by looking at $r$ at different values did not work out either; I ended up with very abysmal equations at just $r=2$. I don't know exactly how to make this appealing to the denizens of math.stackexchange, but it (as far as I know) isn't a heavily studied problem.  There is a very high possibility that I've just been doing elementary techniques and nothing of note, so I hope someone or a group of people could shed light on this. I'm having the strangest issue since updating to OS X El Capitan. My "Open File" dialogs show the sidebar but all my main (and useful) locations are missing. Take a look at this screenshot. This screenshot shows Keychain Access but this happens in Safari when I'm trying to attach a file to Gmail for example, or uploading an image to Facebook.  What I would like is for the sidebar to show my home directories, such as Desktop, Documents, Downloads, etc.  Help? Insert list of figures in the table of contents Is it possible to create a list of all the figures at the end of a document (this I can do) and make it appear in the table of contents?  So in the the table of content there will be a line saying List of figures ... 19 for example? How can I chroot sftp-only SSH users into their homes? I want to give a client access to my server, but I want to limit those users to their home directories. I will bind-mount in any files I want them to be able to see.  I've created a user called bob and added him to a new group called sftponly. They have a home directory at /home/bob. I've changed their shell to /bin/false to stop SSH logins. Here is their /etc/passwd line:  bob:x:1001:1002::/home/bob:/bin/false   I've also changed the /etc/ssh/sshd_config to include the following:  Match Group sftponly         ChrootDirectory /home/%u         ForceCommand internal-sftp         AllowTcpForwarding no   When I try to log in as them, here's what I see   $ sftp bob@server bob@server's password:  Write failed: Broken pipe Couldn't read packet: Connection reset by peer   If I comment out the ChrootDirectory line I can SFTP in but then they have free rein over the server. I have found that ChrootDirectory /home works, but it still gives them access to any home directory. I have explicitly tried ChrootDirectory /home/bob but that doesn't work either.  What am I doing wrong? How can I limit bob to /home/bob/?  ----EDIT-----  Okay so I just had a look at /var/log/auth.log and saw this:  May  9 14:45:48 nj sshd[5074]: pam_unix(sshd:session): session opened for user bob by (uid=0) May  9 14:45:48 nj sshd[5091]: fatal: bad ownership or modes for chroot directory component "/home/bob/" May  9 14:45:48 nj sshd[5074]: pam_unix(sshd:session): session closed for user bob   I'm not entirely sure what's going on there,  but it suggests something is wrong with the user directory. Here is the ls -h /home output:  drwxr-xr-x 26 oli      oli      4096 2012-01-19 17:19 oli drwxr-xr-x  3 bob      bob      4096 2012-05-09 14:11 bob Block specific URL on web browsers I want to block certain URLs on browsers. I don't want to block whole site. For example, I want to block , but not whole  domain. Is there any way I can do it? proof relating to limit definition of e I'm studying the book A Primer for the Mathematics of FinancialEngineering, along with it's solution guide. I've ran into trouble with the solution to question 7 in chapter 1.    The problem is:  Show that $(1+\frac{1}{x})^x &lt; e &lt; (1+\frac{1}{x})^{x+1}$ .   Specifically, I'm having trouble with one step in the solution.    It says that  $$x\ln\left(1+\frac{1}{x}\right)&lt;1&lt;(x+1)\ln\left(1+\frac{1}{x}\right)$$  can be written as   $$\frac{1}{x+1} &lt;\ln\left(1+\frac{1}{x}\right)&lt;\frac{1}{x}, \forall \ge 1.$$  How can the first equality (or is it inequality?) be written as the second? Here's the very dumb way:  def divisorGenerator(n):     for i in xrange(1,n/2+1):         if n%i == 0: yield i     yield n   The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb :-)  I can find prime factors and their multiplicity fast enough.  I've an generator that generates factor in this way:  (factor1, multiplicity1) (factor2, multiplicity2) (factor3, multiplicity3) and so on...  i.e. the output of   for i in factorGenerator(100):     print i   is:  (2, 2) (5, 2)   I don't know how much is this useful for what I want to do (I coded it for other problems), anyway I'd like a smarter way to make  for i in divisorGen(100):     print i   output this:  1 2 4 5 10 20 25 50 100     UPDATE: Many thanks to Greg Hewgill and his "smart way" :) Calculating all divisors of 100000000 took 0.01s with his way against the 39s that the dumb way took on my machine, very cool :D  UPDATE 2: Stop saying this is a duplicate of  post. Calculating the number of divisor of a given number doesn't need to calculate all the divisors. It's a different problem, if you think it's not then look for "Divisor function" on wikipedia. Read the questions and the answer before posting, if you do not understand what is the topic just don't add not useful and already given answers. What is the geometric meaning of the determinant of a matrix? I know that "The determinant of a matrix represents the area of ​​a rectangle." Perhaps this phrase is imprecise, but I would like to know something more, please.  Thank you very much. Closed formula for the sums $\sum\limits_{1 \le i_1 < i_2 < \dots < i_k \le n} i_1 i_2 \cdots i_k $? I've worked out a few summation formulas, and I am hoping to find a pattern. Unless I have made a mistake somewhere, we have the following identities:  $$\sum_{1 \le i \le n} i = \frac{(n+1)n}{2} $$  $$\sum_{1 \le i &lt; j \le n} ij = \frac{(3n+2)(n+1) \, n \, ( n-1)}{24}$$   $$\sum_{1 \le i &lt; j &lt; k \le n} ijk = \frac{(n+1)^2 \, n^2 \, (n-1)(n-2) }{48}$$   It seems clear that $$p_k(n)= \sum_{1 \le i_1 &lt; i_2 &lt; \dots &lt; i_k \le n} i_1 i_2 \cdots i_k $$ is a polynomial in $n$ of degree $2k$. But is there a nice closed-form formula for it? Maybe in terms of its factorization?  Comment: I realize that what I am looking for is the coefficient of $t^k$ in the expansion $$(1+t)(1+2t) \dots (1+nt),$$ so maybe generating function techniques could be helpful. But the main way I know to extract the coefficient of $t^k$ is to take derivatives $k-1$ times and on the surface of things that looks like a huge mess. Labeling all sides of the matrix with kbordermatrix I have a matrix with labels on the left and top. Now I want to have a label on all sides of the matrix. How can I change my code?  \documentclass[10 pt, a4paper, leqno, oneside] {report} \usepackage{kbordermatrix} \begin{document}  \renewcommand{\kbldelim}{(}% Left delimiter \renewcommand{\kbrdelim}{)}% Right delimiter \[   \tilde{\textbf{m}} = \kbordermatrix{     \mbox{} &amp; c_1 &amp; c_2 &amp; c_3 &amp; c_4 &amp; c_5 \\     % &amp; c_1 &amp; c_2 &amp; c_3 &amp; c_4 &amp; c_5 \\     r_1 &amp; 1 &amp; 1 &amp; 1 &amp; 1 &amp; 1 \\     r_2 &amp; 0 &amp; 1 &amp; 0 &amp; 0 &amp; 1 \\     r_3 &amp; 0 &amp; 0 &amp; 1 &amp; 0 &amp; 1 \\     r_4 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; 1 \\     r_5 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1    } \]  \end{document} I read this story a long time ago and cannot remember either the title or the author. It was written in the 60s or 70s. The setting is sometime in the 21 century.  Here is a summary of the plot.  One of the great classical composers (maybe it was Schubert, I'm not sure) is revived with some future technology. All the guys in the lab are very happy about it, the world cheers the achievement. The composer is also quite excited to be alive. Naturally, he is asked to perform a concert. He asks for ink and music paper. Nobody knows what that is: in those days everybody writes music directly in "frequency spectrum" and similar stuff.  The composer, excited to create music again, tries to come up with something but he doesn't like anything he writes. The music is well written, but lacks something essential, it doesn't sound like his real music. Finally, the composer realizes that the lab guys recreated his mind from reviews by music critics, and his music just sounds like that. He performs the concert. The audience enjoys it, applauds and bravos. Not only to composer, but also to the lab guys.   At the end, if I remember it right, the composer gloats over the  primitive taste of the audience. The audience who writes music in frequency spectrum and applauds to lab guys at the music concert did not see the failure in the concert and ate it as it is.  Does someone recognize the story?  PS all the recent talk of advent of AI machines with Machine Learning algorithms reminded me of this story. How can I show a supremum of a set is also its limit point? It just seems like I can't wrap my head around this. For a set $A$ how can I show that the supremum of that set $\sup(A)$ is also a limit point of said set? Can I just set $$a=\sup(A)$$ $$b\le a \: \:  \forall \: b \in A$$ and then show that there's a point different from $a$ in any $\epsilon$-neighbourhood for any $\epsilon&gt;0$? Or should I use a completely different approach? How can I reset $PATH to its default value in Ubuntu? I accidentally unset all the directories of $PATH while trying to add a new one in ~/.bashrc. I opened a new terminal window as I was editing and now $PATH is empty. I'm worried if I boot from another drive to find the $PATH I won't be able to boot into this drive again.  Basically, what is the default result of echo $PATH? Why can rm remove read-only files? If I create a file and then change its permissions to 444 (read-only), how come rm can remove it?  If I do this:  echo test &gt; test.txt chmod 444 test.txt rm test.txt   ...rm will ask if I want to remove the write-protected file test.txt. I would have expected that rm can not remove such a file and that I would have to do a chmod +w test.txt first. If I do rm -f test.txt then rm will remove the file without even asking, even though it's read-only.   Can anyone clarify? I'm using Ubuntu 12.04/bash. What does linear time series refer to? When does the amount of skew or prevalence of outliers make the median preferable to the mean? I know that "deviations in the data are devil", and when the distribution is highly skewed, it is better to consider median as average rather than mean, but how to decide these hard-limits.  For example:   CASE 1:   Assume X = 10,20,30,40,50,60,70 In this case, I think that it is better to use mean and that it will give very accurate results.  CASE 2:   Assume X = 10,20,30,40,50,60,70,7000 In this case, I think that it is better to use median instead of using the mean.  CASE 3:    Assume X = 10,20,30,400,500,600,700 In this case, I think it is better to use IQR (Inter Quartile Range)    But I'm stuck with how to decide these hard-limits i.e. which to use in which condition, in general.   I've found a tool working on subjected principle, which takes context-less sample-distribution as input and determines whether mean is close/moderate or against the null-hypothesis.  Find References:-     (For Mean Test)  (For Median Test)   What I'm really looking is a good answer which states how to derive these conclusions. How to turn off notifications for individual apps? On my iphone, there is a "notifications" setting section, which basically just allows me to choose which apps has the power to notify me.  I was wondering if there's anything similar that is available on the Samsung Galaxy s2?  Basically, we have a new app called Scramble For Friends. And it keeps notifying us every time someone has finished their turn so that I can play. We play random people so this could be in the middle of the night or in a meeting etc.  It just vibrates but still - it's annoying and we want to turn it off. We also don't want to turn off other notifications like Email, Facebook etc. - we just want to turn off the notifications for Scramble For Friends.  I've been looking around in the Settings but there doesn't seem to be a universal page which deals just with notifications. How do I determine if a number is prime?  I'm writing a program where a user inputs any integer and from that the program determines whether the number is prime, but how do I go about that? I want to create a simple figure where images are connected with arrows. Here is what I did:  \begin{tikzpicture} \node[](A) {\includegraphics[width=0.2\textwidth]{a}}; \node[right=1mm of A](B) {\includegraphics[width=0.2\textwidth]{b}}; \draw[-&gt;] (A) to (B); \end{tikzpicture}     But I want the arrow to start and end right at the images with no space between. How can I do that?