Using the command directly works: $ find \ /home...  But not as alias: alias synclinks="find \        /home/foo/Pictures/ \        -type f -exec file --mime-type {} \+ | \        awk -F: '{if ($2 ~/image\//) print $1}' \        | xargs ln -t /home/foo/MyHardlinks"  $ synclinks  Returns awk: cmd. line:1: {if ( ~/image\//) print } awk: cmd. line:1:       ^ syntax error ln: missing file operand Try 'ln --help' for more information. find: ‘file’ terminated by signal 13 find: ‘file’ terminated by signal 13 find: ‘file’ terminated by signal 13 find: ‘file’ terminated by signal 13


Some text editors (emacs, vim, etc) have an "autoindent" feature, where you can select the entire code and indent it perfectly (e.g. by pressing Tab for emacs, or = for vim).  Since there is an abundance of badly formatted code in SO, would it be possible to have a feature where you select the entire code and press a button to auto-indent it?  This wouldn't work for whitespace-sensitive languages like Python, but for languages that are more free-form (C, Java, etc), this would be pretty convenient.


Show that a function from $\mathbb{N^2}$ to $\mathbb{N}$ is bijective

Hello I am wondering how to prove that a function that takes 2 numbers from the Natural number and produces one is bijective. I have the following function $$\operatorname{f}(x,y) = \frac{1}{2}(x+y)(x+y+1)+y$$ For injectivity I tried to start with assuming that $$\operatorname{f}(x,y) = \operatorname{f}(x_1,y_1) \rightarrow x = x_1 \land y=y_1$$ but I couldn't proove it. For showing that it is surjective, I have no idea. Thank You :)


The functional equation $ f \big( x - f ( y ) \big) = f \big( f ( y ) \big) + x f ( y ) + f ( x ) - 1 $

I came across the functional equation $$ f \big( x - f ( y ) \big) = f \big( f ( y ) \big) + x f ( y ) + f ( x ) - 1 \text . $$ So far I tried plugging $ x = f ( y ) $ and got $ f ( x ) = \frac { f ( 0 ) - x ^ 2 + 1 } 2 $ which holds for every $ x $ that is equal to $ f ( y ) $ for some $ y $. I suppose that $ f ( 0 ) = 1 $ and $ f ( x ) = 1 - \frac { x ^ 2 } 2 $, which would be true if I prove that $ f $ is surjective, which I still haven't proven. Could anybody help me?


How get rid of the terminal message about sudo

After upgrading to 15.04 I get a message with every new terminal to tell me how to use sudo:  To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details.   I know that login messages can origin from  or from the login shell executing several files but where does this message come from and how to get rid of it?


Why is $I[x]$ not maximal $\mathbb{Z}[x]$?

We have that $I=(2)$  is maximal in $\mathbb{Z}$ because $(2)\subseteq (4)\subseteq \dots \subseteq (2^k)$, right?   Why is $I[x]$ not maximal $\mathbb{Z}[x]$ ?


Semi-simple Lie algebra $L$ coincides with its derived algebra $L'$

If $L$ is a semi-simple Lie algebra, then $L=L'$.   Since $L$ is semi-simple we can write it as a direct sum of simple ideals $L_i$, i.e. $L=\oplus_{i=1}^r L_i$. Then $L'=\oplus_{i=1}^r L_i'$ and since every $L_i$ is simple we have $L_i'=L_i$ and consequently $$L'=\oplus_{i=1}^r L_i'=\oplus_{i=1}^r L_i=L$$  This proof seems surprisingly short. So my question is, did I make any mistakes or did I forget any crucial assumptions? Is there perhaps a more elementary proof?


Why do we fall down when the bicycle slows down?

My question is: It is easy to balance a bicycle when it is moving at a fairly high velocity, say 7 m/s or 25 km/hr. But when a bicycle slows down, it is hard to keep it upright, and the person riding it may thus fall down! Why?


Gyros with an analog interface represent rotational velocity by a varying DC voltage. The range of my gyro woks from -10 V DC to +10 V DC. I need a circuit to convert this range into this range: from 0 v DC to 5 V DC.   Example:   Gyro OUTPUT   -9 v DC      Circuit OUTPUT    0.25 v DC. Gyro OUTPUT   -8 V DC      Circuit OUTPUT    0.50 v DC Gyro OUTPUT   -+5 v DC     Circuit OUTPUT    3.75 V DC Gyro OUTPUT   +10 v DC     Circuit OUTPUT    5.00 V DC   How to do it?


I made a simple code whis keeps adding 0.1 to zero. this is the code:  static double num = 0;     public static void main(String[] args) {         num+=0.1;         System.out.println(num);          try {             Thread.sleep(100);         } catch (InterruptedException e) {             e.printStackTrace();         }         main(null);     } }   This is what it outputs:  0.1 0.2 0.30000000000000004 0.4 0.5 0.6 0.7 0.7999999999999999 0.8999999999999999 0.9999999999999999 1.0999999999999999 ...   But I want the output to look like this:  0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 ...   Any ideas why it does that or how to fix it please?


Which predictions can a theory of quantum gravity make - update since 2014?

I have read the answers and comments to  and I wonder if anything new can be added since 2014. Today we have an image of the Einstein shadow of the black hole in M87* produced by EHT and the discovery of gravitational waves by LIGO.


How to install Ubuntu Touch to a Jolla Phone

I'd like to install Ubuntu Touch on my Jolla Phone device. Is it possible? Any guides on how to do that? Has anyone tried theirself?  Edit: I see Jolla Phone isn't on the list of currently supported devices, but since Jolla is having financial problems (and maybe even going down), I think there might be demand for a port in the near futue. At least I don't want to be stuck with the current version of Sailfish OS forever. Porting should be possible, since Jolla Phone is Android HW and the OS is running on top of Android drivers.


A command scope variable is left assigned after executing the command

Let's check the following script:  #!/bin/sh  func() {   echo "var: $var"; }  var="val" func  echo "after executing the command, var: $var"   Its output is:  var: val after executing the command, var: val   The var variable is left set after executing the command.  Is it correct behavior? I thought that command scope variables are set just for a single command.  If I use bash (set #!/bin/bash in the first line) instead of sh then setting a variable for a command doesn't affect the rest of the script:  var: val after executing the command, var:    In the busybox implementation sh and bash work equally: the variable is left assigned after executing the command.  To workaround the problem I use parentheses when executing such commands:  (var="val" func)   This way the var variable isn't touched in all shells.


How can I get Freestyle lines to show around two objects where they intersect each other?

In this simple example, I have a cube and a sphere. I want Freestyle to show lines around the sphere (or the cube) where the two shapes are intersecting each other.  Does anyone know how I can accomplish this?   The current set-up.   The cube and sphere are intersecting.   The Freestyle lines don't go all the way around the red sphere. How can I make the lines go all the way around?


Is there a maximum amount of photons that can exist in a certain amount of space?

If you have a set amount of space, lets say 10 cubic centimeters, and you would be able to trap photons in there. If you would then add more and more photons to that space, could you then go on infinitely or would you eventually run into a maximum amount of photons that can be in that space?


What is a single powerplay in ice hockey?

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


Details showing unknown driver for graphic

I have AMD Graphics Card, which have model number Radeon HD 8450G. It is on a Notebook, HP PROBOOK 445 G1  My Ubuntu Installation worked good . It was a fresh install.  In the details tab of System Settings, Graphics driver is shown as "Unknown".


How to use \def to redefine \end{split}?

When I use \def to redefine \end{split}, there is an error.  \documentclass{article} \usepackage{amsmath}  \begin{document} \def\be{\begin{equation}} \def\ee{\end{equation}} \def\bs{\begin{split}} \def\es{\end{split}}  \be     \bs         a\\         b     \es \ee  \end{document}   The error is:      Runaway argument?      a\ b \es \ee       ! Paragraph ended before \split was complete.   However, if I don't use \def\es{\end{split}} and just modify the code to be  \documentclass{article} \usepackage{amsmath}  \begin{document} \def\be{\begin{equation}} \def\ee{\end{equation}} \def\bs{\begin{split}} \def\es{\end{split}}  \be     \bs         a\\         b     \end{split} \ee  \end{document}   it's OK. What's the problem? Thank you!


I have always said, "Our hope and prayer is..." but was recently corrected by my husband and told that the correct grammar would be, "Our hope and prayer are...".  Which one is correct?


Why is it necessary that different observers agree on the value of the spacetime interval $ds^2$?

What's the physical reason that all (inertial) observers agree on the value of the spacetime interval $$ds^2 = (c dt)^2 - dx^2 - dy^2 -dz^2 \, ?$$  What would be the physical implications if different (inertial) observers wouldn't find different values of $ds^2$, analogous to how they find different time intervals and different distances?  EDIT: none of the linked questions (to which this question supposedly is a duplicate) explain why a constant speed of light implies that all observers agree on the value of the spacetime interval.


soul + highlight does not work with references?

MWE:  \documentclass[a4paper,11pt]{article} \usepackage{color} \usepackage{soul}  \begin{document} \label{lbl}   See here: \ref{lbl} % This does work \hl{See here: \ref{lbl}} % This does not work  \end{document}   Here is the error message:  ! Argument of \ref has an extra }. <inserted text>                  \par  l.14     \hl{See here: \ref{lbl}}                                   % This does not work ?


Does anyone know how to put a gap between the axes and data in PGFPlots? Essentially I'm looking to use Jean-Luc Doumont's style from his excellent book Trees, Maps, and Theorems. Figure here is from .   Don't worry about the arrows and everything, that is all straightforward. I am specifically asking about the axes position.


On Finder, using the View as Icons grouped by document type, is it possible to visualize all the elements instead of to have to click every time on "Show All" button?


Please show bounty message in Android bounty details pop-up

In the android app, looking at bounty details using the i button, the bounty reasons are not shown:        The bounty message can provide important information as to the setter's requirements (who may not be the OP and therefore does not wish to edit the question to do so).


Can a Muggle use magical objects (potion, Time-Turner, etc)?

Say that a wizard were to foolishly give a Muggle a potion, Time-Turner, broomstick, or some other magical object. Would the Muggle be able to use it (or drink it, in the case of a potion)? To be clear, I'm talking about objects made by wizards and given to Muggle, so no . The closest thing I could find is an almost certainly non-canon Harry Potter skit for the 80th birthday of Queen Elizabeth II. In this, Hermione blatantly violates the International Statute of Wizarding Secrecy gives an envelope that contains "a charm that can be worked by Muggle" with the following instructions:  Dear Prime Minister, Happy birthday to the Queen from the students of Hogwarts. In view of this special occasion, we send you a charm that can be worked by Muggles, as long as they are in possession of a little borrowed magic, which we include in the envelope. This is a limited one-time only offer. Stand up straight, point both to the left and the right, and shout the following phrase: “Accio Her Majesty’s handbag”.  Do these sort of magical objects actually exist in the canon Harry Potter universe, that can be used by wizards and Muggles alike?


How was Obi-Wan Kenobi able to hide his light side presence from Vader and the Emperor?

