In a computer network there are two types of nodes: client and server. Each client is directly connected (using network cables) to at least one server and there are no direct connections between clients. Suppose that each server can route messages to other servers with which it is directly connected and the entire network is connected(the set of servers is connected). In order to make the network more reliable, one scenario is considered:  Every client is directly connected to at least 2 servers and every pair of servers having the distance between them 2 are connected using a direct cable. Prove that, in this new network, if a server becomes unavailable the clients can still communicate with all the remaining servers.  I realised that there are at least two paths which connect a client with a server, but I don't know how to prove that if a server becomes unavailable the clients can still communicate with all the remaining servers.

I have the following graph problem that I have no idea how to solve. Could you help me please? I need a proof. In a computer network there are two types of nodes: client and server. Each client is directly connected (using network cables) to at least one server and there are no direct connections between clients. Suppose that each server can route messages to other servers with which it is directly connected and the entire network is connected. In order to make the network more reliable, a scenario is considered: Every client is directly connected to at least 2 servers and every pair of servers having the distance between them 2 are connected using a direct cable. Prove that, in this new network, if a server becomes unavailable the clients can still communicate with all the remaining servers.


I'm new to Ubuntu. I have 14.04 release, and I wanted to add a shortcut of /var/www to my desktop, since I want to do some PHP development. I went to /var/www to make a link, but my right-click menu is greyed out:   Why is that and how do I solve it?

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.


What word can fill in the blanks in the following pair of analogous sentences?  If B is necessary to A, then A depends on B and A is dependent. If B is necessary to A, then B __________ A and B is _________.   Is there a word, the opposite of "dependent", meaning "is depended on"?    Edit: 'requisite' fits the second blank:  If B is necessary to A, then B __________ A and B is requisite.   I don't know a form of 'requisite' that can fill the first.

Are you his dependency, dependendee or something else? What is this type of opposite word called?  I believe it is not called antonym, as that would be independent.


Is there a technical name for a word that contains other words? I'm thinking about the contained words having all the letters in the order they appear in the original word. For example, "spawn" contains spa, pawn, paw. I'm also hoping to find a more technical word than "Kangaroo words" or "Matryoshka words" if there is one--something like "paraprosdokian" or "palindrome" etc.

Is there a term for a word that occurs unbroken within another word? For example, the word "fun" in "funeral", or "drag" in "hydragog".  The closest thing I could find from my search was the term "", which refers to a word that contains the letters of its synonym, in the correct order (though not necessarily consecutively).  I am currently using "substring" as a substitute in my essay. Unfortunately, "substring" applies to any selection of consecutive characters from the containing word, and doesn't convey the fact that the subset is a complete English word.  I have tagged this , but I would appreciate single words as well. I will have to use the term quite often, so the less awkward it is, the better.


My HDD drive has 30 bad sectors, so I have not installed any operating system on my computer. Can I fix this problem using Ubuntu?  Currently I use it with a CD player.

I tried to fix my hard drive using Ubuntu but I encountered an error message and didn't know how to proceed. I need to fix my bad sectors   fsck /dev/sdb   fsck from util-linux 2.20.1   e2fsck 1.42.5 (29-Jul-2012)   fsck.ext2: Permission denied while trying to open /dev/sdb   You must have r/w access to the filesystem or be root


Will there be a new version of the Android app? It's been without any update for a long time and it doesn't seem to be working really well.

Recently upgraded to a Samsung S10e and Android 10, but all Q&A in the Stack Exchange app v1.0.95 are blank.  The title and comments are visible, but question/answer posts are just white space. Accessing the About page in the app is also blank.  I tried clearing data, cache and re-installing the app, but I still get the same behaviour.


Accordingly to the player handbook dragonborns are an own race originated by dragons. But I'm uncertain about half-dragons. Are they dragonborns themselves or are they a mix between dragons and other humanoids?  If they are not the same:   Do they differ in appearance (e.g. can half-dragons have tails or wings?)? Could an adventurer (or townsfolk) differ them?   Background: I stumbled upon half-dragons in Hoard Of The Dragon Queen and one of the PCs is a dragonborn, so I'm wondering if it is the same or rather what are the differences.

What are the differences between "Dragonborn", "Half-Dragon", and "Draconian" races in D&D?  In the Hoard of the Dragon Queen adventure, for example there is  a Half-Dragon npc. I had assumed that when writing the adventure they were only allowed to use known material from Basic, and so renamed the Dragonborn into "Half-Dragon" for the sake of compatibility etc. However, the dragon breath rules are not at all similar for the half-dragon and the dragonborn, and I've also noticed wiki article that imply that they are different races entirely. (Thus introducing me to the term Draconian)  Are there clear differences between these three races, (in the same way there are differences between Goblins and Hobgoblins, or Dragonborn and Lizardfolk and Kobolds,) or are they really just three different setting names for the same basic race?  Answers can either be D&D 5e specific, or be based on the lore from all editions of Dungeons and Dragons. (I'm assuming here that the answer will be the same regardless)  Here are two images, the first one is a "half-dragon" from the front of the Hoard of the Dragon queen module, and the second one is a "dragonborn" from the 5e player's Handbook.  I've included these images to help explain my confusion.


Let $$ A:=\left[\begin{array}{llll} 3 & 1 & 0 & 0 \\ 1 & 3 & 0 & 0 \\ 0 & 0 & 6 & 2 \\ 0 & 0 & 2 & 6 \end{array}\right] $$ Find $\sup _\limits{Q \in M_{4\times 2} (\mathbb{R}), Q^{T} Q=I_{2}} \operatorname{tr}\left(Q^{T} A Q\right)$, where $M_{4 \times 2}(\mathbb{R})$ represents the set of all matrices of size $4\times 2$. I know that $\mathrm{tr}A=\sum _i A_{ii}$, but how can we deal with this upper bound? It is obvious that $Q^T AQ$ is a $2\times 2$ matrix, but I don't know how does the condition $Q^TQ=I_2$ help. Also, are there any backgrounds for this problem? I seldom see (linear algebra) problems asking the uppper bound for a trace and I hope I could get further information about these kind of problems (if possible).

