In general, when someone defines a manifold he defines the concept of topological manifold and then the concept of compatible smooth charts, atlases,... If I understand it correctly the Whitney embedding theorem sais that every manifold can be embedded in $\mathbb{R^n}$ (I guess with the canonical smooth structure?) for some natural number $n$, so we could instead of defining manifolds just define embedded submanifolds of $\mathbb{R^n}$. Also, this is the takeaway I get from . But then What would be this precise definition of an embedded submanifold of $\mathbb{R}^n$? If I consider the definition of an embedded submanifold  I think I get that a subset $S\subset \mathbb{R}^n$ is an embedded submanifold if for every $x\in S$ we have a diffeomorphism $U\xrightarrow{\phi}\mathbb{R}^n$ (here $U\subset\mathbb{R}^n$ is open) such that $\phi(U\cap S)=\phi(U)\cap(\mathbb{R}^{(n-k)}\times\{0_{\mathbb{R}^k}\})$. Is that how it is defined? Because in some notes I see the (except for open submanifolds) :  definition : Let $M$ be a subset of a linear space $E$. We say $M$ is a smooth embedded submanifold of $E$ if : For a fixed integer $k\ge 1$ and for each $x\in M$ there exists a neighborhood $U$ of $x$ in $E$ and a smooth function $h:U\to \mathbb{R}^k$ such that (a) If $y$ is in $U$, then h(y) = 0 if and only if $y\in M$;and (b) rank Dh(x) = k  Are these two equivalent?

A subset $M \in \mathbb{R}^n$ is called a smooth k-dimensional submanifold of $\mathbb{R}^n$, $k \leq n$, if any point $x \in M$ has a neighborhood $O_x$ in $\mathbb{R}^n$ in which $M$ is described in one of the following ways:  (1) there exists a smooth vector-function $$F:O_x \to \mathbb{R}^{n-k}, \text{  } rank \frac{dF}{dx}|_q=n-k $$ such that $O_x \cap M = F^{-1}(0)$  (2) there exists a smooth vector-function $$f:V_0 \to \mathbb{R}^{n}$$ from a neighborhood of the origin $0 \in V_0 \subset \mathbb{R}^k$  with $$f(0)= x \text{   and   } rank \frac{df}{dx}|_0=k $$ such that $f: V_0 \to O_x \cap M$ is homeomorphism.  (3) there exists a smooth vector-function $$\Phi:O_x \to O_0 \subset \mathbb{R}^{n},$$ onto a neighborhood of the origin  $0 \in O_0 \subset \mathbb{R}^n$  with $$\text{  } rank \frac{d \Phi}{dx}|_x=n $$ such that $ \Phi(O_x \cap M)= \mathbb{R}^k \cap O_0$   I am trying to show the equivalence of these definitions and my first question is why is each definition imposing itself on the rank?