I read long ago, I think it was in , that Yoda was able to hide his presence from Vader and the Emperor because of that .   I found this reference :      He made his dwelling near the Cave of Evil, which further negated his light side presence       That always bugged me since. How was Obi-Wan Kenobi able to hide his light side presence on Tatooine without using any subterfuge of this kind? Or did he?


High RAM usage by Ubuntu 16.04 LTS 64-Bit

I just installed Ubuntu and finished installing updates. It is using 1 - 1.2GB of ram without any program running. With Firefox with just one tab open it is using 1.4GB.   Here is the screenshot from System Monitor:    PC Specs:  CPU : Pentium Dual-Core CPU E5500 @ 2.80GHz  Graphics : Intel Express Chipset G41  RAM : 2GB DDR3  OS : Ubuntu 16.04 LTS 64-Bit (Dual boot with Windows 7 64-Bit)


Why MSE of this MATLAB neural network is so high?

I'm using this code to train a neural netowrk in MATLAB:  x = Input_data % with 13 features (unnormalized data) t = out_data % (unnormalized data)  trainFcn = 'trainlm';  % Levenberg-Marquardt backpropagation.  % Create a Fitting Network hiddenLayerSize = [10,5]; net = fitnet(hiddenLayerSize,trainFcn);  % Choose Input and Output Pre/Post-Processing Functions % For a list of all processing functions type: help nnprocess net.input.processFcns = {'removeconstantrows','mapminmax'}; net.output.processFcns = {'removeconstantrows','mapminmax'};  % Setup Division of Data for Training, Validation, Testing % For a list of all data division functions type: help nndivide net.divideFcn = 'dividerand';  % Divide data randomly net.divideMode = 'sample';  % Divide up every sample net.divideParam.trainRatio = 70/100; net.divideParam.valRatio = 15/100; net.divideParam.testRatio = 15/100;  % Choose a Performance Function % For a list of all performance functions type: help nnperformance net.performFcn = 'mse';  % Mean Squared Error    % Choose Plot Functions % For a list of all plot functions type: help nnplot net.plotFcns = {'plotperform','plottrainstate','ploterrhist', ...     'plotregression', 'plotfit'};  % Train the Network [net,tr] = train(net,x,t);  % Test the Network y = net(x); performance = perform(net,t,y)  % Recalculate Training, Validation and Test Performance trainTargets = t .* tr.trainMask{1}; valTargets = t .* tr.valMask{1}; testTargets = t .* tr.testMask{1}; trainPerformance = perform(net,trainTargets,y) valPerformance = perform(net,valTargets,y) testPerformance = perform(net,testTargets,y)    % View the Network view(net)   Output of my neural network:  performance =     2.4135e+04   trainPerformance =     2.2552e+04   valPerformance =     1.8569e+04   testPerformance =     3.7084e+04     Why MSE and performance outputs are so high!?


Can I achieve infinity focus from Auto focus?

I have a 18-55mm zoom lens with no Infinity symbol on it. Let's assume I want to capture stars in night. There are three ways to do it (If I am not wrong)   Use Auto focus (If your camera is able to set it) Use manual focus Use focus point to set focus  Auto Focus:  Now, What if I set my lens to Auto focus and put it to lowest F-stop (No zoom) number Is it not equivalent to setting infinity focus because I am allowing lens to capture the maximum light and allowing light to hit lens in parallel way?  Infinity Focus: As I mentioned that I don't have infinity sign on my lens. So, I set my lens on MF mode and rotate focus ring in clockwise (Assuming Infinity is on that side) and the zoom ring is exactly at the same position (same f-stop number) as I had in Auto focus mode. Isn't it going to capture the same image like I am having in Auto focus?  Last question is What is the use of 8-focusing point in Night photography? Will it play role when I have to capture only Moon (Assuming I am able to set the focus point on moon in night)?


Creating Voronoi for points that consider separated land or gaps in land

As can be seen in the picture, I've created a Voronoi for points in the UK. However, the Voronoi does not take into consideration the split in land in the south-west region of the country. Therefore, it does accurately display the areas of land nearest to the points. How do I get past this? I have  UK Boundary vector point data layer (text converted file, not shp) Voronoi layer for points


I have two-column slides where there is a tikz figure on the left, and itemization on the right. There is >10 overlays due to pauses in the itemization, and some pieces of the tikz picture are added/removed/modified accordingly (with \only<>) as are the items uncovered.  It is easy to break the code by adding one \pause, because all numbers have to be rewritten.  Is there a way (no hint in Beamer Manual, chap. 9) to assign the value of beamerpause counter to symbolic names, at the point when that part gets uncovered for the first time, something like (needs multiple passes to be resolved) the following?  \begin{column}{..}    \only</bar->{...}  % <2-> (use e.g. / to reference labels)    \only<-/baz>{...}  % <-3> \end{column} \begin{column{..}    \begin{itemize}       \item foo \pause       \item bar \firstUncoveredLabel{bar}\pause % assign 2 to label /bar       \item baz \pause[baz]       % nicer syntax; assign 3 to label /baz       \item end    \end{itemize} \end{column}   EDIT: minimal working example:  \documentclass{beamer} \usepackage{tikz} \begin{document}    \begin{frame}       \begin{columns}          \begin{column}{.5\textwidth}             \tikz{                \draw< -3>        (0,0) grid (3,3);                \draw<2-3>[red]   (0,0) -- (3,1);                \draw<3- >[green] (0,0) -- (3,2);                \draw<4  >[blue]  (0,0) -- (3,3);             }          \end{column}          \begin{column}{.5\textwidth}             \begin{itemize}                %%%% uncomment this item and all numbers above have to be shifted :-(                % \item important remark at the beginning \pause                 \item grid \pause                \item grid, red \pause                \item grid, red, green \pause                \item green, blue             \end{itemize}          \end{column}       \end{columns}    \end{frame} \end{document}   and this is what I dream of (does not compile):  \documentclass{beamer} \usepackage{tikz} \begin{document}    \begin{frame}       \begin{columns}          \begin{column}{.5\textwidth}             \tikz{                %% use symbolic names for overlay specificaiton                \draw<-/gridRedGreen>                (0,0) grid (3,3);                \draw</gridRed-/gridRedGreen>[red]   (0,0) -- (3,1);                \draw</gridRedGreen->        [green] (0,0) -- (3,2);                \draw</last>                 [blue]  (0,0) -- (3,3);             }          \end{column}          \begin{column}{.5\textwidth}             \begin{itemize}                %%%% uncomment and overlays are still correct :-)                % \item important remark at the beginning \pause                 \item grid                \pause[grid]                \item grid, red           \pause[gridRed]                \item grid, red, green    \pause[gridRedGreen]                \item green, blue                   \end{itemize}          \end{column}       \end{columns}    \end{frame} \end{document}


What is the easiest way to parse an INI File in C++?

I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an open-source solution or attempt to parse it manually?


I have already posted a similar problem in the link above. I am facing the same issue in this circuit. What will be the state of the 2 BJT's Cutoff, Saturated or Active ? Please suggest me a generalised approach to tackle such problems.


What does this Statistic mean? And how to find a density of a statistic?

My First Question! But it's in two parts. Context: I am given a Probability Density Function, and the question wants me to find the density of a statistic. Given pdf: $$f(x, \theta, \phi)=\frac{1}{\theta \phi}\left(\frac{x}{\theta}\right)^{\frac{1-\phi}{\phi}}, \quad 0 \leq x \leq \theta, \quad 0<\phi<1 $$ Show that the density of the statistic $$T=X_{(n)}$$ is given by $$ f_{X_{(n)}}(x)=\frac{n}{\theta \phi}\left(\frac{x}{\theta}\right)^{n / \phi-1} \quad \text { for } 0 \leq x \leq \theta $$otherwise zero. Part 1: What Statistic is this?$$T=X_{(n)}$$ I don't know what it means or what is it called. Is it the nth observation? Part 2: How do you find the density of a statistic? If the statistic was the mean, would it possible to find the density of the mean? Am I making sense? I am not primarily from a Stat Background, but I've been holding on due to my math so far. But there might be some painfully obvious things I'm unaware about. Thank You for being patient. Edit: The question mentions a hint, I am not looking for the solution but rather explanations for my conceptions, so this might be unnecessary but nonetheless.  Hint: You might consider using the following$$P\left(X_{(n)}<x\right)=P\left(X_{1}<x, X_{2}<x, \ldots, X_{n}<x\right)$$


What is the best way to parse non-digit strings e.g. "twenty two"->22 to integer or double values in python ? Especially what is the best way to detect that region if there are additional words in a sentence.   Thanks


Show that $\sum\limits_{k=1}^{\infty}\ln\left(\frac{k(k+2)}{(k+1)^2}\right) = -\ln(2)$?

I'm working with the following sum and trying to determine what it converges to: $$\sum_{k=1}^{\infty}\ln\left(\frac{k(k+2)}{(k+1)^2}\right)$$  Numerically I see that it seems to be converging to $-\ln(2)$, however I can't see why that is the case. I have expanded the logarithm and expressed the sum as $\sum_{k=1}^{\infty}\ln(k)+\ln(k+2)-2\ln(k+1)$, but I don't know if that actually helps anything. Does anyone have any thoughts on how to approach this problem?


Partitioning for Dual Boot Windows 8.1/ Ubuntu HDD

So i got a blank 750 GB HDD on a laptop. My intention is to install Windows 8.1 only on a single partion like a 100 GB for the system only to use it for my university programs etc. and to use Ubuntu for personal use like browsing, listening to music. For example Windows 8 to be only 100 GB and the other free space to be for Ubuntu and i know Ubuntu has to be on separate partiotions like the swap, / (root), /home. Can you tell me how to do it or a walkthrough?


Who has the winning hand in this Texas-holdem scenario?

The table cards were A,K,K,8,3. All four suits were on the board. Player one had A,8. Player two had A,3.   Is this a split pot?


How to remove whitespace around equation when \abovedisplayskip, \adobedisplayshortskip, ... don't work

I've been dealing with this problem quite some time. I have this code \usepackage[top=2cm,bottom=4cm,inner=2.5cm,outer=4cm]{geometry} \usepackage{amsmath,amsfonts,amssymb,amsthm} % Links utilizables en el PDF final % \usepackage[colorlinks=true,allcolors=black,linktoc=all,hidelinks,linktocpage]{hyperref} % Cuadros en definiciones % \usepackage{mdframed}  \setlength{\parskip}{1em} \setlength{\abovedisplayskip}{0pt} \setlength{\belowdisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}  And this bit here Formalmente, el producto cartesiano de $A$ y $B$ es el conjunto $A\times B$ cuyos elementos son pares ordenados $(x,y)$ tales que $x\in A$ y $y\in B$:  \begin{equation*} A\times B = \{ (x,y) : x\in A, y\in B \} \end{equation*}  texttexttext  The problem is, it's producing a big whitespace around the equation and after like an hour fixing a similar problem with a theorem environment, I got this new one. They don't seem to be related as if I change the theorem, equation keeps having that space around. I also found in this site that abovedisplayskip, belowdisplayskip and so on would do the thing but actually nothing happens.  How to remove the space above and below the equation? Or if it's possible how to set a customizable option to change it?


Why is the IntelliSense not working when I open a new script in Visual Studio?

The strange thing is that opened scripts or newly opened ones are working fine. It's the new created C# scripts that are not working.  With not working, I mean the MonoBehaviour is not in light blue color it's in black color. In this screenshot I took, I marked it with a red circle.    What have I tried so far? I have closed Visual Studio and started over again.  Since it didn't solve it, I closed the unity editor and started it over again, to no avail.  I pressed 'clean solution', I pressed 'rebuild solution', I pressed 'build solution'.  What else can I do ? And why are the other scripts working fine? If I type gameo...it will auto complete it to GameObject but in this specific script it's just not working.  This is a screenshot of the editor. I have in the Hierarchy a Ladder object.  In the Assets I created a folder name Ladder and a script name Ladder. But this Ladder script is not working.    This is the Ladder script and this script was working before but once I created another script inside the ladder folder name Raise empty script the Raise script didn't work and now the Ladder is not working either. But other scripts are working fine.  using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Ladder : MonoBehaviour {     public Transform charcontroller;      private bool inside = false;     private float heightFactor = 3.2f;      private void OnTriggerEnter(Collider other)     {             inside = true;     }      private void OnTriggerExit(Collider other)     {             inside = false;     }      private void Update()     {         if (inside == true && Input.GetKey("w"))             charcontroller.transform.position += Vector3.up / heightFactor;     } }


How does an outcome of photon measurement 1 affect Photon 2 in quantum entanglement?

I know I am missing something and this question is probably very silly, but I would like to understand. Quoting an article:     If one photon is measured to be in a +1 state, the other must be in a   -1 state. Since the outcome of one photon affects the outcome of the other, the two are said to be entangled.......when you measure the state of one photon you immediately know the state of the other....If we’re light years apart, we each know the other’s outcome for entangled pairs of photons, but the outcome of each entangled pair is random (what with quantum uncertainty and all), and we can’t force our photon to have a particular outcome.   I just cannot see the "magic" here. Using a stupid analogy: There are two balls, black and white, wrapped in a piece of cloth. You take one and I take the other. Whenever and wherever I unwrap the one I took, I will immediately know which one you have.  What is so special about that in the world of particles, how does the outcome of the first affect the other?


OS: Ubuntu 14.04 LTS  Python: 2.7.6  My installation of Gourmet Recipe Manager suddenly stopped loading. When I run it in a terminal window, I get the following at the end of the traceback:  import datetime as dt ImportError: No module named datetime   So far as I can tell, nothing has been changed and my Python installation is up to date. It simply quit working yesterday. I'd certainly appreciate a good approach to diagnose and fix this problem!  Update: thanks to all who replied!  Tim, I'm sorry if I asked this question in the wrong place. Please chalk it up to being a new guy simply following the links from the Ubuntu website.  TheSchwa, I tried your suggestion and got the same error message as above.  muru, the package seems to be installed, but I have no idea if it's installed/configured correctly. How might I find out?  I'm sorry for all the questions, but I'm an old RedHat guy who has been away from Linux for some time. All of the apt/dpkg stuff is new to me.


Four complex numbers $z_1,z_2,z_3,z_4$ lie on a generalized circle if and only if they have a real cross ratio $[z_1,z_2,z_3,z_4]\in\mathbb{R}$

Let $[z_1,z_2,z_3,z_4]$ denote the  of the complex numbers $z_1,z_2,z_3,z_4\in \mathbb{C}$. Show that the distinct points $z_1,z_2,z_3,z_4\in\widehat{\mathbb{C}}$ lie on a generalized circle if and only if $[z_1,z_2,z_3,z_4]\in\mathbb{R}$.    I saw this statement claimed in , and wondered how one would go about showing it. I know of some facts we could work with:   First, the definition: A  in $\mathbb{C}$ is either a circle or a line in $\mathbb{C}$. I know that a Mobius transformation maps generalized circles to generalized circles. I know that if $f$ is a Mobius transformation and $z_j'=f(z_j)$, $j=1,2,3,4$, then $[z_1',z_2',z_3',z_4']=[z_1,z_2,z_3,z_4]$.   I have posted a potential proof as an answer below. Please let me know if you think it's complete. Thank you!


Do the bonuses from Artificer's Enhanced Arcane Focus and Staff of Power stack?

When I have an Enhanced arcane focus wand in one hand and the Staff of Power in the other, do the spell attack bonuses stack?     Enhanced Arcane Focus      Item: A rod, staff, or wand (requires attunement)      While holding this item, a creature gains a +1 bonus to spell attack rolls. In addition, the creature ignores half cover when making a spell attack.      The bonus increases to +2 when you reach 10th level in this class.      Staff of Power      This staff can be wielded as a magic quarterstaff that grants a +2 bonus to attack and damage rolls made with it. While holding it, you gain a +2 bonus to Armor Class, saving throws, and spell attack rolls.


Proving $a_{0} = 1$, $a_{n + 1} = \sqrt{1 + a_{n}}$ converges to the golden ratio

Define $a_{0} = 1$ and $a_{n + 1} = \sqrt{1 + a_{0}}$.   Then we have  $$\lim_{n\to\infty} a_{n} = \sqrt{1 + \sqrt{1 + \sqrt{1 + \sqrt{1 + \ldots }}}} $$  So I let $x = \sqrt{1 + \sqrt{ 1 + \ldots }}$. Then we have  $$x =  \sqrt{1 + x}  \Longleftrightarrow x = \frac{1 \pm \sqrt{5}}{2}.$$  So I think it converges to the golden ratio. But how can I prove this? Clearly, it's monotone increasing. Now I can just show the golden ratio is a supremum for the sequence. But how can I do that? (Monotone Convergence Theorem)


Expected is always coming 0 , When using @Mock

public class EHI_employee {     private String name;     private Integer empid;      public EHI_Employee(String name, Integer empid) {         this.name = name;         this.empid = empid;     }      public int calculatesal(int empid) {         return empid * 3;     }     public void findname(int empid,String name) {         System.out.println("Employee with "+empid+" has name "+name);     } }     My Test Class:  public class EHI_EmployeeTest {     @Mock     EHI_Employee mock;     @Test      public void calculatesalTest() {        assertEquals(mock.calculatesal(2), 6);      }}   Output Error     junit.framework.AssertionFailedError:  Expected :0 Actual   :6   But When I do:  public class EHI_EmployeeTest {     @InjectMocks     EHI_Employee mock;     @Test      public void calculatesalTest() {         assertEquals(mock.calculatesal(2), 6);      }}   Output:     :) test passed   I have read this thread:  , but i dont understand this in my context, I would love if someone can explain me with my example.  When I do this , still my test is passed, but the actual method is not checked, right??  public class EHI_EmployeeTest {     @Mock     EHI_Employee mock;     @Test      public void calculatesalTest() {         when(mock.calculatesal(234)).thenReturn(268);         assertEquals(mock.calculatesal(234), 268);      }}   Please explain me!