Let $C \in \mathbb{R}^{d \times d}$ be symmetric, and   $$Q = \begin{bmatrix}       \vert & \vert &    & \vert \\       q_1   & q_2   & \dots & q_K  \\       \vert & \vert &    & \vert       \end{bmatrix} \in \mathbb{R}^{d\times K}$$  where $d \geq K$. Using Lagrange multipliers,   $$\begin{array}{ll} \text{maximize} & \mbox{tr} \left( Q^T C Q \right)\\ \text{subject to} & Q^T Q = I\end{array}$$    I am unfamiliar with these kind of constraints with this method, and after reading  I believe the same specific and simple result given is also applicable, and therefore the lagrangian would be:  $$\mathcal{L}(Q,\lambda)=\mathrm{tr}(Q^TCQ)-\left<\lambda,Q^TQ-I\right>$$  where $\lambda\in\mathbb{R}^{K\times K}$, and $\left<\cdot,\cdot\right>$ is the element wise inner product (what kind of makes sense to me since we're actually adding as many constraints as there are elements in these matrices.  In attempting to do that I start taking $\frac{\partial \mathcal{L}}{\partial Q}=O\in\mathbb{R}^{d\times K}$, and compute that LHS element by element; for the $(l,m)$ one:  \begin{equation} 0=\frac{\partial \mathcal{L}}{\partial Q_{lm}}=(CQ+C^TQ)_{lm}-\underbrace{\frac{\partial}{\partial Q_{lm}}\sum_{i,j}\lambda_{i,j}(Q^TQ-I)_{ij}}_{=\lambda_{lm}\frac{\partial (Q^TQ)_{lm}}{\partial Q_{lm}}}=2(CQ)_{lm}-\lambda_{lm}\frac{\partial (q_l^Tq_m)}{\partial q_m(l)} \tag{1}\end{equation}  where in the last step I've used the definition I made at the beginning for $Q$, and $q_m(l)$ denotes the $l$-th component of the column vector $q_m$.  In trying to compute the very last term:  $$\frac{\partial (q_l^Tq_m)}{\partial q_m(l)}=\frac{\partial \left[q_l(1)q_m(1)+ \ldots + q_l(d)q_m(d)\right]}{\partial q_m(l)}= \begin{cases}     q_l(l)\equiv Q_{ll}    & \text{if } l\neq m\\     2q_l(l)\equiv 2Q_{ll}  & \text{if} l=m \end{cases}$$  The whole equality (1) then can be written:  $$0=2(CQ)_{lm}-\lambda_{lm}Q_{ll}(1+\delta_{lm})$$  where $\delta_{lm}$ is the Kronecker delta.  The equation for the other stationary point of the lagrangian, $\frac{\partial \mathcal{L}}{\partial \lambda}=O\in\mathbb{R}^{K\times K}$, for the $(l,m)$ element as well:  $$ 0=\frac{\partial \mathcal L}{\partial \lambda_{lm}}= \frac{\partial }{\partial \lambda_{lm}}\sum_{i,j}\lambda_{i,j}(Q^TQ-I)_{ij}=(Q^TQ-I)_{lm}\tag{2}$$  what obviously leads to $(Q^TQ)_{lm}=\delta_{lm}$.  All this should tell that the columns of $Q$ are eventually the $K$ first eigenvectors of $C$, but I don't know how to continue from here to prove that, supposing I didn't make a mistake. Please I would sincerely appreciate any help.    Edit:  I have rewritten the inner product as a trace of a product of matrices (after seeing ):  $$\left<\lambda,Q^TQ-I\right>=\sum_{i,j}\lambda_{i,j}(Q^TQ-I)_{ij}=\mathrm{tr}(\lambda^TQ^TQ) $$  and have thus managed to do the derivative without losing the matrix format (using formulas from the ):  \begin{align} O=&\frac{\partial \mathcal{L}}{\partial Q}=\frac{\partial}{\partial Q}\mathrm{tr}(Q^TCQ)-\frac{\partial}{\partial Q}\underbrace{\mathrm{tr}(\lambda^T(Q^TQ-I))}_{\mathrm{tr}(\lambda^TQ^TQ)-\mathrm{tr}(\lambda^T)}\\=&(CQ+C^TQ)-(Q(\lambda^T)^T+Q\lambda^T)=2CQ+Q(\lambda+\lambda^T) \end{align}  And this leads to:  $$CQ=Q\underbrace{\left(-\frac{\lambda+\lambda^T}{2}\right)}_{:=\widetilde{\lambda}};\quad CQ=Q$$  If the defined matrix $\widetilde{\lambda}=Q^TCQ$ were diagonal we would already have the result.


first Stack post :D  I see there's a lot on topic already, but I'm still struggling with Tikz picture margins in LaTeX.  Code (PDFLaTeX):  \documentclass{amsart}  \usepackage{tikz}  % Custom Commands %buffer window around unit (total window is 1+2*twindow) \newcommand{\twindow}{0.2}  \begin{document} \title{Pandemic Legacy: Season 1\\Salt Report Zero} \author{Noriko ``Dr. Salt'' Shio} \maketitle  % Tanith Lee quote \emph{Narasen, the leopard queen of Merh, stood at her window and watched Lady~Plague walking about in the city.}\\{\flushright -\textsc{Tanith Lee}, Tales From The Flat Earth: Death's Master  \begin{tikzpicture}[scale=10.5] \draw(-\twindow,-\twindow)rectangle(1+\twindow,1+\twindow); \end{tikzpicture}  \end{document}   Result:    1) Topic question is: Simplest way to horizontally center this tikzpicture square?    Bonus Question:  2) can I control the text margin independently from the picture margin?

I have a figure that is wider than the \textwidth of my document. (I don't want to change the \textwidth.) As a result, the leftmost part of the figure is flush with the left margin, while the rightmost part spills into the right margin too much. I'd like to center the figure, so that it will exceed the \textwidth equally on both sides.


One of my teacher corrected me when I read the article 'a' as /ey/ in a phrase. And he said it should be /uh/.  A banana (/uh/)  I know that both are acceptable /ey/ and /uh/, but is there really a difference on the pronunciation when it is in a phrase or a sentence?

Most times we hear that the letter A is pronounced as [ə], but sometimes I hear that it is pronounced as [eɪ] in American English. Such as the following sentence: From VOA Special English:  She says governments must make that goal of a continental free trade area a reality.  The first A is pronounced as [eɪ], the second A  is pronounced as [ə]. Why? Does it have some regularity in it?


Given $\lim a_n =a$ and $\lim b_n =b$,  show $\lim\frac{1}{n}\sum_{k=1}^{n}a_k b_{n+1-k}=ab$  As you can see, two limit are expanding in two different direction. I have no idea about how to do it.

Let $\{x_n\}$ and $\{y_n\}$ be sequences of real numbers which converge to $\ell$ and $m$ respectively. Show that  $$\lim_{n\to \infty} \frac{1}{n}\sum_{k=1}^{n}x_ky_{n+1-k}=\ell m$$  This is a problem I found in a book, it seemed to be routine, but now I can't solve it.  What I tried :     Let us take some $\epsilon>0$. Now after a stage $N$, both $|x_n-\ell|<\epsilon$ and $|y_n-m|<\epsilon$. Now I wanted to break the sum $$\left|\frac{1}{n}\sum_{k=1}^{n}x_ky_{n+1-k}-\ell m\right|$$in two parts, one upto $N$, and other one for $N+1$ to $n$. Now we need this to be arbitrarily small. But here I am lost. I don't know how to proceed anymore. Because when I take $x_i's$ to make up a finite sum, then the $y_j's$ are there too with $j$ very large. I think this is the main idea, but unable to do anything further. Can someone help me? Thanks.


I currently have Windows 10 installed on an SSD. There is another HDD in the machine for storage purposes. I wanted to add another SSD and install another OS (maybe Windows 7). I know I can always choose during the boot process as to which OS to run. However, is it possible to have a shortcut (for any batch file or something) on the desktop of each of the OS to directly reboot into the other OS?

I have dual boot Win 7 Pro 64-bit and Win 8 Pro 64-bit on a Dell Optiplex 7010 MT.  How can I write two batch files on the desktop of EACH OS to tell it to reboot either into Win 7 or into Win 8.  (Four batch files total, two on each desktop.)  Need it because I frequently remote into this machine and have no way of rebooting efficiently into the desired OS.  I could use in each OS: System Properties - Startup and Recovery - Settings - System Startup - Default Operating System but it just takes too long to go there, make the setting and then do restart.  I'd like some batch files that do all of that for me.  Thanks!!


I posted a question to Stack Overflow regarding the Android Camera API's implementation within AOSP. The question was about a custom View called PreviewFrameLayout that they use for maintaining the image's aspect ratio across the preview so that it does not appear stretched.  The link to the question is here:    Today I found a blog called  who copied the Stack Overflow question as it is and reblogged it in it's entirety without any modifications.I would have been happy if that person changed the code or suggested a solution to the problem,added his twist to it or quoted it's source but they did not do so. (In the answer I accepted,the poster recommended an alternative approach). More over the blog also advertises software outsourcing as it's business.  I took a look at some of the other posts on the blog and they were all similar in  nature.  Here is a link to the blog post that copies my question:   What can/should I do to help Stack Overflow do something about it?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


but I`m not indubitably sure. AM-GM doesn`t work. Karamata`s inequality doesn`t work too.   Prove that inequality holds $$ \sum_{k=1}^n (\frac{a_1+\ldots +a_k}{k})^2 \leq 4 \sum_{k=1}^n a_k^2$$

I recently encountered the following problem: If $\sum a_n^2 $ converges and $\alpha_n= \frac{a_1+...+a_n}{n}$ then show that:  $$4\sum_{n \ge 1} a_n^2 \ge \sum_{n \ge 1} \alpha_n^2$$  I had an approach which i did not manage to utilize, so i am asking if anyone has an idea if it can be used or not:   We note that the right hand side will be maximized if $a_i$ are all of the same sign. Without Loss of Generality, suppose that $a_i \ge 0$. If we use (1.), another way to maximize the right hand side would be if $a_i \ge a_{j}$ for all $i>j$. Let us also suppose that this is true.   And i stop there, i tried many approaches but nothing seemed to work. I thank you in advance for any hint and/or a complete solution.  Supplementary question: Can we construct a similar problem for integrals (instead of series)?


Using the following code, is it possible to insert the long text (in the node) inside a framed box with certain background colour, with a certain defined width and a height that accommodates the long text.      \documentclass{beamer} \beamertemplatenavigationsymbolsempty \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{frame}[fragile,t] \frametitle{1} \begin{tikzpicture}[scale=.9, transform shape] \draw [thick,-latex](0,0) -- (6.2,0) node [black, xshift=.3cm, yshift=0cm] {$x$}; \draw [thick,-latex](0,0) -- (0,5) node [black, xshift=0cm, yshift=.3cm] {$u$}; \draw [ultra thick,blue] (0,2.84) -- +(-40:4.44cm) node [pos=.5,red] {x} node [pos=.5, xshift=4.8cm, yshift=.2cm] {very very very very very very very long long long long long long long text} node [pos=0,circle, draw, black, fill=black, scale=0.5]{}  node [pos=1,circle, draw, black, fill=black, scale=0.5]{}; \end{tikzpicture} \end{frame} \end{document}     to make it look like this

How can I insert a line break in a TikZ node? Simply putting \\ where I want the break doesn't work (see MWE).  Is there a way to make lines break automatically at some specified width?  And can I control the alignment of the text (left, right, centered, justified)?  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node {First line\\second line}; \end{tikzpicture} \end{document}


I managed to dig out my old XP machine and want to install Ubuntu on it. Anyway, what I'm wondering is whether I should choose the 32-bit or the 64-bit.  On the download page there stands that if you have UEFI firmware you should choose the 64-bit, but I don't know what that is so?

What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them.  If so, why not promote 64-bit over 32-bit?


I'm very new to physic and I'm watching this physic lecture:   at the 22:05 he talks about dimensional analysis.  there is an apple and we drop it from height h and we measure how long it takes to hit the ground which we call it t  then he says that $$ t \propto h^\alpha m^\beta g^ \gamma $$ then he talks about dimension $$[T]^1 = [L]^\alpha [M]^\beta \frac{[L]^ \gamma}{[T]^ {2\gamma}}  $$ which if i understand correctly is the unit of the above statement. what i do not understand is that if my height is 3 meters then i square my height  $3^2$ = 6 meters for example the unit is the same so why the alpha in the first expression goes into the unit expression(the second expression)?  the first expression is kind of an equation of the time it takes for apple drop from height h to hit the ground at time t. for example if I square my height the function just return the $f(x^2)$ to me with the same unit(the unit will never change no matter what input I give to a function) the value that the function return will change not the unit.  I found a question about this story too  but this question do not ask the same question as I'm asking. Im asking about why you treat the unit statement as a function statement?  I mean in mathematic if you have a function f(x) and you square your x and put it into f(x) you get the same unit. The unit is not a function and the function is not a unit its a different story.  I feels like he transform a function into unit then calculate, then plug those units back into a function which seems invalid in mathematic.  Im very new to physic and I found physic world is so weird. can someone explain to me in very step by step and easy to understand with an example. Thank you.

Dimensional analysis, and the notion that quantities with different units cannot be equal, is often used to justify very specific arguments, for example, you might use it to argue that a particular formula cannot possibly be the correct expression for a particular quantity. The usual approach to teaching this is to go "well kids, you can't add apples and oranges!" and then assume that the student will just find it obvious that you can't add meters and seconds.  I'm sorry, but... I don't. I'm not convinced. $5$ meters plus $10$ seconds is $15$! Screw your rules! What are the units? I don't know, I actually don't understand what that question means.  I'm specifically not convinced when this sort of thing is used to prove that certain formulae can't possibly be right. Maybe the speed of a comet is given by its period multiplied by its mass. Why not? It's a perfectly meaningful operation - just measure the quantities, multiply them, and I claim that the number you get will always equal the current speed of the comet. I don't see how "but it doesn't make sense to say mass times time is equal to distance divided by time" can be a valid counterargument, particularly because I don't really know what "mass times time" is, but that's a different issue.  If it's relevant, I'm a math student and know extremely little about physics.


This is a question only about the statistical representation of power plays.  When looking at team statistics (), there are numbers that describe teams efficiency in power plays and penalty killing.  In the linked example Denmark had an advantage 29 times and scored 10 goals thus having 34.48% powerplay efficiency. But how do they get the "29"? It is clearly not the amount of penalties as in the penalty killing table Canada has had 29 disadvantages while actually having earned 35 penalties.  It is obvious that a 5-man team playing 2 minutes against team that has one player sent off on a minor penalty is a powerplay, but I am concerned about some trickier cases:   Player a (team X) is sent off for 2 minutes. After 1:50 (game time) player b (team X) is sent off. After 1:50 (game time) player c (team X) is sent off etc. Does this all counts as a single disadvantage situation? Can a team play 4v5 for 50 minutes and have only one penalty killed? Player a (team X) is sent off for 5 minutes. A minute later player b (team Y) is sent off for 2 minutes. Does team X get two disadvantage situations based on a single penalty? It would seem wrong that you have more powerplays just because a 5 minute penalty was split in half by a minor penalty on the opposing team.   Edit  As this question is pretty much a duplicate, I will specify that I am interested to find the interpretation that is used by IIHF as in the linked example. The  defines some of the statistics, but does not define this one.  I initially asked without specifying IIHF rules because I expected that there would be a common and accepted understanding of the statistic.  I was aware of the NCAA rulebook, I just don't really believe that IIHF tournaments and different national leagues follow the NCAA definitions and there should be either the accepted or at least the IIHF definition of counting advantageous/disadvantageous situations.

One of the team statics in ice-hockey is power play percentage. From example, you can see it  for the currently played World Chapmionship or  for this year's NHL season.  I understand that this should be something like ratio of power play goals and total number power plays. I wonder whether in some cases the fact that the power play is shorter than 2 minutes is factored in when calculating PP%.  There are several reasons why power play might be shorter, here are some I can think of:   The power play ended because a team scored a goal. The power play was shorter because a team playing power power received a penalty. The power play was shorter because the penalty of the opposing team was called while playing shorthanded, which means that there was 4 on 4 play before the power play stared. The power play was shorter because it started less than two minutes until the end of the game.   In the first case, this was a successful power play - so there is no doubt how this should be counted. In the second case, it is the mistake of the team who had the advantage that they infringed the rules. So it should be counted an unsuccessful power play and the fact that it was shorter does not seem to be relevant. Probably the similar argument can be in the third case.   But at least in the fourth case we can say that it is not the team's fault that the power play they played was shorter. So the team has less time than 2 minutes to score a goal in the power play. So it seems a bit illogical that if they do not score this should be called in the same way as if they  do not score during the whole 2 minutes.  In any case, what I wrote above are just my speculations. I would be glad to find some official source showing how this statistic is counted in these special cases.


Let $(X,d)$ is metric space. Let $d(y_n,z_n)\to r$. And let $(y_{m_k})$ and $(z_{m_k})$ be subsequences of $(y_n)$ and $(z_n)$ respectively, with $(y_{m_k})\to y\in X$ and $(z_{m_k})\to z\in X$. (Yes, the indices of subsequences are same.)     How to show that $$d(y,z)=d(\lim\limits_{k\to\infty} y_{m_k},\lim\limits_{k\to\infty} z_{m_k})=\lim\limits_{k\to\infty}d(y_{m_k},z_{m_k})=r?$$   I am having trouble deriving second of equality above (obviously).   I went line this: $d(\lim\limits_{k\to\infty} y_{m_k},z)=\lim\limits_{k\to\infty}d(y_{m_k},z)$ by continuity of $x\to d(x,a)$ for fixed $a$. But But I can't take out lim for both the $x$ and $y$ simultaneously.

Let $X$ be a metric space with metric $d$. Show that $d:X\times X\rightarrow \mathbb{R}$ is continuous.   The problem is taken from Munkres Topology second edition, Section 20.  I know that if $d$ is a metric on $X$ then $d:X\times X\rightarrow \mathbb{R}$. My thinking is that the topology that is on $X$ is the topology induced by the metric $d$, and that the topology on $X\times X$ is the product topology on that space where we take the basis to be $$\mathcal{B}=\{ U \times V \mid \text{ $U,V$ both open in $X$}\}.$$ Am I on the right track to say that we define some new metric on $X\times X$ and show that this metric induces the same topology as the product topology and then work with the function $d$ as a function between metric spaces to show continuity? The question doesn't mention anything about defining some new metric and I've tried to solve the problem by looking at $X\times X$ as having the product topology, but in picking some point $(x,y) \in X\times X$ and some neighborhood around $d(x,y)$ in $\mathbb{R}$, I haven't yet found the way to make a neighborhood around $(x,y)$ which maps into the neighborhood around $d(x,y)$.


Can we enable VF page in a lightning component. If possible provide me with suggestion how to achieve it.

As a developer, just curious to know what's the future of Visualforce (pages, components, email templates, etc..) ??  I believe for sure there will be backward compatibility so that the existing ones will still run.  But what's gonna happen next (say after couple of releases when lightning becomes GA & goes mainstream). ??    will Salesforce stop customers from using VF for new development ? will VF & L work together (like embed one in another or call one from another) is it possible to migrate / upgrade existing VF to L without rewriting ?   Just a few questions i can think of now.. but in general if any of you know more details on these, please share with us..  Thanks


There seems to be quite a few pages on how to re-partition a hard-drive without lead to loss of data. There are also pages that state that it is not possible with encrypted drives, and other stating that it is only possible using the command line utilities. I am a bit sceptical as there does not seem to be any hands on instructions how this can be done. Some guidance and links to how this can be done would be helpful. I understand that without encryption one needs to boot from a live-CD or usb, and run Gparted. I have a dual boot Ubuntu 14.04 Windows 7 laptop. The partitions are as follows: I want to increase sda10 (/) and move/decrease sda9 (/home).  Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x75487944     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048      409599      203776    7  HPFS/NTFS/exFAT /dev/sda2          409600   124969634    62280017+   7  HPFS/NTFS/exFAT /dev/sda3       124971006  1465147119   670088057    f  W95 Ext'd (LBA) Partition 3 does not start on physical sector boundary. /dev/sda5      1435705408  1464936447    14615520    7  HPFS/NTFS/exFAT /dev/sda6      1464936511  1465147119      105304+   c  W95 FAT32 (LBA) Partition 6 does not start on physical sector boundary. /dev/sda7       124971008   124973055        1024   83  Linux /dev/sda8      1415692288  1415694335        1024   83  Linux /dev/sda9       124975104   184971263    29998080   83  Linux /dev/sda10      184973312  1403674623   609350656   83  Linux /dev/sda11     1403676672  1415677951     6000640   82  Linux swap / Solaris /dev/sda12     1415696384  1435697151    10000384    b  W95 FAT32  Partition table entries are not in disk order  Disk /dev/mapper/cryptswap1: 6144 MB, 6144655360 bytes 255 heads, 63 sectors/track, 747 cylinders, total 12001280 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x4079e40a  Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table

Which is the best way in order to resize an encrypted (ecryptfs) ext4 home partition ?  Pros nad Cons of each method are greatly appreciated.  $ fdisk -l Disk /dev/sda: 256.1 GB, 256060514304 bytes 255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *          63    41945714    20972826    7  HPFS/NTFS/exFAT /dev/sda2       207007744   211206554     2099405+  82  Linux swap / Solaris /dev/sda3        42946560    82008063    19530752   83  Linux /dev/sda4        82008064   207007743    62499840   83  Linux


I would like to , however I'm not sure how do I read from standard input within process substitution?  My attempts:  $ echo foo >(cat /dev/stdin) >(cat /dev/stdin) foo /dev/fd/63 /dev/fd/62  $ echo foo >(cat -) >(cat -) foo /dev/fd/63 /dev/fd/62  $ echo foo >(cat <&3) >(cat <&3) 3<&0 foo /dev/fd/63 /dev/fd/62 -bash: 3: Bad file descriptor -bash: 3: Bad file descriptor   Alternative version of the same problem:  $ cat file | tee &>/dev/null >(cmd1 /dev/stdin) >(cmd2 /dev/stdin)   What's the right way of doing this?

The process substitution <(cat) doesn't work. Why?  head <(cat)  cat: -: Input/output error   I can use an extra file descriptor, but I don't understand why the above doesn't work.  # Using file descriptor 3 to reroute the input (head <(cat <&3)) 3<&0


I have Core 2 duo PC, 2.1 GHz and with 4GB RAM.  I have Host OS Win7. I have nstalled Workstation 9 on it, and then Ubuntu 13.04 on to workstation 9. The working of Ubuntu 13.04 is very low. How can I enjoy good Ubuntu working with efficient speed?  Thanks Advance.

I run a guest ubuntu 12.04 on a host ubuntu 12.04, with VirtualBox, and the guest is much, much slower than the host (ALT+TAB takes 4-5 secs). I had a look around and I found contradicting opinions on VirtualBox versus VMware (free); so I thought to keep the former.   Both systems are updated, I installed the additions on the guest and I evenly split memory and video memory (64MB) between guest and host. I am running a Toshiba m200 laptop with 4GB ram and shared video memory. The host bios does not include a configuration option for machine virtualization. I have 2 cpus and I can't give them both to the virtual machine.  Is there anything I overlooked that could solve my problem?  Feel free to ask for more info, and thank you for any help.  EDIT Idling with the system monitor open the (single) guest cpu never gets below 55% and could rise to 80 - 90% just by moving the mouse around. Opening Firefox will cause the system monitor to show cpu usage 100% in the guest, while the host shows that both cpus are evenly working around 60%.  My cpu is Intel® Core™2 Duo CPU T5450 @ 1.66GHz × 2.  If this is not a configuration problem, does it mean my machine is too weak for virtualization?


I don't know whether this question was already been asked before, but my team is currently developing a trivia quiz game about football (soccer not NFL). And we want to put player's images or club emblems as part of the questions and answers. My question is, is it legal? Or should we just put text without the images? Please your help is much needed. Thank you.

I'm writing a sports management simulation game. Like most sport management games, it makes heavy use of statistics. I would like to use real players, teams and league names.  i) Am I running the risk of getting into legal battles if I should use the real names? ii) Also what about team colours and emblems etc?    Update Much thanks for all the input!


~~This is my code Can Anybody tell me why outputs are not coming correct?  class FrequencyOfWord {   public static void main(String dt[])   {     String str="Hello World Hello";     int i=0,j=0,space=0,count=0;     for(i=0;i<str.length()-1;i++)     {         if(str.charAt(i)==' ')         {             space++;         }     }     String arr[]=new String[space+1];     String cstr="";     for(i=0;i<str.length();i++)     {         if(str.charAt(i)==' ')         {             arr[j]=cstr;             cstr="";             j++;         }         else         {             cstr=cstr+str.charAt(i);         }         arr[j]=cstr;     }     //System.out.println(str);     for(i=0;i<arr.length;i++)     {         System.out.print(arr[i]);     }     for(i=0;i<arr.length;i++)     {         count=0;         int flag=0;         for(j=0;j<arr.length;j++)         {             if(arr[i]==arr[j])             {                 count++;             }             if((arr[i]==arr[j])&&(i>j))             {                 flag=1;             }         }         if((count!=0)&&(flag==0))         {             System.out.println(arr[i]+"\t\t"+count);         }     }   } }   the output of count is coming to be 1 for each word. Can anyone tell me the error. The flag variable is used so that only once the frequency of a word is printed.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I was watching a video with Tom Hanks the other day and he was talking bout his first kiss experience. So he said, “it was in somebody special’s kitchen”. Does the S in the word special’s indicate possession? Does it sound correct? And why didn’t he put S after somebody like SOMEBODY’S special kitchen. Thank you in advance!

If my two neighbors own a cat, it’s "my neighbors’ cat". If someone famous owns a dog, what's the correct way to describe it: "someone famous’ dog"?


Recently, I find out that somebody uses my network traffic. I found his MAC address and now I wanna find full details of his device. I tried:  and such this, but the response was only the name of manufacture. Tnx from anybody who helps me( or says a better solution to find him:) ) EDIT: Anybody who has another way to find him, tells me.

Just wondering if that is possible. Are there any naming conventions that would allow one to deduce whether the MAC address belongs to a router (of a specific brand), or a network card, etc..


My expertise in machine learning and statistics is probably at a sophomore level. But anyway, my question is this:  Given a Hidden Markov Model returned over a sequence of events with some states, how do you find the most likely path over the states given only the information to create this HMM?  There are 2 things I've learned about in my research: the Viterbi Algorithm and Markov Chain Monte Carlo. As far as I can tell, the Viterbi algorithm is an analytical approach applying some math over the transition matrix of the HMM to find the most likely sequence of future states. And a MCMC is an empirical approach using a stochastic method over the transition matrix to find the most likely path over the states.  I'm wondering if the previous paragraph I wrote is correct. And, if paragraph is correct, in what situations would I use one method over the other?

I want to know what the differences between the  and the  for inference in hidden Markov models (HMM) are.


Prove that if $\gcd(p,q+Ar)>1$ for all integers $A$, then $\gcd(p,q,r)>1$.  I let $A=0$ to get that $\gcd(p,q)>1$. Then I noticed that $\gcd(p,q,r)=\gcd(\gcd(p,q),r)$.  Another way to say it:  Prove that if $\gcd(ag,bg+Ar)>1$ for all integers $A$ ($\gcd(a,b)=1$), then $\gcd(g,r)>1$.

I can't crack this one.      Prove: If $\gcd(a,b,c)=1$ then there exists $z$ such that $\gcd(az+b,c) = 1$ (the only constraint is that  $a,b,c,z \in \mathbb{Z}$ and $c\neq 0)$


I have accepted a scholarship at a certain university, after exchanging many emails with the supervisor. I was interviewed by him and he personally took trouble to secure funding for me. And he also helped me a lot throughout the process. But now I have received a better offer from a better university, which has a better research group.  Now I am not sure how to email my supervisor rejecting the offer, after accepting it months back. It seems a really unethical thing to do. But considering all the other aspects, the second university seems to be the ideal choice for me.  How should I reject the first offer without offending my supervisor?

I have accepted a PhD offer from a very good university to do a project very close to my interests. I have told the project supervisor I accept it. In the meanwhile I have managed to secure a PhD offer from another 2 universities much better in world rankings and with better research groups and better faculty. Additionally these 2 universities do research exactly on what I want to devote my PhD research.  My only commitment to the first university is a mail confirming I accept. Nothing else. I understand declining the offer after already having accepted it is quite dishonest but it is a huge decision that will affect my future in a very significant level.   I would like your opinion and I would also like to ask for possible consequences of such an action. As far a postdocs concerned, in the first university there is no chance I ever get a postdoc since they do not actually do research on my area (except for the prospective supervisor and even he not as much).  UPDATE I have decided to do as I was afraid to. I have decided to choose a different university than the first one that I have already accepted the offer. My offer acceptance included:    An online "I accept" statement. An e-mail I sent stating "I accept the scholarship and this University is my first option"   I do not have any legal commitments since I have not signed anything. The supervisor of the first university though is really nice to me and continuously was sending me mails. How do I very nicely tell her I will not be joining in the end? Additionally the place I will go in the end will be for research in Mathematics and not Physics. Can I use this as a part of a sensical excuse?  WHAT I HAVE CHOSEN AND WHAT THE CONSEQUENCES WERE  I think that I should let people, especially other beginning grad students know what happened with my case. I have chosen to nicely tell the first university I got accepted that I will not be attending and will not be pursuing a PhD there since I decided I have different research interests (which is true). I had applied there in the first place since I was not sure what I wanted to do and because it was a nice program. Despite that, I got an offer from a World top university to work on 100% my research interests. I explained this to them, the first uni, and they happily let me go and wished me good luck, especially the supervisor who faught a lot secure me funding. I was lucky.


I like make a for loop in bash script with parameters, some like this:  for VALUE in {"$from".."$to"} do       echo -e "Processing $VALUE \n"  done   This no loop, only return: "Processing {1..4}" It is possible?

How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5}


A little bit of context, I read the sentence below after the system - a computer application - has been subject to a certain kind of update:     The system will be able to not create a record of that movement   anymore.   I think they are trying to stress the new behavior of the system compared to the previous one, hence that sentence construction.  Firstly, would it sound better if we changed the sentence for something like this where we get rid of the split infinite:     The system will be able not to create a record of that movement   anymore.   At least for me that sentence construction seems a little bit odd and something an English native speaker would not say, do you agree with me or is it perfectly acceptable?

This is one thing that keeps bugging me, and maybe there's a direct answer. Grammatically, which one is more correct of these two?  Does it make a difference?  I tried not to do that. I tried to not do that.


"I've never said that nor thought it"  I don't think so, but I don't know how I can say it.

I wasn't forcing myself to say anything, or/nor trying to be funny.   "Or" sounds more grammatically correct to me. But "nor" has more Google results. So I'm confused.


This question originates from Pinter's Abstract Algebra, Chapter 27, Exercise G1.     Let $F$ be a field, and let $c$ be transcendental over $F$.   Prove {$a(c):a(x) \in F[x]$} is an integral domain isomorphic to $F[x]$.   [Edited]  In general, if $A$ is an integral domain, then $A[x]$ is an integral domain.    Let $S_c =$ {$a(c):a(x) \in F[x]$}.  $S_c$ is an integral domain iff $S_c$ is a commutative ring with unity that has no divisor of zero.   $S_c$ is obviously commutative and closed under addition and multiplication by the properties inherited from $F[x]$, which is an integral domain.  Note $F[x]$ is an integral domain for $F$ is a field. $a(x)=1\in F[x]\implies a(c)=1\in S_c$. Suppose $a_1(c)a_2(c) = 0$ for nonzero polynomials $a_1(x), a_2(x)\in F[x]$.  Let $b(x)=a_1(x)a_2(x)$. Then $b(c) = 0$, contradicting that $c$ is transcendental. Hence $a_1(c)a_2(c) = 0$ implies either $a_1(x)$ or $a_2(x)$ is zero; that is, $S_c$ has no divisor of zero.   This completes the proof that $S_c$ is an integral domain.  Let $\sigma_c: F[x]\rightarrow S_c$ such that $\sigma_c(a(x)) = a(c)$. Note $\sigma_c$ is a ring homomorphism from $F[x]$ onto $S_c$. Furthermore, $a(c)= b(c)\implies a(x)= b(x)$, for otherwise suppose $a(x)\ne b(x)$, then $a(x)-b(x)\ne 0\implies a(c)-b(c) \ne 0$, as $c$ is transcendental, contradicting $a(c)=b(c)$.  Hence $\sigma_c$ is bijective and therefore an isomorphism; that is, $S_c\cong F[x]$.

If I am correct simple extension fields are extensions generated by one element. I have learned that this means that elements of a simple extension can be written as powers of that element as long as the power is greater than the degree of that element. Also this means that all elements of the simple ext. Can be written in terms of decending powers of the generating element where the highest power is the degree of the generator minus 1. This concept seems to work for generating elements whose irreductable in a certain field is a descending degree polynomial. Looking at the construction of the complex numbers by starting with $\Bbb R$ (and doing $\Bbb R [x]/\langle x^2+1\rangle$), it is said that all elements are of the form $a+b\cdot \text{generator}$. But when the generator is evaluated for the irreductable, $x^2+1$, we see... $(\text{generator})^2=-1$. Thus there is no first power of gen. Can someone explain where all elements of the extension just explained are of the form $a+b\cdot \text{generator}$ comes from or explain this situation for anytime where the irreduc ( gen, F)  is not a descending degree polynomial. I hope my question is clear.  Thank you


I'm trying to build Scipy from source following these instructions: . I first installed the dependencies: sudo apt-get install gcc gfortran python-dev libopenblas-dev liblapack-dev cython  However, my Scipy unit tests do not pass, and the maintainers asked me to tell them what my BLAS and LAPACK versions are. However, I seem to find this information. How can I tell where these libraries are installed? Using Ubuntu 20.04.1.

Background: I'm trying to build my program but first I need to set up libraries in netbeans. My project is using GLU and therefore I installed libglu-dev. I didn't note location where the libraries were located and now I can't find them..  I've switched to Linux just a few days ago and so far I'm very content with it, however I couldn't google this one out and becoming frustrated.. Is there way to find out where files of package were installed without running installation again? I mean if I got library xxx and installed it some time ago, is there somecommand xxx that will print this info?  I've already tried locate, find and whereis commands but either I'm missing something or I just can't do it correctly.. for libglu, locate returns:  /usr/share/bug/libglu1-mesa /usr/share/bug/libglu1-mesa/control /usr/share/bug/libglu1-mesa/script /usr/share/doc/libglu1-mesa /usr/share/doc/libglu1-mesa/changelog.Debian.gz /usr/share/doc/libglu1-mesa/copyright /usr/share/lintian/overrides/libglu1-mesa /var/lib/dpkg/info/libglu1-mesa:i386.list /var/lib/dpkg/info/libglu1-mesa:i386.md5sums /var/lib/dpkg/info/libglu1-mesa:i386.postinst /var/lib/dpkg/info/libglu1-mesa:i386.postrm /var/lib/dpkg/info/libglu1-mesa:i386.shlibs   Other two commands fail to find anything. Now locate did it's job but I'm sure none of those paths is where the library actually resides (at least everything I was linking so far was in /usr/lib or usr/local/lib).   The libglu was introduced just as example, I'm looking for general solution for this problem.


For example, if I have a data-set as below  ID ITEM 1   A 2   B 3   C 1   B 1   C 2   A   then need a sql query which gives output as below:  ID  ITEM 1    A, B, C 2    B, A 3    C   That is how to group based on ID and display all the values pertaining to another column attributes in SQL.

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I try to have an operator== called from a derived class  but if i use base class pointers, it does not work, although the objects are created as derived classes  class A  { public:     bool operator==(const A & other)     {         cout << "this should never been called" << endl;         return this==&other;     } };  class B : public A { public:     bool operator==(const A & other)     {         cout << "this should be called instead" << endl;         return this==&other;     } };  void process(A _b1,A _b2) {     if(_b1==_b2)     {        cout << "here" << endl;     } }  int main()  {    B b1;    B b2;     process(b1,b2); }   although the operators overload have the same signature, i dont get it  plz help me out  thx

Someone mentioned it in the IRC as the slicing problem.


I’ve got an iPhone 4S that I still use, but the WiFi chip has died. I want to try the hairdryer and freezer trick (I used it once before) but in the meantime I want to be able to add apps to it through iTunes. However, somehow the Apps tab is gone. Is there a way to get it back?  Help would be appreciated a lot.

Now that Apple has removed the ability to access the iOS App Store in iTunes 12.7 on Mac/Windows , I can't find any way to download an IPA file from the App Store. As a note, I'm not worried about installing the IPA files (see ), I just need the IPA files as a developer looking for some basic information on the apps. I'd like to solve this without resorting to jailbreaking as my devices are already updated to iOS 10.3.3.  Here are things that I've tried that didn't work:   Extract from backup: The apps seem no longer to be backed up. Save to Mac from iPhone management software: I believe this has been blocked by Apple works as far back as iOS 8.3. Figuring out how the file is downloaded via proxy connection: At least for me, this looks too complicated to do because you have to authenticate with your Apple ID and I'm sure that by now, Apple even requires the phone to be authenticated in some way. Not sure if it would even be possible in the same way that you see all those Android APK download services out there.   At least for now, it looks to me like maybe the only way is to hold onto an older version of iTunes for as long as that works.


computer science student here, haven't done much in GIS, just trying to finish a project for a class.  What I have is a CSV of origin/destination points as co-ordinates (longitude and latitude)  what I want to do is to create a heatmap of the routes, similar to a traffic heatmap that you see on google maps.   ie. I want more frequented pieces of road to be red, and less frequented to be green. not just the more frequented origins/destinations, thats trivial.  what's the easiest way to do this? I have experience with python, java and matlab.   I was wondering if there is a free software that could do it straight from the CSV? or maybe a python module?  edit: since im using just a CSV of origin/destination points, I believe it is not a duplicate, since the referenced post used GPS tracks, which is quite different information.

This winter I am planning to track my downhill skiing/snowboarding using a GPS.  Most of my riding will occur at the same resort.  I would like to be able to create a sort of "heatmap" that shows the amount of runs that I have made in a given area.  As I add more and more GPS traces to my database, my goal would be to see a sort of linear heatmap of the most traveled areas.  Given the nature of downhill skiing, you would expect the uphill chairlift lines will be the "hottest" because it will be the only places visited over-and-over again.  Given that 1) my track will not be the same every time and 2) the area covered by following one "run" may be a few hundred feet wide, what might be the best way to analyze this "linear" data to create a sort of heatmap?  My thoughts were to buffer the lines, then intersect the polys to get a sort of Venn Diagram thing going.  My preference is to use open-source technologies.  I've got QGIS and PostGIS loaded and available.  UPDATE: In regards to @blah238's response, I was thinking of something that might be able to "collect" the number of passes ("runs") through an area, and then symbolize by the count.  Conceptually, this would be similar to ArcGIS "" (but for lines, not points) or  (but for multiple line in roughly the same area).  A more visual example of a similar concept might be a traffic-flow map, where highly-congested areas would equate to "highly-traveled" ski runs/areas:    I've read the following questions that may give some ideas, but they don't really address what I am trying to accomplish:


Why does wp add slashes to $_POST values? All my quotes in my $_POST are escaped.. is there a reason for that??

I've been writing some Wordpress plugins, and I've been having some problem with Wordpress putting magic quotes on POST and GET data.  Specifically, the "wp_magic_quotes" function in \wp-includes\load.php, which is called (presumably on every response) in wp-settings.php.  This function adds magic quotes to the data even if I turn off magic quotes in PHP settings.  /**  * Add magic quotes to $_GET, $_POST, $_COOKIE, and $_SERVER.  *  * Also forces $_REQUEST to be $_GET + $_POST. If $_SERVER, $_COOKIE,  * or $_ENV are needed, use those superglobals directly.  *  * @access private  * @since 3.0.0  */ function wp_magic_quotes() {     // If already slashed, strip.     if ( get_magic_quotes_gpc() ) {         $_GET    = stripslashes_deep( $_GET    );         $_POST   = stripslashes_deep( $_POST   );         $_COOKIE = stripslashes_deep( $_COOKIE );     }      // Escape with wpdb.     $_GET    = add_magic_quotes( $_GET    );     $_POST   = add_magic_quotes( $_POST   );     $_COOKIE = add_magic_quotes( $_COOKIE );     $_SERVER = add_magic_quotes( $_SERVER );      // Force REQUEST to be GET + POST.     $_REQUEST = array_merge( $_GET, $_POST ); }   Is it safe for me to just comment out the wp_magic_quotes() call in wp-settings.php?  That is, will it negatively affect the normal Wordpress code and/or open up some exploitation vector?  If so, is there some other way to do it besides modifying WP code (so I don't have to deal with this every time there's an update)?


Ten to five years ago I was reading , and in a few articles I stumbled upon sentences like "The user should... She needs to...", with "she" referring to the user. Unfortunately I can't find anymore the original quotes, but this was the gist of them. Now, English is not my native language (French is), and I wondered then why was the author using "she" where I would have used "he" or (even then) "they". I know there are related questions here, but I don't think mine is exactly a duplicate. What I'm really asking here is whether "she" may have been considered in the recent past a more inclusive pronoun than "he". It seems that - at least according to  -  is nowadays an acceptable default when nothing is known about someone's gender preference. My intuition is that a few years ago using "she" may have been a - maybe American English - attempt for inclusiveness, but I'd really like to hear the opinion of native speakers on this feeling of mine.

There are some questions on gender-neutral pronouns both  and on .  User Christine Letts :     In academia, there is currently a   movement toward using the feminine   pronoun at all times.   I wonder why that is. I came across several examples on papers I read, but the only one I can remember at the moment is a book: Seth Godin's . While some might not be comfortable labeling it as part of academia, it suits my point perfectly. Every time he refers to a person, he uses the feminine pronoun.  User Senseful  the following, potentially identifying affirmative action as the precursor for this trend.     I remember reading somewhere that it   was recommended to use the opposite of   what most people stereotype the   profession as. So, for example, when   talking about a chiropractor, you   would use "her", and when talking   about a secretary, you would use   "his".   So, where do you think this trend comes from?


i have a problem with my singleton template class.. i got this problem and searched for like 4 hours or more for a solution but i dont understand why it doesnt work because i declared get_instance() in the header file and in the source file  sorry for my bad english and if its an duplicate but the other thread doesnt help me at all.  hope you can help me. thank you in advance  Fehler    LNK2001    Nicht aufgelöstes externes Symbol ""public: static class common::config_t & __cdecl common::singleton_t<class common::config_t>::get_instance(void)" (?get_instance@?$singleton_t@Vconfig_t@common@@@common@@SAAAVconfig_t@2@XZ)".      Fehler    LNK1120    1 nicht aufgelöste Externe   singleton.hpp  #ifndef SINGLETON_H #define SINGLETON_H  #include <iostream> #include <cstdint>  namespace common {     template <typename T>     class singleton_t{     public:         static T& get_instance();          singleton_t(const singleton_t&) = delete;         singleton_t& operator= (const singleton_t) = delete;      protected:         singleton_t() {}     };  }  #endif // !SINGLETON_H    singleton.cpp  #include "stdafx.h" #include "singleton.hpp"  namespace common {     template<typename T>     T& singleton_t<T>::get_instance()     {         static T instance;         return instance;     } }   config.hpp  #ifndef CONFIG_H #define CONFIG_H  #include <cstdint>  #include "singleton.hpp"  namespace common {     class config_t : public singleton_t<config_t> {         friend class singleton_t<config_t>;     public:         config_t();         ~config_t();     public:         uint32_t variable_to_do_anything;     }; }  //#define CONFIG common::config_t::get_instance()  #endif // !CONFIG_H   config.cpp  #include "stdafx.h" #include "config.hpp"  namespace common {     config_t::config_t() : variable_to_do_anything(1){      }      config_t::~config_t() {      } }   and i am trying to get it like this          auto& config = common::config_t::get_instance();         config.variable_to_do_anything;

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'm pretty sure the way to go is with a contradiction, letting $x = \sup E$. Then I think I need to either show that $x < x^2\in E$ (contradicting $x = \sup E$ in that an element of E is greater than x) or show that $({x^2})^2 > 2$ (contradicting the terms of E). As I wrote this I realized showing $({x^2})^2 > 2$ would be redundant since that would only mean something if $x^2\in E$ in the first place... anyway, I'm not sure how to go about this proof.

I am working on a proof about Dedekind cuts on the positive rational numbers. I have been stuck for a while on the following point and would appreciate any help.  Given $x\in \mathbb{Q}^+$ such that $x^2<2$, how to find $y\in \mathbb{Q}^+$ such $y>x$ and $y^2<2$?


Let $f:(a,b)\rightarrow \mathbb{R}$.   $f$ satisfied the following property:  If $\forall x_{1},x_{0},x_{2}\in(a,b)$ and $x_{1}<x_{0}<x_{2};$then$\frac{f(x_{0})-f(x_{1})}{x_{0}-x_{1}}\geq \frac{f(x_{2})-f(x_{0})}{x_{2}-x_{0}}.$   My question : whether the function $f\in C((a,b))?$    We can get  $\displaystyle\frac{f(x_{1})-f(x_{0})}{x_{1}-x_{0}}\geq \frac{f(x_{2})-f(x_{0})}{x_{2}-x_{0}}. $Let $\displaystyle g(x)=\frac{f(x)-f(x_{0})}{x-x_{0}},$ if we can prove $g(x)$ is bound and  decreasing (not strictly ) in $(x_{0}-\delta ,x_{0});$ then we have $f^{'}_{-}(x_{0}) $ exists .In a similar way ,$f^{'}_{+}(x_{0}) $ exists.  $f^{'}_{-}(x_{0}) $ exists $\Rightarrow\displaystyle\lim_{x\rightarrow x_{0}-}f(x)=f(x_{0});$ $f^{'}_{+}(x_{0}) $ exists $\Rightarrow\displaystyle\lim_{x\rightarrow x_{0}+}f(x)=f(x_{0}).$  Obviously, $f$ is coutinuous at $x=x_{0}.$Further, $f\in C((a,b))!$     But  I failed to prove  $g(x)$ is bound and  decreasing (not strictly ) in $(x_{0}-\delta ,x_{0}).$Sometimes  I doubt the conculsion that  $f\in C((a,b)).$  Either make a counterexample to deny it ,or prove the conculsion is correct?

A real valued function $f$ defined in $(a,b)$ is said to be convex if    $$f(\lambda x+(1-\lambda)y)\le \lambda f(x)+(1-\lambda)f(y)$$    whenever $a < x < b,\; a < y < b,\; 0< \lambda <1$.   Prove that every convex function is continuous.     Usually it uses the fact: If $a < s < t < u < b$ then $$\frac{f(t)-f(s)}{t-s}\le \frac{f(u)-f(s)}{u-s}\le\frac{f(u)-f(t)}{u-t}.$$    I wonder whether any other version of this proof exists or not?


I want to know how to determine overflow in C/C++. if my input for integer is 9999999999999999999999 , It is a very big number and if I run the below code I will get a garbage output.   #include <stdio.h>  int main(){     int a;     scanf("%d",&a);     printf("%d",a);     return 0; }   Is there any way to know , if the input is a big number, I can output "Input is too big" .  Note that, I have already checked  . But the question is different from my one.

I was writing a program in C++ to find all solutions of ab = c, where a, b and c together use all the digits 0-9 exactly once. The program looped over values of a and b, and it ran a digit-counting routine each time on a, b and ab to check if the digits condition was satisfied.  However, spurious solutions can be generated when ab overflows the integer limit. I ended up checking for this using code like:  unsigned long b, c, c_test; ... c_test=c*b;         // Possible overflow if (c_test/b != c) {/* There has been an overflow*/} else c=c_test;      // No overflow   Is there a better way of testing for overflow? I know that some chips have an internal flag that is set when overflow occurs, but I've never seen it accessed through C or C++.    Beware that signed int overflow is undefined behaviour in C and C++, and thus you have to detect it without actually causing it. For signed int overflow before addition, see .


I think its an older card. I've been googling for about a half and hour and cant find it.

I want to clone  without falling prey to the legend rule and without using . Are there any cards that allow you to copy a card's text without copying its name? I was unable to find any but might have failed to search the right wording.


In , page 28 (see also ), it's said that:      You can force-reload a module, but you're    never supposed to do it.   Can anyone explain why we are not supposed to reload modules in Python?

I have a long-running Python server and would like to be able to upgrade a service without restarting the server. What's the best way do do this?  if foo.py has changed:     unimport foo  <-- How do I do this?     import foo     myfoo = foo.Foo()


Whenever someone asks a question that's his/her working problem that he/she is unable to fix that bug that's why asked it here. Maybe that person is just beginner and our experts give down-vote to he/her without knowing what was wrong.  So my question is why system doesn't ask down-voter what's is wrong in this? So the person asking question can correct it next time.

Note: If you're looking for a simple explanation as to why comments aren't required on downvotes, see .   I used to get "upset" (though that is too strong a term) when I got downvoted without comment. If my answer isn't good enough then I'd like to know why. Not only does it improve the answer for the OP but it improves my knowledge too.  Where the down-vote has been explained I've found it useful & it has improved my answer, or forced me to delete the answer if it was totally wrong.  So is there any way we can encourage people to leave a comment? Perhaps they don't lose rep if they explain their down-vote?  I must admit though that I haven't always explained my down-vote either so you could call me a hypocrite. I've also grown a thicker skin over the months of using SO (it seems to have come with the higher rep score ;-)), so I'm less bothered about this now.


I'm pretty sure this link worked some day in the past:  It should only display your favorites from all Stack Exchange sites. Instead, the filter is not working, so I consider this to be a bug. This query works on every Stack Exchange site, except for stackexchange.com, itself. If this isn't a bug, I still think this should be the expected behavior. I know a question that I marked as favorite, but I don't remember on which site I've seen the question, since we have many Stack Exchange sites that are related to each other (i.e. Stack Overflow, Super User, etc.)

inbookmarks:mine was fixed for searching within a particular Stack Exchange site, but often I find myself wanting to search for a question I favorited/bookmarked, but not remembering which site it was on when it could conceivably have been on a number of different sites. On the cross-site search at  it does not work, presumably because we have different user ids on each site. Is there a way it could be made to work? Note that this request is for searching, not just viewing, so it's not a duplicate of . Just viewing is not very helpful when you have a huge volume of bookmarks across Stack Exchange sites.


If packagehello does not match, the output is still displayed.  Aim: to see no output in situation 2  Situation 1:  user@hostname ~]$ sudo yum list 'package*' packagehello packagehello package2world packagehello package2world   Situation 2:  user@hostname ~]$ sudo yum list 'package*' | grep -E 'package1.*|package2.*' package2world package2world   How to show the output only if both words match using grep?

