I am having trouble figuring out how to work with convergence in probability questions. I will give a self-study example from Casella and Berger's Statistical Inference Below.      Let $X_{1}...X_{n}$ be a sequence of random variables that converges   in probability to a constant a. Assume that $\mathbb{P}(X_i > 0 ) = 1$   for all i. Verify that the sequences defined by $Y_{i}^{'} = a/X_{i}$   converge in probability.   I will give the solution to this problem below and then point out where I am having trouble.   $\mathbb{P}(|a/X_{i} - 1| \leq \epsilon)$ $=$ $\mathbb{P}({{a}\over{1+\epsilon}} \leq X_{i} \leq {{a}\over{1 - \epsilon}})$ = $\mathbb{P}(a-{{a\epsilon}\over{1 + \epsilon}} \leq X_{i} \leq a + {{a\epsilon}\over{1 - \epsilon}})$  ( ** In the step above, why is 1 chosen in the expression $(|a/X_{i} - 1|)$? Also, why is $(a - {{a\epsilon}\over{1 + \epsilon}})$ used? I know that since we know $X_{n} \longrightarrow a$ in probability, we're probably trying to rewrite the expression in such a way to use that fact.... but I'm not sure how to just "pull it out of my hat" essentially; ie, in a testing situation. ** )   Use $(1 + \epsilon)^{-1} < (1 - \epsilon)^{-1}$ and continue  $\mathbb{P}(|Y_{i} - a^{1/2}| > \epsilon)$ $\geq$ $\mathbb{P}(a-{{a\epsilon}\over{1 + \epsilon}}$ $\leq$ $a + {{a\epsilon}\over{1 - \epsilon}}) = \mathbb{P}(|X_{i} - a|$ $\leq$ $\epsilon{{a}\over{1 + \epsilon}})$ $\longrightarrow 1$ as i $\longrightarrow$  $\infty$   ( ** In the above, why is the constant being used now $a^{1/2}$ ?? )  Is there some better, more systematic way to approach these problems? I want to be able to encounter any convergence problem and instantly know the steps to employ, rather than try to rewrite the problem in a tricky way.

Let $\{X_n\}_{n\geq 1}$ be a sequence of random variables s.t $X_n \to a$ in probability, where $a>0$ is a fixed constant. I'm trying to show the following: $$\sqrt{X_n} \to \sqrt{a}$$ and $$\frac{a}{X_n}\to 1$$ both in probability. I'm here to see if my logic was sound. Here's my work     ATTEMPT      For the first part, we have   $$|\sqrt{X_n}-\sqrt{a}|<\epsilon \impliedby |X_n-a|<\epsilon|\sqrt{X_n}+\sqrt{a}|=\epsilon|(\sqrt{X_n}-sqrt{a})+2\sqrt{a}|$$   $$\leq \epsilon|\sqrt{X_n}-\sqrt{a}|+2\epsilon\sqrt{a}<\epsilon^2+2\epsilon\sqrt{a}$$   Notice that    $$\epsilon^2+2\epsilon\sqrt{a}>\epsilon\sqrt{a}$$   It follows then that   $$P(|\sqrt{X_n}-\sqrt{a}|\leq \epsilon)\geq P(|X_n-a|\leq \epsilon\sqrt{a})\to 1 \;\;as\;n\to\infty$$   $$\implies \sqrt{X_n}\to\sqrt{a} \;\;in\;probability$$      For the second part, we have   $$|\frac{a}{X_n}-1|=|\frac{X_n-a}{X_n}|<\epsilon \impliedby |X_n-a|<\epsilon|X_n|$$   Now, since $X_n \to a$ as $n \to \infty$, we have that $X_n$ is a bounded sequence. In other words, there exists a real number $M<\infty$ s.t $|X_n|\leq M$. Thus,   $$|X_n-a|<\epsilon|X_n|\impliedby |X_n-a|<\epsilon M$$   Looking at it in probability, we have   $$P(|\frac{a}{X_n}-1|>\epsilon)=P(|X_n-a|>\epsilon|X_n|)\leq P(|X_n-a|>\epsilon M)\to 0 \;\;as\;n\to\infty$$   I'm pretty confident in the first one, but am pretty iffy on the second. Was my logic sound?


I was going over a cpp con video, and I couldn't understand how it worked. I understand what it is doing, but now how. I haven't seen these syntaxes before.   template<class T> inline void allocator<T>::construct(pointer p, T const& val) {     ::new((void*) p) T(val); }   The allocator decouples memory allocation and object creation, (unlike the new operator). So this is the construction part. So to construct an object a reference to an already constructed T object is necessary. That seems circular.  What is the ::new((void*) p) T(val); line doing ?  Also what is inline void doing ?   Where can I learn more about things like this in C++ ?

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.


I've tried so many things but nothing helped out

My desktop has a fast wired connection and I would like to set up a sort of "wifi hotspot" that allows mobile devices to connect to my pc and share this fast connection. How would I go about doing this?


I recently posted a question - , and I have tried a lot of things and could not manage to do it. But while I was waiting for an answer, this guy came outta nowhere and marked it duplicate.  Now firstly, the duplicate question link he provided has an answer which doesn't work for me. Sure, the questions do look similar, but they are not. But there is now way I can communicate this to the guy who did this, because there is no facility for pm. And this screws the chance of anybody providing an answer now.  Is there no way I can prevent these self-proclaimed SE 'guru's to at least have the courtesy of asking the OP in a comment whether the new link actually solves the problem or not, and upon OP confirming it, close it, rather than close it on their own? Sure I understand, they are guys with responsibility more than even Batman, but can't they wield it with a little more caution and understanding?

I asked a question regarding a very specific feature of a program and whether or not it works with a larger program.  Within hours someone had marked it with "This question may already have an answer here of a similar question, but not related to my question.  The question I asked IS NOT ADDRESSED in the referred-to question. It's frustrating to spend half an hour putting together an intelligent and specific question, and then have someone mark it as a duplicate (or possible duplicate), which apparently causes people to skip over my question. I haven't received any more responses since the question was flagged.   Two questions:  (1) How do I get this flagging removed and (2) what's the best way to prevent these "helpful" flaggings in the future?


This website states that the equivalent statement to if A then B is if NOT B then NOT A  This doesn't make sense.  I also am a bit confused about the truth table for an if then statement, as I have different answers from different websites.  UofT's website says in their "introduction to logic video" states that if A then B is impossible to answer if A is false.  But another website states this is false in their truth table:    Please ignore the second table, only look at the first  The truth tables are exactly the same for both statements.  But I do not understand the logic in the equivalent statement at all.

Why is "$P \Rightarrow Q$" equivalent to "$\neg Q \Rightarrow \neg P$"?  I am trying to understand why this does always apply, in terms of pure logic. Can you please explain it to me?


I'm brand new to TeX and am making my first beamerposter.  I'm using XeLaTeX and I like the package pxfonts for the math and the body text.  However, I'd like to have sans serif text in the block headers, and I don't like the default sans serif font that results from the pxfonts package.  Can someone explain to me, in simple terms, why I cannot use the package fontspec to modify the sans serif font after I have loaded pxfonts?  And what should I use instead?  Consider the code below.  How can I change the font of the sans-serif part while keeping the first paragraph and the equation as they currently appear?  \documentclass[11pt]{article} \usepackage[english]{babel} \usepackage{blindtext} \usepackage{pxfonts}  \begin{document} \blindtext  \[ \int_0^1 x^2 \, dx = 1/3 \]  \sffamily \blindtext %This is the text whose font I wish to change to something already loaded on my computer. \end{document}

The standard font packages make global changes to the fonts in my document. What if I want to use a particular font for just a portion of my text?   How do I find the right name of the font? How do I select the font? How do I restrict the scope of the font change?     There are separate answers for different flavors of TeX (quick links):


I understand that pressure increases with depth in a liquid and that it is the difference in pressures at the top and bottom of an object submerged in a liquid that provides the buoyant force. What I do not understand is how the liquid exerts a pressure on the bottom of a completely submerged object. Isn't all the liquid displaced at this point? (No liquid remains underneath the object???) And if the pressures exerted horizontally are equal and opposite, it seems there is a net pressure directed downward. How then is the buoyant force still dependent on pressure differences and directed upward?

Let's say a 10N cube (in air, on Earth) rests flat on a scale at the bottom of a tank of water, and the scale reads 8N, so there is 2N of buoyant force on the cube.  How does the buoyant force manifest itself on the cube?  I assume the force is normal to the surface of the scale, but if there isn't any water under the cube, how does the water push up on the cube?


Man 1: We need to do something. Man 2: What do you want us to do? We can't do anything. Is the emboldened response/question natural and does using "us" include Man 1? If not, would "What do you want we should do?" work better to include both of them?

I'm confused about 'want you to do (something)' and 'want you do (something)'.  Example:      "I want you to eat fish" instead of "I want you eat fish" or "I want that you eat fish".    Can anyone explain what is the grammar rule for this?


Does there exist an infinite field with characteristic $p$ for any prime $p$?  I haven't seen any such fields in my course yet.

Can you give me an example of infinite field of characteristic $p\neq0$?  Thanks.


I've had a  on coding-style, but I often read in the comments of some questions, that such questions are unwelcome on Stack Overflow even though there is still a  tag. So I searched for a Stack Exchange site which could be right for my question. My question is: could I post my question on Stack Overflow?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