In the Harry Potter series, it is known that Professor Severus Snape tries to protect Harry.  Reason for being is because as a Hogwarts student himself back in the day, he fell on love with who was Lily (Harry's mother). But she had an affair with James Potter.  Because Snape instantly knew that Harry was Lily's son, he dedicated to protecting Harry in the mid to last years of Harry being at Hogwarts.  But as we know, Snape, in the first few years, Snape hated Harry and deducted many points from Griffyndor.   Snape hated Harry, but in the first movie during the Griffyndor vs Slytherin Quidditch match, Quirrel is said and proven to be the one that tried to kill harry by throwing him off his nimbus 2000.  But Snape intervened with a counter- curse to save Harry.  Snape even refereed the second match of Quidditch to make sure Quirrel didn't do it again. That was in the book.  But I don't understand Snape's motivation in the first few years of hatred towards Harry Potter.  But towards the last few years, Snape showed that he cared and protected Harry without hesitation.  Why did Snape hate Harry to begin with?  Especially saying:     "I'll make sure you two-three are expelled next time something like this happens again"

Professor Severus Snape was a very important character throughout the Harry Potter series. He played very important roles in Harry's life as well as in Hogwarts fortune. His works were admirable and beyond expression in words.   But, with all due respect to him, I could not understand why he portrayed himself as angry, ferocious, tough and mischievous toward his students?   He always treated Harry and the students in a way which cause everyone to dislike him, except for his Slytherin students.  Why did he pretend to be so?   Was it because he could not get Lily and that Harry was the son of James, the hater of Snape?


I have installed Windows 10 on my PC using Legacy mode(I checked Bios Mode in System Infomation, and it said Legacy). Now, after I found out the many advantages of UEFI mode, such as fast booting, secure boot, etc. etc. I want my machine work with UEFI mode.  Do I need to install it again in UEFI mode? I dont want to do this because I found out from googling it that the hard drive must be wiped completely to change hard drive system from MBR to GPT to make it run in UEFI mode.  What if I directly switch to UEFI mode(without reinstalling)? Will it work without complications?

I've installed Windows 10 in BIOS mode and use MBR. How can I convert it to use UEFI and GPT without reinstalling Windows 10? Is this possible?


I am trying to replace the old 3par LUNs with new Vmax LUNs. Can someone help me  make a script to ease the task?  Is it possible to create 2 files, one file having the 3par LUNs, the other file having all the new VMAX LUNS? Then replace all the content of mulipath.conf.  Currently I am using:  sed -i "s/360002ac000000000000001f20001add7/60002ac000000000000001f20001accb/g" multipath.conf   Can someone help make the command work?  sed "s/`cat 3par.txt`/`cat vmax.txt`/g" multipath.conf

Preface: Every couple of days there comes a question of this type, which is easy to solve with sed, but takes time to explain. I'm writing this question and answer, so I can later refer to this generic solution and only explain the adaption for the specific case. Feel free to contribute.  I have files with variable definitions. Variables consist of uppercase letters or underscore _ and their values follow after the :=. The values can contain other variables. This is Gnom.def:  NAME:=Gnom FULL_NAME:=$FIRST_NAME $NAME FIRST_NAME:=Sman STREET:=Mainstreet 42 TOWN:=Nowhere BIRTHDAY:=May 1st, 1999   Then there is another file form.txt with a template form:  $NAME Full name: $FULL_NAME Address: $STREET in $TOWN Birthday: $BIRTHDAY Don't be confused by $NAMES   Now I want a script which replaces the variables (marked with $ and the identifier) in the form by the definitions in the other file, recursively, if necessary, so I get this text back:  Gnom Full name: Sman Gnom Address: Mainstreet 42 in Nowhere Birthday: May 1st, 1999 Don't be confused by $NAMES   The last line is to ensure that no substrings of variables get replaced accidentally.


I need to get file path for my java program during runtime. Is there any way to use default dialog box to choose a single file and get its full path and name?  Its just picking a file and get its path into a String object  Can you please provide the code for it or a tutorial?   PS: Windows OS

I was wondering if there was some kind of J tool in the java swing library that opens up a file browser window and allows a user to choose a file. Then the ouput of the file would be the absolute path of the chosen file.  Thanks in advance,


Can someone help me finding an expression for "making a big incident/problem as a minor one" by ignoring it or taking it casually?  I want to insist someone to concentrate on the main incident when they deliberately try to ignore the core point and hang on to trivial things.

Some examples:   Instead of admitting that I'm an alcoholic, I just say I had one too many drinks. Instead of the bank admitting that it has lots of loans that are in arrears and are likely to default, it only says that it has underperforming loans. Instead of admitting that they overeat, they simply claim that they have a strong appetite.    Basically, I'm after a word for when a phrase is used that is not really a lie, but doesn't give the whole truth to make it sound more positive than it actually is. Usually when something should be dealt with, but it's kind of swept under the carpet by the misleading phrase.


For some reason, all of this has been fixed, somehow. Thank you @null (Science fiction & fantasy mod) for changing it to 'Alex' and letting me change my name on other sites.  I've found a bug where my profile name appears as my UUID instead of my name…        It happens for:   Movies and TV Physics Electrical Engineering Super user Puzzling  Programmers    Is this a bug or is this just me being inactive and having only 101 rep on those sites?  And for some sites, the default StackExchange icon is displayed (ex. Software Recommendations)

I was just asking a question on Gardening SE and suddenly my user name there is a25bedc5-3d09-41b8-82fb-ea6c353d75aand my picture is replaced by a Gravatar. My location is also left blank.  Here's a   Curiously, my profiles on all other sites are fine.  I don't have a separate login for SE, I log in using my Google account. Nobody other than me has access to my Google account. I use two step authentication and I can see on "recent devices" in Google that no one but me has accessed my Google account. I only access SE from home, and nobody other than me has used my devices.   I tried to edit my Gardening SE profile back to the way I want it to be and I got the following message:     Oops! There was a problem updating your profile:   Display name may only be changed once every 30 days; you may change again on Jun 20 at 10:49   I'm assuming this is because I changed the "about me" on all SE sites two days ago.  I never edit my profiles individually. I always apply changes to all sites, using the same profile on all sites.  I have certainly not made such strange (or any) edits to my profile on Gardening SE.  Why did this happen, and how can I get my proper user name and picture back on Gardening SE? Do I really have to wait for a whole month? I want to use the site, and I want them to recognize me as the user they know. I don't want to wait a whole month.  Update: The Gardening SE moderator Niall C. helped me out, and he offered the following potentially relevant information:     I changed your display name on Gardening & Landscaping back to "Fiksdal". Your profile history shows that your profile image (from your headshot on imgur.com to a gravatar), email, about me also changed at the same time as your display name on May 21. It also shows that I changed your profile image to a different gravatar when I changed your display name just now... weird! – Niall C. 1 hour ago


Find all $d > 0$ that for any function $f$ such as $f(0) = f(1)$ for some $x_0 \in [0, 1 - d]$: $$ f(x_0) = f(x_0 + d), x_0 \in [0, 1 - d] $$  I suspect the answer is something like $(0, 0.5) \cup \{1\}$ as, obviously, for the function $f(x) = sin(2\pi x)$ $d$ cannot be greater than $0.5$ (except 1), but I can't prove that.   $f$ is continuous on $[0, 1]$.

Let $f \in C[0,1]$ and $f(0)=f(1)$.   How do we prove $\exists a \in [0,1/2]$ such that $f(a)=f(a+1/2)$?  In fact, for every positive integer $n$, there is some $a$, such that $f(a) = f(a+\frac{1}{n})$.  For any other non-zero real $r$ (i.e not of the form $\frac{1}{n}$), there is a continuous function $f \in C[0,1]$, such that $f(0) = f(1)$ and $f(a) \neq f(a+r)$ for any $a$.  This is called the Universal Chord Theorem and is due to Paul Levy.  Note: the accepted answer answers only the first question, so please read the other answers too, and also this answer by Arturo to a different question:     This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


The complement of $\mathbb{Q}^2$ in $\mathbb{R}^2$ is connected.   I have to solve this problem.  At first, I tried to solve as following: For any 2 disjoint neighborhoods of $\mathbb{R}^2$ \ $\mathbb{Q}^2$, whose union is $\mathbb{R}^2$ \ $\mathbb{Q}^2$,    one of them must be empty.  But I couldn't deduce the last goal. How can this problem be solved?

I started learning topology recently, so I'm very new to this.    The question is as follows:     Given the set $A = \{ (x,y)\;;\;x, y\in\mathbb{Q} \}=\mathbb{Q}^2$, show that the complement set $A^c=\mathbb{R}^2\setminus A$ is polygonally connected.   As an attempt on this question, I plan to show that the set $A^c$ is connected, thus using a theorem, I can say $A^c$ is polygonally connected.  But here is the part that I got confused: By definition, the set $A^c$ is connected iff it cannot be written as the union of $2$ nonempty separated sets.    In this case, I believe $A^c$ is the set of all $(x,y)$ where $x,y$ belong to $\mathbb R-  \mathbb Q$.  But how can I express the fact that $A^c$ is not the union of $2$ nonempty separated sets ?   Based on my knowledge, I know both sets $\mathbb Q$  and $\mathbb R-\mathbb Q$ are dense, but how is this helpful to solving this problem?  I think a reason is because for any collection of $(x,y)$ where $x,y $are in $\mathbb Q$, I can always find a point in $\mathbb R-  \mathbb Q$ which is a boundary point of that certain collection.  But is my thought ok ?  Would someone please help me on this?  I'm kinda lost >_< Thanks ^^


I'm active user on many sites, and I'd like to delete my account on some of them. Is something like that possible?  It would require to unlink the account first, from what I know, so is it technically possible in the first line?   I wouldn't like to throw away my SO account, as well as orphaning Area51 proposals, if it would be possible to keep them.

Previously I asked to delete only my Meta account, but my Stack Overflow account was deleted as well. How can I prevent this in the future?


When I was in early high school, I remember reading a book that was set in an alternate world in which vehicles slid along on tracks using a frictionless, perfect lubricant.  I thought it may have been a Discworld book, but I haven't been able to actually find what book it was. I'm not sure if it was a Discworld book or not.  edit: I think it was from a book that was kind of in the vein of Red Dwarf or Hitchiker's Guide or something similar. I liked those semi-humorous sci-fi fiction books at the time.  edit2: I think the cover also had some kind of cartoon people or animal-looking people on it, and may or may not have had a picture of one of the vehicles. Just kind of a carriage-style thing, maybe with sleds.

This book is about an explorer (with robot companion) who walks through a "gateway" into the future/parallel world. In this world, things that are created do not fall into disrepair, instead things get better.  The main character is kidnapped early on in the story and forced to labor by beating the outside of a castle with a spear. It is explained to him that this makes the wall better and able to resist attacks by these weapons. In his cell, he meets a man wearing an extravagant shirt and asks about it and the man explains to him that the shirt has been in his family for several generations, which is why it looks so nice.   To escape from the jail cell, the man tears one of his zippers from his jump suit and uses it like a saw to cut a hole in the wall. He escapes with the man in the fancy shirt and a woman.   The woman, is something special in this world. (She can focus on the change that is happening to an item and somehow enhance or speed up the process)  The man makes a wheeled cart for them to escape in. While the wheels are at first rough and wobbly, they soon "become better" and spin better.


I'm trying to copy an object in other using spread operator but wheni change one item from array in a copy object, the original is changed to. Any one knows how can i make the change only in object 2 ? Follow a simple example: let obj1 = { a:'hello', b:'hi', c: [1,2,3] } let obj2 = { ...obj1 } obj2.c[1] = 44   EDIT: This thread has the answer :)

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I have a tutorial question which focuses on LFSRs and Berlekamp-Massey Algo (which is totally out of my syllabus). Please forgive me if my questions seem stupid.  I'm given these information:     {"lfsr":{"seed":"1100110001100101"},"keyFragment":"101010001111001110000110111001101","cipherText":"bb0000e911b4238a6ca3"}   My seed is 1100110001100101 (16 bits)  My key fragment is 101010001111001110000110111001101 (33 bits)  My cipher text is bb0000e911b4238a6ca3 (in hexadecimal)     Apply the Berlekamp-Massey algorithm on the key stream fragment you   were given to obtain the feedback polynomial that generated the key.   For full marks, you have to implement the algorithm yourself, attach   key parts of the algorithm to the report as an appendix and describe   briefly which bit of the implementation you found the most   challenging. If you use someone else’s code or an online service you   will not be awarded full marks; in this case make sure you acknowledge   the source of the code or service you use.   I'm using an online calculator and my LFSR is x^16 + x^12 + x^3 + x^1 + 1. Which means that my tap positions are 1, 3, 12 and 16.     Question 6: Generate the full key stream in order to be able to decrypt the   cipher text you intercepted (i.e. what you were given)   From this question, I have no idea what to do. I don't exactly understand how multiple taps work. I understand that with one tap position you are able to XOR and obtain last bit for every cycle. My fundamentals are weak, and most resources come with a difficult mathematical explanation which I cannot understand.

Edit  Does the state register (the LFSR) always have to remain with 16 bits (I'm assuming yes).  If so, are we shifting the register right by one (lfsr>>1) and inserting the output bit onto the left-most bit (lfsr>>1 | bit<<15) which allows us to wraparound within the same 16-bit address space.  So with this in mind, how does one generate the continuous keystream given:  seed: 1100101001110101  taps: 3, 12, 14, 15    Assuming you are given the following information:  Seed: 1100101001110101  Key Fragment: 000100011110101100001101101111101  And the following ciphertext/encrypted stream: 10101011000000010010110011001100101000010101010101010111101111110111010000010011  I am seemingly unable to decrypt the entire text into some ASCII values (UTF-8 decoded). I initially wrote a Berlekamp-Massey implementation and an  to grab the tap positions of the above key fragment, which returned the following polynomial:  $$x^{15} + x^{14}+x^{12}+x^{3}+1$$  Fibonacci LFSR implemented in Rust:  fn next(&mut self) -> Option<(u16, u16)> {     self.bit = ((self.lfsr >> self.taps[0]) ^ (self.lfsr >> self.taps[1]) ^                 (self.lfsr >> self.taps[2]) ^ (self.lfsr >> self.taps[3])) & 1;      self.lfsr = (self.lfsr >> 1) | (self.bit << 15);      if self.lfsr != self.seed {         Some((self.bit, self.lfsr))     } else {         None     } }    The key fragment never appears in the generated key stream, indicating something probably went wrong. The decrypted cipher doesn't map to ASCII values, just cryptic UTF-8 symbols.   The Berlekamp-Massey implementation is based off of the following whitepaper -   And the full code can be found here -


Consider a setup of an experiment to measure the photoelectric effect. We have a photodiode which is linked to an ammeter and a source of voltage which can apply voltage in either direction. Let the light shone onto the photodiode be such that the energy of photons exceeds the work function of the metal and a current is observed to flow when the voltage is set to zero.  I understand that when a reverse voltage is applied - one that opposes the flow of electrons through the diode - eventually a stage is reached when the kinetic energy of even the most energetic electrons cannot overcome the potential energy attracting the electron back in the direction it came, and no current flows because no electrons reach the other side of the diode.  However, what I don't understand is that when a voltage is applied in the same direction as the electrons, the current does not increase. However, it looks to me as if the current is dependent on the kinetic energies of the electrons, because when the kinetic energy of the electrons is restricted by a reverse voltage, the current drops.  I like to compare this to an analogy of an object being thrown off a high place. The gravitational force at the top of the cliff depends on the height, and a change in height could be compared to a change in voltage - they both lead to a change in the potential energy of the object/electron. The initial velocity of the object when it is thrown downwards is analogous to the initial kinetic energy on the electron created by the photoelectric effect. It remains constant, no matter from what height you throw the object.  With this analogy in mind, it looks to me as if it does not matter what height you throw the object down from - it will always have the same kinetic energy when it hits the bottom. This is obviously incorrect in mechanics, but seems to be the case in the photoelectric effect.  What is going on here?

While studying photoelectric in my school, my teacher drew a graph of current versus the potential difference across the two electrodes:    I am not able to understand why do we get saturation current. I know that at saturation current all the electrons emitted from the metal surface are able to reach the other electrode. My question is suppose we increase the potential difference between the two electrodes further. I think that one of the following two things should happen:   current may increase as now the electrons in the wire will be under greater potential difference thereby reducing the time in which the electrons complete one round to reach the same point again and hence increasing current. ($V=IR$) current may not be continuous (steady current might not be achieved) as the time taken by the photoelectrons to reach the positive electrode may be more than the time taken by the electrons inside the wire to go from end of the wire nearer to the positive electrode to the  other end.   So in no case should we get a graph as shown in the link.  It may be that I have not understood the photoelectric effect completely. If that is the case please tell me where am i wrong?


When stepping through C# code, I notice that the debugger stops three times in a foreach declaration:   First, it highlights the collection. Then, it highlights the in operator. Last it highlights the variable.   I'd like to understand what the debugger is doing. For example, it makes sense in a for loop. During initialization, it assigns the variable, then checks the condition. At the beginning of each subsequent loop, it updates the variable, then checks the condition.  It seems in a foreach, it would need to get an enumerator at the in operator during initialization, then only assign the next item at the beginning of each loop.  I'm using Visual Studio.

Which types of classes can use foreach loops?


I have an Ubuntu 18.04 cloud server. Every week lately I get an email from cron reminding me that there's an upgrade to 20.04 available. I get it, cron. I really do. I'd like to stop this reminder only without disabling cron emails in general. How can I notify my buddy cron that I'm aware of the upgrade and they can stop emailing me about it?

I have an Ubuntu 14.04 server installation that consistently sends a weekly email, from the root user, with the following content:  /etc/cron.weekly/update-notifier-common: New release '16.04.1 LTS' available. Run 'do-release-upgrade' to upgrade to it.   How do I stop these emails, without upgrading to 16.04? Is there a method that doesn't involve disabling the script mentioned in the first line of the email?  Ideally I'd like to allow /etc/cron.weekly/update-notifier-common to continue to run, calling the /usr/lib/ubuntu-release-upgrader/release-upgrade-motd and /usr/lib/ubuntu-release-upgrader/check-new-release scripts, but stop new release messages. It would be useful for these scripts to still warn if my current release becomes EOL.


How can I calculate $$\sum_{n=1}^{+\infty}\frac{1}{n\sqrt{n+1}+(n+1)\sqrt{n}}$$   ? Can someone help and explain too?


There are two classes:  class A {    protected IntPtr i;    public A(A copy)    {       this.i = SomeStaticClass.Copy(copy.i);    }    protected A(IntPtr ds)    {       this.i = ds;    } }  class B : A {     public B(A init)     {         SomeStaticClass.doSomethingWith(init.i); //Cant access this field.     }      public void AnotherMethod(A asd)     {         SomeStaticClass.doSomethingWith(init.i); //Cant access this field again.     } }   Field "i" in A class may controll the unmanaged code, so it's should'nt be public.  And I dont wanna make a copy of A (whinch gonna call some unmanaged code to copy i field, whinch is taking some time), this constructor of B is just converting A to B.  Why do objects of class B cant access objectOfA.i field?  Is there any way to fix that problem?

class MyBase {     protected object PropertyOfBase { get; set; } }  class MyType : MyBase {     void MyMethod(MyBase parameter)     {         // I am looking for:         object p = parameter.PropertyOfBase;  // error CS1540: Cannot access protected member 'MyBase.PropertyOfBase' via a qualifier of type 'MyBase'; the qualifier must be of type 'MyType' (or derived from it)     } }   Is there a way to get a protected property of a parameter of a type from an extending type without reflection? Since the extending class knows of the property through its base type, it would make sense if possible.


I'm working with VS2015 and C# on a console application in which I'm logging info for the end-user while the application is running.  In one situation I want to show the user per example that items of a list are handled.  So I want to write an info like "Item 1 of 100 is handled".  With Console.WriteLine I would get a lot of lines which are standing under each other.  Do I have a chance to write the info in the same line at the same place?  What I mean is, I want to write a new line with "Item 1 of 100" and then writing at the same line and place "2 of 100", "3 of 100" and so on.

I have a console application project in C# 2.0 that needs to write something to the screen in a while loop. I do not want the screen to scroll because using Console.Write or Console.Writeline method will keep displaying text on console screen incremently and thus it starts scrolling.  I want to have the string written at the same position. How can i do this?  Thanks


Needed to know if an HTML element can have multiple attributes of ID's, for instance :  <input type="text" id="identifier1" id="selector1" />   As I needed to clarify this statement mentioned about selectors at .     If an element has multiple ID attributes, all of them must be treated   as IDs  for that element for the purposes of the ID selector.  Such a   situation could be reached using mixtures of  xml:id, DOM3 Core, XML   DTDs, and namespace-specific knowledge.   The Possible duplicates which people are referring, states question for this syntax  <input type="text" id="identifier1 selector1" />   which is different than syntax that I am asking.

I understand that an id must be unique within an HTML/XHTML page.  My question is, for a given element, can I assign multiple ids to it?

   I realize I have an easy solution with simply using a class. I'm just curious about using ids in this manner.


If your comment is less than one minute old at the time you click submit (meaning, not when you click the edit button) the little pencil will not come up:   This is because if your comment is less than one minute old the most likely reason you are editing it is to fix a grammatical error. Good idea?

There is currently a 5-minute grace period on edits on questions and answers where editing it does not cause a new revision in the history.  I'd appreciate a similar grace period on comments, perhaps 30 seconds or so. Call me clumsy but I'll very often notice a tiny slip or unclear wording I want to correct immediately after posting a comment, but even if an edit is done within 10 seconds it still incurs the penalty of having the pencil icon stuck next to it.  This doesn't seem like the best use of the pencil icon, because when a comment is that new it's probably been scarcely seen in its original form and the edit is not likely to lead to abuse that would cause things to be read out of context (no more so than deleting a comment, anyway). The pencil icon would be more meaningful if it was reserved for non-immediate changes.


I just switched from Windows 8 to Ubuntu 13.04. I installed UFW GUI interface for the firewall. In the listening report it shows the something called dhclient and avahi-daemon running in a few ports.  I google both, but could not find a clear answer on if I need them and if not how do I turn them off. The only things I use my home computer for is the internet (Midori browser), steam and arduino.  Any help would be appreciate.

For some reason I need to disable a system service on boot. In my case this is the Avahi Daemon. I just don't want it to start on boot.  In previous Ubuntu releases (e.g. 12.04) I could do  sudo update-rc.d avahi-daemon disable   However on 14.04 it shows  update-rc.d: warning:  start runlevel arguments (none) do not match avahi-daemon Default-Start values (2 3 4 5) update-rc.d: warning:  stop runlevel arguments (none) do not match avahi-daemon Default-Stop values (0 1 6)  System start/stop links for /etc/init.d/avahi-daemon do not exist.   And Avahi is started on boot. How can I disable this? I'm looking for a command line way of doing this.  And please care to explain what happened here? Some change in a recent Ubuntu release broke the use of update-rc.d? I suspect I'm missing something here.


so basically i dont know whats going on with my mac. please look at the images bellow.   there are several problems with this picture. first, adding up storage volume of my drives is 104gig and 121 - 104 = 17gig . but at the top it says 11gig free. second , in my Documents it says 17gig usage but when u add the contents of folders and files in documents it is hardly 10gig .third, why my system drive takes 77gig space?? . how can i get a better look at my usage with good details. i m so confused.

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


I have the following python code:      if direction == 0: # Left         moved = self.slideLeft()     elif direction == 1: # Right         moved = self.slideRigth()     elif direction == 2: # Up         moved = self.slideUp()     elif direction == 3: # Down         moved = self.slideDown()       if(moved):   I know there is no swith statement in python but i am curious if there maybe is a nicer way to write this. Btw moved is just a Boolean

I want to write a function in Python that returns different fixed values based on the value of an input index.    In other languages I would use a switch or case statement, but Python does not appear to have a switch statement.  What are the recommended Python solutions in this scenario?


How can I install Ubuntu 13.10 alongside windows 8? This option doesn't appear in the installation menu

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I’m currently studying for a particle physics module about the standard model and there is a lot of material on Lagrangians (curly L) and actions (S).  I’m not quite sure what both of these quantities signify/mean physically. From what I gather a Lagrangian kind of describes the energies that contribute to particular forms of matter but I may be wrong.  If anyone can give me a reasonably simple description of what these quantities do/describe I would appreciate it.

The action  $$S=\int L \;\mathrm{d}t$$  is an important physical quantity. But can it be understood more intuitively? The Hamiltonian corresponds to the energy, whereas the action has dimension of energy × time, the same as angular momentum.  I've heard the action being described as a measure of change, although I don't know how this description can be justified.


Is it OK to ask a question on a Stack Exchange site that could have several different answers (like a brainstorm) or must all questions have a single, correct answer?  The help section said not to ask for people's opinion, which I don't plan to.  But I'm wondering if a more open-ended question (that has multiple practical answers for a real problem) is allowed.

I lead a team of 600 people in over 70 countries.  I often would like their input on one of my ideas and I don't want to use a survey because they tend to limit creativity by requiring a choice among predetermined answers.  Let's take a simple example.  I want to get the European team together next year.  I want the team to select the location of the meeting.  Could I use The Workplace exchange to ask the following question "Where should we meet in Europe next year?" and then invite my 100 team members to submit cities and/or vote on cities already submitted?  This doesn't seem to be in the spirit of Stack Exchange (I've only discovered this today), and I don't want to break etiquette.  If I can't use Stack Exchange for this purpose, is there another site out there that would allow people to submit ideas and/or vote on ideas submitted?


this question is more of the understanding of .run installation, when you download a file and use .run to install it, does it actually interact with Linux's package manager, or does it work just like a portable program, where once you delete the installation path, it's gone?  For example, if I download Qt Creator which has a .run file, and I install it in Documents/Qt, does that mean it's installed in that path and once I delete that folder it's gone from my system?

My PC has both Ubuntu and Windows 7 installed. I have installed all my drivers in Windows like Nvidia graphics, motherboard etc. Shall I install them in Ubuntu too?  I looked on the web for my Nvidia drivers and I have found a .run file. How could I install it on my Ubuntu?


So since ES6 all functions are block scoped in strict mode, but "var" ignores block scope, then why code below gives a reference error? 'use strict' function asd() {   var ssss = 5; }  console.log(ssss); //reference error  for (const item of arr) {   var sss = 5; }  console.log(sss); //5

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?


If a user asks for upvotes in the comments in Stack Overflow will it be considered as an ABUSE? CONTEXT: A user answered my question and I accepted the answer but didn't upvote. Then they commented,  "Consider upvoting if you found my answer helpful".  I was wondering if asking them (in the comments) to upvote my question in return to the upvote that I make in their answer, would be considered as an abuse.

Some times people accept the answer but don't upvote it. When this happens to me I'm always tempted to ask them to upvote it, but I don't know if I'll look rude or needy lol. Should we ask for upvote when our answer is accepted or just let it go?  (It just happened to me )


I am having difficulties with this proof--Hints will be appreciated.  Prove that for any sets $A$ and $B$, if $\mathcal{P}(A) \cup \mathcal{P}(B) =  \mathcal{P}(A\cup B)$ then either $A$ is a subset of $B$ or $B$ is a subset of $A$.

I came to point where I suppose for case 1 that $A\subseteq B$ and conclusion is trivial. For case 2 I suppose that $A\not\subseteq B$ and try to prove $B\subseteq A$, but that gets me nowhere. Any pointers here are most welcome.


I'm just working through some flags, and I notice that some answers allow a choice of NAA and VLQ (among others), but some particular questions don't allow VLQ.  For example, for , which I think shouldn't be "Not an answer" (because it is, it's correct, it's just very poor on content), so I'd like to flag it as "Very low quality". However, the flag options I'm shown are just these:    Where has the "Very low quality" option gone? It's ok for many other answers.

On posts with a positive score, the very low quality flag option isn't enabled. This is great for many instances - if a post is +7, it's most likely high quality. We don't want unexperienced users flagging those.  However, this brings with it a problem when flagging link-only answers. Relatively often, a link-only answer will have a positive score - the link is useful. If the score is just +1, I downvote it, flag, and move on. If it's +2 or above, though, I'm kinda stuck.   I could use a custom flag, but 10kers don't get to see those - meaning the mod workload just got that much heavier. I could flag it as NAA, but it is an answer. It's just very low quality.  So, I propose that the VLQ flag option be reneenabled on positively-voted posts for users with x helpful flags - maybe 500? 1000? 50? The details can be worked out.  Opinions? Huge, gaping holes in my reasoning?


Prove that a group with more than one element contains an element of prime order.

Let $G$ be a finite group with more than one element. Show that $G$ has an element of prime order


I would like to use two types of footnotes. The first are standard footnotes used throughout the body of the text and which are numbered sequentially. The second are footnotes used in a few chapter titles, which I want to have a single static symbol (e.g. *), these should not increment and should not interact with nor affect the bodytext footnotes.  If possible, and a simple method exists, I would like to avoid using another package.  I had thought of using \footnotemark and \footnotetext, but I am not sure how. Any suggestions?

I was wandering if there's a way to make only one footnote appear with a symbol (*) instead of the number.  Thanks!!!


This is the main class:-  import javax.swing.JFrame;  public class RR {     public static void main(String[] args) {         RegionalResource object = new RegionalResource();         object.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);          object.setSize(500,500);         object.setVisible(true);     } }   Here's the other class:-  import java.awt.*; import java.awt.event.*; import javax.swing.*;  public class RegionalResource extends JFrame {     private JComboBox box;     private JLabel picture;      private static String imagenames[] = {"1.png", "2.png"};     private Icon images[] = {new ImageIcon(getClass().getResource(imagenames[0])), new ImageIcon(getClass().getResource(imagenames[1])) };      public RegionalResource() {          super("Tourism Information Provider");         setLayout(new FlowLayout());          box = new JComboBox(imagenames);          box.addItemListener(                 new ItemListener() {                     public void itemStateChanged(ItemEvent event) {                         if(event.getStateChange() == ItemEvent.SELECTED)                         {                             picture.setIcon(images[box.getSelectedIndex()]);                         }                     }                 }             );         add(box);         picture = new JLabel(images[0]);         add(picture);     } }   When I run the program (in eclipse oxygen 2), it results in the following error  Exception in thread "main" java.lang.NullPointerException  at javax.swing.ImageIcon.<init>(Unknown Source) at RegionalResource.<init>(RegionalResource.java:11)  at RR.main(RR.java:6)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


is there any way to automatically log off a guest account after 10 minutes of login? I want to log out of the account every 10 minutes immaterial of whether it is active or inactive. Is there a way to accomplish that on Mac?

As part of a kiosk system, I have set up a Guest account on a Mac OS X Snow Leopard computer. This account is cleared every time someone logs off the computer. However, plenty of people don't. Is there any way that I can automatically log out this guest account after a period of inactivity?  I tried using the security preferences pane, but that just causes the confirm logout dialog to show up.  I have hacked around the /System/Library/User Templates/ folder, so I can set the screensaver, desktop background, &c. If something like ScriptSaver can solve my problem, I will gladly use it.


I want to create filtered ls function in C which takes path to file or dir and outputs only files and directories allowed by passed filter function. This filter function have to take at lest two arguments. The question is, how do I pass arguments that are "stored" in ... of the parent function? Something like this: #libs here  //let assume I have this filter. //So, file should be regular and its' size should be less than maxSize int  regfile_size_filter(const char *name, struct stat info, off_t maxSize) {     return S_ISREG(info.st_mode) && info.st_size < maxSize; }  //here is filtered ls function //second argument is a pointer to the filter function //which take at least two parameters - name of a file and its' stat void  filtered_ls(const char *path, int (*filter)(const char *, struct stat, ...), ...) {     //let's open passed dir, then copy path somewhere else for later use.     DIR *dir = opendir(path);     char fullpath[PATH_MAX];     snprintf(fullpath, PATH_MAX, "%s/", path);     size_t fplen = strlen(fullpath);      //now let's read the directory     struct dirent *dinf;     while (dinf = readdir(dir))     {         //cat strings so we could get info with stat function         snprintf(fullpath + fplen, PATH_MAX - fplen, "%s", dinf->d_name);                  //skip file if stat failed         struct stat info;         if (lstat(fullpath, &info) == -1)             continue;          //------> here is the problem: //        how do I pass extra argument into filter function? //        I know about va_arg, but how do use it here?         if (filter(dinf->d_name, info, ...))             printf("%s\n", fullpath);          //same goes for recursive call         if (S_ISDIR(info.st_mode))             filtered_ls(fullpath, filter, ...);     }     closedir(dir); }  int main(int argc, char **argv) {     if (argc < 3) return 1;     char *dirPath = argv[1];     int maxSize = strtol(argv[2], NULL, 10);      filtered_ls(dirPath, &regfile_size_filter, maxSize);     return 0; }

In C, is it possible to forward the invocation of a variadic function? As in,  int my_printf(char *fmt, ...) {     fprintf(stderr, "Calling printf with fmt %s", fmt);     return SOMEHOW_INVOKE_LIBC_PRINTF; }   Forwarding the invocation in the manner above obviously isn't strictly necessary in this case (since you could log invocations in other ways, or use vfprintf), but the codebase I'm working on requires the wrapper to do some actual work, and doesn't have (and can't have added) a helper function akin to vfprintf.  [Update: there seems to be some confusion based on the answers that have been supplied so far. To phrase the question another way: in general, can you wrap some arbitrary variadic function without modifying that function's definition.]


I have been looking at the following coding problem. There is a building of 100 floors.  If an egg drops from the Nth floor or above, it will break. If it's dropped from any floor below, it will not break.  You're given two eggs.  Find N, while minimizing the number of drops for the worst case. Looking at the solution in the Cracking the Coding Interview book I can see the equation for 100 floors as ( X ( X + 1 ) / 2 ) = 100 If we distribute X we are left with a quadratic equation and we can use the quadratic formula to solve for X and use that as our interval.  My issue is that I am not sure how that equation is derived in the first place. The following code solves this problem: bool drop( int floor ) {     return ( floor >= breakingPoint ); }  int findBreakingPoint( int floors ) {     int interval = 14;     int prevFloor = 0;     int egg1 = interval;     while ( !drop( egg1 ) && egg1 <= floors ) {         interval--;         prevFloor = egg1;         egg1 += interval;     }      int egg2 = prevFloor + 1;     while ( ( egg2 < egg1 ) && ( egg2 <= floors ) && ( !drop( egg2 ) ) ) {         egg2++;     }      return egg2 > floors ? -1 : egg2; }  Can anyone help me out on this?

One of those classic programming interview questions...  You are given two marbles, and told that they will break when dropped from some certain height (and presumably suffer no damage if dropped from below that height). You’re then taken to a 100 story building (presumably higher than the certain height), and asked to find the highest floor your can drop a marble from without breaking it as efficiently as possible.  Extra info   You must find the correct floor (not a possible range) The marbles are both guaranteed to break at the same floor Assume it takes zero time for you to change floors - only the number of marble drops counts Assume the correct floor is randomly distributed in the building


private void calculateTotalValue() {     DefaultTableModel dtm=(DefaultTableModel) tableDetail.getModel();     double total=0;     for(int i=0;i<dtm.getRowCount();i++){         total =total+(double)dtm.getValueAt(i, 4);     }     totallbl.setText(Double.toString(total)); }   total =total+(double)dtm.getValueAt(i, 4); this line throws the NullPointerException  But I can't understand why it is happening?


I want to iterate through the HashMap and this is part of the code:  HashMap<Long, Integer> users = ((HashMap<Long, Integer>) getArguments().getSerializable("HashMap"));  Iterator it = users.entrySet().iterator();      04-25 19:13:31.070: E/AndroidRuntime(1446):   java.lang.NullPointerException: Attempt to invoke virtual method   'java.util.Set java.util.HashMap.entrySet()' on a null object   reference   I looked at the users variable and it does contain a table with keys and values.


Once again I am trying to find about a story I read decades ago in translation (I do not remember the title in Italian, either). The main topic was a world where genetic engineering had starter producing "Fantasy" creatures (including satyrs, dragons) until for some reason tech-based civilization collapsed and the survivors were living in something that superficially resembles a Fantasy world.  If memory serves the book opens with a short scene where three "creatures" (including, but I am not sure anymore, a sort of werewolf) kill the family of the protagonist.   --- Some extra info as per requests in comments  a) It was probably a novel, definitely not a short story: it is difficult to say because it was published as part of a series that churned out lots of (translated) American and British works... but unfortunately in order to keep the throughput costant and make the page number more or less uniform, the editors often made extensive cuts to the original content (e.g. a couple of chapters completely removed from "The Shrinking Man"). For fellow Italians: Yes,  I am talking of .  b) As per point (a): it is difficult to know the publishing date of the originals - Urania started publishing in 1952 but they often reprinted their content so in 80s you could still get an "Issue" with a story that had been originally published 10 years before, and whose American first edition was maybe even older. I think that the original was maybe from the 70s (I doubt that Genetic Engineering was really a common trope in the 60s), but I really have no idea.

id needed for a Sci-fi/Fantasy novel....mid to late 1980's. The only thing I can remember was the book was set in the future.  There was a guy (main character) who was on a quest.  He had several companions with him.  The one that stands out in my memory was a cat who had been 'gene-spliced' 'manufactured' with human DNA and had the brain/intelligence of a human.  The whole society was super into genetic modification.  the cat was a girl...and maybe the face of the cat was that of a woman and not a cat's face..


I have thought a lot on this point but now needs help. If Universe is Infinite, Then we must be receiving Infinite energy from infinite stars and systems. So what's going on?

The question is the well-known      If there are so many/infinite stars, in every direction, why is it dark at night? Where goes all the light we don't see?    Discussing with a friend we found different answers.   The first (my friend's answer) is that given the fact that in a finite amount of time (in this case, the age of the universe), light can travel only a certain, finite, distance, we cannot see, if they actually exist, stars farther than such distance (about 13 billions of years, I guess). Then he states (or better, I got him notice he implicitly does this)  that within this radius there aren't enough stars to fill the night sky, and that's why we have darkness without sun's light.   The second answer (mine, or anyway the one I heard from a minutephysics YouTube video) is that despite of the big size of the observable universe, cosmological expansion red shifts most of the light out of the visible radiation range, so that the majority of light can't be seen by our eyes at night, while if we use, for example, an infrared camera, we should see a brighter sky, and lenghtening more and more the wavelength at which we observe the sky, we come to the uniform background radiation.  So my question is, what is the right answer? Is it one of the above-mentioned or even a third one?  EDIT: I've seen both answer may be acceptable, but what is the main contributing phenomenon?


I wish I could remember more of this book.  The overall premise was that there were humans living within a comet, possibly even Halley's Comet.  I don't remember how they got there, but it was not something like a lost offshoot of the race.  They were the result of a mission to the comet or they were refugees.  They had tunnels running throughout the comet and had adapted to the difficult living situations and I think they had even evolved.  In the story, I think the comet was making its first approach toward the Sun after many years (I think so many that it likely wasn't Halley's Comet, but it might have been).  My memory is very sketchy, but I think they had to deal with not only the issues of the destabilization of their world as it approached the Sun, but also with the rest of humans on the Earth either wanting to land on the comet or bring it in or something else -- I don't remember what, but there was either some kind of conflict with Earth or Earth was totally disinterested in helping them as they swung so close to the Sun.  It was definitely a hard science book and I think the author was well known, but I don't remember for sure on that last point.

I'm trying to remember the title of a book.  The plot was a group of people are stranded on a comet or asteroid.  They establish kind of a colony inside it, and rig up rockets on the surface to move it.  Some of the people discover some sort of algae type life form inside it, which bonds with and mutates people helping them to survive.  They set the asteroid to head for Earth but have to change the course when authorities on Earth threaten to blow the asteroid up because of the mutations.


I want to know where the system will search for dynamic libraries. Let's take nxclient as an example. ldd /usr/NX/bin/nxclient gives me some output, for example   libpng12.so.0 => /usr/NX/lib/libpng12.so.0 (0x00007fcb4a16f000)   Now why did the system select /usr/NX/lib/libpng12.so.0 and not for example /usr/lib64/libpng12.so.0? Both exist. Where is this configured? /etc/ld.so.conf* does not contain /usr/NX and my $LD_LIBRARY_PATH is empty.

I understand how to define include shared objects at linking/compile time. However, I still wonder how do executables look for the shared object (*.so libraries) at execution time.  For instance, my app a.out calls functions defined in the lib.so library. After compiling, I move lib.so to a new directory in my $HOME.  How can I tell a.out to go look for it there?


I'm doing an undergrad research project that lies at the intersection of biology and nonequilibrium thermodynamics, but I'm starting to realize almost none of my equilibrium thermo/stat mech knowledge carries over.  What's a good book on this subject that covers both near-equilibrium (e.g. linear response) results, as well as more recent far-from-equilibrium (e.g. Jarzynski and Crooks equalities) results? Coverage of nonequilibrium steady states and simulation methods is a plus.  I'm going for a physical understanding, not complete mathematical rigor; I know real/complex analysis but not, say, probability theory or functional analysis.

What is a good textbook on statistical field theory,  with an emphasis on applications to non-equilibrium phenomena?  I am a final-year undergraduate, have already taken introductory classes in statistical physics and quantum mechanics but do not know a lot of quantum field theory yet. I would like to better understand nonequilibrium phenomena, phase transitions and spontaneous symmetry breaking in condensed matter systems.


While going through a  (Problem $17$) of interesting integrals I have come across this one     $$\int_0^1 {\sin \left( {\pi x} \right)} x^x \left( {1 - x} \right)^{1 - x} \mathrm dx = \frac{{\pi e}}{{24}}$$   I have tried integration by parts with $u=x^x \left( {1 - x} \right)^{1 - x}$ and $\mathrm dv=\sin \left( {\pi x} \right)$ but this ended up in and even more complicated integral. To use the series representation of $e^{x\ln(x)}$ and respectively $e^{(1-x)\ln(1-x)}$ does not appeared to be helpful at all even after reshaping it all in the form $(1-x)\left(\frac{x}{1-x}\right)^x$. Then I thought about using Euler's Reflection Formula to get rid of the $\sin(\pi x)$ and work in terms of the Gamma Function instead. Hence this formula only holds for $x\notin\mathbb{Z}$ $-$ and the limits are given by $0$ and $1$ $-$ I guess this is not possible here. My last try was to use the Weierstrass Expansion of the sine function but I guess this is not the right approach either.     Could someone please provide a whole solution since I have no further idea how to deal with this integral? I have searched here on MSE but it does not seem like someone hast asked something like this before. Nevertheless tell me when I have overseen something or when you can link a former question which is helpful for understanding the process of evaluating this definite integral.   Thanks in advance!

I've found  the following integral.  $$I = \int_{0}^{1}\sin{(\pi (1-x))}x^x(1-x)^{1-x}\,dx=\int_{0}^{1}\sin{(\pi x)}x^x(1-x)^{1-x}\,dx=\frac{\pi e}{24}$$  I've never seen it before and I also didn't find the evaluation on math.se. How could we verify it?  If it is a well-known integral, then could you give a reference?


I am new to all of this Linux stuff, so I'm not to good at understanding some of the terminology. Either way, I installed Lubuntu using UNetBootin and it said that I could use something like persistant or live storage. I agreed because I want to have my computer on the go in case if I am using my friend's computer or something in that context. However, I don't know how to use live data. Should I always have my USB connected? How do I move or have my apps and files in the USB? I hope you guys can answer this question soon. If you need more information, I would be glad to help the most as I can.

I've created an Xubuntu 18.04 persistent live USB stick and installed several softwares for web development, such as XAMPP, Sublime Text 3, Google Chrome, etc.. I did some configurations as well in the ~/.bashrc file.  I am wondering if these installation and configuration in my persistent live USB stick be carried over in a full installation in to a new machine using it.


I am stuck with this code and don't understand the error. I'm trying to make a forward declaration of template specialization in a header and then define this specialization in a source file. When I try to include this header, compiler complains that I'm using incomplete type.  Error:   $ error: invalid use of incomplete type 'A_Template<Stub *>'   std::cout << A_Template<Stub*>().int_method() << std::endl;                ^~~~~~~~~~~~~~~~~~~ $ note: forward declaration of 'A_Template<Stub *>' struct A_Template<Stub*>;        ^   /* a.h */ #pragma once template <class T> struct A_Template{};  class Stub{};  template<> struct A_Template<Stub*>;   /* a.cpp */ #include "a.h"  template<> struct A_Template<Stub*> {     int int_method() {return 42;} };   /* main.cpp */ #include <iostream> #include "a.h"  int main() {         std::cout << A_Template<Stub*>().int_method();     return 0; }   Can anyone tell me what is wrong and is there a way to fix it?

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


I have got Win 8 on my SSD and I want to install Ubuntu on my HDD. Can I? Thanks. My SSD is 120 GB and when I try to access it gives this error in "trying Ubuntu" :  Error mounting /dev/sda2 at /media/ubuntu/2284BD1E84BCF57F: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=999,gid=999,dmask=0077,fmask=0177" "/dev/sda2" "/media/ubuntu/2284BD1E84BCF57F"' exited with non-zero exit status 14: Windows is hibernated, refused to mount. Failed to mount '/dev/sda2': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   Thanks for advance.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


The attached screenshot is from a schematic in a datasheet.  I know that the flat-topped arrow is a diode, but I don't know what the pair of looped circles are.  Can anyone help me out?  If there's a good online symbol reference, please share the link!    Thanks!


Ok so I am reading what has already been asking about NPE on here but I can't seem to find anything that will help with my code. It says that It is being thrown at .searchCollection(COLLECTION_NAME).   public class PantryDataStorage {  private static final String COLLECTION_NAME = "pantry"; private static HashMap<String, PantryItem> pantry = getDatabaseItems(); private static String API_KEY = "c3672b0c-b96c-4145-8b75-bd6895b5458e"; private static OrchestrateClient client = new OrchestrateClient(API_KEY); ShoppingItem shoppingItem = new ShoppingItem();    public static void savePantryItem(String itemName, PantryItem updatedPantryItem){      pantry.put(itemName, updatedPantryItem);     client.kv(COLLECTION_NAME, itemName).put(updatedPantryItem).get().getKey();  }  public static void deletePantryItem(String itemName){      pantry.remove(itemName);     client.kv(COLLECTION_NAME, itemName)     .delete()     .get(); }  public static HashMap<String, PantryItem>getDatabaseItems(){      SearchResults<PantryItem> result = client             .searchCollection(COLLECTION_NAME)             .limit(100)             .get(PantryItem.class, "*")             .get();      Iterator<Result<PantryItem>> iterator = result.getResults().iterator();     HashMap<String, PantryItem> listHash = new HashMap<String, PantryItem>();      while(iterator.hasNext()){         PantryItem pantryitem = iterator.next().getKvObject().getValue();         listHash.put(pantryitem.getItemName(), pantryitem);     }     return listHash; } public static boolean itemConsists(String itemName){      pantry.containsKey(itemName);     return true; }  public static void iteratorMethod(){     Iterator<PantryItem> pantryItemIterator = pantry.values().iterator();      while (pantryItemIterator.hasNext()) {         System.out.println(pantryItemIterator.next());     }  }  }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm interested in teaching myself quantum mechanics, and I'm looking for a good goal to aim for.   I've got an undergrad maths degree and a graduate degree in probability theory and stochastic processes. I've worked fairly extensively with diffusion processes, so I understand how the Fokker-Planck equation works, for example.   As far as I understand, the Fokker planck equation is related to the Schrodinger equation via something called a Wick rotation. I'm a bit hazy on the details, but I think this may have been Feynman's approach to QM.  If anyone could recommend a text for someone with my background (linear algebra, group theory, ODE and PDE, probability), but with relatively little experience in physics, that would be very helpful.  The maths shouldn't be a problem, but there's a chance I'll just get bored unless I have a specific goal. Maybe deriving the emission spectra of various atoms, or understanding quantum computing. Any other suggestions?

I'm really interested in quantum theory and would like to learn all that I can about it. I've followed a few tutorials and read a few books but none satisfied me completely. I'm looking for introductions for beginners which do not depend heavily on linear algebra or calculus, or which provide a soft introduction for the requisite mathematics as they go along.  What are good introductory guides to QM along these lines?


My house is the tallest in my town.   My house is tallest in my town.      Are these two sentences the same or different in meaning?

For example:     I could not face being alone again and losing the person dearest to me.   I wonder why there is no "the" in front of "dearest".


If I watch The Simpsons in French for example then the lips movements match with the oral traduction.  Question: In general, are lips movements in animated films/shows modified to match traductions in languages different from the original one?  This seems like a lot of work to me, but I don't see how there could be a perfect match if it wasn't done.

For instance, I know that Toy Story 3 was released in several other languages besides English, did Pixar re-render the characters mouths to sync with the audio? Do traditional animation studios do this?  I would ask about television shows as well, but I'm fairly certain that the lower budgets means this never happens.


System details: Intel Core i5 2.50GH, Nvidia, 2GB RAM, 32bit O/S for both Linux and Windows.   Well I have been using Ubuntu 14.04 LTS for nearly 1 week. I have noticed whenever my laptop runs on Ubuntu its battery last only half an hour. On the other hand when I run laptop on Windows 7 battery last nearly 1 hour! This is amazing. I always thought Linux is far away than windows in every technical aspects. But unfortunately this is not true when it comes to power management technology! Well I did read some old posts in Ubuntu forum and here on askubuntu too. I see many experts (or at least experienced users) not acknowledging this fact and often they are saying this is simply not true. They showed many statistics from their end but to me none of them are convincing at all. However I myself did few tests and here is my test results...   I charged my Laptop during 5 hours seamlessly and then unplugged the power cable from main power supply and run my laptop on Ubuntu. Battery lasted only 28 minutes. Then again I charged my Laptop during 5 hours seamlessly and unplugged the power cable from main power supply and run my laptop on Windows 7. Battery lasted nearly 54 minutes.   I did this litmus test 2 times more. Here are the results....   1st Test - Ubuntu - 28m | Windows7 - 54m 2nd Test - Ubuntu - 26m | Windows7 - 1h 3rd Test - Ubuntu - 28m | Windows7 - 55m   So this is clear Ubuntu failed in race with Windows7. Well now my question is how to solve this problem? The only reason why I provided you test results is because some guys might start arguing that Ubuntu is not consuming more power than Windows and I know which is simple not true. At least in my tests I didn't get any evidence to agree with them.

This question is present as a matter of historical interest.  While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will be closed per the .   It is possible to greatly extend the usage time of a laptop or netbook running on battery by disabling various services and installing various packages.   What tricks or tips do people have for getting an extra hour or two out of their batteries?


Consider my example below. Example: 1. A man standing on grass(point) on earth surface. 2. He jumped. 3. And returned back, and he could find the same grass(point) under his foots. Right?  If earth is spinning, when he is on air (on jump) and return back to the earth surface, the grass(point) should be moved right or left side based on rotating direction of earth Right. But it did not happen on real scenario.   Newton told that as "Gravity". and the definition would be  the force that attracts a body towards the centre of the earth, or towards any other physical body having mass.  But from my example the man attaching with a earth surface by some force due to not only of earth's massive body, but also for it's spinning.   Because If gravity only about to mass means the man return back to earth surface is OK, but how could he feel like settle down on same place on earth surface that he stood before he jumps.  I am really curious about the answer.

I know there are similar questions on StackExchange but I think it is different and detailed.  The earth is spinning 465 meters/second so why don't we jump and land on a different location?  I googled about this question and I got some answers:   When we jump, we (and the atmosphere itself) also spin along with the earth so we don't land at a different location. (But why we are also spinning along with earth ?) The earth is so big and we are very small relative to earth so the tiny jump won't make any difference.   But according to answer 1, We are also spinning with the earth. But the question is, "why are we also spinning along with earth" ??  Regarding the answer 2, it won't make any difference but logically it doesn't make sense or I just don't understand it.  Here is the followup question,   "When we jump why don't we thrown out of earth due to centrifugal force of the spinning earth ??"  Please provide some detailed answer to these questions. With logic if possible.   This phenomenon is not possible I know, but even if it exists, then traveling will be so easy, we just have to hang on space (with help of helicopter etc.. ) and we can travel the whole world in 24 hours :D


Macbook air mid-2012 w/ Mountain Lion.  Whenever I wakeup from a long sleep and also on some random moments when it's on, i get DNS resolution failures for every server, with nslookup saying ;; connection timed out; no servers could be reached; however, direct connections to IP addresses work correctly, since (among others) Skype works perfectly.  This resolves by itself after more or less 5 minutes, when DNS resolution gets back to work correctly, both with nslookup and in other applications (browser etc.).  I have Google's DNS servers (8.8.8.8 and 8.8.4.4) configured both on my network preferences and on my wireless router's settings.  Possibly related but still unsolved:   Any ideas?

Some of my coworkers are having troubles on their Macs - DNS resolution does not work under Mac OS X. They're running Snow Leopard 10.6.8. They can use DNS in a Windows 7 virtual machine (VMware Fusion 3.1.3) running under OS X. The computers are 15" MacBook Pros, early 2011 model.  Things they've tried that have not worked:   turning airport on/off rebooting using wired connection instead wifi deleting connection credentials and adding it again turning off Mac firewall using fixed static IP manually setting DNS servers restarting mDNSResponder the fixes from    EDIT response Martín's answer:  • Can you ping the DNS you want to use?  $ ping apple.com ping: cannot resolve apple.com: Unknown host   • What is/are the IP address(es) of the DNS(s) you want to use?  This is a company DNS server that is given with DHCP, it works well for other people. I've also tried Google's 8.8.4.4 and 205.171.3.65 (which I found from GRC's DNS Benchmark to be the fastest).  • Have you tried using 8.8.8.8 (google) or any of the OpenDNS    208.67.222.222 or 208.67.220.220?  It doesn't work, see Google Chrome output:     The server at www.apple.com can't be found, because the DNS lookup failed. DNS is the network service that translates a website's name to its Internet address. This error is most often caused by having no connection to the Internet or a misconfigured network. It can also be caused by an unresponsive DNS server or a firewall preventing Google Chrome from accessing the network.   • Can you ping those hosts?  $ ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes 64 bytes from 8.8.8.8: icmp_seq=0 ttl=58 time=3.925 ms   • creating a blank user  A guest user account was created, the DNS issue was still there when using the guest account.  • nslookup and dig both work fine  $ nslookup www.apple.com 8.8.8.8 Server:  8.8.8.8 Address: 8.8.8.8#53  Non-authoritative answer: www.apple.com canonical name = www.isg-apple.com.akadns.net. www.isg-apple.com.akadns.net canonical name = www.apple.com.edgekey.net. www.apple.com.edgekey.net canonical name = e3191.c.akamaiedge.net. Name: e3191.c.akamaiedge.net Address: 184.24.141.15      $ dig @8.8.8.8 www.apple.com ; <<>> DiG 9.6.0-APPLE-P2 <<>> @8.8.8.8 www.apple.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11298 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0  ;; QUESTION SECTION: ;www.apple.com.   IN A ;; ANSWER SECTION: www.apple.com.  1041 IN CNAME www.isg-apple.com.akadns.net. www.isg-apple.com.akadns.net. 38 IN CNAME www.apple.com.edgekey.net. www.apple.com.edgekey.net. 8794 IN CNAME e3191.c.akamaiedge.net. e3191.c.akamaiedge.net. 17 IN A 184.24.141.15 ;; Query time: 4 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Tue Oct 4 09:25:28 2011 ;; MSG SIZE  rcvd: 158   • also flushing the DNS cache was done but it didn't help  sudo dscacheutil -flushcache sudo killall -HUP mDNSResponder   EDIT 2:   $ cat /etc/resolv.conf # # Mac OS X Notice # # This file is not used by the host name and address resolution # or the DNS query routing mechanisms used by most processes on # this Mac OS X system. # # This file is automatically generated. # domain {redacted}.com nameserver 8.8.8.8 nameserver 208.67.222.222