I would like to get the multi pattern match with implicit AND between patterns, i.e. equivalent to running several greps in a sequence:  grep pattern1 | grep pattern2 | ...   So how to convert it to something like?  grep pattern1 & pattern2 & pattern3   I would like to use single grep because I am building arguments dynamically, so everything has to fit in one string. Using filter is system feature, not grep, so it is not an argument for it.    Don't confuse this question with:  grep "pattern1\|pattern2\|..."   This is an OR multi pattern match.


Is there a Stack Exchange site that deals with specific questions about  e.g. Facebook or Instagram? Questions like  How can I batch unfollow multiple people?   If I unfollow him/her, does he/she know it in real-time?

I want to ask question about problems in my Facebook account. On which Stack Exchange site should I ask?


I have a "Canon Pixma MX925" printer and run Ubuntu 16.04 on my computer.  How can I install and use this printer?

I tried to install the MP190 drivers, but appeared a message show me that requires to have libcupsys2. I understand that libcup2 is an update of libcupsys2.   How do I solve this? Are there proprietary drivers for my Canon printer or scanner?


I have a Bootstrap dropdown button that is filled like the following:

Brand1

Brand2

   Then I have the following JS code to dynamically create and fill a second dropdown button depending on the selection of the first:  $(function() {   $("#brandselection li").click(function(e){     e.preventDefault();     $("#model").load("getModelsUL.php?brand=" + encodeURI($(this).text()));   }); });   The resulting button code is basically the same as the one described above - and is created correctly.  But then, I use the exact same JS function (only the id of the div being different) to react to a click on the second button - and it doesn't even enter the function.  I assume it is a problem with the DOM not being considered, since the second button was created after the initial DOM, but I don't know how to handle it correctly.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Hopefully my question is not the same as  as I am asking about the English in writing a prohibition. Do "No A or B" and "No A and B" mean the same thing, where A and B are present participle of some verb?  For example: Is there any difference between     No eating and drinking   and     No eating or drinking   ?  Which one of these two, if any, should one say if he/she wishes to express the idea "either A or B is allowed", but not both A and B (such as drinking alcohol and driving)?

