What's the RewriteRule in htaccess to redirect to a different port?
Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About mod_rewrite Rules but Were Afraid to Ask
How do I disable a bottom panel with the list of open windows on GNOME 3? How do I disable "Workspace dock" (a bottom panel with the list of open windows and a workspace indicator-cum-switcher), the one that is over "Plank" in the screenshot below?    I'm using Ubuntu 17.10. Which should I use on my DB? - Clustered Index or Non Clustered Index or Both I just need advice on how I am going to optimize my database.  Date ---- Time ---- Area ---- Block ---- Data1 ---- Data2 ---- Data3 ---- DataN   I have that format of tables on my database. Each tables has 30-days of records with hundred thousands of records each data. Uploading of data to database is every morning. The data of yesterday will be uploaded.  The most common queries to run is grouped by Date or Date and Area or Date and Area and Block. Now, in order to make queries faster, I found out using indexes. I used indexes before. But that was when I am using a primary key. In this table, I didn't use primary key because it is totally unnecessary.   Now, I am really confused on how I am going to optimize this. Based on  on Column Considerations part, clustered index is not a good choice on Columns that undergo frequent changes. I am really confused.  Please help me if I need to use clustered index here or just non clustered or both. Setting the editing style on a UITableViewCell How can I display a short chapter name in the header and a long chapter name in the ToC? I am writing a book and one of my chapters has a very long title. As it can't be displayed correctly on the top of even pages, I provide a "short title name" via the   \chapter[short title]{long title}   command. But then, "short title" appears in the table of contents instead of the original/true/long one.  How can I have the "short title" in the header of even pages, and the "long title" in the ToC and in the "Title header"?  For reference, here is the code I use:  \documentclass[11pt,a4paper]{book} \begin{document} \tableofcontents  \chapter[Short title]{Very vey very very very very very very long title     i can't display in the header} Lorem ipsum dolor sit amet, consectetur adipiscing elit. \end{document} How do I rip audio from a DVD? I remember reading a long time ago how you can rip the audio (music) from a DVD and convert it to a usable/readable format.  I can't find that article any more. Can anybody help me? Fixing geometry validity errors in QGIS 2? Any idea why the piece of code below does not add the script element to the DOM?  var code = "&lt;script&gt;&lt;/script&gt;"; $("#someElement").append(code); Best way to compare 2 XML documents in Java I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end.  I've got a good set of input/output message pairs so all I need to do is send the input messages in and listen for the XML message to come out the other end.  When it comes time to compare the actual output to the expected output I'm running into some problems.  My first thought was just to do string comparisons on the expected and actual messages.  This doens't work very well because the example data we have isn't always formatted consistently and there are often times different aliases used for the XML namespace (and sometimes namespaces aren't used at all.)  I know I can parse both strings and then walk through each element and compare them myself and this wouldn't be too difficult to do, but I get the feeling there's a better way or a library I could leverage.   So, boiled down, the question is:  Given two Java Strings which both contain valid XML how would you go about determining if they are semantically equivalent?  Bonus points if you have a way to determine what the differences are. White stains and stainless steel cookware I know this question has been asked before in some form or another, but I can't seem to find a definitive answer. I've looked on SA, chowhound, martha stewart, about.com, etc., and answers seem to vary. Answers that I've seen vary from using vinegar to washing using special stainless steel soaps (which I'm not very keen on using) to only using soft sponges and hot water.   The one thing I always do is wash my stainless steel with warm soapy water and a soft sponge. If there's burned food stuck on the cookware, I scrape it off with a wood pot scraper (lightly, of course). And I always dry with a soft cloth immediately after washing. Yet I still get stains!  I'd like to get a general consensus on how to prevent those white and rainbow colored stains as well as minimizing corrosion. Tikz: shading region bounded by several curves I know that my effort below can be improved upon considerably.  In particular, there must be a way of shading the region in a single scope, as opposed to subdividing as I have done (thus necessitating a hidden gray boundary).  Neither am I fond of sample points, but this is where my research has led me.  Your constructive criticism is appreciated.    \documentclass{article} \usepackage{tikz} \begin{document}  \begin{tikzpicture} %graph \draw[draw=gray!50!white,fill=gray!50!white]      plot[smooth,samples=100,domain=0:1] (\x,{0}) --      plot[smooth,samples=100,domain=1:0] (\x,{1}); \draw[fill=gray!50!white] plot[smooth,samples=100,domain=1:2.71828] (\x,{ln(\x)}) --      plot[smooth,samples=100,domain=2.71828:1] (\x,{1}); \draw[domain=0:4] plot (\x,{1}); \draw[samples=100,domain=.25:4] plot (\x,{ln(\x)}) node[above left]{$y=\ln x$}; %coordinate grid \draw (-.5,0)--(4.5,0) node[right]{$x$}; \draw (0,-1.5)--(0,2.5) node[above]{$y$}; \foreach \x in {1,2,3,4}     \draw (\x,2pt)--(\x,-2pt) node[below] {$\x$}; \foreach \y/\ytext in {1,2}     \draw (2pt,\y)--(-2pt,\y) node[left] {$\y$};     %labels  \node at (.75,.5) {$\mathcal{D}$}; \end{tikzpicture}  \end{document} I am trying to change the page size in the QGIS 3.0 Composer but I am not able to see the Composition tab.  I have right clicked an empty space in the toolbar but did not see anything about composition.  I am using Windows 7.  I tried looking at the QGIS docs but they are still in testing. resizable serial console window? When using the serial console of my system I always end up with $COLUMNS=80 and $LINES=24.  While I can change these variables manually it is somewhat annoying to do this any time when the client side terminal window has been resized.  Usually I'm connecting to the console using screen /dev/mytty baudrate.  Changing the $TERM environment variable to "screen" or "xterm" does not help.  Will I need to call getty with some of those instead of vt100?  Needless to say that all of this works fine, when I connect to the same machine using ssh. Pass Method as Parameter using C# Making sense of principal component analysis, eigenvectors & eigenvalues In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues.   I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it.        I strongly believe in the following quote:     You do not really understand something unless you can explain it to your grandmother. -- Albert Einstein   Well, I can't explain these concepts to a layman or grandma.   Why PCA, eigenvectors &amp; eigenvalues? What was the need for these concepts? How would you explain these to a layman? Is Tolkien prejudiced against the East? I'm looking for a single line regex which does the following:  Given a HTML tag with the "name" attribute, I want to replace it with my own attribute. If that tag lacks the name attribute, I want to implant my own attribute. The result should look like this:  &lt;IMG name="img1" ...&gt; =&gt; &lt;IMG name="myImg1" ...&gt; &lt;IMG ...&gt; =&gt; &lt;IMG name="myImg1" ...&gt;   Can this be done with a single line regex? Is there any practical difference between saving at 300ppi or 72ppi? I often see statements in discussions about web displayed image quality that go something like this: "I only upload pictures at 72 dpi and 1200 pixels on the long edge, so if someone copies and prints the image it won't look as good as if it were 300 dpi."  What? Have I missed something here?  Does an image edited and saved/exported with 1200x800 pixels at 300 ppi look any different online than the same image saved/exported with 1200x800 pixels at 72 ppi? Other than the metadata regarding ppi, is there any difference in the two images at all? If so, what is the difference? If I tell my printer to print the images at 4R (4X6 inches) will there be any difference at all in how the printer creates a print from the 1200x800 @ 300 dpi image versus the 1200x800 @ 72 dpi image? How do I just restart the nautilus after adding a nautilus script without having to log out. Prove that $|f''(\xi)|\geqslant\frac{4|f(a)-f(b)|}{(b-a)^2}$ Let ${\rm f}:\left[a, b\right]\to\mathbb{R}$ be twice differentiable, and suppose   $$\lim_{x\to a^{+}} \frac{{\rm f}\left(x\right) - {\rm f}\left(a\right)}{x - a} = \lim_{x\to b^{-}}\frac{{\rm f}\left(x\right) - {\rm f}\left(b\right)}{x - b} =0 $$  Show that there exists $\xi \in \left(a, b\right)$ such that $\displaystyle{% \left\vert\vphantom{\Large A}\,{\rm f}''\left(\xi\right)\right\vert \geq \frac{4\left\vert\vphantom{\Large A}% \,{\rm f}\left(a\right) - {\rm f}\left(b\right)\right\vert} {\left(b - a\right)^{2}}}$.  I don't know how to start. Any hints ?. What is the closed form for $\sum_{n=1}^\infty \frac1n - \frac1{n+1/p}$? A while ago, I started to look at expressions of the following form: $$ S_p:=\sum_{n=1}^\infty \frac1n - \frac1{n+1/p}, $$  where $p$ is prime, because otherwise things get too complicated for me at the moment.  What I found so far is the following: $$ S_p= p -\log(2p) - \frac12 \pi \cot\left(\frac\pi p\right) + T_p, $$ where $T_p$ contains $\frac{p-1}2$ terms $t_{p,k}$ of the form:  \begin{cases} \pm 2 \sin\left(\frac{k\pi}{2p}\right) \log\left(\sin\left(\frac{k\pi}{2p}\right)\right) \\ \pm 2 \cos\left(\frac{k\pi}{2p}\right) \log\left(\sin\left(\frac{k\pi}{2p}\right)\right)\\ \pm 2 \sin\left(\frac{k\pi}{2p}\right) \log\left(\cos\left(\frac{k\pi}{2p}\right)\right)  \\ \pm 2 \cos\left(\frac{k\pi}{2p}\right) \log\left(\cos\left(\frac{k\pi}{2p}\right)\right)  \end{cases}   An example can be found .     How does the closed form for $\sum_{n=1}^\infty \frac1n - \frac1{a+n}$ look like? (EDIT: where $a=1/p$)