I'm trying to parse a string object that carries simple XML.  I have parsed XML files at the past but I can't use the code because it refers to files and not strings- please review the code I used for files and let me know how can I parse the same way string  object  code example:  DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse( GET_XML.toString()); doc.getDocumentElement().normalize();   xml example:  <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <TccSubscriptionData xmlns="tcc.generated.interfaces.com">     <MessageKey>         <MessageKey>12</MessageKey>         <Receiver>sc</Receiver>         <Timestamp>2018-06-20T14:33:22.968+02:00</Timestamp>         <ResponseType>Subscription</ResponseType>         <CorrelationId>0</CorrelationId>     </MessageKey> </TccSubscriptionData>

I have the following code:   DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(xmlFile);   How can I get it to parse XML contained within a String instead of a file?


I have a text file named links.txt which looks like this  link1 link2 link3   I want to loop through this file line by line and perform an operation on every line. I know I can do this using while loop but since I am learning, I thought to use a for loop. I actually used command substitution like this   a=$(cat links.txt)   Then used the loop like this  for i in $a; do ###something###;done   Also I can do something like this  for i in $(cat links.txt); do ###something###; done   Now my question is when I substituted the cat command output in a variable a, the new line characters between link1 link2 and link3 are removed and is replaced by spaces  echo $a   outputs  link1 link2 link3  and then I used the for loop. Is it always that a new line is replaced by space when we do a command substitution??  Regards