How to find the sum of the series:  $\sum _{n=0}^{\infty}a_nx^n$  where $a_0=0,a_1=1,a_{n+1}=a_{n-1}+a_{n}$  Please give some hints on how to find the sum


\begin{figure}[!ht]    \begin{subfigure}{0.31\textwidth}   \begin{tikzpicture} \begin{semilogyaxis}      [name=plot, ymin=0,ymax=10,xmin=0,xmax=2,     xlabel = $L(m)$,     ylabel = {$T(s)$},     legend pos=north west,   scatter/classes={%     a={mark=o,draw=black}}] \addplot[scatter,only marks,%     scatter src=explicit symbolic,  error bars/.cd,    x dir=both,  x explicit,   y dir=both,   y fixed=1.61] table[x=x,y=y,x error=xerror] { x      y     xerror 0      2.20  0.01 0.38   2.13  0.03 0.46   2.1   0.04 0.54   2     0.02 0.63   1.95  0.01 0.79   1.86  0.02 0.84   1.79  0.05 1      1.69  0.08 1.13   1.61  0.06 1.31   1.48  0.04 1.42   1.39  0.02 1.7    1.22  0.02  };\label{puntos}      ]  \addplot [     color=red,     domain=0:2     ] {-0.6354*x+2.325};\label{Func} \end{semilogyaxis}  \node[anchor=north east, draw=black, fill=white] (legend) at (plot.north east) {\begin{tabular}{l l}  Ajuste & \ref{Func}\\  Datos & \ref{puntos} \end{tabular}}; \end{tikzpicture}     \caption{Figura 2 --      \begin{equation}         y_1=a\cdot x_1^2+b\cdot x_1+c     \end{equation}      \textit{$r_2=0.99$, la correlación es positiva y casi es máxima por lo que se podría decir que el ajuste es casi perfecto.\\  \begin{equation*}   a=-6,2065   \end{equation*} \begin{equation*}  b=8,4139  \end{equation*} \begin{equation*}  c=-1,251 \end{equation*} \begin{equation*}  y_1=-6,2065\cdot x_1^2+8,4139\cdot x_1-1,251 \end{equation*} -\\}}  \end{subfigure} \end{figure}

In the following MWE:  \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest}  \begin{document}     \begin{tikzpicture}       \begin{axis}[ymode=log, ymin=0.005, ymax=0.1]         \addplot [mark=diamond]         plot [error bars/.cd, y dir=both, y explicit]         table [x=x, y=y, y error=y-err]{%           x y y-err           0 0.070 0.003           1 0.026 0.001           2 0.018 0.001           3 0.012 0.02         };       \end{axis}     \end{tikzpicture} \end{document}   The error of the last point is too large so that the error bar should span from -0.008 to 0.022. However, because I am plotting in log-scale, the lower bound is completely gone, as shown below. In standard plotting libraries (like MATLAB or matplotlib), the lower error bar usually extends until below as far as ymin.  I know that one way to fix this is to to use y error minus=y-min, y error plus=y-max and choose an appropriate y-min. However, I am wondering if there is a better way, since this requires modifying all the points even though only one is problematic. Better yet, is there a way to fix the behavior of error bars?    Example Python code that produces the correct plot (MATLAB is similar):  import matplotlib.pylab as plt x = np.arange(0,4) y = [0.070, 0.026, 0.018, 0.012] yerr= [0.003, 0.001, 0.001, 0.02] plt.yscale('log')  plt.errorbar(x,y,yerr=yerr, fmt='-o') plt.xlim([-1, 4]); plt.ylim([0.005, 0.1]) plt.show()


i have a lot of star trek 1E through to voyager, Vampire the masquerade, Shadowfist, jedi knights, rage, Battletech, alien vs predator CCG cards i'm trying to sell but have no idea where to sell them, anyone able to help me please? They're taking up space that i don't have to spare. In all it's probably around 20 to 25k cards all up....

I played for quite a few years and have a ton of cards that I want to get rid of. I have a mix of all editions before 2007. 7th, 8th, etc...  So the question is where can I sell them effectively. And if it is better to just get all rares out, and then sell the rest as a lot at a common hobby store.  Thanks for the feedback!


First I must say that I am not an expert in string theory so my understanding is minimal and therefore feel free to correct any misunderstandings I may have. String theory is very popular among mathematicians and physicists nowdays. I can understand why mathematicians may be interested in it, since to us it's just another theory but I cannot understand why physicists are so interested in a theory that we have no evidence is the correct theory of quantum gravity. Here are a few points about why string theory is a questionable theory of quantum gravity.  String theory hasn't managed to eliminate singularities. One of the reasons we want a theory of quantum gravity is to deal with singularities, but string theory not only doesn't resolve them, it even generalizes them to higher dimensions.  string theory hasn't made any prediction. In fact, as far as I know (please correct me if I am mistaken) string theory hasn't even been able to predict classical phenomena and I am not sure whether it's possible for string theory to make any prediction.  There is no experimental evidence of supersymmetry or even the existence of the graviton.  It cannot give general relativity as a classical limit. Many times I have heard of people claim that string theory gives Einstein's field equations in the classical limit but I have yet to see it in process, it can give rise to Einstein's field equations only for special cases but I haven't been able to find any proof that the theory of general relativity can be fully recovered from string theory (hopefully you can show me references to prove me wrong)   So I want to ask, why do physicists believe that string theory is the appropriate theory of quantum gravity? What evidence do we have? Is it just because it's the best we have, so we choose to work with what we've got?

I know that string theory is still under heavy development, and as such it still can't make predictions (or not that many predictions anyways).  On the other hand, it is clear from the number of years this theory has been under development and from the large number of theoretical physicists studying it, that it is considered a good and viable candidate as a quantum gravity theory.     So, what is the evidence that this is true? Why is it considered such a good candidate as the correct quantum gravity theory?   Without wanting to sound inflammatory in the least, it has been under heavy development for a very long time and it's still not able to make predictions, for example, or still makes outlandish statements (like extra dimensions) that would require a high amount of experimental evidence to be accepted. So - if so many people believe it is the way to go, there have to be good reasons, right? What are they?


My data set is about forest fires in Portugal. I want to define a model that can predict better wildfires. In my data set, the outliers are entries referring to big fires. What is the best performance measure in this situation? I'm using the model SVM, which is the one that gives me a lower value of MAE but with RandomForest i get better values of MSE and NMSE. I don't know what is the best in this situation. Thanks for your help.

It is a common practice to measure an SVM model's performance by calculating its MSE (Mean Square Error). Why not use Mean Absolute Error (averaging errors' absolute values instead of squared values)?


Is there any difference when I say I wish I were rich or I wish I had been rich?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


How many $n$-length binary sequences, $(x_1,x_2,\ldots x_n)$, are there such that $x_1 ≤ x_2 ≥ x_3 ≤ x_4 ≥ x_5 \le \ldots$ ?  My attempt but I am not sure it is correct (finding pattern):  How to find out the solution to this problem? Any hint/reference would be also appreciated. Thanks in advance.

If each term $a_k$ is either 0 or 1, how many sequences are there $a_1, a_2, \cdots$ , $a_n$ such that    $$a_1 \leq a_2 \geq a_3 \leq a_4 \cdots?$$   If we let $f_n$ be the number of ways for a n-term sequence, we can get a recursive formula.   Suppose $a_1=1$. Then $a_2=1$ and $a_3=0,1$ which is actually $f_{n-2}$.  Suppose $a_1=0$. If $a_2=1$, we get $f_{n-2}$ by similar reasoning. If $a_2=0$, $a_3=0$ so the cycle repeats. Thus the # of ways in this case is $f_{n-2}+f_{n-4}+f_{n-6}+\cdots$.  So the recursive formula will be $$f_n=2f_{n-2}+f_{n-4}+f_{n-6}+\cdots$$ and $f_1=2, f_2=3$. How do I get a closed form, or did I find the wrong recursive relation?


I installed TeXnicCenter Version 2.02 Stable (64 bit). I wanted to make beamer file for my thesis proposal. I already have my sample beamer, but when I run it, 3 errors occurred. It says     "Latex Error: File `beamer.cls' not found"   I really need to beamer. Please help me. What should I do?

