I have a cron job written to root (I'm writing to a log in /var/log so need root permission). The problem is that sometimes it works, and sometimes it doesn't.  The cron job is simply to call a python script in my home directory, this then does all the hard work.  I set the job to go off in the middle of the night so it doesn't interfere with what I'm doing and so that the API it interacts with is less likely to change (the API is updated throughout the day).  But every morning I check the logs and get the following error:  python3: can't open file '/home/myUser/path/to/the/main.py':  [Errno 2] No such file or directory   My response to this is to change the timing on the crontab to a few minutes beyond the time I am checking the logs, wait a few minutes, and the file starts running. The only thing I change is the timing, and suddenly it works.  So I know, for sure, that the file exists.  I've tried a variation of times at night (30 23 * * *, 01 01 * * *, 10 02 * * *) none have worked, but whenever I set it off for 2 minutes after I check in the morning, it is fine.  Here is the crontab as it currently stands:   PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games  01 01 * * * python3 /home/myUser/path/to/the/main.py >> /var/log/thisjobs.log 2>&1   It's also worth mentioning that there is an additional newline after this job (I've heard that it is necessary).  Has anyone seen this before? Is there anything I can try to get this file found without me having to manually change the script each time?  EDIT: here is my env output for cron:  LANGUAGE=en_GB:en HOME=/root LOGNAME=root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games LANG=en_GB.UTF-8 SHELL=/bin/sh PWD=/root   Also thought I'd mention that I have tried using the following command (after the timing) to no avail (same error, but only with the main.py instead of the full path):  cd /home/myUser/path/to/the; python3 main.py

I have set up a cron job, but for some reason it fails to run during the night. The same job runs fine when i'm running it during the day (i.e. setting up the same job to run in a few minutes and waiting for it to run).  Some logs:  Jun 17 14:04:01 server CRON[20174]: (root) CMD (/home/server/scripts/sync.sh >> /home/server/logs/nightly.log 2>&1) Jun 17 14:12:01 server CRON[20349]: (root) CMD (/home/server/scripts/sync.sh >> /home/server/logs/nightly.log 2>&1) Jun 17 14:23:01 server CRON[20513]: (root) CMD (/home/server/scripts/sync.sh >> /home/server/logs/nightly.log 2>&1) Jun 18 01:00:01 server CRON[25717]: (root) CMD (/home/server/scripts/sync.sh >> /home/server/logs/nightly.log 2>&1) # this runs during the night Jun 18 01:00:01 server CRON[25706]: (CRON) error (grandchild #25717 failed with exit status 2) # doesn't leave anything behind it, not even the nightly.log file - as though the command itself is invalid)   cron entry looks like this:  0 1 * * * /home/server/scripts/sync.sh >> /home/server/logs/nightly.log 2>&1   script looks like this:  #!/bin/bash  SUCCESS=0 echo "Running nightly automation..." echo "Running xxxx script..." SUCCESS=`/home/server/scripts/xxxx.sh && echo 1` if [ $SUCCESS -eq 1 ]; then         echo "xxxx success!" else         echo "xxxx fail!" fi echo "Running rsync..." /usr/bin/rsync -am --remove-source-files /path1/ /path2/ --log-file=/home/server/logs/sync.log && echo "rsync success!"


What is the sum of the series  $$\frac {4}{10}+\frac {4\cdot7}{10\cdot20}+ \frac {4\cdot7\cdot10}{10\cdot20\cdot30}+\cdots?$$  I know how to check if a series is convergent or not.Is there any technique to find out the sum of a series like this where each term increases by a pattern?

How to find infinite sum How to find infinite sum $$1+\dfrac13+\dfrac{1\cdot3}{3\cdot6}+\dfrac{1\cdot3\cdot5}{3\cdot6\cdot9}+\dfrac{1\cdot3\cdot5\cdot7}{3\cdot6\cdot9\cdot12}+\dots? $$   I can see that 3 cancels out after 1/3, but what next? I can't go further.


Show that the following identity holds for vectors in any inner product space: $$ \langle \mathbf{u}, \mathbf{v} \rangle = \frac{1}{4}\left(\| \mathbf{u} + \mathbf{v}\|\right)^2 - \frac{1}{4}\left(\| \mathbf{u} - \mathbf{v}\|\right)^2. $$ The "in any inner product space" is quite confusing for me.

For a real (or complex) inner product space $V$, the inner product can be expressed in terms of the norm as either $$ \langle x,y\rangle=\frac{1}{4}(\|x+y\|^2-\|x-y\|^2) $$ or $$ \langle x,y\rangle=\frac{1}{4}(\|x+y\|^2-\|x-y\|^2+i\|x+iy\|^2-i\|x-iy\|^2) $$ respectively.  These identities are not hard to verify directly once they are given. I would like to know, is there a systematic way one would derive these from scratch without knowing them beforehand, or are both polarization identities just clever observations?


Let $R$ be a left artinian ring and $M$ be an arbitrary $R$-module.  Prove that $M/J(R)M$ is a projective $R/J(R)$-module.

I need a hint about this question, I know all the different ways of defining a projective module, but, I don’t know where to start: R is an left Artinian ring, M is a left R-module. I need to prove M/J(R)M is a projective R/J(R) module. Could anyone please help me to prove it?


By definition, the wave function can be obtained by acting the position eigenstate to a state of the system, e.g., $\langle x\vert \psi \rangle$. For the wave function of an electron travelling in one-dimensional space, we can calculate the wave function of an electron by the way mentioned above, $\psi(x)=\langle x \vert \psi\rangle$. I'm okay with this.   Q1) However, what about the case of photon? Can we also define the wave function of photon in the same way above?   Q2) What about the following? Let consider a single photon state of light, which encoded to a left-propagating electromagnetic wave in one-dimensional space. Then, we place the infinite number of detectors along the space and then repeat the detection measurement for photon's position so many times at different times. Would what will be measured over space be almost same as the square of the wave function of photon, i.e., $\vert \psi(x)\vert^{2}=\vert \langle x\vert {\rm single~photon}\rangle\vert^{2}$? Can we say this way?  Q3) Would $\vert \psi(x)\vert^{2}$ in Q2 be equivalent to the electromagnetic wave?

According to this review     Photon wave function. Iwo Bialynicki-Birula. . ,   a classical EM plane wavefunction is a wavefunction (in Hilbert space) of a single photon with definite momentum (c.f section 1.4), although a naive probabilistic interpretation is not applicable. However, what I've learned in some other sources (e.g. Sakurai's Advanced QM, chap. 2) is that, the classical EM field is obtained by taking the expectation value of the field operator. Then according to Sakurai, the classical $E$ or $B$ field of a single photon state with definite momentum p is given by $\langle p|\hat{E}(or \hat{B})|p\rangle$, which is $0$ in the whole space. This seems to contradict the first view, but both views make equally good sense to me by their own reasonings, so how do I reconcile them?


Can I install and run Ubuntu on this machine?         AMD Dual-Core E1-6015 APU with    Radeon R2 Graphics (1.4 GHz, 1 MB cache)    4 GB DDR3L-1600 SDRAM (1 x 4 GB)      If yes, which version of Ubuntu should I run?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I'm currently trying to copy (by use of code) a .xml file and have approached it many different ways. This way however seems to be the one I get the most as i have I've it before but to create a console.writeline output. I can't seem to get it to work for a console.out when producing the .xml layout. It gives me the following error      "cannot be serialized because it does not have a parameterless constructor"      please could anyone help me with this.  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using System.Xml.Linq; using System.Xml.Serialization;  namespace ConsoleApplication1 { class Program {     const string FILENAME = @"SmallResults.xml";     static void Main(string[] args)     {         List<BasicEvent> NewBasicEvent = new List<BasicEvent>();         XmlTextReader fileReader = new XmlTextReader("SmallResults.xml");         XmlDocument xml = new XmlDocument();         xml.Load(fileReader);         XmlNodeList BasicEvents = xml.SelectNodes("/HiP-HOPS_Results/FaultTrees/FMEA/Component/Events/BasicEvent");         if (BasicEvents != null)         {             XmlNode[] nodearray = BasicEvents.Cast<XmlNode>().ToArray();             for (int i = 0; i < BasicEvents.Count; i++)             {                 NewBasicEvent.Add(new BasicEvent(nodearray[i].FirstChild.NextSibling.InnerText, nodearray[i].FirstChild.NextSibling.NextSibling.InnerText, nodearray[i].FirstChild.NextSibling.NextSibling.InnerText, nodearray[i].FirstChild.NextSibling.NextSibling.NextSibling.InnerText));                 new XmlSerializer(typeof(BasicEvent)).Serialize(Console.Out, nodearray );             }         }       } } public class FMEA {     public List<Component> components { get; set; } } public class Component {     public string CompName { get; set; }     public string BasicEventID { get; set; }     public List<BasicEvent> basicevents { get; set; } } public class Events { } public class BasicEvent {     public string BasicEventName { get; set; }     public string BasicEventShortName { get; set; }     public string BasicEventDescription { get; set; }     public string BasicEventUnavalability { get; set; }     public List<Effects> effects { get; set; }      public BasicEvent( string basiceventname, string basiceventshortname, string basiceventdescription, string basiceventunavalability )     {         BasicEventName = basiceventname;         BasicEventShortName = basiceventshortname;         BasicEventDescription = basiceventdescription;         BasicEventUnavalability = basiceventdescription;     }

I'm writing code to do Xml serialization. With below function.  public static string SerializeToXml(object obj) {     XmlSerializer serializer = new XmlSerializer(obj.GetType());     using (StringWriter writer = new StringWriter())     {         serializer.Serialize(writer, obj);         return writer.ToString();     } }   If the argument is a instance of class without parameterless constructor, it will throw a exception.     Unhandled Exception:   System.InvalidOperationException:   CSharpConsole.Foo cannot be serialized   because it does not have a   parameterless constructor.    at   System.Xml.Serialization.TypeDesc.CheckSupported()   at   System.Xml.Serialization.TypeScope.GetTypeDesc(Type   type, MemberInfo sourc e, Boolean   directReference, Boolean throwOnError)   at   System.Xml.Serialization.ModelScope.GetTypeModel(Type   type, Boolean direct Reference)    at   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type   type , XmlRootAttribute root, String   defaultNamespace)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type, String defaultName space)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type)   Why must there be a parameterless constructor in order to allow xml serialization to succeed?  EDIT: thanks for cfeduke's answer. The parameterless constructor can be private or internal.