I'm not a native speaker. Apologies if the question is obvious.  The scenario is:   I'm not doing A, and I'm not doing B.   In order to communicate this joint event in a single sentence: should I say: "I'm not doing A or B" or "I'm not doing A and B." (I know I can also say "I'm doing neither A nor B" but that is a seperate solution.)  The source of my uncertainty is that the logical negation of (A and B) is [(not A) or (not B)] so I don't know whether "I'm not doing A and B" can be interpreted as   I'm not doing A, or I'm not doing B.   which is not my original scenario.


I need to know if it is possible to obtain the current execution node?   Example:  ..html <script id="x">   console.log(document.currentNode.id); // << this must return "x" </script> ..html   Thanks!

How can I reference the script element that loaded the javascript that is currently running?  Here's the situation. I have a "master" script being loaded high in the page, first thing under the HEAD tag.  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script type="text/javascript" src="scripts.js"></script>   There is a script in "scripts.js" which needs to be able to do on-demand loading of other scripts. The normal method doesn't quite work for me because I need to add new scripts without referencing the HEAD tag, because the HEAD element hasn't finished rendering:  document.getElementsByTagName('head')[0].appendChild(v);   What I want to do is reference the script element that loaded the current script so that I can then append my new dynamically loaded script tags into the DOM after it.  <script type="text/javascript" src="scripts.js"></script> loaded by scripts.js--><script type="text/javascript" src="new_script1.js"></script> loaded by scripts.js --><script type="text/javascript" src="new_script2.js"></script>