I often run into problems in LaTeX with packages. I did a reinstall (MiKTeX) and it seemed to fix some issues with knowing where packages coming from or going. In general, I am not sure what should or does happen when using \usepackage command.  Is it standard that these packages are automatically pulled from the internet? Where do they go (by default)? Is there a better place to put them?  If I am troubleshooting, and if we can say packages are usually installed automatically, when, and should I ever, install packages manually? If so, where would I put them?  For instance, I believe the package easylist is installed on my computer. I was able, with some difficulty, to get into the roaming folder, looked around, and really the only package I saw, was several easylist files, such as .sty, and an associated readme file. I did a windows search for easylist, and only found one, with suffix .tpm and in the Program Files (x86)\MiKTeX 2.9\tpm folder.  My problem currently, is that I am trying to use the todonotes package. It seems to require the xcolor package. But this "can not be found". It asks to choose a place to get it. I think default was "choose random", but I just switched it to internet, and some random mirror site in country (USA). That didn't work, and I'm afraid I've now fiddled with the default settings for getting packages, which will create problems later.  Here are some other threads I have been fishing through:             In lieu of picture, I have this:    miktex-pdftex.exe: No connection could be made because the target machine actively refused it.  miktex-pdftex.exe: Data: connect failed in tcp_connect() {}======================================================================  ! LaTeX Error: File `xcolor.sty' not found.  Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty)  Enter file name:    and from clipboard:    MiKTeX Problem Report Message: No connection could be made because the target machine actively refused it.  Data: connect failed in tcp_connect() Source: Libraries\MiKTeX\PackageManager\PackageManager.cpp Line: 2461 MiKTeX: 2.9 OS: Microsoft Windows 7 Home Premium Edition, 64-bit Service Pack 1 (build 7601) Invokers: explorer SystemAdmin: no PowerUser: no Root0: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 Root1: C:\Users\aUserName\AppData\Local\MiKTeX\2.9 Root2: C:\ProgramData\MiKTeX\2.9 Root3: C:\Program Files (x86)\MiKTeX 2.9 UserInstall: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 UserConfig: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 UserData: C:\Users\aUserName\AppData\Local\MiKTeX\2.9 CommonInstall: C:\Program Files (x86)\MiKTeX 2.9 CommonConfig: C:\ProgramData\MiKTeX\2.9 CommonData: C:\ProgramData\MiKTeX\2.9    (from "Package Installation" window below)   The required file        tex\latex\xcolor\xcolor.sty  is missing. It is part of the following package:        xcolor  The package will be installed from:  ftp://... [Change...] The package will be installed for...


I am having troubles getting a cronjob on ubuntu 16.04 digital ocean to work.   I programmed a python spider, which i want to run every 5 minutes. In order to run this spider I made a script runmyspider.sh (chmod +x) with the command:  scrapy runspider aspider.py   Now I want to call this script via Cron.   */5 * * * * sh /scripts/runmyspider.sh 2>&1 /scripts/spider.log   However, the spider never runs (I can see that no changes in the database have been made, if I execute the file manually the changes happen)  What am I doing wrong here? I have set up a cron multiple times before, but this time I seem to get an error into it...  Thanks for all your advice!

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I noticed that when I enabled two-factor authentication for my Apple ID and have handoff turned on, the code pops up on the mac where I'm seeking the two factor. Seems like it renders the two-factor worthless. Isn't the point it have it go to another device, separate from the login device?  I guess the obvious solution is to not have handoff on the mac?

My Apple-ID (e.g., on  ) is set up to require entry of a 6-digit code sent to my registered Apple products.  This code is being sent to the same device I'm currently requesting to log in. I feel this absolutely defeats the purpose of this 2-Factor Authentication: If a person knows my password, this person can receive the code on that device, and access my apple account without any problems.  Is this a bug or can I set up / change how this security step works?