I want to place an image in the center of my white page and add a title over it (the title would be larger than the image || also the title center must be the image center). The problem is that the title won't go on top of the image. I use Django and bootstrap ^^ Here is the code : HTML :

                 Brand

Title

  CSS: .hero {     width: 65%;     height: auto; }  .title {     position: absolute;     background-color: cadetblue;     top: 50%;     left: 50%; }  .ctr {     position: absolute;     transform: translate(-50%, -50%); }  What happens currently :  EDIT : I found the answer !! I hope it can help the ones who still wonder how to do it :)

I want to overlay one image with another using CSS. An example of this is the first image (the background if you like) will be a thumbnail link of a product, with the link opening a lightbox / popup showing a larger version of the image.   On top of this linked image I would like an image of a magnifying glass, to show people that the image can be clicked to enlarge it (apparently this isn't obvious without the magnifying glass).


I'm gonna get Borderlands the Handsome Collection for Xbox One and give my Xbox 360 copy of Borderlands 2 to my friend. Will we be able to play if he's on Xbox 360 and I'm on Xbox One?

OK, I know cross-family platform play with Borderlands 2 (ex PS/XBox) is a no go, but will cross platform play within the same family (ex XBox 360/Xbox One) work?  I know you can transfer saves, but will they play together on a LAN?  I've got 2 360s not being used and my wife is getting annoyed with the split screen play on the XBox One.


I have shown that  $1+\cos(\theta)+\cos(2\theta)+\cos(3\theta)+\dots+\cos(n\theta)=\Re(\frac{1-e^{(n+1)i\theta}}{1-e^{i\theta}})=\frac{1-\cos(\theta)+\cos(n\theta)-\cos((n+1)\theta)}{2-2\cos(\theta)}=\frac{1}{2}+\frac{\cos(n\theta)-\cos((n+1)\theta)}{2-2\cos(\theta)}$  but I am unsure how to proceed from here. If possible, I would like to avoid using to many identities as this is an exercise in my complex analysis book.

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


When evaluating limits we often come across the form 0/0 and we cant get a limiting value. As stated in many textbooks and online resources, the method to still get a limiting value as the input approaches a specific value is to first factorize or simplify the function to cancel out the factors/variables responsible for the form 0/0.  My question is doesn't it change the function altogether if we simplify it?  Because if we had used the original function it would not have been defined at that particular input? Can anyone provide the intuition or concept behind this?

$$\lim _{x\rightarrow 5}\frac{x^2-25}{x-5}  = \lim_{x\rightarrow 5} (x+5)$$  I understand that to evaluate a limit that has a zero ("hole") in the denominator we have to factor and cancel terms, and that the original limit is equal to the new and simplified limit. I understand how to do this procedurally, but I'd like to know why this works. I've only been told the methodology of expanding the $x^2-25$ into $(x-5)(x+5)$, but I don't just want to understand the methodology which my teacher tells me to "just memorize", I really want to know what's going on. I've read about factoring in abstract algebra, and about irreducible polynomials (just an example...), and I'd like to get a bigger picture of the abstract algebra in order to see why we factor the limit and why the simplified is equal to the original if it's missing the $(x-5)$, which has been cancelled. I don't want to just memorize things, I would really like to understand, but I've been told that this is "just how we do it" and that I should "practice to just memorize the procedure." I really want to understand this in abstract algebra terms, please elaborate. Thank you very much.


What is the use of 'javascript:methodName(); in an anchor link?  I have seen the following in some code. What is use of the "javascript:"?   Click   It works if in both (with and without "javascript:") condition.

AFAIK, you never need to specify the protocol in an onclick:  onclick="javascript:myFunction()" Bad  onclick="myFunction()" Good  Today I noticed in  on Google Anallytics that they are using it:  <a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');">   Is this example just plain wrong, or is there ever a reason to specify javascript: in anything other than a href?


When I edit a web page in safari. with opened visual studio code a moment ago, and didn't close it.  The cpu just jump higher, so I close that web page and visual studio code, then the cpu jump down to normal.  Not sure what case this.  I have notice that the mds is lower when the mds_stores are high.  PS: it's macOS 10.15.1  Edit:  I didn't think it's duplicate of another question , because in that question, the situation is    lower cpu consumer: mds:11.9%, mds_stores:9.6,  compare to mine:    mds:1.3, mds_stores:701.8(kind of killing my cpu) the cpu drop down to normal after I close the webpage & vscode.

mds and mds_stores are constant CPU consumers even when I think nothing should have changed on the hard drive. Activity Monitor:  I have a circa 2009 Macbook Pro with lots of software installed over the years. Dropbox and Crashplan are active background processes among many others. I have included many locations in the privacy settings of Spotlight to exclude from its index:  USB drive Crashplan folder /Library/Caches /Users/me/Library/Caches  Still, mds and mds_stores are constant consumers of CPU hovering around 10-12% each. My fan keeps running due to the heat. Any ideas as to what it could be due and how I can troubleshoot?


I've tried this in different occasions within the past year and I have always had the same problem. I go to the line of the Latex code where I want to insert my images using \begin{figure}, but the images appear before the content in the previous lines:  \lstinputlisting{q9_1_c.m}   \vspace*{5\baselineskip}  \begin{figure}[!tbp]   \centering   \begin{minipage}[b]{0.3\textwidth}     \includegraphics[width=\textwidth]{diff_6}     \caption{$\nu = 6$.}   \end{minipage}   \hfill   \begin{minipage}[b]{0.3\textwidth}     \includegraphics[width=\textwidth]{diff_7}     \caption{$\nu = 7$}  \end{minipage}    \hfill  \begin{minipage}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{diff_8} \caption{$\nu = 8$}  \end{minipage} \end{figure}   produces a layout in which the images precede the code included using \lstinputlisting{}. This is not an issue if I just use \includegraphics, but I needed to put 3 images next to each other. Why doesn't this work?

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


I would like to upgrade my Lenovo B50-70's BIOS. The only options for OS on the product's  are Windows 7 and 8.   When I try to run the EXE file inside Hiren's MiniXP it claims the system battery is missing (although it's plugged in). I extracted the EXE file and found the BIOS .ROM file, but there's no way to install it. The Insyde20.exe program works only in Windows.  Obviously, I won't install a full version of windows just to upgrade the BIOS...

I want to update the BIOS on Toshiba QOSMIO-G30. The exe file that I downloaded from the manufacturer web site is supposed to be Operating System independent! Yet using Wine I could not execute the file to FLASH System BIOS. Is there any way to update the BIOS in Ubuntu?


Assume that $X$ is normally distributed with mean $\mu$ and variance $\sigma^2$. How do I derive $\mathbb E(e^X)$? Note I'm not asking for a mere answer, but an approach how to solve it. I end up messing with integrals, and change of variables, and it's not working.