This is a coding question.Here we have to find the $k$-th value in which we get $888$ as the last three numbers for a cube of a number. For example, if $k=1$ the first value with last three numbers as $888$ is $192 ^3$.Then if $k=2$ the second value with last three numbers as $888$ is $442 ^3$. After checking the solution for the problem they arrived at this formula   answer = $192+(k-1)250$.   My question is how did you arrive at this formula and how do you tackle math problems where you need to find n last digits.I know cyclicity is one of the methods but that is used to find the last digit.In this case i have to find the last three digits.

Find the Smallest Perfect cube ending in 888  My Try: First of all its cube root should have Last digit as $2$.  Now if $x888$ is a Perfect Cube Then $$x888=888+1000x=8(111+125x)$$ which means $111+125x$ should be a Perfect cube.  Need a small Hint to Proceed Further


Given that $p$ be a prime and $a$ and $b$ are integers not divisible by $p$, prove that  $$(a+b)^{p} \equiv( a^p + b ^p ) \pmod{p}$$  My approach : By Fermat's little theorem, $$a^p \equiv a \pmod{p}$$ and  $$b^p \equiv b \pmod{p}$$ Then  $$a^p + b^p \equiv (a + b) \pmod{p}$$ Either $p \mid (a+b)$ or $p \nmid (a+b) $. In the former,  $$(a+b)^p \equiv 0 \equiv (a+b) \pmod{p}$$ In the latter,  $$(a+b)^p \equiv (a+b) \pmod{p}$$ follows from F.L.T.   1. Is this approach correct ?   2. How to prove the result starting with the binomial theorem: $$(a+b)^p = a^p + \sum_{k=1}^{p-1} a^{k} b^{p-k} {p \choose k} + b^p \equiv (a+b) + \bigg\{ \sum_{k=1}^{p-1} a^{k} b^{p-k} {p \choose k} \bigg\} \pmod{p}$$ How do we show that the term within the curly braces is $0 \pmod{p}$?  Any help is much appreciated.