Why I am getting StackOverflowError at line 11.  The line that I am getting error: System.out.println(new JavaInnerClass().callInnerClassMethod(animalQuantity));  Here is the full code:   public class Dog extends Animal { private String animalName; private int animalQuantity;  public Dog(String animalName, int animalQuantity) {     animalName(animalName);     quantity(animalQuantity);     // JavaInnerClass.tempDog name = new JavaInnerClass.tempDog();     // System.out.println(name.totalQuantity(animalQuantity));     System.out.println(new JavaInnerClass().callInnerClassMethod(animalQuantity)); }  @Override public String animalName(String animalName) {     this.animalName = animalName;     return animalName; }  @Override public int quantity(int animalQuantity) {     this.animalQuantity = animalQuantity;     return animalQuantity; }   }  the JavaInnerClass:     public class JavaInnerClass {  Dog[] dog = { new Dog("Husky", 90), new Dog("Boxer", 100) };  tempDog temp = new tempDog();  public static class tempDog {      public int totalQuantity(int quantity) {         return quantity + 200; // assuming a statement     }  }  public int callInnerClassMethod(int quantity) {     return temp.totalQuantity(quantity); }  public static void main(String[] args) {     new JavaInnerClass(); }   }

What is a StackOverflowError, what causes it, and how should I deal with them?


I am monitoring a Cpanel (centos) server which have a 2-core CPU (4 virtual CPU cores) and it seems to be overloaded because I got this values using top:  load average: 11.80, 13.30, 13.02 Cpu(s): 42.2%us, 11.7%sy,  0.0%ni, 35.6%id, 10.1%wa,  0.1%hi,  0.3%si,  0.0%st   But if I look at the proccess list (using top or ps) no proccess is using more that 1%  Also, the sum of the proccess CPU usage (%) equals 4 and if I even assume that 0% values are rounded numbers, and change it to 0.04 (which rounded using 1 decimal digit is 0) the sum is 11 (still less than 100%).  How can I correctly interpret this data?, are there some hidden proccesses which are overloading my cpu.


How to compute $\lim\limits_{x \to 0} \frac{e^x-1}{x}$ without using derivatives? Every method I can think of gives me some indeterminate form.

I was messing around with the definition of the derivative, trying to work out the formulas for the common functions using limits. I hit a roadblock, however, while trying to find the derivative of $e^x$. The process went something like this:  $$\begin{align} (e^x)' &= \lim_{h \to 0} \frac{e^{x+h}-e^x}{h} \\ &= \lim_{h \to 0} \frac{e^xe^h-e^x}{h} \\ &= \lim_{h \to 0} e^x\frac{e^{h}-1}{h} \\ &= e^x \lim_{h \to 0}\frac{e^h-1}{h} \end{align} $$  I can show that $\lim_{h\to 0} \frac{e^h-1}{h} = 1$ using L'Hôpital's, but it kind of defeats the purpose of working out the derivative, so I want to prove it in some other way. I've been trying, but I can't work anything out. Could someone give a hint?


Why can not we call servlet constructor instead of init method to initialize the config parameters?

Why do we need an init() method in servlet? Can't we use the constructor to initialization?


the code below is counting character.  I am a bit new to hashmaps so I am confused about the syntax and what's it doing from this line: Map charCounter = new TreeMap();  Can someone please dumb this code down and explain from that line please?           public class repeated {     public static void main(String[] args) {          String str = "Abaa";          char[] char_array = str.toCharArray();          System.out.println("The Given String is : " + str);      Map<Character, Integer> charCounter = new TreeMap<Character, Integer>();          for (char x : char_array) {      charCounter.put(x,charCounter.get(x) == null ? 1 : charCounter.get(x) + 1);          }      for (Character key : charCounter.keySet()) {   System.out.println("occurrence of '" + key + "' is  "+ charCounter.get(key));         }      }  }

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


In a badminton competition there are n players. All the players play with each other exactly once and each game has a result, i.e. win or lose. No tie is permitted. Now all the players enlist the name of some other players in the following manner -  1. He enlists the name of all the players he defeated. 2. He enlists the names of the players who are defeated by the players whom he defeated. For instance, a player A enlists the names of B and C if A defeats B and B defeats C.  Prove that there exists at least  one such player A who has enlisted the names of all the other players.

Every participant of a tournament plays with every other participant exactly once. No game is a draw. After the tournament, every player makes a list with the names of all the players, who either were beaten by him or were beaten by a player beaten by him. Prove that there is a player whose list contains the names of all other players.


What is the need of using the passive form, for instance:     These lines have been taken from the poem XYZ.    and     These lines have taken from XYZ.   What's the reason behind it?

I found native people prefer to use passive voice in a sentence. For example:  Tonight's moon can be seen from anywhere worldwide. We have reason to believe that progress can be made.  Be honest, it's difficult for an English learner to understand. Why not phrase it this way:  We can see the moon from anywhere worldwide.  In which cases do people prefer to use passive voice rather than active voice?


I'm new to Blender and this is my first big project.  What I have: multiple objects (table and chairs) built using given dimensions to represent the interior of a dining room.  What I want: to arrange these objects and the camera so that they match the perspective of a photo of the real life scene.  What I've tried: I've added the real photo as a background image for the camera view for starters. I also drew some guide lines onto the image to get an idea of the where the perspective line lies. Many guides exist but these seem to nearly all revolve around building objects from scratch onto the background - matching objects to camera rather than camera to objects. I've spent hours rotating and zooming and tilting the camera and I can't seem to get close at all. I know manipulation of the shifts and focal length come into play but I've tried adjusting these and I have no idea whether I was making things better or worse  Here's the closest I've come, I've just been focusing on aligning the table as it's the central piece. You can still see the end of the real table sticking out and the furthest legs won't align, but the dimensions should be accurate.   I'd really appreciate some help or guidance!

I've found a number of how-tos for solving video but I'm just looking to put an element in a photo and can't seem to find a how-to for that.  Is it possible in blender to do a camera solve with a still image?  Thanks.


i have   $query = "SELECT * FROM movisat.provincias WHERE descripcion LIKE '%coruña%'";     $rs = mysql_query($sql, db::getConexion());         print_r(mysql_fetch_assoc($rs));   return:  Array()   and with this it works  $query = "SELECT * FROM movisat.provincias WHERE descripcion LIKE '%coru%'";  $rs = mysql_query($sql, db::getConexion());         print_r(mysql_fetch_assoc($rs));   return:    without the character "Ñ" it works

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Magic Resistance:     The flameskull has advantage on saving throws against spells and other magical effects.   Turn Undead:     Each undead that can see or hear you within 30 feet of you must make a Wisdom saving throw.   Is Turn Undead magical?

Some creatures have Magic Resistance:     The [...] has advantage on saving throws against spells and other magical effects.   We know from  that this works against Turn Undead, but does it work against Stunning Strike, Death Strike, Fey Presence, etc? How do we decide?


I have a blue, red, and green cup and put a thermometer in each. Of the 3 the blue cup had the coldest temperature inside, then green, then red. I understand there may be differences in the composition of the cups but does color reflect the sun differently? I thought blue being closer to black would be hotter, but it is not?

I spent some time studying about temperatures and color of objects. It turns out that as we heat something it turns to red, then yellowish white and if we heat it more it turns to bluish-white.  Like we can say a blue star is hotter than a red star. But why isn't it the same with flames?  Blue flame isn't always hotter than a red flame. It's just the chemistry of it all.   I mean I know the electrons jump from one orbit to another and gets into excited state when heated.  But the questions in my mind are:   If one object appears blue and another red, that doesn't always mean that the blue object is hotter than red. Is that correct? If yes then how is it so? I am sorry but I'm bit confused over it. With the "Color Temperature" concept on Wikipedia. They say 1,700 K to match a flame. But 15,000–27,000 K for a clear blue poleward sky.   This confuses me. The sky appears blue, does that mean its hot? But it isn't right? It's colder. I am not sure if I'm able to frame it properly. It's a bit confusing to me.  Is this something like a glowing object vs reflecting object? The sun is white but Earth is blue. But sun is hotter than the earth. It's the sun radiating light but earth is just scattering it.  But the surface temperature of sun is 5778K while the Wikipedia states our sky is about 15000K-27000... I know there's something I'm missing here. I'm hoping someone can tell me what is it.


Assume that 100 passengers waiting to go on board for their flight. Each passenger has his own seat. Now unfortunately the passenger number one is drunk and he is gonna take one of the 100 seats randomly. For one of the rest 99 passengers, if his seat has not been taken before he entered the plane, then he normally take his own seat; otherwise he will take a vacant seat randomly. Now the problem comes: what is the probability that the last passenger can be seated in his own seat?   I tried to calculate the probability when there are totally 2, 3, 4, 5 passengers and found that P=1/2. So I think using induction is OK to prove that P=1/2 for arbitrary n. But is there any alternative methods?  Thanks!

This is a neat little problem that I was discussing today with my lab group out at lunch. Not particularly difficult but interesting implications nonetheless  Imagine there are a 100 people in line to board a plane that seats 100. The first person in line realizes he lost his boarding pass so when he boards he decides to take a random seat instead. Every person that boards the plane after him will either take their "proper" seat, or if that seat is taken, a random seat instead.  Question: What is the probability that the last person that boards will end up in his/her proper seat.  Moreover, and this is the part I'm still pondering about. Can you think of a physical system that would follow this combinatorial statistics? Maybe a spin wave function in a crystal etc...


How can i set Service mssql-server to start on boot       root@ubuntu-s-1vcpu-2gb-lon1-01:/etc/init.d# update-rc.d  mssql-server enable update-rc.d: error: cannot find a LSB script for mssql-server root@ubuntu-s-1vcpu-2gb-lon1-01:/etc/init.d# update-rc.d system.ctl mssql-server enable usage: update-rc.d [-n] [-f] <basename> remove        update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]                 -n: not really                 -f: force  The disable|enable API is not stable and might change in the future. root@ubuntu-s-1vcpu-2gb-lon1-01:/etc/init.d# update-rc.d system.ctl mssql-server -f usage: update-rc.d [-n] [-f] <basename> remove        update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]                 -n: not really                 -f: force

how to auto start or enable service on next boot up or start up? in ubuntu 16.04 lts how to start or enable service on the next boot up or start up? in ubuntu 16.04 lts  without doing it manually enable or start services again everytime i start up or boot up the ubuntu 16.04 lts  thank you


Let $a \in \mathbb{Z^{+}}$. Show that $x^4+a$ is reducible over $\mathbb{Q}$ if and only if $a=4b^4$ for some integer $b$.  My idea for one implication was to assume reducibility and write $x^4+a = (x^2+\alpha_1x + \beta_1)(x^2+\alpha_2x + \beta_2)$, leading to the system of equations: $\alpha_1 + \alpha_2 = 0$, $\beta_1+\beta_2+\alpha_1 \alpha_2 = 0$, $\alpha_2 \beta_1 + \alpha_1 \beta_2 = 0$, $\beta_1 \beta_2 = a$. But I wasn't able to get much farther than this. This is a practice problem for an exam, any help is appreciated.

$$x^n-a$$  So $n$ is any integer greater than 1, and $a$ is any integer.  $a$ being any integer is where I am running into trouble.  I have already shown and worked out a proof for this being irreducible when a is prime.  Now I am just working through examples, trying to figure out a pattern.  The exercise is asking for application of Eisenstein's Criterion only, so I am assuming that the value of n should have no effect on the irreducibility.


How can I make a chapter heading like this in latex?

Hi I want to format my chapter of my thesis as shown in the figure. How can I do it? Can you suggest me some fancy latex templates for a phd thesis?


I'm trying to navigate to the directory in which a file resides. i.e. I'm trying to cd $(which chromedriver)  That errors for obvious reasons cd: not a directory: /usr/local/bin/chromedriver Is there either  An alternative to cd that navigates to the directory of a file, or  A way to handle or parse the output of which so that it's generalisable (i.e. not just removing the last 10 characters in the case of chromedriver, but which works for all applications)

I want to cd to the directory of go's bin file:  $ type go   go is /c/tools/go/bin/go   How can I quickly cd to this directory in bash ?


I have a late 2013 Mac Pro running Yosemite.   How can I become root in Yosemite? There is no root user listed in Users & Groups under System Preferences...  I need help to be able to be root so I can administer my system in a professional way.

I know how to enable root account on Mac OS X Leopard, but not Snow Leopard or newer OS X versions. How can I do it?


Is there a term for two words combined intact to make another word? E.g. back yard -> backyard, every day -> everyday, etc.

Is there a grammatical rule to compound a set of words such as a single one? e.g.  word1 word2 --> word1word2  or word1-word2? Bye.


Why is there not a standardized email   regex? I was recently involved in a   project where we had a hickup where   the email passed our email regex but   failed when creating the MailMessage   object. A small error but it had   rather big consequences         Is the MailMessage constructor using a email regex when checking if   an email address is correct?   Why are there so many different versions of an email regex?         this is an ASP.Net application and we   used the System.Net.MailMessage object   This is a duplicate of

I recently read somewhere that writing a regexp to match an email address, taking into account all the variations and possibilities of the standard is extremely hard and is significantly more complicated than what one would initially assume.  Can anyone provide some insight as to why that is?    Are there any known and proven regexps that actually do this fully?  What are some good alternatives to using regexps for matching email addresses?


Problem Given any piece of data, I could sign it with public key and made available online. This proves I am in possession of given data, but it doesn't tell I am the creator. The only possibility (I'm aware of) to prove this, is to prove, that I was chronologically first to have it. Simple approach. Lets assume, that I wrote piece of code, and I want to generate some proof, that I am legitimate author of it. I can simply sign it's hash with e.g. RSA and put the signature along source code to some trusted site, like github. Now my commit has timestamp generated with this trusted site, and even if some Alice would sign herself the same source code, her upload to any trusted site will have newer timestamp proving she's not the legitimate author. This works as long as we'd assume data on github has undetermined life span and will be always available which is hardly true about any server out there. When that commit would be lost, my rights to the source code are lost as well: I might still have my local signed copy, but I cannot prove I've created it at given time. My understanding of the problem. I believe there is no possibility to self-authenticate, that I were in possession of given data at specific time - I could just made up arbitrary timestamp and sign it. Moreover, anyone out there could get my publicly available data, replace personal data with their, made up older timestamp and call me thief. Thus, sign from trusted server is needed. Trusted timestamp My idea of the mechanism is as follow: sign source code, optionally append personal data, generate hash and send this hash to trusted server. Then this server would have to send me back signed information, that it received hash H at time T. This way I've got publicly accepted certificate, that I've got file with hash H at time T. Even if the server had go down, I would still have the certificate. Question So is the "trusted timestamp" good solution to the legitimate author problem? Do you know of any available open source tools to achieve this goal? Maybe other techniques? Assuming, I want to public code/publication/anything else licensed for non-commercial use only, should I be concerned with such issues?

Does there currently exist a free online service that accepts a file, hashes it, takes an authoritatively chosen timestamp (from one or more time services), signs these and sends this signed message back? E.g. a digital notary, but only with regards to the timestamp and not the validity of the content as legal notaries might be obligated to guarantee.  Such a service might have an extremely simple API: Simply wget http://service/<checksum> and receive a signed message containing one or more timestamps and the checksum. The emphasis would be on the type of authority who might make such a service.  Edit: Although the original question did not emphasise the following, the Bitcoin-based timestamping services provided below do not rely on one authority, but rather the entire Bitcoin network. They can be seen as tamper-proof and verifiable without the help of the service that helped you sign it!


Do we have to use a definite article before film in the following example:     Film motivates learners.   Or      The film motivates learners.

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


Package icedtea-8-plugin is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'icedtea-8-plugin' has no installation candidate

I updated from OpenJDK 7 to 8. I uninstalled 7, which uninstalled the IcedTea plugin as well. I tried to reinstall IcedTea with      sudo apt-get install icedtea-7-plugin   But it doesn't work. When I try to launch topcoder jnlp file, it fails. Also, it doesn't load any java plugin in Google Chrome. It was fine with OpenJDK 7. Is there a newer version of IcedTea for OpenJDK 8?


I have a Digital Ocean droplet running Ubuntu 14.04. I use it for running quick node.js tests on a publicly available server. I just logged in via SSH and did $ lsof -i to see what ports I was using. At the bottom of the list I noticed:  sshd    30952 root    3u  IPv4 66978103      0t0  TCP xxx.xxx.xxx.xxx:ssh->120.52.72.81:7810 (ESTABLISHED) sshd    30953 sshd    3u  IPv4 66978103      0t0  TCP xxx.xxx.xxx.xxx:ssh->120.52.72.81:7810 (ESTABLISHED)   I didn't expect these ssh connections (it should only be me!) so I looked up the IP address and it seems to be in China. So what should I do now to check whether these ssh connections are malicious and if so what they may have done to the server. I'd rather not nuke it but if it's been compromised (since they have root access I presume it has!) then perhaps that's the simplest thing to do.  Update: Since writing the above, I have 2 different SSH connections so I presume it really is compromised.  sshd    31009 root    3u  IPv4 66979206      0t0  TCP xxx.xxx.xxx.xxx:ssh->221.194.44.218:50829 (ESTABLISHED) sshd    31010 sshd    3u  IPv4 66979206      0t0  TCP xxx.xxx.xxx.xxx:ssh->221.194.44.218:50829 (ESTABLISHED)   If anyone can suggest a sensible approach to checking for a compromise/cleaning this up/seeing what's happened that would be great to help me learn (I'm such a n00b!).  Update 2: It appears that this isn't signs of a compromise but rather the signs of brute force log in attempts - see the comments from  and  below.

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