As per the following example, and as in  In bash, where has the trailing newline char gone?, I want to know "why" it happens    x="$(echo -ne "a\nb\n")" ; echo -n "$x" | xxd -p  # Output is: 610a62  # The trailing newline from the 'echo' command #   has been "deleted" by Command Substitution   I assume there must be some very significant reason for a shell action, namely Command Substitution, to actually delete some data from the command output it is substituting... but I can't get my head around this one, as it seems to be the antithesis of what it is supposed to do.. ie. to pass the output of a command back into the script process... Holding back one character seems weird to me, but I suppose there is a sensible reason for it...  I'm keen to find out what that reason is...


I am actually working on a Framework development, which means require a really strong coding methodology.  I am facing a problem where I do not know which System.Exception derivated class I need to throw. Basically the case is when I have a class with fields that can be optionnaly initialized by the constructor and that have methods using these fields. Which exception must I throw if the user did not initialized these fields? (which means they are null)  Here is an example:  public class MyConnection {     private Uri endpointUri;      public Uri EndpointUri     {         get         {             return this.endpointUri;         }          set         {             this.endpointUri = value;         }     }      public MyConnection()     {     }      public MyConnection(Uri endpointUri)     {         this.endpointUri = endpointUri;     }      public FileStream GetFile()     {         if (this.endpointUri != null)         {             // My doer methods         }         else         {             throw new TheExceptionINeedToThrow("endpointUri", ...);         }                     } }   Note that I have been reading the whole  chapter concerning exception handling and throwing and that I did not found any solution fitting this exact case. Or maybe I misunderstood something ...  Thanks for your help.  EDIT : The fact that I provide an empty constructor seems a bit confusing regarding my problem but it is completely voluntary. In some objects that have to comply with a range of different states that cannot be duplicated in multiple objects it is sometimes useful.

What exception should I throw if I encounter an illegal state - for instance, an initialization method that should only be called once being called a second time?  I don't really see any built-in exception that makes sense.  This seems like something that should be in the framework - am I not poking in the right spot?


In almost every derivation of a quantum theory (quantum mechanics or quantum field theory), we start with a classical theory using classical equations and quantize it (by imposing certain constraints on commutation relations, etc).   My question is, isn't the entire process of starting with a classical theory (which is less fundamental) and deriving a quantum theory (which is presumably more fundamental) backwards? Why should we expect the correct fundamental quantum theory that describes our universe to be derivable from a less fundamental (averaged over, approximation) classical theory?

I am now reading the quantum mechanics textbook by Dirac (chap. 4, $\S21$, p. 88).   He says that his quantization procedure does not include all possible systems in quantum mechanics and there are systems without a classical analogue.  How is this possible?


When a command is piped to another command in what way or in what format does the piped output exist/get sent? Is it a temporary file? Is it a string? And how does the command that receives the piped output decode/read that output?    Example:  echo "Someone string" | ./program | tail     Does the program "program" receive the output of echo as a file? How would the program read in that input?

When I just used pipe in bash, I didn't think more about this. But when I read some C code example using system call pipe() together with fork(), I wonder how to understand pipes, including both anonymous pipes and named pipes.  It is often heard that "everything in Linux/Unix is a file". I wonder if a pipe is actually a file so that one part it connects writes to the pipe file, and the other part reads from the pipe file? If yes, where is the pipe file  for an anonymous pipe created? In /tmp, /dev, or ...?   However, from examples of named pipes, I also learned that using pipes has space and time performance advantage over explicitly using temporary files, probably because there are no files involved in implementation of pipes. Also pipes seem not store data as files do. So I doubt a pipe is actually a file.


Hello can anyone help me solving this problem I don't understand what exactly is wrong and Hello can anyone help me solving this problem I don't understand what exactly is wrong Hello can anyone help me solving this problem I don't understand what exactly is wrong and Hello can anyone help me solving this problem I don't understand what exactly is wrong  MainActivity.java      public class MainActivity extends AppCompatActivity {       Button btnSearch,btnDailyEntry,btnNewCust;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          btnSearch.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 btnSearch = (Button)findViewById(R.id.btn_search) ;                 Intent intent = new Intent(v.getContext(),Search.class);                 startActivity(intent);             }         });         btnNewCust.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 btnDailyEntry = (Button)findViewById(R.id.btn_daily_entry) ;                 Intent intent = new Intent(v.getContext(),NewCust.class);                 startActivity(intent);             }         });         btnDailyEntry.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 btnNewCust = (Button)findViewById(R.id.btn_new_cust);                 Intent intent = new Intent(v.getContext(),DailyEntry.class);                 startActivity(intent);             }         });      }   }   activity_main.xml      <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"     android:orientation="vertical"     android:gravity="center">      <TextView         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="Daily Entry System"         android:textColor="@android:color/holo_blue_dark"         android:textSize="20dp"/>     <Button         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="Search"         android:id="@+id/btn_search" />       <Button         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="Daily Entry"         android:id="@+id/btn_daily_entry" />      <Button         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="New Cust"         android:id="@+id/btn_new_cust" /> </LinearLayout>

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm struggling a bit with my Special Relativity course. Most exercises are quite trivial and can be done without much effort, but when you really start to think and analyse why and how certain things are, they can get really complicated and I often find myself thinking for hours about these things.  In Moore's work Six Ideas That Shaped Physics: The Laws of Physics are Frame-independent he explains a bit about what originally sparked Einsteins work. I will explain it as far as I understand it and then underline what I do not quite get.   Maxwell published at the end of the 19th century a set of equations that describe the phenomena of electromagnetism. From these equations it can be concluded that the speed of electromagnetic waves are well defined since it depends on certain well established universal constants. This speed happens to be $c\approx 3.00 \cdot 10^8 \text{ m/s}$. It was known that the speed of light was very similar (no measurable significant difference) to the speed of electromagnetic waves and also that light behaved like a wave in certain situation (from work done by for example Fraunhover). Therefore it was assumed that light must also be an electromagnetic wave. Since there was no known isolated "carrier" for electromagnetic waves it was conjectured that some kind of ether must exist in which an electromagnetic wave could be produced, much like when you trow a rock in a pool it also creates ripples in carrier (water). The concept of ether was very unsatisfying to start with, since it was not measurable and had to be virtually everywhere. Michelson and Morley tried to prove the existence of this ether, since if it were to exist, it would produce an "ether wind" which would result in the speed of light being measured differently in the direction of rotation of the earth in comparison with the opposite direction of this rotation. However, nor Michelson and Morley nor any other physicist did find the existence of this "ether wind". They all found that the speed of light was measured exactly the same in each direction. Einstein concluded from this that the conjectured ether did not exist and that electromagnetic waves must therefore be able to travel trough vacuum, at the speed of light. Since no particular reference frame can be attached to vacuum we must conclude that the measured speed of light is independent of the reference frame and therefore that the Galilean transformations are incorrect (assuming the Maxwell equation and the postulate of relativity are true).   Now what I do not understand entirely (I do feel certain points a bit intuitively, but that is not enough for me):   How did the experiment of Michelson and Morley disprove the existence of the conjectured ether? What if the ether moves along with the direction of the rotation of the earth? In the last point I phrased the book by saying "no particular reference frame can be attached to vacuum". Why can't we think of vacuum as an inertial reference frame with an absolute speed of 0? Why is vacuum assumed to be part of every reference frame (so that the speed of light must be measured the same in every frame)? Basically: what is the fundamental difference between the conjectured ether and vacuum? Why did the assumption that light does not travel equally fast in all directions not violate the principle of relativity? Was it because electromagnetic waves were assumed to travel in an other reference frame (the ether) and not in the frame that generated the emission (for example earth)?   When I am talking about reference frames, I assume - in the context of this question - that they are inertial (also assuming earth is practically inertial).  Thanks a lot for taking the time to answer my questions. Best wishes to you all!