I need your help. I am confused about the output of the following code.    a = [] b = []  for j in range(2):     b.append(j) a.append(b) print(b) print(a)  for i in range(2):     b.append(i) print(b) print(a)  a.append(b) print(a)     I thought that the 3rd "print(a)" should give [[0,1],[0, 1, 0, 1], but it actually gives [[0, 1, 0, 1], [0, 1, 0, 1]]. It seems that after the 2nd loop the "a" is automatically updated, sth that is not happening in the following case, for example, where both prints should give 0:    x=0 y=x print(y)   x=9 print(y)     Does anyone know what changes from the 1st "print(a)" to the 2nd and why they give different outputs?  Thanks!


"Which foods do you..." vs. "What foods do you..."

The word "which", by its definition, is "asking for information specifying one or more people or things from a definite set." So, naturally, "which foods do you..." is the correct way of phrasing this question, right? But some people tell me that "what foods do you..." is the correct way. This phrasing even returns more Google results — 1.4 million as compared to 221k for "which foods..."  So which one... err... what one is correct?


Continuous Function taking rationals to irrationals and vice versa

Note Do not close this question like It was done earlier. Question is different so I am asking a new question.  l am not supposed to use connectedness here  Mine is a basic real analysis course. Thanks.  Question     Does there exist a continuous function $f:\mathbb{R} \to \mathbb{R}$ satisfying $$f\left(x\right) \in\mathbb{Q} \text{  for all  } x \in  \mathbb{R}-\mathbb{Q}$$ and $$f\left(x\right) \in \mathbb{R}-\mathbb{Q} \text{  for all  } x \in \mathbb{Q}$$??   Attempt I do not really know what to do. I don't know whether to prove or to disprove


Journal vs conference publications when looking for a job in in computer science

I'm currently a post doc in theoretical computer science and I have a double digit number of conference publications, about half of which are at so called "tier 1" conferences (SODA,STOC,...). Unfortunately I only have 1 journal publication so far, mainly due to coauthors dragging their feet.   Will the lack of journal publications have a great impact when applying for a faculty job in cs-theory at some point, and is it advisable to try to up this number before applying? Or is this fully compensated by having sufficiently many conference papers?


I am currently writing my thesis and need to include a bunch of email conversions. I am using classicthesis. I wonder, how you would format stacked conversions. Moreover, how would you deal with the email header, signatures and line breaks: why do I need to add \\ all the time? This is the configuration I am currently experimenting with:  \documentclass[ oneside, openright, titlepage, dottedtoc, numbers=noenddot, headinclude, footinclude=true, cleardoublepage=empty, abstractoff, BCOR=5mm, paper=a4, fontsize=11pt, ngerman, american ] {scrreprt}  \PassOptionsToPackage{utf8}{inputenc} \usepackage{inputenc} \usepackage{blindtext}  \usepackage{framed}  % Vertical line that highlights quotations in an email. % Use \begin{leftbar} and \end{leftbar} environment. % Width of the line = 0.4pt % Space between the line and the text = 10pt % Requires \usepackage{framed} \renewenvironment{leftbar}{%   \def\FrameCommand{\vrule width 0.4pt \hspace{10pt}}%   \MakeFramed {\advance\hsize-\width \FrameRestore}}% {\endMakeFramed}  \usepackage{nicefrac} \usepackage[english]{babel} \usepackage[pdfspacing]{classicthesis}  \begin{document} \selectlanguage{ngerman} % american ngerman % Disable paragraph indentation. \setlength{\parindent}{0pt}     \begin{verbatim} From: john.doe@yahoo.com Subject: Your inquiry from 20042012 Date: Thu, 3 May 2012 11:34:54 +0200 To: Jane Doe <jane.doe@hotmail.com> \end{verbatim}  Jane Doe wrote: \begin{leftbar} \begin{leftbar} \begin{leftbar} \begin{leftbar} There are a couple of questions I like to ask. Please forward them if you cannot do so. \end{leftbar} I hope I can answer them after holidays. \end{leftbar} I am back from holidays now and will look through your questionaire the next days. \end{leftbar} Thank you, Mr. Doe - I am awaiting your answers. \end{leftbar}  Dear Mrs. Doe,\\ \ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut molestie placerat pharetra. In quam leo, tincidunt ut consequat eget, malesuada sit amet urna. Morbi et interdum arcu. Nullam nisi nunc, ullamcorper vitae pulvinar eu, suscipit ut augue.\\ \ Donec risus mi, accumsan ac interdum id, molestie sed mauris. Suspendisse porttitor luctus justo in ullamcorper. Proin in neque magna. Mauris quis arcu eget enim mattis pharetra vitae a dolor. Nam aliquam consectetur mollis. Ut at sem quis dolor faucibus fringilla. Quisque cursus vehicula odio, vitae placerat ipsum dapibus id.\\ \ Best regards\\ John Doe\\ \ (See attached file: Questions\_Doe.doc)  \begin{verbatim} _______________________________________________________ Administration New York John Doe Mainstr. 3 11111 New York  T:        (011) 212-4301 F:            (011) 212-954301 M:         john.doe@yahoo.com \end{verbatim}  \begin{leftbar} My question I looking forward to reading the answers to my questions:\\ \ 1. Is the world analog or digital? \end{leftbar} digital  \begin{leftbar} 2. How long does the world exist?  \end{leftbar} analog since 1984, digital since 1999  \end{document}     This is what the above latex example looks like.    I also saw  but I do not want to use > or colors. My settings are inspired by this  and this .


3 random numbers to describe point on a sphere

I'm currently working on a problem involving computer graphics and got into a discussion about whatever or not constructing a 3d vector out of 3 random points uniformly distributed points between -1 and 1 (and then normalize the vector) to get points uniformly distributed over the surface of the sphere?   Note that I'm a computer science student not a math student and as such might not be able to follow the really complex stuff.   The other student said it would be better to instead pick 2 random points on a 2d plane and then warp those onto a sphere, however this to me seemed needlessly complex which one of us is right?


Book where FTL is generally invented in the bronze age

There is a sci-fi book whose premise is that a FTL drive is very primitive technology discovered by most alien races some time between their equivalents of the Bronze Age and Middle Ages.  Once FTL is developed, advances in other technologies slows or ceases.  The galaxy is rife with what amounts to ancient Romans flying through space conquering each other.  Occasionally, a race reaches the Victorian era before developing FTL travel. They become the big kids on the block, conquering willy-nilly.  For whatever reason, Earth never stumbled upon FTL on their own.  Confined to their single planet, Humanity developed advanced technologies: Metallurgy, Medicine, Mechanics, Radioactives, Computers. Warfare. Modern Earth.  In a galaxy filled with ancient Romans.  One day, Earth is invaded by a fleet of bronze spaceships.  A bunch of crossbowmen pour out and are immediately eradicated.  Earth now has FTL technology.  You can guess what happens next.  The book takes place countless thousands of years later when the galaxy spanning Terran empire has collapsed millennia ago.  Can you point me to the book?


Distribution of quadratic form of multivariate normal with linear term

Suppose that $A$ is a symmetric non-random matrix and $X\sim N(\mu,\Sigma)$ and $b \in R^n$ is a non-random vector. Then what is the distribution of  $$X^tAX+b^tX \quad ?$$  The distribution without the linear term is solved in the answer here().  In the case of an invertible $A$ we can write $X^tAX+b^tX=(X-h)^tA(X-h)+k$ where $h=-\frac{1}{2}A^{-1}b$ and $k=-\frac{1}{4}b^tA^{-1}b$. However, the case where $A$ is not invertible is also of interest as it arises in practice. In the case where $n=1$ this corresponds to $A=0$ and thus the distribution above is simply a normal with mean $\mu_0 = b^t\mu$ and $\sigma_0 = b^t\Sigma b$. Is there a reducible solution in the more general case of $n>1$ for arbitrary non-invertible $A$? Perhaps an appropriate transformation can disentangle the quadratic form and the linear so that we have in some basis independent sum a normal and a linear combination of scaled non-central chi-squared with 1 degree of freedom.  Attempt: Write $A=P\Lambda P^t$, where $\Lambda$ is a diagonal of the eigenvalues and $P$ has the corresponding unit eigenvectors in it's rows, $PP^t = I$. As $A$ is not invertible there are $r>0$ zero eigenvalues. Then we can write $$X^tAX+b^tX = X^tP\Lambda P^tX+b^tPP^tX $$ Set $Y=P^tX$, then $$ X^tAX+b^tX = Y^t \Lambda Y + b^t PY$$ Assume w.l.o.g. that the eigenvalues which are $0$ and corresponding eigenvectors in $P$ are the last $r$ rows/columns in $\Lambda$. Then $$X^tAX+b^tX = (Y^\star)^t \Lambda^\star Y^\star + (b^\star)^tY^\star+(b')^tY' $$ $Y^\star$ are the $n-r$ first entries of $Y$ and $Y'$ the rest, $b^\star$ is the $n-r$ first entries of $P^tb$ and $b'$ the $r$ last. $\Lambda^\star \in R^{(n-r)\times (n-r)}$. Now the first two terms can be used to fill the square and the last term involves parts of $Y$ not involved in the first two terms but it is not independent of them as the covariance matrix of $Y$, $Cov(Y) = P^t\Sigma P$ is not diagonal. The goal is to identify the distribution of $X^tAX+b^tX $.