In my /etc/sudoers.d/myAppCommand file I set some command like this.  Cmnd_Alias APP_CMD = /opt/myApp/lib/app-start, \                                     /opt/myApp/lib/app-stop, \                                     /opt/myApp/lib/app-restart #Rules section # my-app ALL = NOPASSWD: APP_CMD   But at the time of installation this command giving the below error:  2015-01-12 08:22:27 SecurityEvent sudo Rack1 alert sudo:  my-app : no tty present and no askpass program specified ; TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/opt/myApp/lib/app-start

I want to disable requiretty so that I can sudo within scripts, but I'd rather only disable it for a single command rather than everything. Is that possible within the sudoers config?


I have a function that spits out an array using print_r and would like to capture the information inside a variable to input it into a function for a specific use case. I've simplified the output to make it easier to understand.  [fruit] => 'banana' [color] => 'yellow' [sizes] => array('small', 'medium')   I would like it formatted as so:  $var = 'fruit' => 'banana', 'color' => 'yellow', 'sizes' => array('small', 'medium');   This way I can copy and paste the output of the first and assign it to a new default variable.

I'd like to capture the output of  to a string.  The PHP documentation says;     As with anything that outputs its result directly to the browser, the  can be used to capture the output of this function, and save it in a string (for example).   What would be an example of how that might work?  print_r() isn't a valid possibility, because it's not going to give me the information that I need.


I'd like to solve the warning message cited in title. My document class is \documentclass[smallextended]{svjour3} % onecolumn (second format). I tried to use, but there is not a answer.

i am receiving this problem when attempting to add an existing PDF into a latex document   pdfTeX warning: /usr/texbin/pdflatex (file ./filename.pdf): PDF inclusion : invalid other resource which is no dict (key 'ProcSets', type <array>); ignored.   Any help on this, happening on 2 different file i am trying to include in the PDF output


Recently, while on the train, I saw a person not holding the handrails on purpose. He decided that playing a game with no outcome whatsoever was more important than his safety. In fact, he bumped into the overhead luggage carrier several times. Twice he almost stumbled and fell, with a possibly very negative outcome for him. Once he stumbled and bumped so hard into the carrier, it left a red mark on his face, even after facing it earlier.  Still he refused to hold a handrail as that would have prevented him from playing the game. Clearly his addiction to the game won over any sense of self protection.  Now thinking about it, I think this is the case with most addictions. At the end, they are to some degree, harmful to the addicted person(imho). Taking this to the time when we were still facing predators, it must have been careless just to think of getting delicious berries whilst not considering the exposure to predators it came with. These individuals that are addicted (in a way) and don't care of the dangers associated with a problem, are harmed more often. Thus, making addiction an evolutionary disadvantage. Therefore, being easily addicted, as a trait, shouldn't have developed much.  Yet addiction is one of the worst problems of humanity and has been so for a long time.  So how could it develop? Are my conclusions wrong? Is addiction just a modern phenomenon? Or are there evolutionary benefits of being addicted?

Addiction and addictive traits seem common amongst animals.  A  shows it's been studied in everything from humans to worms.  My personal favorite of these is:    Is there/was there something adaptive about addictive behaviour? Alternatively, how it is that addictive behaviour survived/persists if it is not adaptive?


Here is my question.  Suppose $f$ is a real function. Then the set $E=\{x\in \mathbb{R}:\lim\limits_{y\to x}f(y)=+\infty\}$ is countable.  I want to define an injective map from $E$ to $\mathbb{Q}$ or $\mathbb{Q}^n$, but I do not have any good ideas. I would appreciate a lot if someone can help me. Thx~

Let $f\colon\mathbb{R}\to\mathbb{R}$. Prove that the set    $$\{x \mid \mbox{if $y$ converges to $x$, then $f(y)$ converges to $\infty$}\}$$ is countable.   My book told me to consider  $g(x)=\arctan(f(x))$, then it said "it is easy to see the set is countable." But I still can't understand what it mean.


In RSA algorithm we have the value of $e$ & $d$ exponent and also one of the prime numbers. My question is how to produce another prime number that is not equal to the first one and the digit of a prime number is 1024.

Say I want a random 1024-bit prime $p$.  The obviously-correct way to do this is select a random 1024-bit number and test its primality with the usual well-known tests.  But suppose instead that I do this:   select random odd 1024-bit number $n$ if $n$ is prime, return $n$ $n \leftarrow n+2$ goto 2   (This approach allows faster selection of primes via sieving.)  Since primes are not uniformly distributed on the number line, it would seem that this algorithm prefers primes that lie after long runs of composites.  Take a piece of the number line around $2^{1024}$ with x denoting a prime:     ---x-x----------------------------x------------------------x---x   Clearly our algorithm above is much more likely to find the 3rd prime above than to find the 2nd one.  Question: Is this a problem?


I've installed Ubuntu 13.04 from my USB and straight away I got problems. I've Windows 7 installed in my PC. Therefore I've chosen ubuntu installation along side Windows 7. The problem I'm facing is that Ubuntu fails to start after installation. I've reinstalled Ubuntu 13.04 many times. But the problem seems to be there. The very first run after installation seems to be working fine. But on a next restart, the issue will pop up. The startup screen is showing that I've got Ubuntu and Windows 7 installed in my PC. Windows is working fine. But upon selecting Ubuntu its showing a purple screen and I was forced to restart the PC using the restart button. Upon restart, again the startup screen shows up.(Please note that the auto login countdown is not shown at this time). Two OS installed in the PC is listed down and this time the scenario is little bit different. Now, selecting Ubuntu will produce a black screen with blinking cursor. Why is this happening? I don't know what is the real issue behind this. I lurked around various sites but couldn't find a solution. I don't know whether my hardware has got any relation with this issue. Please help me. I'm a newbie to Ubuntu and I'm really frustrated with this issue.  The configuration of my PC is ,  Intel i5 processor 2500K, Intel H67 Motherboard, 4GB RAM, nvidia GT520 graphics card, and a 500GB HDD

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Can we require a deletion reason to be entered any time an OP deletes their post, question or answer?  I think this would help moderators (including 10k users) get answers when asked to explain a "why".

I have had to delete a few questions and answers and really wanted to make mods know why I deleted them, as it stands I would have to revive my answer to explain the reason. With questions once its gone its gone.   It would be nice to have a little field that allows you to select why you deleted something:   Eg. "Deleted cause I answered the wrong question", "Deleted cause I made a trivial logic mistake" etc..


I reread the series every summer, and still, there are many events that continue to upset me as if it's the first time I've read them. Like when Sirius had to flee because they had nothing to prove his innocence.  I considered the use of Veritaserum, but after reading something JK Rowling said about the potion not being sufficient evidence (because highly skilled wizards would be able to fight it or something like that, i ruled it out. and the pensieve, the pensieve is out of the picture too, as well as legilimency and occlumency because it's possible to create false memories and ideas.. as stated by Slughorn in HBP. But they could've taken the Minister with them back in time, so he could witness the conversation that took place in the shrieking shack. no meddling with time. or if that would be too risky, maybe they could've hidden somewhere by the trees to see, at least, that Pettigrew is still alive. maybe someone can show me that I'm missing something so I can put my mind to rest?

With the use of a time turner, that opens a whole "Pandora's Box" of possibilities.  While the use of one can be problematical, when the Ministry of Magic found out how dangerous Voldemort was, why didn't they simply use a time turner to go back and stop him before he became dangerous?  (I know this does open a lot of plot holes, but witches and wizards don't seem to worry about laws of science, so it would seem strange that magic that seems to easily supersede laws of physics (like brooms that fly without propulsion) would worry about the problematical issues of time travel.)