I got a problem of calculating $E[e^X]$, where X follows a normal distribution $N(\mu, \sigma^2)$ of mean $\mu$ and standard deviation $\sigma$.  I still got no clue how to solve it. Assume $Y=e^X$. Trying to calculate this value directly by substitution $f(x) = \frac{1}{\sqrt{2\pi\sigma^2}}\, e^{\frac{-(x-\mu)^2}{2\sigma^2}}$ then find $g(y)$ of $Y$ is a nightmare (and I don't know how to calculate this integral to be honest).  Another way is to find the inverse function. Assume $Y=\phi(X)$, if $\phi$ is differentiable, monotonic, and have inverse function $X=\psi(Y)$ then $g(y)$ (PDF of random variable $Y$) is as follows: $g(y)=f[\psi(y)]|\psi'(y)|$.  I think we don't need to find PDF of $Y$ explicitly to find $E[Y]$. This seems to be a classic problem. Anyone can help?


I am using ArcGIS Desktop 10 and we have three different servers for accessing concurrent use licenses of ArcView, ArcEditor and ArcInfo. So, whenever I need to switch to other product, I have close currently using Catalog or ArcMap and open ArcGIS Administrator and then change the software product and License manager (Server IP) manually. So, is there any way to change the software product and License manager (Server IP) using script or batch file?

I'm unable to change my license type (ArcView, ArcEditor or ArcInfo) in ArcGIS 10.0 using the Desktop Administrator due to permissions restrictions.  I'm trying to use the back-door method of changing the registry key in Regedit. In older versions of ArcGIS this was found under > HKEY_LOCAL_MACHINE > Software > ESRI > License but I'm not seeing this in ArcGIS 10.0  The post  mentions a similar problem on Citrix, however I'm unable to set a system variable due to the same permissions issues.  Which registry key holds the license type in ArcGIS 10.0, and is it still possible to change the license type using this method?


Given the two variables $A\sim \text{N}(\mu, \phi^2)$ and $B\sim \text{N}(\xi, \omega^2)$ with $\mu, \xi \in R$ and $\phi^2, \omega^2 > 0$ how do I prove that $C := A + B\sim \text{N}(\mu + \xi, \phi^2 + \omega^2)$ ?

How can I prove that the sum of $X_1, X_2, \ldots,X_n$ random variables, all of which have normal distributions $N(\mu_i, \sigma_i)$, is a random variable that is itself normally distributed with mean $$\mu =\sum_{i=1}^n \mu_i$$  and variance  $$\sigma^2 = \sum_{i=1}^n \sigma_i^2$$  Edit: I forgot to add that this was with the assumption that all $X_1, X_2,\ldots,X_n$ are independent.


This seems to be a regular occurrence, judging from  and  but why does Sagemath not get packaged for 20.10? Is it always left out of the October releases? I've managed to install using their Linux binaries but it was a rather unpleasant surprise to upgrade and then discover that I've lost an important application.

I wanted to know if there is any way to install Sagemath in Ubuntu 17.10. I haven't found the install package, but I just wanted to check if it was just me.  Thanks in advance!


I know the definition of a category and know several examples. But I have not studied the theory of categories.   Much of mathematics I studied can be written as a category and a functor.  But for me, a category is just an organizational language. What is the merit of studying category theory?  What can I obtain by reading Mac Lane's book?  Is it necessary to learn category theory to be a good mathematician, especially for number theorists, algebraists, and topologists?

Okay, so I understand what calculus, linear algebra, combinatorics and even topology try to answer (update: this is not the case in hindsight), but why invent category theory? In Wikipedia it says it is to formalize. As far as I can tell, it sort of generalizes a bunch of fields in mathematics, like in topology, graphs and groups we have isomorphisms and automorphisms and homomorphisms, it seems to me like it just finds a bunch of results that are true to these functions in a bunch of disciplines. But why would generalizing that be of use? I mean, wouldn't it be easier to prove them specifically in each of the important disciplines?


I plan to build a floating desk with the following dimensions: 75"-79" long and 22"-24" deep. I plan to mount it to concrete wall(see Image). My Preferred material is MDF.    The desk intended for use as computer desk and writing-reading desk. The load on the desk will be mainly consists of: monitor screen, books, laptop and so on.  My goal is to create a strong and stable desk that can support not only the load described above, but also beyond that(specifically: adult leaning on the desk with his arms).  My question is: How can I support the desk without any legs or bracket?   EDIT: There is a similar question to my question on the site() but I think the solution proposed does not fit my question. Since to my opinion the proposed support in  solution is too weak for my purposes. I'm pretty sure that if I will lean down on the edge of the desk with time not only it will created a 'belly' but it will damage the Alum angle stability (maximum torque). I think the proposed solution is better suited for shelf that functions as a desk, and I want a strong desk that can support for example a person sitting over it.   Note: I do not care if the most of the entire thickness of the desk(based on the design offered) would be a hollow, as long as it's does not exceed 5''.

Example of a floating desk top ():      With increased height, it'd be one of simplest standing desk designs, and I am planning to do this at home. But, I am not sure how exactly the desk top (i.e., the wooden board) is supported against the wall.  As you can see, the design isn't using any heavy-duty shelf brackets, or any apparent support beneath. How can this be accomplished?  (FYI, mine is going to be larger, around double the size of the desk top you are seeing in the picture.)


When a moderator user clicks to delete a post on the mobile site, we are presented with two Javascript confirmation prompts; one asking "vote to delete this post?", and another asking "delete this post". The same thing happens on undelete.  It seems we are being presented with both the confirmation meant for regular users and mods (in that order).  Side details: Confirming the first one always (un)deletes, regardless of what is chosen on the second. Cancelling the first one results in an error if we confirm the second, or nothing at all (the expected behavior) if we also cancel the second.  Admittedly, extremely minor!

Attempting to delete questions on the mobile site on iOS causes two notification messages asking me to confirm the deletion, which it shouldn't do.  I haven't really looked into it, but it may just be that the handlers from full.js and mobile.js are both being triggered, as there seems to be the flash of the error dialog indicating something went wrong on the supposed second AJAX request when the response from the first triggers a page reload.  You can see this happening by following the method calls; the mobile view first calls   StackExchange.question.init() -> StackExchange.question.fullInit()   -> StackExchange.vote.init()     -> u()    ...where u() sets a delegated click handler on  $("div.post-menu *[id^='delete-post-'], table.flagged-posts *[id^='delete-post-']")   ...that calls .preventDefault() on the event, but doesn't block other handlers from firing.  It then later calls StackExchange.mobile.init(), which in turn calls the method J() that sets up a similar handler directly on $(".delete-post").  Since both handlers get triggered, there's two confirmation dialogs, and two attempts to delete the post. The extra handler in mobile.js seems unnecessary, so just removing it would appear to be the easy fix to the problem.


I have manage to grab some data of a couple of hdd with photorec, but I can't figure out how the files are saved, and it not very convenient searching in those recup_dir.*. So my thought is to categorize by file endings. So all *.gif end up in /home/mike/photorec/12gb/sorted/gif or something like that. But I don't know how to search the root catalog, grab the file extension and move/cp to that folder (and if not present, create the folder).  This way I can just delete unnecessary folders/files like dll.  Lets say I have three folders:   ~/photorec/80gb ~/photorec/120gb ~/photorec/100gb   Photorec creates a large amount of folder naming recup_dir.1, recup_dir.2 etc. like:  . ├── recup_dir.1 ├── recup_dir.10 ├── recup_dir.11 ├── recup_dir.12 └── recup_dir.9     ├── f21750248.jpg     ├── f21750275.gif     ├── f21750277.gif     ├── f21750281.gif     ├── f21750296.jpg   I want to cd 80gb, run a command or execute a bash script inside ~/photorec/80gb/ so that a new folder is created, sorted, and inside sorted I get all files from recup_dirs, sorted by the found files extensions.  . ├── recup_dir.1 ├── recup_dir.10 ├── recup_dir.11 ├── recup_dir.12 ├── sorted     ├── gif         ├── f21750275.gif         ├── f21750277.gif         ├── f21750281.gif     ├── jpg         ├── f21750248.jpg         ├── f21750296.jpg   How can I achieve this?  Edit: This is not just photorec. It could be any folder ofc.

I have some files with different extensions such as *.pdf, *.mp3, *.jpg and a few others. All of them are stored in a parent directory.  How can I get a list of all extensions, create some folders based on these  extensions and then move all files into their relevant folders?


On ubuntu 16.04. When I run lspci -nnk | grep -iA2 net I get:  01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)     Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [17aa:383a]     Kernel driver in use: r8169     Kernel modules: r8169 02:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)     Subsystem: Lenovo Device [17aa:4035]     Kernel modules: ath10k_pci  $ rfkill list 0: ideapad_wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 1: ideapad_bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   As requested:  $ uname -a; dmesg | grep ath Linux Yinon 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux   Edditional edit:  $ sudo modprobe ath10k_pci modprobe: ERROR: could not insert 'ath10k_pci': Required key not available $ dmesg | grep ath [    1.509368]  [<ffffffff81081212>] warn_slowpath_common+0x82/0xc0 [    1.509370]  [<ffffffff810812ac>] warn_slowpath_fmt+0x5c/0x80   Ethernet works good. How can I find out what is wrong?

This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it?


By 'state' I mean part of a country, like New York, for instance. What other word is globally accepted to mean what we know as state. A little background I'm building a web form where users will have to select their country and then type in their state. If I'm not mistaken, some countries might not use the word 'state.' So I need another word that can be attached to the 'state' label so almost any user easily understands what is required of them. Thank you.

Often a country will have regions called "provinces" or "states". Other times they are called "territories" and "protectorates".   Is there a generic term for these words?  Is there a full list of words that belong to this group?  What makes them different from each other?


I am graduating with a pass grade in my Master's degree from a good university in London.  I want to apply for a PhD scholarship at the University of Sheffield in non-communicable diseases.   I did public health undergraduate degree and became interested in non-communicable diseases in low income countries as it's a neglected area overshadowed by the high rate of infectious diseases. I wrote my undergraduate thesis in this area. I also have a personal interest in this field because I lost my mum to cancer within one year of her diagnosis. My pass grade in the Master's can partially be explained due to difficulties with illness.  Do I stand a chance of gaining my desired PhD place, taking into account the medical reasons for the low grade and my proven interest in the field?

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


Why is the right-hand side delimiters going much further down than the depth of the denominator?    \documentclass{article} \usepackage{amsmath} \begin{document}  \[   \left \lfloor \dfrac{n}{p^{i+1}} \right \rfloor =      \left \lfloor \dfrac{\left \lfloor \dfrac{n}{p^i} \right \rfloor}{p} \right \rfloor \]  \end{document}

I'm currently writing my dissertation in civil engineering using LaTeX. I think LaTeX is really good. I have been slowly distancing myself now from Microsoft Word. LaTeX is good for me since my paper (nonlinear structural dynamics) may eventually contain more than a thousand equations.  I just have one problem now.  Consider the following fraction with delimiter.  \left( \frac{a}{b} \right)   So far, there is really no problem with that fraction. The delimiters automatically resize.  Now, consider the following "complex" fraction with delimiters:  \left( \frac{\dfrac{a}{b}}{\dfrac{c}{d}} \right)   Again, there is no problem with this "complex" fraction, since the delimiters automatically resize.  Now, here's the problem. Consider the following "complex" fraction with delimiters:  \left( \frac{a}{\dfrac{c}{d}} \right)   The result of this is that the delimiters resize, but there is extra "vertical white space" within the region of the numerator. This is because the numerator is just a "variable" while the denominator is another fraction in "displaystyle" font size. Thus, they have different "sizes". I intentionally wanted the font size in the denominator to be bigger since I'm trying to show equations in display mode. (If the denominator was in textstyle fontsize, then there would be less "vertical white space" in the numerator, but the problem is still there. I really want the denominator to be in displaystyle font size.)  What I would want, if possible, is that the delimiter would resize but only up to the "actual size" of the complex fraction. In MathType, this problem is solved using the "fence alignment" command in the "Format" menu, where the delimiters resize exactly up to the size of the complex fraction.  Sometimes, the manual sizing commands \big, ... \Bigg commands can help, but when I have a "complex-complex-complex" fraction, even the biggest \Bigg command doesn't help anymore.  Output of the code samples:    I have been seeking help from the Internet, but I haven't found a solution yet.


I have a Schengen visa (single entry) which is valid from 22nd September to 30th October. When I had applied, I had written that I plan to leave the Schengen region on 14th (Friday). However, I am planning to extend the stay by a day and leave on 15th. Will this cause a problem?

I'm from Tunisia and I got a Schengen visa from the Austrian Embassy for  28 days, the “duration of stay”, and the number of entries is 1. But the validity of the visa is from 02/08/2015 to 13/09/2015.  Do I have to stay only 28 days, for example from 02/08/2015 to 29/08/2015 or can I stay there until 12/09/2015 ?  And if I have got to stay only 28 days, then can I choose the days of stay, that's mean can I stay in Austria for example from 09/08/2015 to 05/09/2015?


Let $f$ be an holomorphic function from $\mathbb{D}$ to $\mathbb{D}$ and let $z \in \mathbb{D}$. I have to prove that $$ \frac{|f(0)| - |z|}{1 + |f(0)| |z|} \leq |f(z)| \leq \frac{|f(0)| + |z|}{1 - |f(0)| |z|} $$ and I have thought to use Schwarz-Pick theorem but I haven't obtain any result. Any help? Thank you very much.

Let $D := \{z \in \mathbb{C}: |z| < 1\}$ and $f\colon D \rightarrow \mathbb{C}$ be holomorphic. Suppose $\lvert f(z)\rvert \leq 1$ on $D$, show that $$\frac{|f(0)| - |z|}{1 + |f(0)||z|} \leq |f(z)| \leq \frac{|f(0)| + |z|}{1 - |f(0)||z|} \ \forall z \in D.$$  I have tried using Cauchy Integral Formula to $f$ and expanding $f$ at $0$, but I have no idea why $f(0)$ appears in the inequality in the former case. Both answers and hints are appreciated and thanks in advance!