I'm elaborating a tutorial/guide about the software I used on my thesis.  The tutorial and the thesis won't be part of the same document. So, I was thinking about using other than times/arial.  Any sugestions? Also, any design sugestions? I think the document looks very plain.


TAB press for auto-complete does not work for some service names

I can run following command on my Ubuntu 14.04.3 Terminal without any problem:  sudo service network-manager restart [sudo] password for username:  network-manager stop/waiting network-manager start/running, process 5204   If I type sudo service network and then press Tab it is auto completed to sudo service networking. If I type sudo service network-ma and them press Tab no auto-complete occurs.    My question is if there is a service named network-manager that could be restarted by service command why its name is not auto-completed? and How to solve it?  Update:  ls -l /etc/init.d/network* -rwxr-xr-x 1 root root 4479 Apr 28  2014 /etc/init.d/networking


Consider  I attempted to help on.  The root cause of the problem is unclear, but the code was messy and may have contributed to the issue.  So as a step in resolving the OP's issue, I proposed a different, cleaner way of approaching the problem that I hoped would get him closer to finding a solution.  To me, this seemed more helpful than just leaving a comment saying "there's not enough information to say with confidence what the problem is".  However, I was downvoted by someone with 12k rep and .    Is this really the case?  I'm not worried about the -2 rep, so please don't misunderstand, it's an honest question about what is better for the OP or for the site: attempts to move the OP forward as much as possible or simply terse comments stating "insufficient details".


Proving that there exist a nonsingular linear functional for a field of characteristic 0.

The question is from Hoffman Kunze pg 106,Q14.  Let F be a ﬁeld of characteristic zero and let V be a ﬁnite-dimensional vector space over F. If there exist m ﬁnitely many vectors in V, each different from the zero vector, prove that there is a linear functional f on V such that  f(a)=0  for all a in V.  This is equivalent to showing that there exist a nonsingular linear functional for a finite dimensional vector space, as i can extend m to any arbitrary no of vectors. I understand that we will map the basis of the subspace generated from above to some nonzero 1d vectors. After that,how can be show that all non zero vectors are not zero as we have only less generators in comparison to the entire V. Please help.


Godaddy dedicated server randomly timeout users on just 400-500 Active users

We have Godaddy's Dedicated server. but we are facing problems with this server. after on 400-500 active users server randomly timeout or kill users. we this it's error with IIS. We did conversation with some server experts they said there is some issue with IIS. but nobody can resolve this issue. i share a screen shoot of analytic of active users. Please help us.


So this happen when i was claim a field research reward of catching 10 pokemon, and then Ghastly appeared.  Im not catching him immediately coz ran out of pokeballs and save this rewards for later. But when i want to take the reward, the capture screen it become a blank.      And also the field research become 4 column @@    Anyone got an idea what should i do ?


Is true that $H^{s,p}(\mathbb{R}^n)\subset C^k(\mathbb{R}^n)$ with $s-k>n/p$?.

In Functional Analysis by J. Cerda, the theorem 7.28 says:  theorem 7.8. If $s-k>n/2$ then $H^{s}(\mathbb{R}^n)\subset C^{k}(\mathbb{R}^n)$ (functions $k$ times differentiable) with $H^{s}(\mathbb{R}^n):=\left\{u\in L^2: \mathcal{F}^{-1}(1+|\xi|^2)^{s/2}\mathcal{F}(u))\in L^2\right\}$  Let  $H^{s,p}(\mathbb{R}^n):=\left\{u\in L^p: \mathcal{F}^{-1}(1+|\xi|^2)^{s/2}\mathcal{F}(u)\in L^p\right\}$ Sobolev space.  I know that if $s>n/p$ then $H^{s,p}(\mathbb{R}^n)\subset C(\mathbb{R}^n)$ [Taylor,Partial Differential equations  III, prop. 6.3, p.26]  Is there a similar result in the context of $L^p$? e.g.  If $s-k>n/p$, the Sobolev space $H^{s,p}(\mathbb{R}^n)\subset C^k(\mathbb{R}^n)$?