The following problem is from the spring $2020$ analysis qualifying exam given at UCLA: Define $T_n\in L^{\infty}(\mathbb{R})^*$ as $$T_n(f)=\int_0^\infty \frac{x^n}{n!}e^{-x}f(x)dx$$  Prove that no subsequence of this sequence converges weak-∗. Explain why this does not contradict the Banach–Alaoglu Theorem.  The second point is not too hard: $||T_n||=1$ and it does not contradict Banach-Alaoglu because Banach-Alaoglu gives compactness of the unit ball, not sequential compactness, in general. We have sequential compactness if the banach space is separable, and $L^\infty(\mathbb{R})$ is not so there's no contradiction. However, I am stumped by the first point: my first idea was to try and find, given a sequence $T_{n_k}$, a function $f$ such that $T_{n_k}(f)$ does not converge (perhaps by some diagonalization process) but I was not able to construct such a function. Any hint is appreciated

I'm trying to solve this previous qual problem from my univeristy: Let $L_n$ be the continuous linear functions on $L^\infty(\mathbb{R})$ given by $$L_n(\phi)=\frac{1}{n!}\int_0^\infty x^ne^{-x}\phi(x)\,dx.$$  Prove that $L_n$ has no subsequence that converges in the weak* topology of $L^\infty(\mathbb{R})^\ast$. So far, I managed to see that $\frac{1}{n!}x^ne^{-x}$ converges uniformly on compact sets to 0, hence the weak* limit of any subsequence of $L_n$ must take compactly supported $L^\infty$ functions to 0. I've also tried to construct a test function directly for any subsequence but so far I have yet to come up with such a construction. Can anyone pleas help me? Some hints would be very much appreciated! Thanks!


I've come across a few popular, useful questions on Stack Overflow that have been closed as off-topic, which have duplicates on other sites. For examples, Stack  Overflow question  is closed, with a banner that suggests seeking help on Server Fault:     "Questions on professional server, networking, or related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault." – Duncan, Brian Clozel, Trinimon, Bhavik Ambani, AlSki   But there's already an open duplicate on another Stack Exchange site where the question is on-topic, .  It would be nice if, rather than just closing the Stack Overflow question, somebody - even if the power was only available to moderators - could also mark it as a duplicate of the question on . (The text of the duplicate banner might need to be slightly different from normal.)

Some questions might be asked on three different sites, each site needing three different answers. For example, a question about a text editor.  So perhaps there should be a way to link the questions on the three different sites. Adding a link manually in the questions is certainly possible, but perhaps a feature officially supporting this will be beneficial.


I am sorry to say my answer to question ratio is not very good.  It is not because I don't enjoy helping others, but just because I don't have the expertise of many of the other members.  I have no formal software training nor is my day job involved in software, I don't even have any friends involved in software and have to rely on the many knowledgeable members of Stack, and am trying to learn too many things at the same time which makes me a master of none. Recently, whenever I ask a question, I quickly receive a downvote and often with a close.  Note that I have no issues with downvotes.  If I am asking bad questions, I should be penalized to correct my behavior, and while not expected, would still appreciate a comment describing my bad doing.  Or maybe the voter wishes to enunciate that a given direction is not a good direction, and what better way than with a quantifiable score.  And I agree that duplicated questions should be closed to not dilute good answers to a specific question.  And if the question asker did zero research and asked a question that clearly has already been answered, sure a downvote is warranted to encourage behavior which doesn't waste the time of Stack's many generous members. Before posting this question, I searched for various related questions.  First, I was concerned that there was a certain answer to question ratio that I wasn't meeting, but couldn't find any quantifiable criteria.  When researching, I came across the term "moocher" and thus searched more, and while I read "Moochers suck, no question about it", I don't believe (and hope) that I fall in this criteria.  I always spend significant time researching the subject before asking the question.  I try to pose the questions so that they will be relevant to others.  I provide script and output  results when appropriate.  If a member posts a comment requesting additional information, I always try to provide it.  While I know that a bunch of "thanks" comments are not desired, I always respond appreciatively.  I never leave a question with a reasonable answer unaccepted unless I end up answering my own question in which I feel a little shady for selecting myself. Take my past three posts.  I diligently researched each topic before posting the question partially motivated by fear of the looming downvote I was sure to come.  But still I hoped, yet within minutes each of my posts were quickly downvoted.  I did get one comment on the three and if that individual downvoted my question, I have no issues and am thankful for his or her response.  But typically there is no comment, and I believe questions with negative votes and no comments will be ignored by other members even if they are good questions which need answers to help the community.      Is there an unwritten quota of answers to questions?  Are there other obligations and responsibilities which I must be aware of?  Am I a Moocher and if so, what must I change to continue being a contributing member?

I have used the websites of SO a lot the past few months because I am busy with a large scale web project. I feel I get better answers here on SO than when I just do a Google search, maybe because I can be more specific here with my problem, and the responses are really fast.  Occasionally when I am not working I try to answer some questions, but the question almost always has an answer which is 'as good as' or 'better' than the answer I would supply.  So my question/answer ratio is about 20/1 something, if not more. When I look at my profile page I see a bucket-load of questions and almost nothing I answered myself.  Is this considered bad behaviour? I can see that this looks a little egoistic.  : One devoted to one's own interests and advancement.


So yeah , the answer seems true but i'm very skeptical about it since D3 is in the middle

Why isn't $V= V_1 + V_2$? $V=V_a - V_c = V_a - V_b + V_b - V_c$, $V_a - V_b= V_1$ and $V_b - V_c = V_2$ Doesn't that prove that $V = V_1 + V_2$? Regardless of $V_3$, If i'm wrong , is there a way to obtain $V$ in terms of $V_1$, $V_2$ and $V_3$


I am trying get the state of the checkbox in my animation subpanel and would like to set myBool to it's state. Here is my code: import bpy import os from bpy_extras.io_utils import ExportHelper from bpy.props import (StringProperty, CollectionProperty, BoolProperty, EnumProperty) from bpy.types import (Operator, OperatorFileListElement,) import textwrap   class WorldOriginExport(Operator, ExportHelper):     bl_label = 'Export'     bl_idname = 'object.world_origin_export'     bl_description = textwrap.fill('Moves each selected object to the worlds origin and exports them as a gltf separate', 80)     bl_options = {'PRESET', 'UNDO', 'REGISTER'}     files = CollectionProperty(name = 'File Path', type = OperatorFileListElement,)     directory = StringProperty(subtype = 'DIR_PATH',)     filename_ext = '.gltf'      myBool = False      @classmethod     def poll(cls, context):         sfile = context.space_data         operator = sfile.active_operator         return operator.bl_idname == 'OBJECT_OT_world_origin_export'       def draw(self, context):         layout = self.layout         layout.use_property_split = False         layout.use_property_decorate = False  # No animation.          sfile = context.space_data         operator = sfile.active_operator       def execute(self, context):         bpy.ops.export_scene.gltf(filepath = folder_path + os.sep + sel.name)         return {'FINISHED'}    class GltfSeparate_PT_Panel(bpy.types.Panel):     bl_space_type = 'FILE_BROWSER'     bl_region_type = 'TOOL_PROPS'     bl_label = 'glTF Separate'     bl_options = {'DEFAULT_CLOSED'}       @classmethod     def poll(cls, context):         sfile = context.space_data         operator = sfile.active_operator         return operator.bl_idname == 'OBJECT_OT_world_origin_export'       def draw(self, context):         layout = self.layout         layout.use_property_split = True         layout.use_property_decorate = False  # No animation.    class GltfSeparateAnimation_PT_Panel(bpy.types.Panel):     bl_space_type = 'FILE_BROWSER'     bl_region_type = 'TOOL_PROPS'     bl_label = 'Animation1'     bl_parent_id = 'GltfSeparate_PT_Panel'     bl_options = {'DEFAULT_CLOSED'}       @classmethod     def poll(cls, context):         sfile = context.space_data         operator = sfile.active_operator         return operator.bl_idname == 'OBJECT_OT_world_origin_export'       def draw(self, context):         layout = self.layout         layout.use_property_split = True         layout.use_property_decorate = False  # No animation.    class GltfSeparateAnimationAnimation_PT_Panel(bpy.types.Panel):     bl_space_type = 'FILE_BROWSER'     bl_region_type = 'TOOL_PROPS'     bl_label = ''     bl_parent_id = 'GltfSeparateAnimation_PT_Panel'     bl_options = {'DEFAULT_CLOSED'}       @classmethod     def poll(cls, context):         sfile = context.space_data         operator = sfile.active_operator         return operator.bl_idname == 'OBJECT_OT_world_origin_export'       def draw(self, context):         layout = self.layout         layout.use_property_split = True         layout.use_property_decorate = False  # No animation.       def draw_header(self, context):         scene = context.scene         self.layout.prop(scene, "use_gravity", text = 'Animation2')    def register():     bpy.utils.register_class(WorldOriginExport)     bpy.utils.register_class(GltfSeparate_PT_Panel)     bpy.utils.register_class(GltfSeparateAnimation_PT_Panel)     bpy.utils.register_class(GltfSeparateAnimationAnimation_PT_Panel)   def unregister():     bpy.utils.unregister_class(GltfSeparateAnimationAnimation_PT_Panel)     bpy.utils.unregister_class(GltfSeparateAnimation_PT_Panel)     bpy.utils.unregister_class(GltfSeparate_PT_Panel)     bpy.utils.unregister_class(WorldOriginExport)   if __name__ == '__main__':     register()     bpy.ops.object.world_origin_export('INVOKE_DEFAULT')