right now my tactics are to use some kind of proof by induction/contradiction, but have not really got anywhere. Any suggestion is appreciated

Let $(G,\cdot)$ be a non-empty finite . Is there any $a\in G$ such that: $$a^2=a$$ It seems to be true in view of theorem 2.2.1 page 97 of  book (I'm not sure).  But is there an elementary proof?  Theorem 2.2.1. [R. Ellis] Let $S$ be a compact right topological semigroup. Then there exists an idempotent in it.  This theorem is also known as .


My internal harddisk in my laptop got corrupted so I have removed. I loaded desktop ubuntu for testing from pendrive. Now i want to install to my external hard disk. It already has 650gb of data in ntfs format.  Remaining space i splitted to ext4 and installed. When restarting, am not getting ubuntu loaded from HDD.  Please explain how to make my ubuntu load from external hard disk.

I have an external Hard disk with 500 GB capacity.  I have data filling almost 300 GB.  I want to install Ubuntu into it.  I have downloaded the iso and have written it to a USB drive as a bootable device.  My laptop runs on Windows 7.  What is the way to install Ubuntu in my external HDD.  I have yet to do any partitioning.  I would not like to lose the data.


My niece and I love playing Minecraft: Pocket Edition together, but since the new update (0.12.3) we can't seem to play it. How should I fix this?

We have two iPads, and both of them have Minecraft PE. My son wants to connect the two and play with me. I have absolutely no idea what I am doing here, so I do not know how to do this.   One game says "Broadcast to LAN", and the other one says "Local Server Multiplayer". I have switched both to on.   What do I need to do to be able to play joined? We are both on the same WiFi.


Why is my shading producing artifacts? I've search around with no solution. I can get a smooth look in Solid view, but Cycles and Eevee create artifacts. the topography is clean, no ngons, subdivided. Things I've tried: -Recalculating normals -checking for n-gons (there are none)  Merge by distance to check for overlapping vertices (none) smoothing options in Mesh->Shading.  The only thing that has worked is subsurf modifier, but I don't want to use that. The model was imported as an .obj, and I find that most imported .objs have similar problems. What can I do to get a smoother look, like in solid view? Thanks

I wonder if this is a bug, or if I missed something... When a light hits tangentially convex surfaces with "smooth shading", the shadow on this surface seems to "partially ignore" the smoothness of the surface. Here is an example with a simple cylinder :    On the left, a cylinder with "flat shading". Everything's ok. On the right, the same with "smooth". We can see an edge, bad shadowed.  With or without the "Edge split" modifier, no matters, the edge is still there. The shader is a simple white diffuse shader with no texture nor displace.  I have to add a subsurf modifier with at least 2 levels, which will insanely increase the vertex count... And I can't do that for my project.  I hope someone already saw it, and have a little tip to share. Or if someone already know it's a bug, or a limit of the current Cycles renderer ?


Is it possible to pass Array by Value in a function in Java. When we pass array in a function in default it is pass by reference and original version of data in array gets modified.  Hence would like to know if there is pass by value option in Java?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Imagine a circuit consisting of just a battery and conducting wires which have zero dissipativity so that there is no loss of energy( Zero resistance). If the wires are connected to both terminals the current will flow in the direction of lower potential. Can we say that there has been a voltage drop in the current in going from positive terminal to negative terminal? I asked this question because  voltage drop happens across resistor and I don't understand why it should occur only there. Because  I think, considering a positive test charge its electric potential should decrease  as it travel from higher potential to lower potential  whether any dissipation occurs or not.Does voltage drop refers to loss in total energy of electron i.e. because in this case KE + Electric potential will be zero and the total energy of electrons remains unchanged and thus we can says that voltage drop is zero. Is voltage drop(assumed here to mean loss in electric potential) equal to work output under normal conditions. I think no - because electric potential difference gets converted into kinetic energy of electrons out of which only some gets converted into heat or is it the case that in a resistor entire kinetic energy gets converted into another energy such as heat? Is electric field inside circuit constant? If yes how? Will not the shape of circuit matter?

If you connected the positive terminal of a battery to the negative terminal to a battery with a wire with (hypothetically) no resistance, and are asked to give the voltage drop of a segment of wire in the circuit, how would you determine this?


How to configure Subversion to send email to all developers and administrators when I commit source code?

I've always found checkin (commit) mails to be very useful for keeping track of what work other people are doing in the codebase / repository. How do I set up SVN to email a distribution list on each commit?  I'm running clients on Windows and the Apache Subversion server on Linux. The answers below for various platforms will likely be useful to other people though.


I am in search of a movie (or maybe series) that I had once on VHS until it was overwritten. Aliens/cyborgs looked somewhat similar to Chaos Space Marines. I remember the scene where the main actor and his girl were locked at local town PD/sheriff's and these alien/cyborgs were searching him. After they managed to escape from cells by using some acid ampules, bad guys attacked and the good guy dispatched one with an SMG of some sort by repeatedly firing rounds at enemies' hearts/cores. I think that good guy's name was Ballard.

I finally registered in hope of finding people who maybe know the movie I have been looking for for ages...  The movie takes place in a very dry country in the States. I would guess it is Texas or so. The protagonist lives in or visits a small desert town and hears about some rumors of a coming event (or something like that). Searching the vicinity of the town he finds some carvings/paintings in a cave depicting some kind of alien city/huge UFO that is going to land.  And well, in the end it really lands and the inhabitants are not very friendly. As far as I can remember they look like humans with armor or cyborgs with huge weapons or so.  The "visitors" came with one or more huge cities the city/cities had a dome or shield and were built upon some kind of structure with landing supports and their leader was marching down some kind of huge ramp, had a big weapon and I think a bald head with pipes leading from his neck/head to his "armor".  Before they did land, they send some scouts who checked the area, oh yeah and this was definitely in color that much I know for sure.  What non American studio could have made such a movie in the 70s or 80s? It definitely was produced in the west.  I watched it as a little kid (thanks dad for the nightmares) in the mid 80s. So it is kinda old.


I was copying some movies to SD card suddenly my friend fell on to my laptop and SD card got removed from the laptop while copying. Now the SD card is showing is showing only two files in it and it can be accessed. But now the when I format the memory card its still showing the two files. I tried deleting it and it gets deleted but when i plug in the memory card again the files again appear in the memory card. Cannot format it. I have tried deleting the partition and created the new partition but still the SD card is damaged.

I have a MicroSD card in a USB adapter (which plugs into a USB port on my machine, and acts like a USB flash drive). I was using Unetbootin to make this a bootable USB flash drive with Kubuntu. But I needed to cancel while it was working. So I killed the Unetbootin process from the console.  Since then, I can't format the MicroSD or delete the folder that Kubuntu made. I have also tried mkdosfs, with no success. I can't mount the drive anymore either? What can I do to make this drive usable again?  Trying to create a new partition table in GParted, as described in Eliah Kagan's answer, does not work. It fails with the error message "imposible crear tabla de particiones" ("unable to create a partition table").


I want all of the objects to stay upright and un-distorted throughout the whole structure.  Also if you notice anything fucky with what I'm doing and have suggestions I'm all ears. I am new to this and need to learn the proper workflow the first time as to not spend a lot of time unlearning bad habits.  Thanks!    I have followed what you said and now I'm getting 180 degree rotation on the y axis.  Also there is only one object at the very top that has a random amount of rotation.

I have attempting to make a fin tube for two days and it is killing me.  Fin tubes are pipes that have a tight spiral of flat fins sticking out all around them. The spiral wraps around the circumference of the pipe. They are used in heat reclaimers among other places.  I made a spiral using the extra shapes add-on and scales pretty tight. And then I set the scale.  I made the fin shape and set its scale. I added the curve modifier and it jumped around a bit. I set its origin point to one end face and finally got it going the right way off the beginning of the curve.  Then I added the array modifier and moved it to the top  of the stack. It all looked good for the first loop, then the fins started to tip. The outside edge aimed upward steadily as the inside edge seemed to continue to be oriented at the center base of the curve.  How can I keep the darned things at 90 degrees to the z axis? Or should I be using a particle system? I haven't learned that one yet, sigh.


Let $S$ be an open set on $\mathbb R^2$. $bd(S)$ is its boundary. We've known that any line intersect with $bd(S)$ at at most two points. Is it possible to show that one of the following conditions must hold? (1) $S$ is connected convex or $S^c$ is connected convex (2) $bd(S)$ is a discrete set  I first try to show that $S$ is connected by contradiction. Suppose $S$ is not connected. That is, there exists open sets $A,B\subset S$ such that $A\cap B=\emptyset$. Then, there must exists a line crossing both $A,B$, and the line does not tangent their boundary (how to prove the existence of this line???) This contradicts to the assumption that any line only intersect with $bd(S)$ twice. Similarly, we can show that $S^c$ must either have empty interior, or $S^c$ is connected. Therefore $bd(S)$ must be also connected. Then suppose that $S$ is not convex. By definition, there exists two points, $x,y\in bd(S)$, such that, for some $a\in (0,1)$, $z=ax+(1-a)y$ does not belong to $S$. If the previous statement holds, then we have for any $a\in (0,1)$, $z=ax+(1-a)y$ does not belong to $S$. This implies that $S^c$ is connected and convex?

$S$ is an open set in $\mathbb R^2$.  If for any two different points on the boundary on $S$, we have the line connecting those two points only intersect with $\partial S$ only at $\{x,y\}$, can we conclude that either $S$ is convex or $S^c$ is convex?  --> We have:  $\forall x,y\in\partial S$, $L\{x,y\}\cap\partial S=\{x,y\}$   I try by contradiction.  If $S$ is convex or concave, then the boundary of $S$ can be divided into a few graphs of convex functions. If $S$ is neither convex nor concave, then the boundary of $S$ must contain a curve $\gamma$ such that $\gamma$ is a graph of a function but not a graph of convex function. In this case, we can always find two points, $x,y$, such that there exists $z\in\gamma$ and $z=\alpha x+(1-\alpha)y$, contradiction?


I'm very new to Unity so please excuse my question if this sounds very basic to you.  I'm following various tutorials and I have a small question regarding Physics.Raycast:  if (Input.GetButton("Fire1")) {         // check ground hit first         RaycastHit hit;         if (Physics.Raycast(ray, out hit, LayerMask.GetMask("Ground"))) {             Debug.Log("[PlayerMotion]: Hit" + hit.collider.name + " " + hit.point);             agent.SetDestination(hit.point);         } }   Here, even tough I expressively set the layer mask to "Ground", I still get a hit with the Player game object itself (the ground hit is working fine). I thought ok maybe I put the "Ground" layer as well on the player by mistake but I checked several times and it's not the case.  I'm attaching a gif so you can see what's the issue exactly    There's an easy by checking the collider.name but I still find it odd that the Raycast gives me a false positive with the player hit. Any idea what's going on ?

Many questions have been posted on this topic but I'm facing a weird behavior which I could not find an explaination for.  I perform a raycast giving it a LayerMask parameter which is defined as public variable and set in the inspector with thick on layer "Wall" and "Enemy".  At first glance it appeared to work fine because raycast rightly stops  on GameObjects with that layer.   But then I saw that it stopped also on GameObjects with default layer, like if the LayerMask was ignored. Is there something I'm missing?  According to  I set up everything correctly and I expected it to work fine.  Looking at the inspector at Runtime I can clearly see that my mask is set only to "Wall" and "Enemy", and that the GameObject the collider is attached to has default layer set. I'm then stating that the mask the way I'm using it does not exclude other layers. The only way I found to have this working is by setting that GameObject layer to Ignore Raycast but in this case the LayerMask is not necessary.  I'm calling the function this way:  RaycastHit2D inSight = Physics2D.Raycast(start, end, lm);    Maybe is there something different using Physics2D? I would really enjoy touse LayerMasks instead of giving specifically Ignore Raycast to whatever I want to ignore. Any clue?


I'm sure that this is TeX basics and I'm just being a fool, but I can't figure out for what/how the @ symbol is used. All I can tell is that to make sure it works you have to put it between \makeatletter...\makeatother. But I have no idea what it actually does. Thanks!

Many LaTeX “hacks” begin with \makeatletter and end with \makeatother. What do these commands do?


I would like to change the title of my page based on the name of   for example, <h1>lorem imsum<h1>  would set the page title to lorem ipsum

I have a webpage that implements a set of tabs each showing different content. The tab clicks do not refresh the page but hide/unhide contents at the client side.  Now there is a requirement to change the page title according to the tab selected on the page ( for SEO reasons ). Is this possible? Can someone suggest a solution to dynamically alter the page title via javascript without reloading the page?


On compilation, I get a syntax error on the line On Error GoTo ErrorHandler "Near Column 15" which is the beginning of GoTo. I also tried adding a colon to the end of the line (On Error GoTo ErrorHandler:) as I've seen some people do, and I get the same error. What is the syntax error that I'm missing? Subroutine: Sub HandleAnError()     On Error GoTo ErrorHandler          Dim X     X = 1/0          Exit Sub      ErrorHandler:     MsgBox "Error " & Err.Number & ": " & Err.Description End Sub

I want to use VBScript to catch errors and log them (ie on error "log something") then resume the next line of the script.  For example,   On Error Resume Next 'Do Step 1 'Do Step 2 'Do Step 3   When an error occurs on step 1, I want it to log that error (or perform other custom functions with it) then resume at step 2. Is this possible? and how can I implement it?  EDIT: Can I do something like this?   On Error Resume myErrCatch 'Do step 1 'Do step 2 'Do step 3  myErrCatch: 'log error Resume Next


How do I start investing stocks?  I have around 50 bucks I want to start buying stocks the problem I don't want pay a commission fee and the second problem is I live in Europe which means I don't have access to apps like Robinhood  so if you guys know any alternatives it would be really helpful!

Is it feasible to invest a very small amount of money?  If it is, how can I attain it?


public class Foo() {    public Foo() {     this.otherMethod();     otherMethod();   }    public void otherMethod() {     System.out.println("called");   }  }  ------ Main:  Foo foo = new Foo();   Both calls to otherMethod work as expected, and so I want to know is there a special case where you have to use one over the other.  It's hard to answer the question "when do I use this", but in this case, what would be the most logical option, and why?

what about using "this" with methods in Java? Is it optional or there are situations when one needs to use it obligatory?  The only situation I have encountered is when in the class you invoke a method within a method. But it is optional. Here is a silly example just to show what I mean:  public class Test {      String s;      private String hey() {         return s;     }      public String getS(){         String sm = this.hey();         // here I could just write hey(); without this         return sm;     } }


I have this code:  int i = 255; byte b = (byte) i; int c; System.out.println(Integer.toBinaryString( i)); System.out.println("b = " + b); // b = -1 c=b>>>1; System.out.println(Integer.toBinaryString( c)); System.out.println(c);   But I can't understand how it works. I think that unsigned shifting to 255(11111111) should give me 127(0111111) but it doesn't. Is my assumption wrong?

byte x = -1; for(int i = 0; i < 8; i++) {     x = (byte) (x >>> 1);     System.out.println("X: " + x); }   As I understand it, java stores data in two's-complement, meaning -1 = 11111111 (according to wikipedia).    Also, from the java docs: "The bit pattern is given by the left-hand operand, and the number of positions to shift by the right-hand operand. The unsigned right shift operator ">>>" shifts a zero into the leftmost position, while the leftmost position after ">>" depends on sign extension. "  Which means that >>> would shift a 0 to the left most bit every time.  So I expect this code to be  iteration: bit representation of x  0: 11111111  1: 01111111  2: 00111111  3: 00011111  ...so on  However, my output is always X: -1, meaning (I guess) that >>> is putting the sign bit in the left most position.  So I then try >>, and same result.  What's going on?  I would expect my output to be: X: -1, x: 127, x: 63, etc.


Lights entering the prism with different wavelengths at the same angle. why go to different directions? what happens step to step between the protons&electrons in glass and the photons? what is the wavelength of interest in the direction the light goes? please don't tell they have different index of refraction.

It is well known that a  can "split light" by separating different frequencies of light:    Many sources state that the reason this happens is that the  is different for different frequencies.  This is known as .  My question is about why dispersion exists.  Is frequency dependence for refraction a property fundamental to all waves?  Is the effect the result of some sort of non-linearity in response by the refracting material to electromagnetic fields?  Are there (theoretically) any materials that have an essentially constant, non-unity index of refraction (at least for the visible spectrum)?


I have a DNS registered at godaddy. The name of my DNS is: www.example.com and it works perfectly. I discovered that www.fake.de is also linking to my web server. The problem with this is that if someone search for www.example.com, google wont show my DNS but fake.de. Someone else is taking advance from my webserver.   Can someone please fix this?

I was checking out my reverse-DNS entry of my domain the other day which is run from a dedicated server.   I noticed that another person/company had their domain pointing to my server? I have no idea who this company is or why they are pointing their domain at my server IP?  How can I go about stopping this or forcing them to change?


We've bought two laptops running Windows 10 Home for our employees. We need to upgrade them to Windows 10 Pro so we can set them up with BitLocker.  How can I easily buy two license keys for these computers?  I'm aware that it's possible to purchase an upgrade on the computers directly using the Microsoft Store (as detailed in the question: ), but I'd like to purchase product keys in bulk.

I am considering purchasing the desktop computer that fits my requirements, except it comes with Windows 10 Home while I need the Pro edition. Is an upgrade of the OEM version after purchase offered by Microsoft, and, if indeed possible, how much does it currently cost, roughly, in the US--is it significantly less expensive than the ?    I read the , but I cannot make sense of it. The closest statement that seems to apply is     If you don't have a digital license for Windows 10 Pro, Windows 10 Pro is available for purchase from the Microsoft Store.   which possibly implies that there is no upgrade option whatsoever (and the FAQ makes no distinction between retail and OEM). But this is possibly contradicted by my finding posts from people . All in all, I am lost and confused.


module test; reg matrix[7:0] [7:0]='{'{0,1,0,0,0,0,0,0},'{0,0,1,0,0,0,0,0},'{1,0,0,1,0,0,0,0},'{0,0,0,0,1,0,0,0},'{0,0,0,0,0,1,0,1},'{0,0,0,0,0,0,1,0},'{0,0,0,0,1,0,0,1},'{0,0,0,0,0,0,0,0}}; initial begin $display("%d ",matrix[3][3]); end endmodule  this is the test code I am trying to run. My goal is to declare a multi dimensional array to store matrix in Verilog. I am assuming that multi dimensional could be mapped to register or a memory in Verilog. And I have simulated this on Questa sim Error: ** Error: test.v(2): (vlog-2110) Illegal reference to memory "matrix". # ** Error: test.v(2): Illegal LHS of assignment.  Could someone comment on my assumptions and tell me the way to make this happen. Disclaimer: I am a newbie to Verilog !!!

int t=-1'd1; //trying to assign -1 to t; bit vb[7:0]; // simple declaration  bit matrix[0:1][0:7]='{'{0,1,0,0,0,0,0,0},'{0,0,1,0,0,0,0,0},'{1,0,0,1,0,0,0,0},'{0,0,0,0,1,0,0,0},'{0,0,0,0,0,1,0,1},'{0,0,0,0,0,0,1,0},'{0,0,0,0,1,0,0,1},'{0,0,0,0,0,0,0,0}};// initialising multi-dimensional array.  I am using QuestaSim to compile and simulate. this is the report: # -- Compiling module test # ** Error: (vlog-13032) test.v(8): near "=": Syntax error. # ** Error: (vlog-13032) test.v(9): near ";": Syntax error.  I am somewhat New to the Verilog. Please help me in fixing these errors.


I'm getting confused by these types of problems where "n" appears in the general term:  Use Induction to prove:  $$\prod_{i=1}^n \frac{n+i}{2i-3}= 2^n(1-2n)$$  Would my P(n+1) be this?:  $\mathbf P(n+1):$ $$\prod_{i=1}^{n+1} \frac{n+1+i}{2i-3}= 2^{n+1}(1-2(n+1))$$  If this is the case, I dont know how to use the Inductive hypothesis to prove it since the product sequence is now a "different" sequence.  How would I go about solving this?  Many thanks in advance.  Edit: the index was indeed wrong, thanks T Ford, changed it to i=1

i'm trying to solve this, using induction. The base step is easy, there's no difficult there.  The problem comes in the inductive step, I got to demonstrate that:  $$\prod_{i = 1}^{n+1} \frac{n+ 1 + i}{2i-3} = 2^{n+1}(1-2n -2)$$  Now, starting from the left side of the equation I quickly run into a problem. The extra $+1$ in $\frac{n+ 1 + i}{2i-3}$ won't let me use the inductive hypothesis. How can i solve this?


I've been searching for ages, but I only very rarely happen to find a dungeon. Does anyone know if there is a way to find dungeons that is 100% acurate?

In Minecraft survival mode, there are dungeon rooms with mob spawning machines, mossy cobblestones and special treasures.  What's the best way to find those?  I found one the other day and have been looking for more because it was great fun to beat, might be fun to farm, and had awesome special prizes.


import collections import string with open('cipher.txt') as f:   f = f.read().replace(' ', '').replace('\n','').lower()   f = f.strip(string.punctuation)  cnt = collections.Counter(f.replace(' ', '')) for letter in sorted(cnt):   print(letter, cnt[letter])   How do I strip the punctuation!! I can't figure out where to place that line? Can someone please modify my code to remove everything apart from letters? thank you

It seems like there should be a simpler way than:  import string s = "string. With. Punctuation?" # Sample string  out = s.translate(string.maketrans("",""), string.punctuation)   Is there?


I am creating a "to do list" javascript practice app. I have an input, and a "submit button". the submit button uses the text in the input.value. The submit button has an onclick that creates a new div with a nested h3 with the text from the input.value. The submit button also creates an "x button" and a "complete button" How can I create an onclick function for the "x button" which doesn't exist in the DOM until after I use the submit button? I want the "x button" to delete the entire div that was created with the submit button that includes the aforementioned x button itself, as well as the h3 and complete button that were created with the submit button.

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


I have an Asus laptop and it had windows 10 by default and it has 512 GB SSD. I shrinked about 60 GB from a windows drive and I formatted it as unallocated partition. I installed Ubuntu on that 60 GB. Now I want to change the partitions again and allocate a bigger size to ubuntu. Now I have about 200 GB of unused memory on windows and need more space on ubuntu. Note that I do not want to mount them in read-only mode. Is there a solution to do that? EDIT: I am dual-booting now and I want to have both windows and ubuntu on my laptop. But the partition allocated to linux is only 60 GB out of 512 GB of SSD. I want it to be more. [Screenshot link is attached.] EDIT: I turned off device encryption in windows and now I can access windows drives and files from linux. But they are mounted in read-only mode and I can not create files, etc. How can I now access them (ex. only one drive), like the main ubuntu drive?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


Let $A$ and $B$ be $n×n$ matrices such that $AB = BA$. If all the eigenvalues of $A$ are distinct, then $B$ can be expressed uniquely as a polynomial in $A$ with degree no more than $n − 1$.  My Try: From the fact that $A$ has distinct eigen values, we can say that $A$ is diagonalizable. And from the fact fact that $AB = BA$, I have shown the fact that $B$ also have distinct eigen values and hence also Diagonalizable.  It is also noticed that the matrix $P$ for which $P^{-1}AP = C$, the same matrix $P$ also satisfies $P^{-1}BP = D$, where $C,D$ are resp diagonal matrices.  I have also arrived the fact that if $D$ can be expressed uniquely expressed as a polynomial in $C$ with degree no more than $n − 1$, then $B$ can be expressed uniquely as a polynomial in $A$ with degree no more than $n − 1$.  Having Problem to show that $D$ can be expressed uniquely expressed as a polynomial in $C$ with degree no more than $n − 1$.  Thanks in Advance..

If $A\in M_{n}$ has $n$ distinct eigenvalues and if $A$ commutes with a given matrix $B\in M_{n}$, how can I show that $B$ is a polynomial in $A$ of degree at most $n-1$? I think first I need to show that $A$ and $B$ are simultaneously diagonalizable, but I don't know how to begin. Any advice is much appreciated.


My html code <!DOCTYPE html>    <meta charset="UTF-8">  <meta name="viewport" content="width=device-width, initial-scale=1.0">   <link rel="stylesheet" href="style.css">     <title>The Chat App</title>

WELCOME TO THE CHAT APP,
 WHERE YOU CAN CHAT ONLINE!

      Vanilla js code window.onload = function(){const heading = document.getElementById("heading")}; console.log(heading.value);  This code causes this error: app.js:6 Uncaught ReferenceError: heading is not defined at app.js:6 Any help would be much appreciated.

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I flagged an answer as not an answer because it contained just a link (or a little more than a link), and my flag was rejected because, "flags should not be used to indicate technical inaccuracies, or an altogether wrong answer."    I was not flagging it because it was technically inaccurate, or because it was wrong. I flagged it because it was a little more than a link, and the  says:     Answers that do not fundamentally answer the question may be removed. This includes answers that are …         commentary on the question or other answers   asking another, different question   "thanks!" or "me too!" responses   exact duplicates of other answers   barely more than a link to an external site   not even a partial answer to the actual question      In which way should an answer containing just a little more than a link, or two, be flagged?

Related:  (not a dupe, that's a feature request and was closed as a dupe of another one)        (old) post does indeed say that Link-only answers can be flagged as NAA, but there are a lot of posts like  which define Not An Answer is a way that it doesn't apply to link-only answers.  Can we get some up-to-date consensus on this? That link only answers are not allowed is .


Please look at the following code-   public class Program {    public static void Main()   {     A ob = new A();     ob.x = 120;     ob.Name = "No";     GO(ob);     Console.WriteLine(ob.x);   }    public static void GO(A obj)   {     obj.x = 50;     obj.Name = "Local";     obj = null;   } }   in console It prints the value of x 50. but when I am using ref keyword it is giving null reference exception. My question is if object is reference type it should give null reference exception even if I don't use ref. and if it is not then value of x in console should be 120. I am unable to understand this behavior. Please explain whats happening here when we use ref and when we don't.

If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway?  For example:  class Program {     static void Main(string[] args)     {         TestRef t = new TestRef();         t.Something = "Foo";          DoSomething(t);         Console.WriteLine(t.Something);     }      static public void DoSomething(TestRef t)     {         t.Something = "Bar";     } }   public class TestRef {     public string Something { get; set; } }   The output is "Bar" which means that the object was passed as a reference.


I'm trying to download wine 1.7 with the software center and terminal, 3 MB remained of download progress , but when i want to continue the download , it gives me a 404 error. i rebooted the system many times and checked my Internet connection, but still the same problem. Does anyone knows why ?  This is the error I'm getting:  Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libgl1-mesa-glx i386 10.1.3-0ubuntu0.2   404  Not Found [IP: 91.189.91.24 80] Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libgles2-mesa i386 10.1.3-0ubuntu0.2   404  Not Found [IP: 91.189.91.24 80] Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libwayland-egl1-mesa i386 10.1.3-0ubuntu0.2   404  Not Found [IP: 91.189.91.24 80] Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libegl1-mesa-drivers i386 10.1.3-0ubuntu0.2   404  Not Found [IP: 91.189.91.24 80] Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libglapi-mesa i386 10.1.3-0ubuntu0.2   404  Not Found [IP: 91.189.91.24 80] Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libegl1-mesa i386 10.1.3-0ubuntu0.2   404  Not Found [IP: 91.189.91.24 80] Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libosmesa6 i386 10.1.3-0ubuntu0.2   404  Not Found [IP: 91.189.91.24 80] E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-glx_10.1.3-0ubuntu0.2_i386.deb  404  Not Found [IP: 91.189.91.24 80]  E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa_10.1.3-0ubuntu0.2_i386.deb  404  Not Found [IP: 91.189.91.24 80]  E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mesa/libwayland-egl1-mesa_10.1.3-0ubuntu0.2_i386.deb  404  Not Found [IP: 91.189.91.24 80]  E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mesa/libegl1-mesa-drivers_10.1.3-0ubuntu0.2_i386.deb  404  Not Found [IP: 91.189.91.24 80]  E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mesa/libglapi-mesa_10.1.3-0ubuntu0.2_i386.deb  404  Not Found [IP: 91.189.91.24 80]  E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mesa/libegl1-mesa_10.1.3-0ubuntu0.2_i386.deb  404  Not Found [IP: 91.189.91.24 80]  E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/mesa/libosmesa6_10.1.3-0ubuntu0.2_i386.deb  404  Not Found [IP: 91.189.91.24 80]  E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?   running apt-get update gives me this  root@ArshiaAghaei:~# apt-get update Ign http://us.archive.ubuntu.com trusty InRelease                               Get:1 http://dl.google.com stable InRelease [1,540 B]                           100% [1 InRelease gpgv 1,540 B] [Waiting for headers] [Connecting to security.uSplitting up /var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stabIgn http://dl.google.com stable InRelease                                       E: GPG error: http://dl.google.com stable InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)   Now , I dn't see the Install button in software center.

After installing Ubuntu 13.10 I try to install ubuntu-restricted-extras or any software, it shows me:  E: GPG error: http://archive.canonical.com saucy InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication


I have the following script, which manipulates a string.      #!/bin/bash  diry=$( find . -iname "cassandra.yaml" -exec dirname {} + )  dirgo=${diry:2}  echo $dirgo  cd $dirgo   this is the result:  cassandra@server:~$ pwd /opt/cassandra cassandra@server:~$ ./yaml.sh  conf cassandra@cads2001:~$ pwd /opt/cassandra   Prints the directory, But it does not go into the directory.  Maybe i need another kind of variable.  regards.

I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?


How can I calculate this limit:    $$\lim_{n\to \infty} \Bigg(\sum_{i=1}^n{ \frac{1}{\sqrt{ \vphantom{1}i \cdot n}} } \Bigg)$$   Note: I think it has something to do with some Riemann sum, but I can't get anywhere, I tried to set $n$ as the number summands and $\frac1n$ as the width of each part. But that doesn't help; it gives: $\frac1n\sum\frac{\sqrt{n}}{\sqrt{i}}$

I need help with the following limit $$\lim_{n\to\infty}\sum_{k=1}^n \frac{1}{\sqrt{kn}}$$  Thanks.


I'm trying to produce a CV. I'm using Latex and Python, so I can edit the underlying text document with my material easily and the finished cv will come up adjusted for the contents of each section.   I read that longtable cant paginate in the middle of a cell, so when I try and do an itemized list, it won't break up and I end up with a lot of whitespace at the bottom of one page and the whole list on the next.  How can I split the list? Is there another package I can use?   In the final program PdfLatex will be called by python on a calculated script. If I could find out what the overspill was I could force Python to produce two lists. Is there such a variable and how do I access it?  Thanks & MWE below  \documentclass{article} \usepackage[left=0.5in,right=0.5in,top=0.5in,bottom=0.5in]{geometry} \usepackage{colortbl} \usepackage{enumitem} \usepackage{amssymb} \usepackage{longtable}  \newcommand\T{\rule{0pt}{4mm}} \pagestyle{empty} \begin{document}  %\renewcommand{\arraystretch}{1.2}  \begin{longtable}{|>{\columncolor[gray]{0.9}}p{0.15\linewidth}|p{0.80\linewidth}|} \hline\T \textbf{Summary} &  \makebox[2cm][l]{Blah:} Blah \\[2ex] & \makebox[2cm][l]{Blah:} Blah\\ & \makebox[2cm][l]{} Blah \\ & \makebox[2cm][l]{} Blah\\[2ex] & \makebox[2cm][l]{Blah:} blah\\ & \makebox[2cm][l]{} blah \\ \hline\T \textbf{Blah} &  \begin{itemize} \renewcommand{\labelitemi}{$\Box$} \vspace{-1em} \itemsep0ex \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \end{itemize} \\ \hline\T \textbf{Blah} & Blah\\ & \textit{Blah} \\ & \textit{Blah} \\ & \begin{itemize} \renewcommand{\labelitemi}{\textendash} \vspace{-1em} \itemsep-1ex \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \end{itemize} \\ \cline{2-2}\T & Blah\\ & \textit{Blah} \\ & \begin{itemize} \renewcommand{\labelitemi}{\textendash} \vspace{-1em} \itemsep-1ex \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \item Blah \end{itemize} \\ \cline{2-2} \end{longtable}  \end{document}

I have a long table with the explanation of 50 items (the MWE displays only 9). I believe this is hard to read. How do I make it easy to read?  \documentclass[10pt,cleardoublepage=empty,twoside]{book} \usepackage[a5paper]{geometry} \usepackage{longtable} \usepackage[T1]{fontenc}  \usepackage{booktabs}  \begin{document} \begin{longtable}{p{4.8cm} p{4.8cm}} \caption{Lorem ipsum dolor sit amet, orci vivamus ac neque augue cras, pellentesque libero integer.}\\ \textsc{Lorem ipsum dolor sit amet}&\textsc{Lorem ipsum}\\ \midrule \endfirsthead \caption[]{(continued)}\\ \endhead \endlastfoot  aenean ipsum enim egestas dui amet, ut condimentum ipsum vel arcu ullamcorper, nec et quis dolor mi, nunc id laoreet velit elit sit orci. Pede vestibulum ac amet &\textit{enean}\slash \textit{egestas}\\  pede vestibulum ac amet &\textit{egestas}\slash \textit{condimentum}\\  aenean ipsum enim egestas dui amet, ut condimentum ipsum vel arcu ullamcorper, ante voluptatem, suspendisse sed euismod leo &\textit{hasellus}\slash \textit{egestas}\\  pede vestibulum ac amet. &\textit{egestas}\slash \textit{condimentum}\\  aenean ipsum enim egestas dui amet, ut condimentum ipsum vel arcu ullamcorper &\textit{laoreet}\slash \textit{velit}\\  aenean ipsum enim egestas dui amet, ut condimentum ipsum vel arcu ullamcorper, ante voluptatem, suspendisse &\textit{enean}\slash \textit{egestas}\\  mauris lectus vel nulla neque lectus vel nulla eget cras luctus enim pharetra, curabitur sed curabitur sed vitae, lectus vel nulla neque &\textit{egestas}\slash \textit{condimentum}\\  mauris eget cras luctus enim pharetra, curabitur sed vitae, lectus vel nulla neque &\textit{cras}\slash \textit{enim}\\  sapien in sed. Sit lectus sed nullam, condimentum elit quae, morbi lacus nullam dictum libero convallis  &\textit{convallis}\slash \textit{Sit}\\ \end{longtable} \end{document}   Output (extract):    I also have this other table. Do you think it could look better than this?  \documentclass[10pt,cleardoublepage=empty,twoside]{book} \usepackage[a5paper]{geometry} \usepackage[english]{babel} \usepackage{longtable} \usepackage{multirow} \usepackage[T1]{fontenc}  \usepackage{booktabs}  \begin{document}  \begin{longtable}{l l} \caption{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh}\\ \textsc{Lorem Ipsum}&\textsc{Ament}\\ \midrule \endfirsthead \caption[]{(continued)}\\ \textsc{Semantic Category}&\textsc{Variable}\\ \midrule \endhead \endlastfoot \multirow{3}{*}{consectetur eiusmod tempor}&\textit{dolor}/\textit{sit}\\ &\textit{ament}/\textit{sit}\\ &\textit{laboris}/\textit{explicabo}\\ \\ \multirow{3}{*}{consectetur adipisicing elit, sed do eiusmod}&\textit{exercitationem}/\textit{voluptatem}\\ &\textit{incidunt}/\textit{laboris}\\ &\textit{aliquid}/\textit{explicabo}\\ \\ \multirow{2}{*}{consectetur adipisicing elit, sed do}& \textit{holiday}/\textit{exercitationem}\\ &\textit{sundown}/\textit{laboris}\\ \\ \multirow{2}{*}{consectetur adipisicing, sed do eiusmod}&\textit{laboris}/\textit{incidunt}\\ &\textit{exercitationem}/\textit{voluptatem}\\ \\ consectetur adipisicing elit, sed&\textit{aliquid}/\textit{incidunt}\\ \\ consectetur elit, sed do eiusmod&\textit{explicabo}/\textit{laboris}\\ \end{longtable}  \end{document}


I am looking for good (fast, memory efficient, ideally one-pass) algorithms to compute the sample mean and variance.  I have found a technical report by  from 1983 with interesting algorithms. Are there more modern improvements?  EDIT: Added the crucial words "and variance"

Say I have a (infinite) sequences like 1, 3, 2, 2, 1, 3 ...    I want to estimate their mean and variance of the sequence at time $t$.    But I won't have enough storage to keep all the data seen previously.    I know I can compute the mean by only keeping the sum of the sequence by far, then divide through by time $t$.  But how can I compute/estimate the variance (using a constant amount of storage)? Is there any trick/model for this?


I read that a pair of entangled quantum particles can spontaneously pop into existence for a brief moment and especially near to the event horizon whereby one of the entangled quantum particle passes through while the other escape, and the quantum particle that falls in is always carry negative energy while the escapee always have positive energy becoming a real particle. Does it means that no matter which one of the entangled pair falls into the black hole it always carry negative energy provided the other pair manage to escape and gets promoted to real particle.  So far not good... a pair of virtual matter-antimatter particles are entangled and cannot be tell apart from each other, when one of the pair happens to fall into the black hole we immediately assume it carries negative energy! Just because the other particle becomes real particle, is that the reason?

I was reading Brian Greene's "Hidden Reality" and came to the part about Hawking Radiation. Quantum jitters that occur near the event horizon of a black hole, which create both positive-energy particles and negative-energy particles, produce the so-called Hawking radiation. However, I do not understand why only the negative-energy particles are being absorbed into the black hole, while the positive-energy particles shoot outward. Shouldn't there be 50/50 chance that each type of particle is being absorbed by the black hole? Also, the book mentions that a negative-energy particle would appear to an observer inside the black hole as positive. Why?


Steps to reproduce:    Find a comment owned by a deleted user, like . Touch it (as you normally would when trying to upvote or flag). Observe as app stops responding. Wait about 8-9 seconds. Observe crash. Look up to the sky, throw your hands in the air, and scream "WHY???!!!" because you really wanted to upvote that comment. * optional   Could this be unborkified?

I'm using Android App v1.0.23 on a HTC Velocity 4G running Android 4.0.3.  In  I've noticed that tapping the comment from user660 instantly crashes the app. I suspect it is because they don't exist any longer!


Recently, I tried to install ruby and I somewhat messed up with variable environment. As a result, I am not be able to use paths in .profile or any other path files that I set up before (I tried in .bash_profile, .zschr and etc). How can I fix this problem?

I've messed up my path variable, and now some apps that I run raise errors saying Command Not Found (error 127) for commands like date and sleep. These commands work fine when executed directly in the shell.  I'm guessing this has something to do with a malformed $PATH variable, and need to know how to reset it.  I've deleted the files ~/.bashrc, ~/.bash_profile, /etc/bash.bashrc, and ~/.bashrc and ~/.profile.  What other files could hold my $PATH? Is there some simpler way to reset the Path than dig into the myriad files which could hold my path?  Note, this path problem is only with my user. I made a test user on my system, and the path was fine, back to normal.  UPDATE: Thanks. I dunno which one of the files I deleted did it, but things are working again. You guys did what the 'Experts' couldn't. And yes, Chris, you were right. The PATH customizations I had made were in bash_login. But somehow it worked without me deleting those customizations. I think it might have been coz I was using this prefpane called 'RCEnvironment', and I had entered a path with quotes and :PATH in it. I dunno whether it takes quotes, and it doesn't replace :$PATH, so that probably is the root of the error. I forgot I even had that prefpane!


I have taxonomy terms structure something like below:    - Parent 1     - Child 1     - Child 2     - Child 3   - Parent 2   - Parent 3     - Child 4     - Child 5   I want to display same structure in a views block. I already . They have not used blocks. They used pages and depend upon url argument they did something. But I need this to be display in a block. I searched some of the suggestions by using contextual filters and relations but not able to get this structure. Please give some other suggestion which you have used in your case. thanks in advance.

I have a vocabulary like this:   Parent 1  Child 1 Child 2 Child 3   Parent 2  Child 1 Child 2    Now I would like to use a view to create a list of a Parent term with its Child terms. I try to do this with Views UI, but only show the term parent... No the child term's. It is very confusing for me.  Can anyone help with this case? Thanks :D


Chicken nuggets come in boxes of $389$ and $691$. What is the largest number of nuggets one cannot order?

I am asked to prove that:       For integers $n, x,y > 0$, where $x,y$ are relatively prime,        every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$.   How should I approach this? I have very limited knowledge in number theory.


is there any possibility to define a text which I can then input multiple times later?  My problem: I'm writing on a thesis and want to define the titel of it, so I can later reference this titel. So if the name or some words in the titel change (which might happen) I don't have to go through the whole thesis and change it all the times I used the titel.  I know this sounds pretty weird, my english is also not quite good. I hope I could explain what I ment to you to an extend where someone understands ^^

In a long, long, long writing. I have a piece of text that repeats in several places/sections/chapters. When I'm editing, I change 2 or 3 words in that piece of text. The changes have to be applied to all its repetitions in the document. The question is, how can I automate this?  The solution I'm looking for would be something like:  Lorem ipsum \textthatrepeatselsehwhere{This text will be shown in several places}\label{textrep1} lorem ipsum.  Lorem ipsum \displaytextoflabel{textrep1} lorem lorem.   The output should look like:     Lorem ipsum This text will be shown in several places lorem ipsum.      Lorem ipsum This text will be shown in several places lorem lorem.   The solution might be obvious but I don't know how to do it. Thanks, any help will be appreciated.


I have been seeing the following methods declaration but I do not understand how <K, V> and <T> are being used.  What does public <K, V> does in this method?  public <K, V> void add(K k, V v)   What does static <T> does in this method?  public static <T> int countGreaterThan(T[] anArray, T elem)

Consider this example (typical in OOP books):    I have an Animal class, where each Animal can have many friends. And subclasses like Dog, Duck, Mouse etc which add specific behavior like bark(), quack() etc.  Here's the Animal class:  public class Animal {     private Map<String,Animal> friends = new HashMap<>();      public void addFriend(String name, Animal animal){         friends.put(name,animal);     }      public Animal callFriend(String name){         return friends.get(name);     } }   And here's some code snippet with lots of typecasting:  Mouse jerry = new Mouse(); jerry.addFriend("spike", new Dog()); jerry.addFriend("quacker", new Duck());  ((Dog) jerry.callFriend("spike")).bark(); ((Duck) jerry.callFriend("quacker")).quack();   Is there any way I can use generics for the return type to get rid of the typecasting, so that I can say      jerry.callFriend("spike").bark(); jerry.callFriend("quacker").quack();   Here's some initial code with return type conveyed to the method as a parameter that's never used.   public<T extends Animal> T callFriend(String name, T unusedTypeObj){     return (T)friends.get(name);         }   Is there a way to figure out the return type at runtime without the extra parameter using instanceof? Or at least by passing a class of the type instead of a dummy instance. I understand generics are for compile time type-checking, but is there a workaround for this?


I have a very strange thing happening where two lists which are clearly equal are not being considered equal by Python. From here you can see the IPython console output of an element of a dictionary I am working with:  In [251]: saveDict['data']['hpSH']['manifold_type'] Out[251]: ['duct', 'pipe']  Then when I go to check if this same dictionary element is equal to the list ['duct', 'pipe'], it says it is not:  In [252]: ['duct', 'pipe'] is saveDict['data']['hpSH']['manifold_type'] Out[252]: False  However, using "==" instead of "is" results in a True output in the console.  I discovered this because it is messing up other parts of my code and not doing the same calculations with saveDict['data']['hpSH']['manifold_type'] as it is with ['duct', 'pipe']. To give you more backstory, saveDict is coming from a saved file made by cPickle. Here is more on the environment I am working with:  Windows 10,  Python 2.7.12 :: Anaconda 4.1.1 (32-bit),  Spyder 2 IDE

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


This is a very interesting word problem that I came across in an old textbook of mine. So I know its got something to do with sequencing and series, which yields the shortest, simplest proofs, but other than that, the textbook gave no hints really and I'm really not sure about how to approach it. Any guidance hints or help would be truly greatly appreciated. Thanks in advance :) So anyway, here the problem goes:     Simplify $$\frac{1}{1\times2\times3} + \frac{1}{2\times3\times4} +\frac{1}{3\times4\times5}+\cdots+\frac{1}{n(n+1)(n+2)}$$

Prove that $\displaystyle \sum_{x=1}^{n} \frac{1}{x (x+1)(x+2)} = \frac{1}{4} - \frac{1}{2 (n+1) (n+2)}$.   I tried using the partial fraction decomposition $a_j = \frac{1}{2j} - \frac{1}{j+1} + \frac{1}{2(j+2)}$, but I don't see how that helps.


I have an office with about 100 or so users. I have to bring new laptops up by fresh installing office every so often (2-3 a week) and it seems silly to me that I have to download them fresh each time  Is there a way I can cache them locally ( I have 3 windows server 2012 r2 servers but I don't see any roles that look like they apply to this)

What options, if any, exist for offline update of Microsoft  Windows?  If a solution exists please list your experience using it.    Background:  If for any reason a computer does not have a connection to  the Internet or the connection is too slow to download  several hundreds of megabytes every so often some kind of  offline Windows Update is required.  In a multi-computer environment a lot of bandwidth (and thus in some cases money) and/or  time could also be saved if it is possible to update in an  offline manner.


I am having trouble finding a way to position a div at the bottom of the container.   What I tried:   position:absolute; bottom:10px;    But it displays the div I need at the bottom, outside the container in which I need it in...  I appreciate any help in this regard.  Heres the jsfiddle showing the example:

I have floated images and inset boxes at the top of a container using float:right (or left) many times. Recently I hit a need to float a div at the bottom right corner of another div with the normal text wrap that you get with float (text wrapped above and to the left only).  I thought this must be relatively easy even though float has no bottom value but I haven't been able to do it using a number of techniques and searching the web hasn't come up with anything other than using absolute positioning but this doesn't give the correct word wrap behaviour.  I had thought this would be a very common design but apparently it isn't. If nobody has a suggestion I'll have to break my text up into separate boxes and align the div manually but that is rather precarious and I'd hate to have to do it on every page that needs it.  EDIT: Just a note for anyone who comes here. The question linked above as a duplicate is in fact not a duplicate. The requirement that text wrap around the inset element makes it completely different. In fact, the response to the top voted answer here makes it clear why the answer in the linked question is wrong as a response to this question. Anyway, there still doesn't appear to be a general solution to this problem but some of the solutions posted here and in the linked question may work for specific cases.


Everything works fine I just want to know why would my interface change to wlp2s0 by default instead of the usual wlan0

I updated a virtual machine running Ubuntu server 15.04 to the just released new stable 15.10.  There were no apparent problems, but after reboot the machine lost its network connection. lspci showed the correct card and lsmod proved that the driver had been loaded.  Hints about editing or removing /etc/udev/rules.d/70-persistent-net.rules did not succeed (still no network, no new file), the famous /lib/udev/write_net_rules did not even exist.  I don't have much clue regarding udev and systemd, so it took me some time to find in /sys/class/net that the network interface name changed. It became ens32, which was renamed from eth0. After I changed /etc/network/interfaces network communication was enabled again.  But - why does this happen at all? And if it happens, shouldn't the interfaces file be updated automatically?  Now that I deleted the virtual network card and created another one, eth0 becomes eno16777728, which is not so, uhm, nice.  Should this behaviour (at least that of the upgrade procedure) be reported as a bug?  Furthermore, is /etc/udev/rules.d/70-persistent-net.rules obsolete now? And (although only partly related) what about /etc/udev/rules.d/70-persistent-cd.rules?)  Edit - additional question (after accepted answer) The dependency of /etc/network/interfaces from the actual interface name bothered me. I tried a new installation of *ubuntu in another virtual machine. To my surprise, /etc/network/interfaces contained a reference to the loopback device only. However, with my original VM this change prevented the network to come up. So what else do I need to change?  Edit Well, from another test I found that a new Ubuntu Server has the network interface card in /etc/network/interfaces, while XUbuntu has not. Maybe it is using network-manager or something else.


Here is a quote from  (accessed: Nov. 22, 2013) :      As a consequence of Zorn's lemma, every Hilbert space admits an orthonormal basis; furthermore, any two orthonormal bases of the same space have the same cardinality, called the Hilbert dimension of the space.   But it seems to me that for a lot of quantum systems this is not so. For example, the one dimensional harmonic oscillator has a countable basis of energy eigenstates but an uncountable basis of position eigenstates (whose wave functions are delta functions).   So where am I wrong? I assume the answer has to do with the fact that delta functions are not actually part of the Hilbert space. Is that it?

This is obviously a follow on question to the Phys.SE post   So I thought that the Hilbert space of a bound electron is countable, but the Hilbert space of a free electron is uncountable.  But the arguments about smoothness and delta functions in the answers to the previous question convince me otherwise. Why is the Hilbert space of a free particle not also countable?


I've just realised that this question might be interpreted as a duplicate of , and therefore eligible to be closed as such. Apologies for the lapse of memory; I'll leave the community to close one or the other.    I'm slowly (as always) coming to the conclusion that I should make the move from Xe- to Lua-(La)TeX, but, as far as I can see, there is still one last obstacle.  In XeLaTeX, I can do this:  \def\kright#1{\leavevmode #1\kern-\XeTeXglyphbounds3 \the\XeTeXcharglyph`#1 } \def\kleft#1{\leavevmode \kern-\XeTeXglyphbounds1 \the\XeTeXcharglyph`#1 #1}   Which compensates for left or right sidebearings, and allows me to align the 'edge' of text precisely (See, for example, this answer to  and also this question: .  I believe these sidebearing measurements may be available within LuaTeX, but so far have not been able even to get close to finding the document that will tell me how to do it. Can someone help?  BTW, I know that microtype can do something similar, but I understand that it's driven by an external table which takes a lot of effort to set up -- I'm looking for the general solution for an arbitrary (Open Type, probably) font.

has been solved, in XeTeX, by this code:  \def\kright#1{\leavevmode #1\kern-\XeTeXglyphbounds3 \the\XeTeXcharglyph`#1 } \def\kleft#1{\leavevmode \kern-\XeTeXglyphbounds1 \the\XeTeXcharglyph`#1 #1}   which allows me to align text more precisely to the ink by accessing the side-bearing measurements (\XeTeXglyphbounds1 and 3).  This XeTeX dependency is currently the only thing stopping me from moving to LuaTeX (mainly for microtype). Is an equivalent function available in LuaTeX, or planned?    After reading a bit more on microtype, could the equivalent effect be achieved by an appropriately-tailored set of character protrusions? That way, my move to LuaTeX might be a lot simpler.