Why was the  refused by Modern Physics? If you please explain me, I just wanted to understand it more.


Here's my code:  using System; using System.Text; using System.IO; using System.Text.RegularExpressions; namespace ConsoleApplication33 {     class Program     {         static void Main(string[] args)         {             string line = "\"aaaaa\"" + "aaaaa" + "\"aaaaa\"" + "aaaaa" + "\"aaaaa\"";             line = Regex.Replace(line, "\".+\"", "");             Console.WriteLine(line);             Console.Read();         }     } }   I want get rid of "aaaaa" and keepaaaaa.  So with this string I should get aaaaaaaaaa.  But with the code I get nothing.  So how can I fix this?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I want to install  the latest Ubuntu version for the first time in my life.  My system is Windows 8, and I want to replace it without losings my files and documents.  Is that possible?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I have this  I'm trying to get the html inside the <app> tag, but can't seem to get it working. How can I fix it? The regex I am using is .match(/<app.*>(.*?)<\/app>/)[1];

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


Is it ok to Synchronize the SVN Repository directory using the rsync command. Will there be any issues, will the repository files get corrupted due to this? (I use rsync only when no one is using the repositories).

What is the best way to do Subversion backups (on a Debian based server).  Is it to use svnadmin?   svnadmin dump /path/to/reponame > reponame.dump   Or maybe just to tar the dir where the repositories are?  tar -cvzf svn.backup.tar.gz /var/subversion/   What are the pros and cons of the above?  Thanks  Johan    Update:  This is a small server with only a handful of repos.  So incremental backups are probably not needed,  I think it is better to focus on keeping it simple.  Update: I used packs wrapper script (that in turn was a wrapper for svn-hot-backup) to do a full backup and then did a full recovery on another clean computer. However I removed that "SVN_HOTBACKUP_NUM_BACKUPS=10" part since it was not working for me.  Please note that I feel it was kind of simple and the result was very close to just tar the dir.  But as Manni pointed out here to use svn-hot-backup/"svnadmin hotcopy" is a more reliable method,  since tar could create corrupt backups from time to time if you are unlucky.