This question was developed as an extension of  that is related.  What interests me in particular is the part about dispeling.  I'm totally agree with the linked answer to that related question (provided by someone from Pathfinder staff, I believe). That answer is true for Haste vs Slow (and vise versa), as they explicitly dispel each other.  But what if it is Darkness vs Light? Or any other pair of spells, one of wich can dispel the other, but the other can't dispel the first one?  Why it is assumed that dispeling with opposite spell is a separate use of spells from both such pairs?  Cons:   I found no evidence of necessity of using a dispelling spell in some unusual manner to accomplish said dispel (opposite to counterspelling, wich has it's own mechanic). So I assume that dispelling is the part of a normal casting (opposite to counterspelling, again).     Example of application:   Both spells (cast normally) must simply affect the same target. And now both spells are affecting the same target and interact with each other. And, if in case of Haste vs Slow, Slow dispels Haste and Haste dispels Slow (leaving nothing in the end), in case of Darkness vs Light, Darkness dispels Light, but Light has no effect on Darkness. And thus Darkness isn't dispeled and stays on the object.  Were the dispel function a specific use of a dispelling spell, the spell, used that way, shouldn't than affect anything but targets with the spells to be dispeled. But it is said nowhere in the rules.     Example of application:   We have a party of four characters: A, B, C, and D. A and B are hasted. C and D are not. When an evil sourcerer casts slow on them (and they all fail their saves), A's and B's hasted condition is dispelled, while C and D are slowed.    Are those cons wrong and why? What pros it has?


How to sync contacts between iCloud and Gmail with Mavericks

The question is not about enabling the new two-way gmail syncing on Mavericks, or how to activate the iCloud one. What I'm trying to do is just to sync the two.  Manually I could from time to time erase all the gmail contacts and copy all the contacts I have on iCloud. But is there an automated way to do it ?


"cannot open display: :0" while trying to run Nautilus as sudo

When I try to start root access to nautilus the following error appears  ** (org.gnome.Nautilus:30348): WARNING **: 12:13:40.980: Error on getting connection: Failed to load SPARQL backend: Error spawning command line ?dbus-launch --autolaunch=1e3ab93feb7e49058bb4f0057359f389 --binary-syntax --close-stderr?: Child process exited with code 1  (org.gnome.Nautilus:30348): GLib-GIO-CRITICAL **: 12:13:40.996: g_dbus_connection_signal_unsubscribe: assertion 'G_IS_DBUS_CONNECTION (connection)' failed  (org.gnome.Nautilus:30348): GLib-GObject-CRITICAL **: 12:13:40.996: g_object_unref: assertion 'G_IS_OBJECT (object)' failed  (org.gnome.Nautilus:30348): GLib-GObject-CRITICAL **: 12:13:40.996: g_object_unref: assertion 'G_IS_OBJECT (object)' failed No protocol specified Unable to init server: No se pudo conectar: Conexión rehusada  (org.gnome.Nautilus:30348): Gtk-WARNING **: 12:13:41.021: cannot open display: :0   How do I fix it?


Let $f$ be a function defined in the open interval $(a,b)$ and let $x_0\in(a,b)$. Suppose in addition that $f'(x)$ exists for all $x_0\neq x\in(a,b)$. Is the following statement true:      If $\lim\limits_{x\to x_0}f'(x)$ exists, then $f'(x_0)$ exists and $\lim\limits_{x\to x_0}f'(x)=f'(x_0)$.   Thanks!


Fitting data to a log-normal distribution

For a simulation study I've been trying to find an appropriate distribution for job handling times in R. I have a very large dataset of 77010 records (handling time in seconds).  I've been exploring several distributions (lognormal, exponential, Gamma, Weibull, Burr, Pareto and more) and want to confirm which distribution best represents my data. I found that from all fitted distributions (using fitdist) the log normal distribution best represents my data (see picture below).      This plot makes me think that the lognormal distribution is a good representative of my data compared to the other distributions (also when comparing BIC, AIC & MLE). But, when I take the logs of my dataset and test for normality using ad.test (i.e., the Anderson Darling test), the null hypothesis is rejected. Likewise, when I perform the Kolmogorov-smirnov test (ks.test, note that ties are present here), the test is also rejected.  I suspect my dataset is too large to obtain meaningful results from these tests.  How do I proceed in finding substantial evidence that this distribution fits my data?


What does ! mean in the statement if [ ! -n "$1" ]

I am trying to understand what the bellow statement means. if [ ! -n "$1" ] What I understand from the rest of the statement is: An if statement (if), something I do not understand ( ! ), checks the length of a string is nonzero ( -n ), the first argument ( "$1" )


I'm receiving a random line break in the following C# string and can't identify why the output is on two separate lines. I've really only tried to define the variable in two different manners. Both produce the same results. string cmdStr = "docker images | grep -E '^prabhasgupte/webmon.*latest' | head -1 | awk '{print $3}'"; Console.Write(cmdStr); string imageId = commands.Bash(cmdStr); Console.Write(imageId); string x = $"docker tag {imageId} scan_target:{imageId}"; Console.Write(x);  This is the output I'm receiving:  docker images | grep -E '^prabhasgupte/webmon.*latest' | head -1 | awk '{print $3}' 0043699b906f docker tag 0043699b906f scan_target:0043699b906f  public static string Bash(this string cmd) {     var escapedArgs = cmd.Replace("\"", "\\\"");      var process = new Process()     {         StartInfo = new ProcessStartInfo         {             FileName = "/bin/bash",             Arguments = $"-c \"{escapedArgs}\"",             RedirectStandardOutput = true,             UseShellExecute = false,             CreateNoWindow = true,         }     };     process.Start();     string result = process.StandardOutput.ReadToEnd();     process.WaitForExit();     return result; }


python assign multiple values to multiple arrays

My question is:  Lets say I have N arrays: arr0, arr1, arr2,... arrN (edit: actually N+1 arrays, but it doesn't matter) .  I want to insert to the first member of all the arrays values, in the same line, like this:  [arr0[0], arr1[0], arr2[0]... arrN[0]]=[0,1,2,3....N]   I would expect that after this line arr0[0] will be 0, arr1[0] will be 1 etc.  but, for some reason, what happends is arr0[0]=arr1[0]=arr2[0]=...=arrN[0]=N  Any idea why, and what can I do to fix it?  Thanks in advance.


Regular expression doesn't capture elements as expected

I have a regular expression that should capture 4 elements but it is only capturing 3. Here is the code  <?php  $re = '/<input.+>(.*)</m'; $str = '    <input type="radio" name="562" value="1" onclick> turtle.show()
 <input type="radio" name="562" value="2"> turtle.showLocation()
 <input type="radio" name="562" value="3"> turtle.showDirection()
 <input type="radio" name="562" value="4"> turtle.showturtle()
<input type="hidden" id="ans562" value="4">';  preg_match_all($re, $str, $matches);  // Print the entire match result var_dump($matches);


Can I store my pixels somewhere so I don't lose them when I die?

I die all the time. My pixel balance hovers around zero as a result. I'm trying to save up for armor but my nonstop deaths are making that difficult.  Is there anywhere I can store my pixels so that when I die, I won't lose a bunch of them?


why is pressure more convenient than force while dealing with fluids?

If two equal and opposite forces act on a surface, can I say the pressure is zero because the net force is zero? How can pressure be non directional when force as a direction? How can the pressure of a liquid be explained at the molecular level in liquids? If I exert a force vertically on a liquid, why does it move sideways?


Is .Net 4.6 being used in the deployment of Stack Overflow?

One of the developers at Stack Overflow, Nick Craver, , pending for the resolution of    Now that this bug is solved, so I wonder whether Stack Overflow has already upgraded to .Net 4.6? Or SO is still holding on the upgrade, pending for more testing on RyuJIT in x64 environment?


Hi! I'm a beginner learner and I'd like to know how to snap these three objects. I'd like to snap the two cylinders with the different faces of the cube. The short one on the left and the highest cylinder on the top of the cube. I'd like to have the center of the cylinder aligned with the center of the cube (the base of the cylinder inscribed into the face of the cube)  I'm sorry for bad explanation I hope someone can help me  Thanks!   I add a screenshoot in which you can see what I have to do   Thanks again if someone can help me with this!


Proof congruence identity modulo $p$: $2^2\cdot4^2\cdot\dots\cdot(p-3)^2\cdot(p-1)^2 \equiv (-1)^{\frac{1}{2}(p+1)}\mod{p}$

I want to show that for every odd prime $p$ the following congruence holds:  $$ 2^2\cdot4^2\cdot\dots\cdot(p-3)^2\cdot(p-1)^2 \equiv (-1)^{\frac{1}{2}(p+1)}\mod{p} $$  How would I approach this problem?


simple batch script not working PS, but works in cmd

I have a .bat script that just cds into a directory  cddocs.bat  cd \Users\Me\Documents\NetBeansProjects\   It is in my home folder. (C:\Users\Me)  In cmd when I run it   C:\Users\Me>cddocs C:\Users\Me>cd \Users\Me\Documents\NetBeansProjects\ C:\Users\Me\Documents\NetBeansProjects\>   It works as expected, I'm in the NetBeans directory. In powershell, I get this  PS C:\Users\Me> .\cddocs  C:\Users\Me>cd \Users\Me\Documents\NetBeansProjects\ PS C:\Users\Me>   So it appears to run the cd command, but I am still in my home directory! I must be missing something really simple here. How can I get this tiny script to actually cd the directory in powershell?


Challenge delete policy for a question with a low quality answer

On my first question on a specific Stack Exchange site, someone basically answered: "You can find the answer online". Since they're top 2%, and the answer has upvotes, it's not my place to challenge that. But I feel like I should at least be able to delete the question, because it serves no purpose for future readers, and clearly there is no interest in answering on the Stack Exchange site. Is there, or should there be, a way to challenge the delete policy?


How do I make a method that creates a new instance of a generic class specified by an abstract class?

I'm trying to instantiate and register listener classes in a loop, based on a list of event classes.  I'm trying to use a list such as:  static final Class[] USER_EVENTS_HANDLED = {     FirstEvent.class,     SecondEvent.class };   I have a bunch of listener classes, one for each:  FirstEventListener extends MyAbstractListener<T extends MyEvent> SecondEventListener extends MyAbstractListener<T extends MyEvent>   I'm currently manually registering the event class and listener class explicitly:  eventManager.registerListener(FirstEvent.class, new FirstEventListener()); eventManager.registerListener(SecondEvent.class, new SecondEventListener());   I'm trying to not duplicate the event name twice, for maintainability.  I build the name of the listener class from the event class, but I'm struggling to come up with the right way to create a new instance of the listener using that.  First tried newInstance, but then realized generics had to be treated specially.  I got something like this snippet of code from somewhere:  private static class ListenerGenerator<E> {     E generateListener(Class<E> clazz, Constructor constructor) throws Exception {         return (E) constructor.newInstance();     } }   So to make that work, I tried calling "getConstructor", along with some other approaches, but that keeps resulting in a NoSuchMethod error.  What's the simplest approach to accomplish my goal?  NOTE: This is not a duplicate of the question just asking about creating an instance of a generic class in Java.  It's a more specific case requiring a significantly more complex solution.


I just made an edit to a question I asked. Quite often I don't write summaries, but this time I felt that I should have added some explanation to the edit.  Is there a way to add a summary afterwards? I know that I can do a rollback and a new edit and such things, but I don't think the summary is worth polluting the edit history. I simply want to add a summary to an existing edit.


A bijective map from $\bf N \times N$ to $\bf N$

I want a bijective map from $\bf N \times N$ to $\bf N$. I can think of injective map easily. But, bijective seems to be hard to think.


Proof verification: uniqueness of empty set

My question doesn't concern the standard-proof of the uniqueness of the empty set, which uses the lemma that the empty set is a subset of every set. My question concerns an alternate proof that I made before reading the standard one, and which now seams wrong, but I can't find my mistake. Can someone point me in the right direction?   My proof goes as follows:   Let us assume for contradiction that the empty set is not unique. This means that there is another empty set, let's call it $\varnothing'$, for which $ \varnothing' \neq \varnothing $. By the axiom of extensionality we have the following $\varnothing = \varnothing' :\iff \forall x: x \in \varnothing' \leftrightarrow  x \in \varnothing $, which implies $\varnothing \neq \varnothing' \iff  \exists x:  \neg (x \in \varnothing' \leftrightarrow  x \in \varnothing)$.  This is equivalent to $  (x \in \varnothing' \land x \notin \varnothing)  \lor  (x \notin \varnothing' \land x \in \varnothing) $ . But this is never true, because the empty set (by definition) doesn’t contain any elements. Hence, the empty set is unique.     I have read . My question doesn't only concern the correctness of my proof but also the difference between my proof and the standard one. If my proof is right, then I don't see why one should use the "standard" proof, which uses another lemma, instead of just applying the axiom of extensionality.


I recently tried booting into the Grub2's menu entry "Ubuntu GNU/Linux, with Linux 3.2.0-24-generic-pae (Recovery Mode) just to see what was there.  It booted successfully, but I had no idea what to do after I was there.  My question is where can I find some documentation on the recovery mode and what to do if I truly needed to be there.  I'm running Ubuntu 12.04.


Why is a negative number multiplied by a negative number a positive number?  I'm trying to know what does multiplying by a negative number mean.   If you think of multiplication as a "groups of" ($3 \times 5$ meaning $3$ groups of $5$ then it's confusing what a "negative number of groupsof $X$" could mean.  A lot of mathematics can be and was done without reference to "negative" numbers—whatever that unfathomable silliness might mean! The first several chapters of Stillwell's Mathematics and its History cover rational points on the circle, irrational numbers, distance, conic sections, rational curves, Pell's equation, chords and tangents, prime numbers, Chinese remainder theorem all without reference to negative numbers. You could do Platonic solids or spiric sections as well without ever venturing in that direction.


Recover from or repair a corrupt password protected Word 2010 file

I created a password-protected Word 2010 document at work, brought it home using a flash drive, tried opening it using Word 2007, and it won't open. It doesn't even present me with a password-entry box. Word runs, but flat out refuses to open the doc. I have the password, but what bloody good is it when I'm not presented with the password input dialogue?  OpenOffice Writer yields no joy, and WordPad tells me the document is either 'Corrupt or protected under Rights Management.' NotePad opens it quite willingly, and I see frequent references to 'encryption' that look coherent, with large blocks of text that did look so.  WinZip says the file is 'not a valid archive', which an unencrypted Word 2010 file should be a valid archive.  Is there anything I can do to recover this file?


Possible eigenvalues of a projection matrix

What are the possible eigenvalues of a projection matrix? I know that a projection matrix is any square matrix $A$ such that $A^2 = A$. Thus, we obtain  $$ A^2v = \lambda^2 v \\ Av = \lambda v $$  for some vector $v \neq 0$. The above imply that $\lambda v = \lambda^2 v$ so $\lambda^2 - \lambda = 0$ so $\lambda = 0, 1$. Does this seem right? For some reason I feel like $-1$ should also be an eigenvalue.


If $G = H \cup K \cup L$, then $[G:H] = [G:K] = [G:L]=2$

This is a problem from Isaacs's Algebra. Let $G$ be a finite group and $H, K, L$ be proper subgroups of $G$ such that $G= H \cup K \cup L$. He asks us to show that, in this case, $[G:H] = [G:K] = [G:L] =2$.  It seems simple enough, but I can't get started on it! Any hint would be greatly appreciated.


Lens with small scratches on the front element - how do they affect IQ?

I am looking to buy a CANON 28mm 1.8 EF lens. I found an offer, significantly discounted, of a lens with small scratches on the front element.   The offer is very tempting. Here is a photo posted by the seller:    The scratches will probably affect my photos a bit. But how much exactly? Does anyone have experience with a similarly scratched lens?   I am an amateur and hobbyist, and I don't make money from my photography. I would use this lens as a 'normal' on my 60D, mostly for taking portrait photos of my family. I am getting this one because of the aperture (1.8), and I would be using it wide open most of the time.


I know that 0/any number=0 and any number/0=no answer, (negative) infinity, undefined.  So, what happens if we divide zero by itself?  Is it zero?  Is it infinity?  Well, infinity isn't a real number, but let's cut to the real chase.  Let's say there are two points on a coordinate plane put together.  How will we know what line to draw?  What slope does it have?  We know that the x- and y-intercepts are the same.  What happens when we divide zero by zero?


Why does the angle of view narrow as you zoom in?

Why does a 4mm lens have a wider angle of view than an 8mm lens ?


How to create a Windows 7 installation USB from OS X?

I'm trying to create a Windows 7 installation USB (for use on a PC) from OS X.  I've tried following these instructions from a :   Insert the USB flash drive and run the command diskutil list to find out the disk name, we'll use /dev/disk1 as an example Now unmount the disk using diskutil unmountDisk /dev/disk1 dd if=/path/to/Win7.iso of=/dev/disk1 bs=8192   But the instructions don't work. When I insert the created USB drive into my PC and try to boot from it, I get this message:     Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key   What am I missing?


I don't know anything about this topic. Can you explain and describe standard error of the mean?


The dot product in the room (third dimension) equal to the axies-values of the two vectors.

Why is it that the dot product of two vectors $u_1=(a, b, c)$ and $u_2=(x, y, z)$ plays out like this: $u_1 \cdot u_2 = ax+by+cz$. I have seen and understand why this is the case for 2D but why is it the case for 3D? I though the dot product is $|u||v|\cos \theta$? This would result in $\sqrt{a^2+b^2+c^2} \sqrt{x^2+y^2+z^2} \cos \theta$. Are they the same? Edit: Again, I have seen the proof for the second dimension but I have not seen any proof for the equation $u_1 \cdot u_2 = ax+by+cz$. Can anybody guide me? Also, does this apply in all dimensions?


I recently installed Elementary OS onto Ubuntu 16.10 using the steps in . As a result, the window border for unity now looks different:    The window border now has a "squeezed" design. Specifically, the top left buttons (close, minimize, maximize) being more separated than normal, and the window bar has been decreased in height. After removing elementary os entirely, unity remains this way. Is there a way I can go back to the original design?  Note: The solution “” is no longer effective.


Differentiate “it is said” from “it has been said”

It has been said that everyone lives by selling something.  Can I substitute the bold part with "it is said"? I think since it is kinda like a saying, using present simple is more appropriate. However, I also think "it is said" can also mean this sentence was said before, and the impact on the present is that now people generally accept that, which sounds like the function of present perfect. And present perfect I think carry the implication that people may or may not say this anymore as an impact of someone saying it in the past.


Inequalities involving definite integrals in $\mathcal{C}[a,b]$

Let $f \in \mathcal{C}[a,b]$. Assume that $\min_{x \in [a,b]} f(x)=m>0$ and let $M=\max_{ x \in [a,b]}f(x)$. Which of the following inequalities are true? $(A)$ $\frac{1}{M} \int\limits_a^b f(x) \ dx + m \int\limits_a^b \frac{1}{f(x)} \ dx \geq 2 \sqrt{\frac{m}{M}}(b-a)$ $(B)$ $\int\limits_a^b f(x) \ dx \int\limits_a^b \frac{1}{f(x)} \ dx \geq (b-a)^2$ $(C)$ $ \int\limits_a^b f(x) \ dx \int\limits_a^b \frac{1}{f(x)} \ dx \leq (b-a)^2$  So according to answer at the back $A \& B$ are the correct options. $B$ is clear to me you replace $f$ and $1/f$ on the $LHS$ by its appropriate bounds to attain the inequality. I am not sure how to attack $A$. Any help?


Effect size to Wilcoxon signed rank test?

Some authors (e.g. Pallant, 2007, p. 225; see image below) suggest to calculate the effect size for a Wilcoxon signed rank test by dividing the test statistic by the square root of the number of observations:     $r = \frac{Z}{\sqrt{n_x + n_y}}$   Z is the test statistic output by SPSS (see image below) as well as by wilcoxsign_test in R. (See also my related question: )  Others suggest the Bravais-Pearson ($r = \frac{cov(XY)}{sd(X) \times sd(Y)}$) or Spearman ($r_S$) correlation coefficients (depending on data type).  When you calculate them, the two rs are not even remotely the same. E.g., for my current data:     r = 0.23    ( for $r = \frac{Z}{\sqrt{n_x + n_y}}$ )      r = 0.43    ( Pearson )   These would imply quite different effect sizes.  So which is the correct effect size to use, and how do the two rs relate to each other?    Pages 224 (bottom part) and 225 from Pallant, J. (2007). SPSS Survival Manual:


How to sort and get highest value from Java Object/ArrayList

I have an ArrayList with Student Objects (Name, Mark in Math, Mark in Physics). How can I sort the ArrayList and edit with first highest number/s, then second highest then third and so on. For example I have the object value below:  ArrayList<> allStudents = new ArrayList(); allStudents.add(new Student("A", 80, 94) ); allStudents.add(new Student("B", 98, 91) ); allStudents.add(new Student("F", 70, 84) ); allStudents.add(new Student("C", 98, 92) ); allStudents.add(new Student("H", 99, 93) );   I will look for the student with highest number, I got H. I edit the object like: "H", 97, 90 and save it back to that ArraList. Again I look for 2nd highest but here I have students "B" and "C", I can see they same number in math but in Physics C has highest number so I will edit "C", 96, 90 and save it back to the ArrayList and so on. Here which student already edited, I will not fetch them for edit and save thr and so on. IF someone please help me! Thanks in advance


Limit of Ratio of Adjacent Fibonacci numbers $\to \phi$

We define the $n^{th}$ Fibonacci number as $a_1 = a_2 = 1$ and $a_n = a_{n-1} + a_{n-2}$ for $n \geq 3$. Consider  $$ \lim_{n \to \infty} \frac{a_{n+1}}{a_n}. $$  I wrote a script and found that this limit converges to the golden ratio $\phi \approx 1.61803$. However, I'm having trouble giving a rigorous proof for this. Here's what I have so far:  $$ \lim_{n \to \infty} \frac{a_{n+1}}{a_n} = \lim_{n \to \infty} \frac{a_n + a_{n-1}}{a_n} = \lim_{n \to \infty} \left( 1 + \frac{a_{n-1}}{a_n} \right). $$  I'm unsure of how to proceed after this. I know that expressing the limit as a certain continued fraction would imply that it converges to $\phi$ but I'm unsure of how to get there. Any ideas?


Are fact and opinion mutually exclusive?

If I believe a fact, is that fact also my opinion? I'd always thought that opinion and fact are mutually exclusive. To me, 1+1=2 cannot be considered an opinion, as it is a fact.  Merriam-Webster has a few definitions of the word opinion, including one that seems to suggest that facts could also be considered opinions:     a view, judgment, or appraisal formed in the mind about a particular matter   and one that seems to support the idea that fact and opinion are mutually exclusive:     belief stronger than impression and less strong than positive knowledge


Letter of Recommendation from PhD Student for Masters

I am an undergraduate student at an American university and am applying for an Msc at LSE for the 2021-2022 school year. I need advice on a letter of recommendation. I already have one professor who is writing me a LOR, but am having trouble finding a second professor. Here are my options for the second LOR:  A PhD student who taught a class on anthropology. She can write much more personally about my work, work ethic, analysis, and character since she knows me on a much more personal level. I'm applying to LSE's international migration program, and in her class, I wrote several essays on the topic (Partition of South Asia, identity formation in diaspora, etc.), so she can directly write about my work in this field. She agreed to write me a LOR, but encouraged me to first look for a Professor.  The second option is a history professor. I got A-'s in both his classes, and he knows me fairly well on a personal level. But I don't think his LOR would be as strong as the PhD student's. I reached out to him and didn't heard back. I just sent him another email.   According to the LSE website, an academic reference is "tutors who have taught you at university" and "who know your work well, and who, preferably, can comment on subjects or skills relevant to the programme(s) you are applying for." I know LSE pays quite a bit of attention to personal character via LORs and personal statements, so I don't know if it would be more beneficial to have a professor who has more prestige and credibility, but who doesn't know me personally vs. a PhD student who has less prestige and credibility, but knows my personal character and work ethic much better. Any advice would be appreciated. Especially those with experience with LSE admissions.


I am a bit confused with the D&D 5e Starter Set. I'm fairly new to the game.   In the character sheets, I am confused of what dice I use for damage rolls and what the modifiers are?   Is it the one listed under attacks and spellcasting?


$r+r^{-1}$ integral implies $r^n+r^{-n}$ integral

Suppose r + 1/r is an integer. r is real and positve. How to prove r^n + 1/r^n is an integer by induction for all natural numbers n.


node still present even after setting it to null

i was trying to delete the minimum element in BST. there can be 2 cases:  Case I: right child not present In that case, set current node to null straight away.  node=delete(node);   Case II: right child present. In that case copy the contents of right child to current node and delete the right child.  if(node.right!=null)         {             node.data=node.right.data;             node.right=null;         }   My doubt is, why does the second case work and the first doesnt. I mean, if "node" is a reference variable and so nulling it doesnt make it null in actual tree, then WHY does node.right works just fine? My full code of the function:  public static int del_min(Node node) {     if(node.left==null)     {         minimum=node.data;         if(node.right!=null) //WORKING         {             node.data=node.right.data;             node.right=null;         }         else //NOT WORKING         {             node=null;         }     }     else     {         minimum=del_min(node.left);     }     return minimum; }   Please help me.


I have a text file that I first want to print the last 6 lines of, and then to detect when a new line has been added so that it will keep updating the screen with recent activity. The idea is that I'm trying to display six recent transactions made in my program.   The problem I am currently encountering is that it keeps printing the first (not last) six lines in the text file, when I want it to be the other way around.     Here is my sample code:    BufferedReader in = new BufferedReader(new FileReader("transaction-list.txt"));    System.out.println();   System.out.println("SIX MOST RECENT TRANSACTIONS:");   System.out.println();    String line;    for (int i=0; i<6;i++){     line=in.readLine();     System.out.println(line);   }    in.close();  }catch (IOException e){   e.printStackTrace(); } break;


Is there any way to show file suffixes by default at the end of the file name in unity? For example: If I have a file called test.bin, it is shown as test in Unity. I'd like it to be shown as test.bin by default in Unity.


What's the arc length of an implicit function?

While an explicit function $y(x)$'s arc length $s$ is easily obtained as  $$s = \int \sqrt{1+|y'(x)|^2}\,dx,$$   is there any formula for implicit functions given by $f(x,y) = 0$? One can use the implicit differentiation $y'(x) = -\frac{\partial_y f}{\partial_x f}$ to obtain  $$s = \int\sqrt{1 + |\partial_y f / \partial_x f|^2}\,dx,$$  but that still requires (locally) solving for $y(x)$. Is there any formulation that does not require this, e.g. another implicit equation involving $s$?    Thoughts so far:  One could rewrite $s$ as  $$s = \int |\nabla f|\, |\partial_x f|dx,$$  or symmetrize to  $$s = \int |\nabla f|\, \underbrace{(|\partial_x f|dx + |\partial_y f|dy)}_{(*)}/2$$  where $(*)$ might be strongly related to $|df|$ I guess (though it's not identical due to the $|\cdot|$), but then?


Is there a way to condition output on a given date?

I'd like to be able to print text that varies depending on whether the date matches a given date string  For example  suppose there was a command   \iftoday#1#2#3   which printed #2 if \today matched the string in #1 and #3 otherwise.  So a sample of my proposed usage would be:     \iftoday{February 3, 2016}{There's no garbage today}{Please put out the garbage}    I've tried various commands like pdftexcmd's strcmp, to no avail.    I suspect the problem may have to do with matching the string generated by \today.    While on screen it appears that \today returns February 3, 2016. I can't get it to match February 3, 2016 when I compare strings.  Obviously, I'd be perfectly happy if I could get this to work by represent today's date in any of the standard date formats.  Thanks very much in advance for any suggestions.


Consider the matrix of the transformation

I need help with solving this hw problem for my matrix algebra class.   Consider the transformation $T: \Bbb R^3 \to \Bbb R^2$ defined by:  $$ T(x) = T \pmatrix{x_1\\x_2\\ x_3} = (2x_1 + x_3) \pmatrix{1\\2} + (x_2 - 3x_3)\pmatrix{-1\\1} $$  1a) determine the matrix of the above transformation  1b) determine the reduced row echelon form of the matrix found in 1a  1c) based on your answer to part 1b, is the transformation T onto?  1d) based on your answer to part 1b, is the transformation T one-to-one?  1e) based on your answer to part 1b, determine the set of vectors x in R^3 for which T(x) = 0. Write your answer in parametric vector form  Would sincerely appreciate any help.