a, b are integers. p is prime. I want to prove: $(a+b)^{p} \equiv a^p + b^p \pmod p$  I know about Fermat's little theorem, but I still can't get it I know this is valid: $(a+b)^{p} \equiv a+b \pmod p$ but from there I don't know what to do.  Also I thought about $(a+b)^{p} = \sum_{k=0}^{p}\binom{p}{k}a^{k}b^{p-k}=\binom{p}{0}b^{p}+\sum_{k=1}^{p-1} \binom{p}{k} a^{k}b^{p-k}+\binom{p}{p}a^{p}=b^{p}+\sum_{k=1}^{p-1}\binom{p}{k}a^{k}b^{p-k}+a^{p}$ Any ideas?  Thanks!


I need to make a data structure of permutations. Currently I am using a generator that is very time expensive. Is there an alternative to a generator or some other way to systematically step through different indices in for a matrix? The other problem might be the function that now takes the strings and makes them a list of lists.  This is for an assignment problem.  def ourpermutations(iterable, r=None):     """     Input:     String or numbers separated by a space     optional= the length that the permutations must be      Output:     a generator of permutations     """      pool = iterable.split(" ")     n = len(pool)     r = n if r is None else r     for indices in product(range(n), repeat=r):         if len(set(indices)) == r:             yield tuple(pool[i] for i in indices)   def ExhaustiveSearchinputs(datamatrix):     """     Input:     datamatrix: numpy array      Output:     list of every permutation allowed and the time it took to run(this is to help with the optimisation and      testing process)      """      # Important starting values     start = time.time()     length = len(datamatrix)     thestring = ""      #Generate the permutations     for i in range(0,length):  #this is making a string of numbers from 0 to the size of the matrix -1         thestring += str(i) + " "     thestring = thestring[:-1]     listofassociations = list(ourpermutations(thestring,length))  #this was the function we made earlier      #these are the time calculation     end = time.time()     thetime = end - start     return listofassociations, thetime,thestring ##########PLEASE NOTE THIS FUNCTION TAKES 4 seconds once datamatrix is length 8 and takes 99 seconds for length 9    The output is correct just slow.

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