I know when you get an up-vote on a question, your reputation score increases of 5, for an answer, it's +10, an accepted answer, it's +15 and finally, you accept an answer is +2 and there's more.   Well, I know very well how the reputation score works since I read this  which is very well explained.   My questions : When you down-vote a question or an answer, why it's only decreasing the reputation by 2 ? Why this doesn't have the opposite cost of an up-vote ?  As an example, if I down-vote a question, instead of -2, it would be -5. For question, -10 instead of -2. For what reasons did they choose this value (-2 for both) about down-voting ?  Thanks !

When we started Stack Overflow, we wanted to make sure that downvotes were more of a visual and psychological motivator than a punitive action. That's why    upvotes are +10 downvotes are -2, and cost the casting voter -1   However, recently, I've seen Marc Gravell and Jon Skeet both say similar things:     IMO, downvotes don't quite carry enough... -5 downvotes and +1 upvote (for sympathy) yields zero points overall; or it could even yield +10 points for a new user! I'd prefer to see, say, -4 points? -5 points?   I am starting to come around to this way of thinking. There are some users who ask a lot of questions that get downvoted heavily, but over time these users end up with a fairly sizable amount of reputation.  This doesn't feel right.  We are considering changing downvotes to -5, with the same -1 cost to the casting voter.  There really aren't that many downvotes in the system, so the net effect of this change would be to reduce rep growth for users who tend to get downvoted as much as they get upvoted. (Yes, I realize this is no panacea: over time, we'll still get rep inflation for marginal users based on sheer quantity; this is only one of several changes we are considering to help mitigate this.)  The other downside to this change, besides the obvious minor loss of rep for most users, is that it would force a global reputation recalc for every user. I think we're due for one of those anyway.


Let $(\mu_t)_{t\in I}$ and $(\nu_t)_{t\in I}$ be families of finite signed measures on a metric vector space $E$ and $\mu_t\ast\nu_t$ denote the convolution of $\mu_t$ and $\nu_t$. Assume $(\mu_t)_{t\in I}$ and $(\nu_t)_{t\in I}$ are bounded in total variation norm $\left\|\;\cdot\;\right\|$, i.e. $$c:=\max\left(\sup_{t\in I}\left\|\mu_t\right\|,\sup_{t\in I}\left\|\nu_t\right\|\right)<\infty,$$ and $(\mu_t)_{t\in I}$ and $(\mu_t\ast\nu_t)_{t\in I}$ are tight, i.e. for every $\varepsilon>0$, there is a compact $K_\varepsilon\subseteq E$ with $$\max\left(\sup_{t\in I}\mu_t(K_\varepsilon^c),\sup_{t\in I}(\mu_t\ast\nu_t)(K_\varepsilon^c)\right)<\varepsilon\tag1.$$  Now I would like to show that $(\nu_t)_{t\in I}$ is tight as well, i.e. given $\varepsilon>0$, there is a compact $K\subseteq E$ with $\sup_{t\in I}\nu_t(K^c)<\infty$.  The obvious candidate is $K:=K_\varepsilon-K_\varepsilon$. We easily see \begin{equation}\begin{split}(\mu_t\ast\nu_t)(K_\varepsilon)&=\underbrace{\int_{K_\varepsilon}\mu_t({\rm d}x)\nu_t(\underbrace{K_\varepsilon-x}_{\subseteq\:K})}_{\le\:c\nu_t(K)}+\underbrace{\int_{K_\varepsilon^c}\mu_t({\rm d}x)\underbrace{\nu_t(K_\varepsilon-x)}_{\le\:1}}_{\le\:c\mu_t(K_\varepsilon^c)\:<\:\varepsilon}\\&<c\nu_t(K)+\varepsilon\end{split}\tag2\end{equation} for all $t\in I$.  If $\mu_t=\nu_t(E)=1$, we easily obtain $$1-\varepsilon<(\mu_t\ast\nu_t)(K)<\nu_t(K)+\varepsilon\tag3$$ and hence $$\nu_t(K^c)=1-\nu_t(K)<2\varepsilon\tag4$$ for all $t\in I$. We should be able to do the same in the general case, but how do we need to deal with the left-hand side of $(2)$ then?  It clearly holds $(\mu_t\ast\nu_t)(E)\le\mu_t(E)\nu_t(E)$, but that doesn't seem to help much.

Let $E$ be a metric $\mathbb R$-vector space, $I$ be a nonempty set and $(\mu_t)_{t\in I},(\nu_t)_{t\in I}$ be families of nonnegative finite measures on $\mathcal B(E)$.  that if $(\mu_t)_{t\in I}$ and $(\nu_t)_{t\in I}$ are tight$^1$ and bounded in total variation norm, then the family of convolutions $(\mu_t\ast\nu_t)_{t\in I}$ is tight and bounded in total variation norm as well.  Now I would like to show the converse: If $(\mu_t)_{t\in I}$ and $(\mu_t\ast\nu_t)_{t\in I}$ are tight, then $(\nu_t)_{t\in I}$ is tight. (Most probably we need to impose a boundedness assumption on $(\mu_t)_{t\in I}$ and on $(\mu_t\ast\nu_t)_{t\in I}$ or even a priori on $(\nu_t)_{t\in I}$.)  For the moment, I'm only able to prove the claim assuming that the $\mu_t,\nu_t$ are probability measures. Under this assumption, the proof goes as follows: Let $\varepsilon>0$. Since $(\mu_t)_{t\in I}$ and $(\mu_t\ast\nu_t)_{t\in I}$ are tight, there is a compact $K\subseteq E$ with $$\sup\left(\sup_{t\in I}\mu_t(K^c),\sup_{t\in I}(\mu_t\ast\nu_t)(K^c)\right)<\varepsilon\tag1.$$ Now $K-K$ is compact and \begin{equation}\begin{split}1-\varepsilon<(\mu_t\ast\nu_t)(K)&=\underbrace{\int_K\mu_t({\rm d}x)\nu_t(\underbrace{K-x}_{\subseteq\:K-K})}_{\le\:\nu_t(K-K)}+\underbrace{\int_{K^c}\mu_t({\rm d}x)\underbrace{\nu_t(K-x)}_{\le\:1}}_{<\:\varepsilon}\\&<\nu_t(K-K)+\varepsilon\end{split}\tag2\end{equation} for all $t\in I$, which immediately yields $$\nu_t(K-K)>1-2\varepsilon\;\;\;\text{for all }t\in I\tag3.$$  Can we drop the probability measure assumption?  EDIT I'm not able to obtain the claim, even with the help of the answer below. If $\varepsilon>0$, the goal is to show that $$\nu_t(E)-\nu_t(K-K)=\nu_t((K-K)^c)<\varepsilon\tag4.$$ If I'm choosing all the constants as generic as possible, we obtain $$\mu_t(E)\le c_1\tag5$$ $$\mu_t(K^c)\le k_1(\varepsilon)\tag6$$ $$(\mu_t\ast\nu_t)(K)<c_1\nu_t(K-K)+c_2k_1(\varepsilon)\tag6$$ $$\mu_t(E)\ge\alpha_1\tag7$$ $$(\mu_t\ast\nu_t)(E)\le c_3\tag8$$ $$\nu_t(E)\le\frac{c_3}{\alpha_1}=:c_2\tag9$$ $$(\mu_t\ast\nu_t)(E)\ge\alpha_3\tag{10}$$ $$\nu_t(E)\ge\frac{\alpha_3}{c_1}\tag{11}$$ $$(\mu_t\ast\nu_t)(K^c)<k_3(\varepsilon)$$ The assumptions that I'm imposing is that $(\mu_t)$ and $(\mu_t\ast\nu_t)$ are bounded above (by $c_1$ and $c_3$) and below (by $\alpha_1$ and $\alpha_3$) in total variation norm and are tight (so that we can find $K$ for arbitrary $k_1(\varepsilon)$ and $k_3(\varepsilon)$). In order to obtain the claim we need to choose $k_1(\varepsilon)$ and $k_3(\varepsilon)$ such that $(4)$ holds. From everything above, we obtain $$\nu_t(E)-\nu_t(K-K)<\frac{c_3}{\alpha_1}-\frac{\alpha_3}{c_1}+\frac{c_3}{\alpha_1c_1}k_1(\varepsilon)+\frac1{c_1}k_3.(\varepsilon)\tag{12}$$ Even if we simplify this by assuming $\alpha_1=\alpha_3$, $c_1=c_3$ and $k_1(\varepsilon)=k_3(\varepsilon)$, the equation $$\frac{c_3}{\alpha_1}-\frac{\alpha_3}{c_1}+\frac{c_3}{\alpha_1c_1}k_1(\varepsilon)+\frac1{c_1}k_3.(\varepsilon)=\varepsilon\tag{13}$$ doesn't seem to admit a solution $(k_1(\varepsilon),k_3(\varepsilon))$ with positive $k_1(\varepsilon)$ and $k_3(\varepsilon)$; unless $\frac{c_3}{\alpha_1}-\frac{\alpha_3}{c_1}\ge0$; which clearly doesn't need to be the case (it is clearly the case for probability measures though ...)  $^1$ Remember that a family $\mathcal F$ of finite signed measures on $\mathcal B(E)$ is called tight if for all $\varepsilon>0$, there is a compact $K\subseteq E$ such that $$\sup_{\mu\in\mathcal F}|\mu|(K^c)<\varepsilon.$$


i am making a security camera and a want the view of the camera to display as a texture on a monitor. How do i do that?

I have a scene with monitors that display video from cameras in the same scene (or other scenes, but all of them are linked i.e., same objects in the scene). The cameras shown on the monitors do not view the monitors, so no looping should occur.  I found  that shows how to get the effect in the Game Engine.  I would like to do this in cycles.  Essentially I would like a material input node that corresponds to the output of the composition of a particular scene. The incoming image should honor the render settings of the particular scene and any compositing applied to it.  The Render Layer node does not appear to honor the resolution or compositing settings of the scene it comes from, and is not available to apply as a texture in the material node editor (that I can find).  I understand that this could be done by rendering the animation from the various cameras, then applying that video as textures to the monitors, then rendering the camera of the monitors. That's super tedious if your making changes to the whole scene, and I don't want to do that.


I want to ask a question on Mobile Cloud backend solutions and mobile app licensing. I've tried Stack Overflow and Super User and the questions have been closed. Please can you tell me which site is best for these?

Is it appropriate to ask questions about software licenses/licensing on ? Or is the appropriate place  ? Or is there no appropriate site currently and we should suggest such a site on ?


Alien universe - is there any information about the political situation on earth? As I know, in first three films, there were any information about wars or global government on earth or in outer space, but many times I heard that the Company wanted xenomorphs for the purpose of using them as a biological weapon.

In The Alien universe we see that a powerful company has faster than light space travel, off world colonies and their own marine force.  Despite this, they still need to be cloak and dagger about returning a xenomorph to earth.   What is the nature of government on earth at the time of Alien and Aliens?


I'm relatively new to QGIS. I've got a layer that shows the boundaries of the wards in the UK. In addition to this, I've got a csv file, which has long/lat plus an answer (binary). The problem is, that these two files use different CRS (the one with the wards uses a "user defined coordinate system (USER 100001), and the point layer WGS 84. If I try to change them, either the points disappear or the wards... I actually wanted to find out how many points there are in one Query, but this doesn't work.. I assume because of the different CRS.. :( Is there a way I can change this? I've attached a screenshot.

I have a series of layers of lines (shapefiles) in My Project. The CRS of some are different and to merge them they all must have same CRS.  When I use Processing/Toolbox/Qgis_algorithims/Reproject_layer the reprojection only works if it is allowed to save to temporary file somewhere (it will not change the CRS when I reproject if I try to save and replace it in My Project directory);   I must remove the original from the layer list and reproject the temp file (without changing the CRS) to get it into my project and name it appropriately.  Is there a better way to reproject a layer in Qgis?