Where does tmux store the current pan contents? Is there any log file? I want to be able to search this log file programmatically via a script. I know we can search manually by tmux inbuilt commands. Thats not what i'm looking for.


How to install windows 8 on another hard drive when windows 8 came preinstalled on laptop?

I bought a laptop and now I received an hard drive failure message. It still works for now but I think it wont last very long. What do I have to do in order to install windows 8 on another hard drive since I don't have any install disk ?


![enter image description here][1]How do you use a messagebox to ask for user input using c#?   I tried the 'using Microsoft.Visualbasic;' and  Microsoft.VisualBasic.Interaction.InputBox <--- the "Interaction" namespace doesn't exist.  Is there another way of asking a user for input or do I just create another form?   I get this error: The type or namespace name 'Interaction' does not exist in the namespace 'Microsoft.VisualBasic' (are you missing an assembly reference?)


Is the series $\sum_{k=1}^{\infty}(\sqrt[k]{k}-1)$ divergent or convergent?

I find this series to be a bit troublesum. I can't find a proper method that works. Root test doen't seem to be useful. Ratiotest got ugly. Integral test seems to force me to integrate a function $x^{1/x},$ which doesn't have any elementary primitive.  I can't find an apropriate limit to compare it to and do a limit test comparison.


The package linux-headers-5.4.0-56 needs to be reinstalled, but an archive for it can't be found