I would like to wrap my properties inside collapsible panels when using the ExportHelper or ImportHelper class but I can not figure it out how to draw them properly:  This is my code so far (reduced version of the Operator File Export template): import bpy  # ExportHelper is a helper class, defines filename and # invoke() function which calls the file selector. from bpy_extras.io_utils import ExportHelper from bpy.props import StringProperty, BoolProperty, EnumProperty from bpy.types import Operator   class ExportSomeData(Operator, ExportHelper):     """This appears in the tooltip of the operator and in the generated docs"""     bl_idname = "export_test.some_data"  # important since its how bpy.ops.import_test.some_data is constructed     bl_label = "Export Some Data"      # ExportHelper mixin class uses this     filename_ext = ".txt"      def execute(self, context):         return {'FINISHED'}   class SubPanel(bpy.types.Panel):     bl_label = 'SubPanel'     bl_idname = 'Sub_PT_Layout'     bl_parent_id = 'export_test.some_data'     bl_space_type = 'FILE_BROWSER'     bl_region_type = 'TOOL_PROPS'      def draw(self, context):         layout = self.layout         layout.label(text = 'test')          use_setting: BoolProperty(             name="Example Boolean",             description="Example Tooltip",             default=True,         )   def register():     bpy.utils.register_class(ExportSomeData)     bpy.utils.register_class(SubPanel)   def unregister():     bpy.utils.unregister_class(SubPanel)     bpy.utils.unregister_class(ExportSomeData)   if __name__ == "__main__":     register()      # test call     bpy.ops.export_test.some_data('INVOKE_DEFAULT')  Unfortunately I get the following error:  RuntimeError: Error: Registering panel class: parent 'export_test.some_data' for 'Sub_PT_Layout' not found  Q: How can I add a panel to the properties area of the file browser when using the ExportHelper or ImportHelper class?


I know this was asked before, but I can't seem to find a solution for Windows 10, I hope you understand. I have a Lenovo G400 laptop and I want to install Ubuntu 18.04 alongside the Windows 10 it already has, so I can choose the OS I want to run in at boot.  When I entered BIOS in the PC I could not select the USB which contained Ubuntu to boot it and install it.   When I went to the boot menu or something like that in my Lenovo and I chose the USB to boot from and ran Ubuntu with no problem at all! But when I headed on to installation, I got to the part in which you choose to erase the disk and install Ubuntu, install alongside Windows 10, or "something else". But surprisingly, the option to install alongside Windows 10 was not available! How can I fix it? I really do not want to go to "something else"  Any help is much appreciated.

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


Does anybody know, if I can download from somewhere UTM Grid for zones 33 to 35 and U belt (for Poland) in shpfile or different format I can convert to shp. I need precision level 100 m. Is it possible to generate it in some GIS software?

I'm looking for a shapefile containing an 1000m or 2000m UTM grid ("graticule"). All I was about to find on the web is a 10000m UTM grid (here: ) and I am aware that a 1000m UTM grid for the whole world might be quite big.  That's why I'm now wondering if and how it would be possible to generate such a shapefile for a part of the world. I would prefer to use open source tools like gdal. Others output formats than a shapefile might be ok too.   Has anyone an idea?


Observed it many times on many Ubuntu versions. If you type wrong password either in UI mode or in terminal, it takes little more time before it declares incorrect password.  Correct password check is almost instantaneous, but incorrect password takes slightly longer. Its not lot of time, but still lot more than correct password.   Why is it so?

When entering the right password the application or the OS (no specific application, pretty much everywhere) accepts this immediately, but when entering a wrong password there is a slight delay of 1-2 seconds. Why is that?


I am getting this error message when I try to access the Windows drive

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


Hi I'm using Windows 7 64 bit Professional edition.  I've tried disabling aero shake in by:   Adding an entry in registry Disabling the policy in the policy editor   Yet it just wont go away.  I'm also running the software from "actual multiple monitors", so I suspect that it might be causing problems. However, I can't find a way to disable the setting for it.  I'm wondering how "Aero Shake" works, because I can't consistently reproduce and trigger it, so I can't test whats causing the problem. I've tried shaking windows like crazy, but it doesn't seem to work every time. Is there some specific condition for it to be triggered?  Thanks for any help. disable proof:

I'm always accidentally minimizing most of my windows. This is really annoying. How do I disable Aero Shake?


OK I am a complete computer science newbie here - purchased "Practical Computing for Biologists" to learn and first thing they have you do is set up Ubuntu on VirtualBox within Windows to allow access to Unix command line - seems a bit of a steep learning curve since I do not know what any of that means yet, but...  Anyway, I managed to install VirtualBox and download Ubuntu - when trying to set-up virtual machine, I get stuck at several steps - any pointers?

I would like to know if anyone can help me with installing Ubuntu on VirtualBox


I'm opening an Excel file and I'm getting the File in use pop-up that says it's locked for editing by me. However, I've not got it open on this computer (I think I had it open and my machine blue-screened). How do I go about fixing this?  Should specify, this is a file on a file share.  edit I'm not talking about if this is being used by another user on another machine, this is only accessible by me on this file share.

A few of my users are in and out of various Excel 2007 spreadsheets all day. One of them reports that "50% of the time" she tries to open a spreadsheet from the file server, an information message comes up stating:       foo.xlsx is locked for editing        by 'another user'.      Open "Read-Only" or click "Notify" to open read-only and receive notification   when the document is no longer in use.   Nine times out of ten the document is not open by another user. My users immediately try to open the same document again, and it works.  I imagine this is caused by Excel leaving owner files on the server, but I do not know why.  An added clue: When one of my users selects "Notify," a dialog pops up in a moment informing them the file is available for them to edit.  Any guidance on how to solve this issue and make my users' days flow better?


If I can write a convincing Statement of purpose which conveys why I choose the PhD program and show that I am well-prepared for the field, will it save other parts of my application? I read somewhere said that SOP is not as important as GPA and test scores.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


Long ago, I had to reinstall Ubuntu on my Laptop. Unfortunately my disk got split into 2 partitions. Now I want to remount the 2nd partition. However I am not sure what steps to take.   Do I need to clear the 2nd partition first? (no useful data there)  Which tools should I use? (e.g. Gparted)   Any other good advice?     I'd like to clear sda4 and remount it to sda5

Till today I was using ubuntu 13.04 in my windows7/ubuntu dual boot. Just now I have upgraded to ubuntu 14.04. My software updater showed an updates available message. I proceeded with  Install Now . Soon I got the following window.    Then I tried sudo apt-get clean as recommended. Nothing happened! Not even a window opened. Teach me deleting the temporary packages.   Deleting temporary files may not be highly helpful in case of further updates and installs for I don't have too much space left in my /. I wanna extend my / partition with the help of the unallocated space in my HD. The following is my Gparted window.       I got an answer . But it wasn't useful for me. I had two choices. But the answer wasn't working for both my chioces.  Choice 1: I may use the 4.25 GiB unallocated space to extend my /dev/sda10. To do so, I must need to move my linux-swap partition. But my Resize/Move option is disabled for the linux-swap partition. Choice 1 failed!   Choice 2: I may use the 14.35 GiB unallocated space instead. In this case I must move more than one partition. /dev/sda4  partition is the first on the list. Even that partition has the same problem. Resize/Move option is disabled. Choice 2 failed!  I am out of choices now.  What shall I do? Help me to extend my / with Gparted.


@echo off for %%a in (*.mp3) DO ffmpeg -i "%%a" -f image2 -loop 1 -r 30 -i image.jpg -shortest -c:a copy -c:v libx264 -crf 23 -preset veryfast -vf scale=1280:720 "%%a.mp4" pause   I have this batch code here, however it doesn't output correctly. The mp3 is successfully converted to a mp4, though the image is not merging with the audio.   I have the audio and the jpg called image.jpg in the folder together.

When I try to open a movie I just created with the command:  ffmpeg -pattern_type glob -i '*.JPG' -s 640x480 movie.mp4   I get an error from QuickTime:  The document “movie.mp4” could not be opened. The file may be damaged or may not be a movie file that is compatible with QuickTime Player.   I used the same command on a set of images generated from an iSight time lapse, but in this case the above images are from a digital camera.  The resolution is a lot higher, but I am scaling it to 640x480 and I don't see anything in the output that suggests a problem:  Input #0, image2, from '*.JPG':   Duration: 00:00:04.76, start: 0.000000, bitrate: N/A     Stream #0:0: Video: mjpeg, yuvj422p(pc), 4928x3264, 25 tbr, 25 tbn, 25 tbc   vs. the working movie:  Input #0, image2, from '*.JPG':   Duration: 00:01:23.72, start: 0.000000, bitrate: N/A     Stream #0:0: Video: mjpeg, yuvj420p(pc), 640x480 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 25 tbn, 25 tbc   And for the output:  Output #0, mp4, to 'movie.mp4':   Metadata:     encoder         : Lavf55.19.104     Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj422p, 640x480, q=-1--1, 12800 tbn, 25 tbc Stream mapping:   Stream #0:0 -> #0:0 (mjpeg -> libx264)   vs. for the working one:  Output #0, mp4, to 'movie.mp4':   Metadata:     encoder         : Lavf55.19.104     Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 12800 tbn, 25 tbc Stream mapping:   Stream #0:0 -> #0:0 (mjpeg -> libx264)   Aside from the working movie being longer and a lower source resolution, the only difference I can see is that there is an extra "[SAR 1:1 DAR 4:3]" mentioned in the video stream, but I have no idea what this is, or how to try to force it in the non-working movie.  Update: I just downloaded VLC and it plays the movie fine.  So I know ffmpeg isn't at fault here.