Does gravity besides frequency change the speed of a beam of light?For me the easiest way to grasp this possibility is the so called frame dragging where the motion of the frame affects the overall speed of an object or light.So if we presume the frame moving towards the source of gravity this should affect the speed of a beam of light when moving vertically upwards or downwards.Let say we put a mirror on a s=100 m high skyscraper and  measure the total time for the light to travel 200 m back to the emitter at the bottom of the building. So if the beam of light travels one half of the path at speed c-g' and the other half at speed c+g' the overall time should be like this: $$\ ( \frac{s}{c-g'}+ \frac{s}{c+g'})=\frac{2sc}{c^2-g'^2}>\frac{2s}{c}$$  implying that the mean speed of the beam was slower than if the beam moved horizontally. Could this be true or there were experiments that proved this is impossible?

Does gravity slow the speed that light travels?  Can we actual measure the time it takes light from the sun to reach us?  Is that light delayed as it climbs out of the sun's gravity well?


For example, I use 'the' frequently, but mistype it as 'teh' and MS word automatically corrects such words without me having to right-click the incorrect word and select the correct spelling. Similar examples are 'completoin' for 'completion', 'nad' for 'and', etc. MS Word automatically corrects the spelling of such common mistakes on-the-fly, but TexStudio just gives a red wiggly line without correcting it on-the-fly.  I have checked the below link and it hasn't helped me. The link below contains information on how to create Macros for the usage of abbreviations, which isn't what I want. Also, it contains information on auto-correct multiple capital letters and auto-completion of technical words, which again is not what I want.   NOTE: This is NOT a duplicate of the below question.

I was wondering if there's an Autocorrect feature in TexStudio 2.6.2 that works like in MS Word so that if I have to type a certain word many times, the editor writes it for me as soon as I press spacebar after I finish typing the shortcut for that particular word. (Eg. phl --> photolithography)   I've already searched StackExchange for similar questions and read Qrrbrbirlbel's comment  . I've tried my hand at the Macros but it's not working properly, maybe some bug that needs TeXStudio to re-start for it take action or maybe I simply don't know how to make it work.  Can someone help me, please?


In his atomic model, Niels Bohr proposed that electrons can be present only in those orbits where their angular momenta is an integral multiple of $\frac{h}{2π}$. That is $mvr=\frac{nh}{2π}$, where $n=1,2,3,...$ But how did Bohr get this expression? I know that later de Broglie derived this equation by assuming that electrons were actually standing waves. But how did Bohr get this expression. How did he derive it? There is literally no proof of this equation in my book. I am so confused. Can someone provide me the proof of this equation. Please help.

Bohr gave his atomic model in the year 1913, whereas De Broglie proposed his idea of matter waves in the year 1924 (from which the relationship can be derived by considering an electron to be a standing wave). How is it then that Bohr came up with this postulate?


I am hoping to find out where the formula  $$\frac{\pi}{2}=\sum_{k=0}^{\infty}\frac{k!}{\left(2k+1\right)!!}$$ comes from. I can't see how one could begin to prove it.

The sum of the series $$ \frac{\pi}{2}=\sum_{k=0}^\infty\frac{k!}{(2k+1)!!}\tag{1} $$ can be derived by accelerating the  $$ \frac{\pi}{4}=\sum_{k=0}^\infty\frac{(-1)^k}{2k+1}\tag{2} $$ using . Mathematica is able to sum $(1)$, so I assume there must be some method to sum the series in $(1)$ directly; what might that method be?


By coincidence I looked at my servers ssh log (/var/log/auth.log) and I noticed that someone is constantly trying to gain access:   Sep  7 13:03:45 virt01 sshd[14674]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.31.116.42  user=root Sep  7 13:03:48 virt01 sshd[14674]: Failed password for root from 116.31.116.42 port 13423 ssh2 Sep  7 13:03:52 virt01 sshd[14674]: message repeated 2 times: [ Failed password for root from 116.31.116.42 port 13423 ssh2] Sep  7 13:03:52 virt01 sshd[14674]: Received disconnect from 116.31.116.42: 11:  [preauth]   This happens a few times every minute, and has been going on for a long time without me knowing about it.   Question Should I be concerned about this, if yes: What should I do about it?

I have a little SVN server, old dell optiplex running debian. I don't have that high demands on my server, because its just a little SVN server... but do want it to be secure.  I just renewed my server to a newer and better optiplex, and started looking a bit into the old server. I took it down after experiencing problems. When I check the logs, its full of brute-force attempts and somehow someone has succeeded to enter my machine. This person created some extra volume called "knarkgosse" with two dirs "root" and "swap1" or something.  Don't really know why and what they do, but sure do want to prevent this from happening again. I find this a bit strange though because I change my password ever few months or so, and the passwords are always random letters and numbers put together... not easy to brute-force.  I know I can prevent root from logging in, and use sudoers... and change the SSH port, but what more can I do?  So I have a few questions:   How can I prevent logging in for 5 minutes after X amount of incorrect tries. Or slow tries down after each incorrect try? Is there some kind of central blacklist which a server can connect to? A blacklist that keeps track of IP addresses that are "unsafe" and should never be granted access? What more can I do to apply safety to my server?   Like I said earlier, I am running Debian 5 with Apache (www-data user problem?), svn, mysql, php, phpmyadmin, hudson. It is on a home network with port forwarding on 80, 443, 8080, 8180, 23 and 22.


I am having trouble with my email validation code using function validateEmail (str). Any suggestions?  //validates email address form function validateEmail (str)     {     var retVal;     var atpos=retVal.indexOf("@");     var dotpos=retVal.lastIndexOf(".");     if (atpos<1 || dotpos<atpost+2 || dotpos+2>=retVal.length)     {     retVal = false;              return retVal;     }

Is there a regular expression to validate an email address in JavaScript?


I hope this kind of question will qualify for the purpose of this website. What is the purpose of alternate levels in BIT.TRIP. Runner 2 ? By alternate levels I mean those levels that stray from the "main path" on the world map and you have to "pay" some gold to play them.  It seems to me that the quantity of gold demanded is not so big and you can easily play them normally, also they are not more difficult (like the vault ones) or special in any other way.  EDIT: It looks to me that I was not so clear on my question. I was not talking about the alternate exits, I was talking about the levels on the WORLD MAP that are  "locked" and you have to pay gold to get to play them.

Is there any point in taking the alternate exits in Bit Trip Runner 2?  I can't see any benefit to doing so in terms of unlocking a different path in the overworld, so is it just for your own benefit?


How do I overwrite my game data in Shall We Date?: Ninja Assassin+ by deleting my old Game Center account for it on my old iPhone? Because my current data on my new phone is more up to date than the data on my old phone. How do I sync or overwrite the data so it can be the same data as on my new phone ? I also have the Game Center update on both phones  .

I have one particular game that saves data through the game center. Somehow the saved game data got messed up which causes the game not to work properly when I a connected to the internet (I.e. When the game center is accessible).   Is there some way to delete all the data belonging to that game only?


I understand that the Maximum Modulus Principle works, but I'm a little baffled as to why. To be more precise, the picture I have in my head is something like this: for a compact set $K \subset \mathbb{C}$, since $|f|$ (for $f$ holomorphic) can only attain its maximum on the boundary $\partial K$, if you consider a disk centered on the origin, no matter what value $|f|$ obtains on the boundary of this disc, you can just increase the radius of the disc a little bit and find a higher value of $|f|$; in other words, the absolute value of function just keeps growing without bound. What exactly is driving/forcing this growth?  I'm looking for some kind of explanation, geometric or otherwise, that could aid my intuition. In particular, why does $\mathbb{C}$ behave so differently from $\mathbb{R}$ here?  EDIT. In response to the "duplicate" tag: I am looking for something a little deeper than the answers there. As mentioned above, an explanation of the difference in behaviours of $\mathbb{C}$ and $\mathbb{R}$ in this regard, perhaps with a tie-in to the Cauchy-Riemann equations...it seems like there's something that causes functions to behave fundamentally differently over $\mathbb{C}$, and I would like to understand why, with the Maxiumum Modulus Principle as a concrete example.

Let $D$ be an open set in the complex plane and $f(z)$ be a non-constant holomorphic function on D. Then $|f(z)|$ has no local maximum on D.  I can follow the proof fine - usually if I don't understand a theorem intuitively beforehand, the proof will offer the insight necessary. Here, however, I can't see the reason for the Maximum Principle to hold - or perhaps I was just too shallow in my grasp of the proof.  Does anybody have any shillings of wisdom that they would be willing to offer? Cheers.


I have been presented with graphic files in the format .png.  I need to  include them in a Plain TeX document.  How is that possible?  Is there a way to convert them to .eps?

I used the OzTeX implementation of TeX, also I used to typeset my docs in plain TeX, not LaTeX for me, so I had no problem to insert an image using the OzTeX, now I'm back to TeX docs, am using the TeXWorks frontend, but I can't insert an .eps image file, it seems the \includegraphics macro its only for LaTeX, so I can't use it, any idea on how to insert an image when using plain TeX?


$$I=\int_1^2\int_1^2\int_1^2\int_1^2 {{x_1+x_2+x_3-x_4}\over{x_1+x_2+x_3+x_4}} \,dx_1\,dx_2\,dx_3\,dx_4$$  $I=1/2$  or  $1/3$ or $1/4$ or $1$ ? [from ISI-Kolkatta Sample papers]  I know that there must be a really clever trick to get this one. Just not able to see it. Any hint will be really useful for me.

Evaluate  $$I=  \int_1^2\int_1^2 \int_1^2 \int_1^2  \frac{x_1+x_2+x_3-x_4}{x_1+x_2+x_3+x_4}dx_1dx_2dx_3dx_4$$    Answer Options:   $1$ $\frac{1}{2}$ $\frac{1}{3}$ $\frac{1}{4}$   I need some suggestion here. I tried to evaluate one by one but it becomes messy. I think there some trick involved here.


Today I started to create a set of generic answers for most common SO questions.  The main reason I want this to be done (by my hands or not) is that it would make closing such questions very quick and simple.  When you see a question asked on SO for the third time in an hour and you have some spare time, please create a generic question and answer so that, in the future, such questions could be easily marked as duplicates.  Here's my first post of this sort:    I know that many questions have such generic answers. But some don't, and I'd love to see the gaps filled.  So, once again, whenever you find a question which is trivial and can't find a valid duplicate to close it, please spend some time and create such question and answer.

Per , I've been working for about 2 weeks on trying to get Ajax uploading of files to work in Rails 3 using Paperclip to manage attachments. I finally found a solution that works really well, and is much better than any of the tips I got in several questions that I asked. In the spirit of sharing the final answer to all the questions I was asking I wanted to type up a "canonical answer" that would really explain how I finally got this working, with hopes that it will help many others. There are dozens of questions on this topic, many of which have been answered already. It seems silly to "ask it again" just so I can post my own answer to my own question... So, what I'm wondering is, if you've come up with a really good solution to a commonly asked question, what's the best way to share it with the SO community?


We have to $|G|=d$ and $G=\left<a\right>=\{a^n : n \in \mathbb{Z}\}$ by definition of cyclic group.  To show what you are asking, I want to define a function, not necessarily this $$\phi : \mathbb{Z} \to G \text{ such that } z \mapsto \phi(z)=a^d$$ and use the theorem: Let $\varphi:G \to G'$ be a group homomorphism, then $$\dfrac{G}{ker(\varphi)} \simeq Im(\varphi)$$  I need your help to define well a function that serves me.

Let $f$: $Z_m \rightarrow G$, $f(n)$ = $a^n$. Show that f is a function and an homomorphism.  Doing a review on the whole semester, and a little refresh on this topic would be great.   By definition I know $G$ has the same order of $Z_m$, but not sure how to attack this problem with ease.   I also know that cyclic groups of the same order are isomorphic.   (I cannot use the fact that cyclic groups of the same order are isomorphic, that's why I ask for another approach, because I can't use theorems or lemmas that have not been discussed in class.)


Is this inequality true ? How to prove it ?  $$\frac{1}{2}(e^x + e^{-x}) \leq e^{\frac{x^2}{2}}$$

Prove the following inequality:   $$\dfrac{e^x + e^{-x}}2 \le e^{\frac{x^2}{2}}$$   This should be solved using Taylor series.  I tried expanding the left to the 5th degree and the right site to the 3rd degree, but it didn't help.  Any tips?


I have a simple very tiny web app, and wanted to make my life a bit easier by having a very simplistic deployment script, that does the following:   Pull updates from git Run composer Change owner of all files   The script basically works fine and looks like this:  #!/bin/bash echo "Updating repository ..."; sudo git pull;  echo "Installing composer dependencies from lockfile ..."; composer install;  echo "Changing owner to www-data:www-data ..."; sudo chown -R www-data:www-data .;  echo "Deployment DONE!";   However, as you can see, I have two commands run as sudo in this script. Nameply the git pull and the chown.  My problem is as follows: I am aware that there is a timeout for how often the system asks for my password when running commands with sudo. The problem is, that, even though I am well within the timeout, the script always asks for the password on the second sudo (chown) command.  Could someone please enlighten me, why that may be the case?

To do a patch manually I must type this command   sudo ./playback_delete_data_patch.sh 09_delete_old_data_p.sql     There is a space just before the 09:   sudo ./playback_delete_data_patch.sh [space] 09_delete_old_data_p.sql   How can I run this inside a script?  There are also several other commands but this one is giving trouble.


Consider I have a name of a function which does not require any argument in a var -     var fn = "foo";   Can I execute it in some or similar like this -  eval(fn);   It does not work. Please suggest.  My definition of function will look like this -  function foo() {   ....do something.... }

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I want to hide an account from my .  I would like to reference my Stack Exchange profile in a professional setting. I do not want one of my accounts publically displayed for employers to see.   I've heard that it's possible to add accounts to a list of hidden communities, but I haven't been able to find any way to add them from my network profile page.  How can I hide a community from my Network Profile?

Can I hide my accounts that I already participate in, for a specific site?  For example, I'm in one where I don't want to make my accounts visible for others:    Or is this not possible?


If $$|x| < 1$$ Prove that  $$\begin{align}\large 1 + 2x + 3x^2 + 4x^3 + \dots = \frac{1}{(1 - x)^2}\end{align}$$

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


If you attach a ideal string to a wall and pull it with force F, there should be a tension T=F in the string. And the string will apply force F on the wall too.  But what if there are two persons pulling the same string in opposite directions with same force F? Shouldn't the tension in the string be 2F since both persons are applying force in opposite directions. Or the another person which is pulling the string is acting as wall just like in first case?

I'm going to provide my argument for why I think the tension in a rope should be twice the force exerted on either side of it.  First, let's consider a different example. Say, there is a person named A and a block in space. A pushes on the block with a force of 100 N. Then, the block will also push A with a force of 100 N by Newton's third law. Now, consider the case where instead of the block, there is a person B who is also pushing on A with a force of 100 N while A is pushing on him. A will experience a force of 100 N because he pushed on B, AND another 100 N because he is being pushed by B. Hence he will experience a force of 200 N. Similarly, B also experiences 200 N of force.  Now, back to the original problem. There are two people A and B in space with a taut rope (no tension currently) in between them. If only A is pulling and B is not, then I agree that the tension is equal to the force A exerts. This situation (in my opinion) becomes analogous to the above if B is also pulling. So, say both of them pull from either side with a force of 100 N. Then the rope at the end of B will pull B with a force of 100 N (this pull is caused by A). By Newton's third law, the rope will experience a pull of 100 N. But B is also pulling his end of the rope with 100 N. Therefore, the tension should be 200 N. Similarly, the end of the rope at A must pull A with 100 N of force (because B is pulling from the other side) and hence experience a force of 100 N itself by Newton's third law plus another 100 N because A is pulling on the rope.  Apparently, the answer is not this (according to my searching on the web). So, could anyone tell me why this reasoning is wrong? Thanks.  EDIT : So apparently people don't agree with my first example, leave alone the second. This is to the downvoters and the upvoters of the highest-rated answer: You all agree that if only A pushes B with a force of 100 N, then A and B both will get pushed by a force of 100 N in opposite directions, right? Then, in the case where B is also pushing with a force of 100 N, it doesn't make sense that the answer would be exactly the same. It doesn't seem right that no matter what B does, B and A will always experience the same force as they would have if B hadn't applied any force.  EDIT 2 : I'm going to provide here a link to a question that I posted:  According to the answer and the comments there, the reason as to why my first example is incorrect is different to the one provided here. So maybe you should all read the answer and the comments provided by the person and reconsider what you think.


Could you walk me through the most efficient way to solve this modulo?     $276^{247} \mod 323$

How do I simplify this expression?     $276^{246} \mod 323$    Thank you so much.


I want that even if my friends have activated "Get notifications" for me, stop them from getting my notifications because I don't want my friends from seeing my likes, comments and so.  I have seen  and my question is right that.  But unfortunately it has been marked as duplicate with a totally different question () while they differ.

Many people added me as a close friend and they receive updates about my activities on Facebook. I do not want to show them via notification what I post or what I like.  How to turn these notifications off?


I've been using the following code successfully to find 00 PROGRAM and delete all of the following lines of the block, throughout the many blocks in the file, but to keep the last line of the block if it contained XYZ.   sed -n '/00 PROGRAM/,/^$/{/./{h;d}; x;/XYZ/p}' file    Now I need the opposite. I need to find Group cat, and delete only the following lines of the block until it gets to the next empty/blank line. The initial pattern needs to remain in the file. The blank line must stay in the file. Other lines of text also need to remain in the file. Can anyone suggest changes to this structure to make it work, or suggest a new line of code?  Before code runs:   Group cat  Group div  Group member1  Group member2  Group select       <empty line> Common cat Last update   After code runs:  Group cat      <empty line> Common cat Last update   Then it will search for the next pattern match and delete lines in that block and so on.

doesn't seem to work  The next example would delete everything between "ONE" and "TWO:"   #!/bin/sh sed ' /ONE/ { # append a line     N # search for TWO on the second line      /\n.*TWO/ { # found it - now edit making one line         s/ONE.*\n.*TWO/ONE TWO/     } }' file   i was expecting to delete everything between ONE and TWO.i tried with file where file contains.  [user5@mailserver ~]$ cat file ONE hello TWO   but the output come like   [user5@mailserver ~]$ ./test ONE hello TWO   I was expecting ONE TWO I am trying to make it correct but not able to do.