when I ever I want to make most of the things in terminal I faced this problem ,even when I try to run sudo apt upgrade , it also appear I try to reinstall it by using sudo apt install --reinstall linux-headers-5.4.0-56 linux-headers-5.4.0-56-generic and it appear also


Suppose that $\lim_{x→0} f(x^3) = A$, where $A$ is a constant number. Prove that $\lim_{x→0} f(x) = A$.  The domain of f is R. But that is the only information provided.  I am completely lost on how to approach this. Any help would be greatly appreciated!


How do you bake fluid simulation from command line in windows?


Did the fake Mad-Eye Moody ever use the Foe-Glass to learn Snape's true allegiance?

This is a follow-up to . That was about telling Voldemort about the Foe-Glass device, this one is about using the Foe Glass while at Hogwarts.  Barty Crouch Jr., while impersonating Alastor "Mad-Eye" Moody, had Moody's  in his office during Harry Potter's fourth year at Hogwarts. Near the end of the book, Goblet of Fire, the Foe Glass shows Albus Dumbledore, Minerva McGonagall, and Severus Snape just before they burst into the room to arrest Barty Crouch Jr.  This proves that all three were enemies of Crouch and therefore of the Death Eaters too. So Barty Jr. had an entire year to look through the Foe-Glass and know Snape was not really a Death Eater. It would be a major oversight for him to not check out friend and foe around Hogwarts.  Could he have used the Foe-Glass to learn Snape was not a true Death Eater?  If he did, he would have warned Voldemort and the other Death Eaters.  Edit: Not sure why this was flagged as a duplicate of my earlier question. As mentioned above, that question is "Did he tell Voldemort about the Foe-Glass?" which is different from this question "Did he use the Foe-Glass to learn Snape's allegiance?" It's quite possible for Barty Crouch Jr. to tell Voldemort about the Foe Glass and not learn about Snape's allegiance. It's also possible for him to learn about Snape's allegiance and not mention that or the use of the Foe-Glass to Voldemort. Neither condition implies the other. He could do both tell Voldy about the Foe-Glass and learn Snape's allegiance, or he could do neither.


A analytic complex function on $\mathbb{C}$ with $f(z)\ne x>0$ is a constant?

Problem Prove that if $f(z)$ is holomorphic (analytic) on $\mathbb{C}$ and $f(z)$ is never a positive real number, then $f(z)$ is a constant function.  This is a problem in my complex analysis course, from the Riemann map part. I don't know how this problem relates to Riemann mapping theorem... It seems that the problem tells me that $f(z)$ is contained in a simply-connected area $\mathbb{C}-(0,\infty)$, but I have no idea what's going on next... Any help would be appreciated!