I know that both support specifying the username, which can be forced using an alias in root-owned ~/.bashrc, but one can temporarily disable the alias by prepending the command with \, so what are the options to force these programs to show the current user only when the user isn't root ? I'm clueless as to what terms to use in Google ...  In case it matters, it's Ubuntu Linux 12.04.4 on 3.10.23-xxxx-std-ipv6-64 64-bit especially created by OVH.  EDIT 0: Unless I failed with it, rsync completely ignores the environment variable which specifies the password. Using the password file option doesn't work without a Server running on the other end.  The problem with specifying passwords for scripted runs such as cronjobs is you can't, and most programs don't mask the pw (apart from wget) nor allow other methods to tell it. However, the issue at hand is to prevent these 2 programs telling the sensitive info to other users, which seemingly can be prevented by adding a setting to /proc's mount line. Once this is solved, we can move to other similar issues.  I'm still a basic Linux Admin but I'm trying to work out single systems where multiple users can work on using SSH, and that opens an array of security issues.  EDIT 1: Some programs run long enough to show up in [h]top for someone to copy, which is the root of the concern. If we assume we can trust the staff members, showing up passwords in [h]top needs to be prevented.

How could you launch a process and make it invisible to the top command? The process is started by a normal user (not root), and should not be visible to other normal users.


I hope this is the right place to as this question.  I just earned a Bachelor's degree in Management Information Systems and I'm interested in becoming a Database Admin. However, I'm a little confused on how to go about this without experience in the field. Do DB certificates hold any weight in the field? Would you recommend getting something like your Oracle OCA/OCP?  If you do recommend something like the Oracle OCP, do you have any study materials you could recommend?  Many thanks!

Questions   What certifications do you have? Has your certification (or lack of one) ever worked for or against you?   Do you intend to reach out for certification? Do you renew your certifications? If so, does your employer actively support the renewal?


Let's say I buy stocks of a company at $1000, and 6 months later, stock is trading at $1500. What should my strategy be at this point. Should I hold the stock? or should I sell the stock to book my $500 profit or, should I sell and rebuy at $1500?

Suppose you buy stocks from company FOOBAR at price X. After a while, the price is Y = X * 1.25, so you decide you want to collect that 25% profit. You sell the stocks, cashing out your original X plus a 25% profit. Yay! You made money. But haven't you also put yourself out of the trading business by not having stocks anymore? If you just want to take profit but also continue investing, you collect the 25% and you are back to having just X to invest. Now stocks from FOOBAR are too expensive for you (current value is Y). What do you do? Do you select another cheaper (pontentially worse) stock just to be able to buy it? You wait until FOOBAR price is X again? (losing time and also maybe the stock is not as attractive now?). Does this mean stocks are mainly for the long-term-collect-once type of investment? How do short/middle term traders make money, without falling in a diminishing returns type of situation? Thanks!


I have two domains, alfa.com and beta.com.   Beta.com points to alfa.com subdirectory named "ae" by following htaccess-file. It works fine, but what should I add to code to keep beta.com URL and not the URL www.alfa.com/ae. There is also some wordpress-code in the beginning, so the last sector is the one I'm talking about (begin beta.com).  Here's the code. Any help would be appreciated. I'm totally stuck with this…  suPHP_ConfigPath /opt/php5/etc/   AddHandler x-httpd-php52 .php   WordPress:  <IfModule mod_rewrite.c>   RewriteEngine On   RewriteBase /   RewriteRule ^index\.php$ - [L]   RewriteCond %{REQUEST_FILENAME} !-f   RewriteCond %{REQUEST_FILENAME} !-d   RewriteRule . /index.php [L]   </IfModule>   beta.com:  RewriteEngine on   RewriteBase /   RewriteCond %{HTTP_HOST} ^(www.)?beta\.com$ [NC]   RewriteRule ^(.*)$ http://www.alfa.com/ae/$1 [R=302,L]   RewriteCond %{REQUEST_FILENAME} !-f   RewriteCond %{REQUEST_FILENAME} !-d   RewriteRule .* index.html [L]

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I am running an application that communicates through a real serial port e.g. /dev/ttyS0 to a remote device.  I can configure this application to use /dev/ttyS0, /dev/ttyS1, etc., by passing the numeric suffix to the program, not the fully-qualified name. I would like to sniff the traffic going through this serial port using something like jpnevulator.  This jpnevulator opens a pseudo-terminal to which the application to be monitored is supposed to connect.   Is there any way to re-assign the name of the ports, for example /dev/ttyS1 to an actual pseudo-terminal such as /dev/pty/23, so that the application transparently connects to /dev/pty/23 via /dev/ttyS1?  Would a file link ln achieve this?

OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject.  I am hoping that, by asking the question again in a more specific way, I will be able to get an answer I can understand.  I have some application running in linux that communicates with an external device attached to a serial port.  I want be able to capture and log the data sent in both directions between the application and the device, with timestamps at the beginning of each line in the file.  As a test case, I am using minicom as the application I want to monitor, connected via a null modem cable to another computer also running minicom.  I have already confirmed that, if I type characters on either of the computers, characters appear in the other computer's terminal.  So far, so good.  I then found this question:    In the answer to this question, the program jpnevulator is suggested.  However, when reviewing the man page, I could not figure out the right way to use jpnevulator to get what I want.  Here is what I tried to do:  First, I opened a terminal window and typed the following command:  $jpnevulator --tty=/dev/ttyS0 --pty --pass --read --ascii --timing-print --file=serial.log   I saw the output:     jpnevulator: slave pts device is /dev/pts/18  I then opened another terminal window and typed the following command:  minicom -D/dev/pts/18 -b115200   Minicom opened without complaint.  However, when I typed characters in either terminal (local and remote), nothing appeared in either terminal.  jpnevulator only logged the data written to /dev/pts/18.  My expectation is that jpnevulator :   reads data from /dev/pts/18 and "passes" this data on to /dev/ttyS0 while also writing this data to the specified file. reads data from /dev/ttyS0 and "passes" this data on to /dev/pts/18 while also writing this data to the specified file.   I am aware of the remark in the faq that says "Jpnevulator was never built to sit in between the kernel and your application. I'm sorry."  However the very same faq states in the second paragraph down: "Now with a little bit of luck some good news: A little while ago Eric Shattow suggested to use pseudo-terminal devices to sit in between the kernel and your application."  That is the approach I am trying to take but I am having no success.  What am I missing?  Thanks to all in advance.  Cheers, Allan  p.s. I was successfully able to capture the back and forth traffic using the socat method mentioned in the existing question I referenced but this method did not offer any way of timestamping the traffic.  I was hoping that jpnevulator would have provided this for me.


Using theoretical framework of the special relativity, we can show that the quantity that we classically regard as energy does have a property of inertia. And particularly, if the total energy of a box is $L$ then its inertia is $L/c^2$. Now suppose I have an infinitely large parallel plate capacitor which is at rest in an inertial frame $O$. Uniformly charged plates of the capacitors have such a charge density so that the uniform electric field between the plates is $E$.   Now in a frame of reference $O'$ which is moving uniformly along the area vector of the plate plane with respect to $O$, the electric field will be $E$ and magnetic field would still remain zero.  In $O$ frame, the total energy of capacitor is $L_1 = l_0 \int\frac{1}{2}\epsilon_0E^2 dA $ and thus its mass is $m_1 = L_1/c^2$.Where $l_0$ is the perpendicular separation between the plates and $dA$ is the infinitesimal small area element of one of the plates in $O$ frame.  In $O'$ frame, the total energy of the capacitor is $L_2 = l_0\sqrt{1-v^2/c^2} \int\frac{1}{2}\epsilon_0E^2 dA $ . The infinitesimal $dA$ and limits of integration remain exactly the same because no length contraction happen in the direction perpendicular to the relative motion. Here also the mass is thus $m_2 = L_2/c^2$.  So, $m_2$ = $m_1$ $\sqrt{1-v^2/c^2}$. But in general, in relativity we prove that $m = m_0/\sqrt{1-v^2/c^2}$. So why does this apparent contradiction is happening? Does it have to do anything with the fact that actually both the $m_1$ and $m_2$ are infinities? Because I doubt that it might be the case that we cannot directly write  $m_2$ = $m_1$ $\sqrt{1-v^2/c^2}$ because $m_2$ and $m_1$ are infinities. But on the other hand that relation seems to hold pretty well from their corresponding expressions in the integral form.

Suppose I look at a parallel plate capacitor in its rest frame and calculate the electrostatic energy, $E$.  Next, I look at the same capacitor in a primed frame boosted in the direction perpendicular to the plane of the plates. In this frame, the $E$-field is the same strength, there is no magnetic field, and the volume over which the $E$-field extends is less by a factor $1/\gamma$. This suggests $E' = \frac{1}{\gamma} E$, but relativity states that energy transforms as $E' = \gamma E$.   Where is the missing energy?