<?php  class MyClass {     public $prop1 = "I'm a class property!";      public function __construct()     {         echo 'The class "', __CLASS__, '" was initiated!
';     }      public function __destruct()     {         echo 'The class "', __CLASS__, '" was destroyed.
';     }      public function __toString()     {         echo "Using the toString method: ";         return $this->getProperty();     }      public function setProperty($newval)     {         $this->prop1 = $newval;     }      public function getProperty()     {         return $this->prop1 . "
";     } }  class MyOtherClass extends MyClass {     public function __construct()     {         parent::__construct(); // Call the parent class's constructor         $this->newSubClass();     }      public function newSubClass()     {         echo "From a new subClass " . __CLASS__ . ".
";     } }  // Create a new object $newobj = new MyOtherClass;   ?>   Question:  If change $this->newSubClass(); to self::newSubClass();, it also works, so when I need to use $this->newSubClass();, and when need to use self::newSubClass();?


What does this op-amp circuit do? (part of an ECG)

I would like create an ECG circuit based on this schematic (from the AD620AN datasheet):    I don't know this part of the circuit and how it works. I know this is called a right leg driven circuit which is reducing the effect of the noise. But I don't know exactly how negative feedback works in this case. Can someone help me?


What is the sequence of actions when my Shocker removes cards and places cards in my opponents hand?

I have a fun little  deck. From Gatherer     Whenever Shocker deals damage to a player, that player discards all the cards in his or her hand, then draws that many cards.   Note that the errata does not specify combat damage. When the stars align I usually have the following auras on the Shocker.      : Enchanted creature gets +2/+2 and has "Tap: This creature deals 1 damage to target creature or player." : Whenever enchanted creature deals damage to a player, return target creature that player controls to its owner's hand.     My understanding is that when I damage a player (I even targeted myself to get a new hand in desperation) that his hand is discarded and new cards are drawn. Then at the same time a creature (assuming there is a legal target) returns to his hand. Netting the player 1 extra card in his hand once the action is completed.   Is this correct? Are there rules addressing this scenario?


QGIS Conditional statements in field calculator

I have attempted to write an expression for hours now by looking through these forums.    I want to write if this column equals Blank, than this column equals blank.       Ex) If defect_typ = A_FC THEN Defect_Nam = Fatigue Cracking  I can get a return from multiple codes, but here is an example of one I did:  CASE WHEN defect_typ LIKE '%A_FC%'        THEN 'Fatigue Cracking' ELSE 'other'   No matter what code I use it fills my entire defect_nam column with Fatigue Cracking or other, and if I try to do multiple, (which I need to create multiple conditional rules) it will fill the column with a mash up of the returns (fatigueCrackingBlockcrackingPatching) but I need to figure out how to do one before I can move on.    I  am an ArcMap Vet and to get the result I want in Esri I would use the following script  def Defect(defect_types_code):         if (defect_types_code == "A_LC"):       return "Linear Cracking"       elif (defect_types_code == "M_PS"):         return "Parking Bumper Damage"     elif (defect_types_code == "M_RB"):         return "Rebuild/Replace Catch Basin"     elif (defect_types_code == "M_RD"):         return "Ramp Damage     else:       return "N/A"     How do I write this in QGIS?  I was linked to another question with answers to help, "Elseif Conditional Statement in QGIS Field Calculator,"but the outcome of this code filled my defect_nam with all Nulls.


Debian: The repository does not have a Release file

Whenever trying to install some programs from source, or specifically running apt update, I receive this message:  E: The repository 'http://ftp.ca.debian.org/debian stretch/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   I started getting this after adding the architecture i386. Without it, I would not be able to install the proprietary Nvidia driver, and Steam client would not start at all. This is what my /etc/apt/sources.list reads:  deb http://ftp.ca.debian.org/debian/ stretch main contrib non-free deb-src http://ftp.ca.debian.org/debian/ stretch main contrib non-free  deb http://ftp.ca.debian.org/debian/ stretch/updates main contrib non-free deb-src http://ftp.ca.debian.org/debian/ stretch/updates main contrib non-free  ####stretch-updates, previously known as 'volatile'  deb http://ftp.ca.debian.org/debian/ stretch-updates main contrib non-free  deb-src http://ftp.ca.debian.org/debian/ stretch-updates main contrib non-free


Replace a string with empty string inside a file using Batch Script

I need to replace a string in a file A, with empty string. And I need to do it using Batch script.   Input: A.txt A.txt contains "xyz", which I need to replace with empty string in same file A.txt.  I need to replace only "xyz" from the file A.txt, not the entire file. The file A.txt contains contains several other strings.  Please let me know if possible.


Is The Set Of Subsequential Limits Always Closed/Compact?

I've been working my way through Rudin's PoMA, and I was thinking about subsequential limits. If you take a sequence with finitely many subsequential limits, then the set of subsequential limits is clearly closed and compact. Theorem 3.17 in Rudin states that the upper limit of a sequence is the limit of some subsequence. This gives me the feeling that perhaps the set of subsequential limits for a divergent sequence with infinitely many subsequnetial limits is also closed or compact. Admittedly, however, I don't think this follows directly from theorem 3.17. I've toyed with this idea for a bit, but I haven't been able to come up with a proof or a counter-example. Is this true or false, and what's the proof? Does this have any other interesting extensions/implications?


Prove that $ \left(a_{n}\right)_{n=1}^{\infty} $ converges when $|a_{n+1}-a_{n}|<q|a_{n}-a_{n-1}|$ for $ 0<q<1 $

I'm stuck on a homework question, and could really use some help. Here is said question:  "Assume that for every $n$ the following occurs: $|a_{n+1}-a_{n}|<q|a_{n}-a_{n-1}|$ when $ 0<q<1 $  Prove that the series $ \left(a_{n}\right)_{n=1}^{\infty} $ converges. Hint: use Cauchy sequence"  OK I'm really stuck on this one, I don't even have a clue where to begin.  Any help is appreciated. Thank you!


Understanding the Apache server-status page

The following is a sample server status page taken from :  Current Time: Thursday, 01-May-2014 07:38:59 UTC Restart Time: Friday, 11-Apr-2014 18:30:33 UTC Parent Server Config. Generation: 27 Parent Server MPM Generation: 26 Server uptime: 19 days 13 hours 8 minutes 26 seconds Server load: 4.90 5.10 5.39 Total accesses: 200912024 - Total Traffic: 24965.1 GB CPU Usage: u5133.55 s2390.16 cu0 cs0 - .445% CPU load 119 requests/sec - 15.1 MB/second - 130.3 kB/request 351 requests currently being processed, 417 idle workers    I need to understand what the values in Server load stand for as the  did not say anything about it.  Also, from , I understand that the u, s and c stand for user, system and cumulative figures respectively. What do the actual numbers 5133.55 and 0 represent?


Find a surjective function $f:\mathbb{N}\to \mathbb{Q}$

I'm trying to find a surjective function $f:\mathbb{N}\to \mathbb{Q}$;  I know that at least one such function must exist since $\mathbb{Q}$ is countable, but I haven't been able to find one.  Can someone show me one such function?  Best regards,  lorenzo


Suspended users can still edit their chat profiles

Suspended users can still join chat and edit their chat profiles. This is sometimes used as a workaround for communicating, and in the worst cases can be used to spread offensive content, etc.  Suspended users should not be able to log into the chat system at all, or at minimum should not be able to edit profiles.  Somewhat related, as far as communication workarounds go:   Bug if this is not intentional, feature request if it is by design.


i) What is the main role of "only" trying to find orthogonal components in PCA?   I can understand, that we would not want a zero-solution as well as find directions that are orthogonal in order to explain most of the variance. When we look at the problem in terms of finding a projection matrix that preserves the gram matrix of mean centered data,   ii) What would an optimization under a non orthonormal constraint produce, as long as we make sure the solution is non-zero? Why would it be or not be useful?   I am aware of the concept of non-orthogonal eigen-functions as well, just in case you want to generalize the answer to a Kernel PCA, that would be fine as well.


How to make Javascript difficult to understand

I know it's not possible to encrypt JS code, but how can I make it difficult to understand for everyone, like jquery.min.js?


What does the command $() do in UNIX? Could someone explain what is the significance of $ in the below examples;  $(echo var=10)     and    eval $(echo var=10)


If I don't declare a not-yet-used engagement ring at airport security, am I smuggling jewelry?

In , MikeV posted a pertinent question which is worth asking:     If I buy a ring in the US, put it in my bag and do not declare the ring I am smuggling jewelry? How is that different from buying the ring, wearing it round my neck on a chain (or on my own finger for that matter) and not declaring it? Am I supposed to declare my own jewelry that I already paid for (including taxes upon purchase)?   So, what is the verdict on this? smuggling or not? And is it a difference whether it's on a finger, on a neck chain, or in a box in the carry-on?


The TI-84 says 52.342777 but other calculators says domain error.


I have the list of following objects. Using Stream API, can I get a User with the number of frequency it appeared in the List?  public class User {     string name;     int age; }


How to install Dolfin Package (which is generally used when you are using FEniCS)?

To solve Partial Differential Equations, I installed FEniCS on a virtual environment. To use FEniCS, I have to use the Dolfin Library and I wish to know, how to install this library. I tried the following options but didn't get through: 1. pip install dolfin  ERROR: Could not find a version that satisfies the requirement dolfin (from versions: none) ERROR: No matching distribution found for dolfin   2. sudo apt-get install dolfin  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package dolfin  I am new to using Ubuntu and installing packages, it would be great if someone could help me out getting rid of this (in a Jupyter Notebook): import dolfin  ModuleNotFoundError                       Traceback (most recent call last) <ipython-input-17-c13f418a68dc> in <module> ----> 1 import dolfin  ModuleNotFoundError: No module named 'dolfin'


How do real and effective user IDs work?

When a normal user wants to make change to the passwd file, the user will by setuid be given the effective user access. User becomes root temporarily and can edit passwd.  However you can only edit your password right, and not everybody else? However your effective user access is root. So how come you're not allowed to change other passwords beside yours?  When you run a program with setuid, what does it mean actually when effective user is root, but real user id is still your name?


Can the CPU run multiple programs/tasks at the same time?

I've been told that the CPU can only run 1 program at a time and the CPU switches between processes very fast; enough for the human eye not to notice. I believe that only applies to single-core, single-thread CPUs, right? From what I've researched, I think that a multi-core CPU can process multiple programs at the same time, e.g., music, video and videogame; and that, a multi-thread CPU can process multiple blocks of code from the same program at the same time. Is this correct, or can't the CPU actually process tasks at the same time?


Why are SMTP queue lifetimes days instead of an hour or two?

First, I found  and read   I'm having a hard time understanding why we should queue messages for so long. Doesn't that just confuse the end users when their message disappears into a queue for 4 or 5 or 7 days? Especially when they are expecting the message to get there in 3 minutes (or maybe even "instantly")?  I've tried to come up with "horror story" scenario where having a short queue lifetime could cause problems that end users would blame the SMTP server administrator for. I haven't been very successful. Here's the best I have:   Someone mis-configures their mailserver's DNS with a TTL of 86400. An account on our server gets compromised and used to send spam. We get blacklisted on a DNSBL. (Would that even be seen as a temporary failure? Or is that seen as a permanent failure?)   It seems like anything I can come up with where a remote server is actually down, one of our users getting a bounce would be happy to blame the remote server admins instead of us. And, it seems like an end user might even appreciate getting a bounce instead of having their message "disappear" for a couple of days.  I have heard of greylisting, but my understanding is that is for a short time, maybe a max of 15 minutes of delay.  What would be the harm of having a queue lifetime of ~ 12 hours? Or even 6 hours? What good reasons are there for 4+ day queue lifetimes? Or is it just ?


Permission denied error when I back up to an external drive using grsync

When I try to back up my home folder with grsync to an external drive  I'm getting this error  rsync: opendir "/home/jackie/.cache/dconf" failed: Permission denied (13)   Can anyone help? Not related to my question but do all the applications and settings get backup as well?


Redirect 'complete' in bash functions and alias

tl;dr: Is there a way to use an existing auto completion function to also auto complete arguments to an alias or short function.  Auto completion in bash is great but does not mix well with aliases and utility functions.  For example, let us say I often call an executable myexec with some arguments always there:  myexec --arg1=val1 --arg2 foo myexec --arg1=val1 --arg2 bar myexec --arg1=val1 --arg2 foobaz ...   To make my life easier I can create an alias: alias myalias='myexec --arg1=val1 --arg2', but then I will lose order completion for the arguments that varies from time to time (foo, bar, etc.)  Problem 1: Alias  Is there a way where I can make the auto completion on myalias act as though I have written myexec --arg1=val1 --arg2, that is, these two commands should produce the same output:  # Theese should provide identical completion myalias foo[tab] myexec --arg1=val1 --arg2 foo[tab]   Problem 2: Function  Is there a way to do the same for function, for example:  function myfun {   cd ../..   myexec --arg1=val1 --arg2 $@   cd some/dir } # Theese should provide identical completion myfun foo[tab] myexec --arg1=val1 --arg2 foo[tab]     I have taking a look at  and on the , but I do not have experience enough to derive a solution from that.  Thanks a bunch for your help :)


Ubuntu 14.10 64 Bit, USB Install "Boot Error"

I downloaded an Ubuntu 14.10 64-bit iso, then put it on my 8GB USB. I closed my laptop then plugged the USB in and opened the laptop, I pressed F12 to get the "Boot Menu", then I clicked "USB Flash Drive" (Something like that), then it said "Boot Error"