Example:  \documentclass[10pt,a4paper]{article} \usepackage{hyperref} \usepackage{mathtools} \begin{document} Some Text \begin{equation}     \label{eq:1}     d(k_{a},k_{b})= \end{equation}  Some Text  \begin{subequations} \label{eq:2} \begin{equation}     \label{eq:2-1}     s(k_{a},k_{b}) \end{equation}  Some Text  \begin{equation}     \label{eq:2-2}     d(k_{a},k_{b})= \end{equation} \end{subequations}  Some Text \\  \autoref{eq:1}. \autoref{eq:2}. \autoref{eq:2-1}. \autoref{eq:2-2}. \end{document}   2-1, and 2-2 point into wrong places despite having the correct name.

The hyperref documentation says: "Make sure it comes last of your loaded packages". The reason is that it redefines many LaTeX commands. It's a rule of thumb that helps to avoid errors.  However, there are exceptions, for instance the amsrefs user's guide notes that amsrefs has to be loaded after hyperref.  To avoid problems when adding hypertext functionality: do you know further such exceptions?


By color setting in QGIS, I can only set RGB color but not CMY, so I've taken the cmy color from FreeHand, converted to RGB in Adobe Photoshop. Then exported the map as PDF (in QGIS). Before printing this PDF, I've controlled the color using of Adobe Photoshop, it shows me wrong cmy. Is this the problem with a printer or it is possible to get correct cmy or rgb color before print?

In QGIS 2.14, in print composer I can save my project as a PDF file. There is no controls of the color space in which colors are specified in the output file. It will be very useful to have a choice of the color space: RGB or CMYK.  Is it possible to resolve this issue ?


I am trying to take a string of digits, and add them to a list (so i can then multiply them together) public static int METHOD(long n)        //25        {            String holder = n.ToString();                 List<int> numbers = new List<int>();          for (int i = 0; i<=holder.Length-1; i++)         {             numbers.Add(Convert.ToInt32(holder[i]));         }         for (int i = 0; i <= numbers.Count - 1; i++)         {             Console.WriteLine("List Position " + [i] + " is: " + numbers[i]);         }  and you'll get "Number is 50" "Number is 53" why does it convert 2 to 50? & 5 to 53?

I have a char in c#:  char foo = '2';   Now I want to get the 2 into an int.  I find that Convert.ToInt32 returns the actual decimal value of the char and not the number 2.  The following will work:  int bar = Convert.ToInt32(new string(foo, 1));   int.parse only works on strings as well.    Is there no native function in C# to go from a char to int without making it a string?  I know this is trivial but it just seems odd that there's nothing native to directly make the conversion.


Basically i start with this when document is ready:  var newObj = new MyClass(variables); newObj.start();   And MyClass looks like this (simplying it here)  var MyClass = function(){      this.start = function(){          this.loop();     }      this.loop = function(){         // do lots of stuff here         setTimeout(function(){this.loop();}, 1000);     }  } // end MyClass   During runtime it tells me that 'this.loop' is not a function  at the line where setTimeout is called  What am i missing?  Thanks

I have a method that uses the  function and makes a call to another method. On initial load method 2 works fine. However, after the timeout, I get an error that says method2 is undefined. What am I doing wrong here?  ex:  test.prototype.method = function() {     //method2 returns image based on the id passed     this.method2('useSomeElement').src = "http://www.some.url";     timeDelay = window.setTimeout(this.method, 5000); };  test.prototype.method2 = function(name) {     for (var i = 0; i < document.images.length; i++) {         if (document.images[i].id.indexOf(name) > 1) {             return document.images[i];         }     } };


Way back in high school I read a series about colonization of other planets. In the books, contact was lost with the rest of the civilization and over time people with mathematical ability were able to control the computers that were doing the terraforming...and later came to be seen as wizards.  I cannot for the life of me remember the author or title...can anyone help?

I am searching for a book series ... people were transfer from Earth by way of being reduced to a mathematical pattern and recreated on the other end.  Some people appear as "wizards" on the receiving planet, turns out they just had a connection to the computer and the computer was materializing the object by using the "object" formula and using energy to mater transfer from an energy universe.  I think there were multiple books in the series and I seem to remember that the main character may have undergone a magical sex change at some point.


Is there any tool that can calculate the AUC value from a ROC curve if I already have true positive, true negative, false positive, false negative values.

Is there any tool that can calculate the AUC value from a ROC curve if I already know how many samples are true positive, true negative, false positive, false negative out of 500 samples?  Specificity and sensitivity are also known to me.


I know that isomorphism has a well known symbol, but what about diffeomorphism?

Is there a symbol for "homeomorphic to"? I looked on Wikipedia, but it doesn't seem to mention one? Also, for isomorphism, is the symbol a squiggly line over an equals sign? What is the symbol with a squiggly line over just one horizontal line? Thanks.


I am beginner in java and would like to clear an idea about variable initialization. Here is the code --  public class NumberSequence {   private static int n;   public static void main(String[] args) {     print(myTest());     print(myTest());   }    private static int myTest() {     n++;     return n * n;   } }   with two successive calls of the method myTest() the outputs are 1 and 4. So I understand that the default value of n is 0. So for the first call of myTest(), n would be incremented by one resulting 1 and then the multiply line will be executed, that is, 1 * 1 which is 1.  For the next call of myTest(), n will be initially 1, then it will be incremented to 2, then the multiplication, that is 2 * 2 which is 4   Now I am trying to do this --  public class NumberSequence {   public static void main(String[] args) {     int m;     m++;      int n = m * m;     print("n = " + n);   } }   Here it gives complier error that m is not initialized which is obvious. So my question is -- how come compiler doesn't complain in case of the first option where I created myTest() method. There I do not initialize the value of n. Is it the case that compiler is doing the initialization? I would like to get this clarification.

Was there any reason why the designers of Java felt that local variables should not be given a default value? Seriously, if instance variables can be given a default value, then why can't we do the same for local variables?  And it also leads to problems as explained in :     Well this rule is most frustrating when trying to close a resource in a finally block. If I instantiate the resource inside a try, but try to close it within the finally, I get this error. If I move the instantiation outside the try, I get another error stating that a it must be within a try.      Very frustrating.


Today I've earned the "Yearling" badge. When I'm checking the other users who are all received the same badge in the , there I can see a strange behaviour.  For the user , the Yearling badge was awarderd two times in two days. The first one was awarded on 2019-12-19 16:50:12Z and the second one was awarded on 2019-12-20 10:20:09Z. When clicking on the both links, it is redirecting to the same user profile.  What is the reason behind that?  Screenshot for reference:

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I'm trying to figure out how to calculate the current year minus the birth year to calculate age  namespace howOldAreYou {     class Program     {         public static void Main(string[] args)         {             //variables              int birthYear;             string name;             System.DateTime moment = new System.DateTime();             int year = moment.Year;             //int month = moment.Month;             //int day = moment.Day;             //int minute = moment.Minute;             //int second = moment.Second;             //int millisecond = moment.Millisecond;              //Find out person's name             Console.WriteLine("What is your name?");             name = Console.ReadLine();              //Find what year person was born             Console.WriteLine("What year were you born, " + name + "?" );             if (int.TryParse(Console.ReadLine(), out birthYear))             {                 Console.WriteLine(birthYear + "! Well you must be " + (year - birthYear));             }             else             {                 Console.WriteLine("Sorry that's an invalid year");             }          }     } }

Given a DateTime representing a person's birthday, how do I calculate their age in years?


How do you set a Background image in blender 2.8?

Cannot find Background Images feature to add in a photo in Blender 2.8  Where is it?


I would like to be able to watch Netflix on Ubuntu, but on the website it doesn't let me do so. I also attempted to download netflix-desktop but when I click the icon it doesn't do anything.  Thank you.

Is there a way to stream Netflix content to my Ubuntu machine?


Just like the 'bar' in the reduced Planck constant, in physics people need to use the same 'bar' across differential sign $d$ to indicate a imperfect differential in, say, a quasi-static process. How do I type it? For example,

In math mode one can do $\hbar$, which produces an h with a little line through the top of it. I want to do the same thing, except with the letter d instead. Is there a generalization of $\hbar$ that works for other letters besides just h?


Is their any way to find out what websites I joined w/google login?

When you create Stack Exchange accounts and you want them tied to a Google account, when you log into your Google account you get taken to a separate page where it asks for permission and whether you want the setting to be remembered.  I am wondering how I can access the page which lists what accounts are tied to my Google account and have set to remember.   I think it's about time I went in and see what accounts I am not using and get rid of them.


This video demonstrates how an electric eel can supposedly produce up to 800 watts, and power a Christmas tree, which is very topical (a late Merry Christmas to the Biology community!). The video, sadly, is not very detailed as to how this works. I was under the impression that electrical discharge was a conscious action on the part of the eel, rather than a natural state for it. But, apparently, the electric eel generates electricity "whenever it moves," as the video's narrator put it? Do electric eels produce electricity subconsciously, just by moving? Surely, though the host lists off the 800 watts of power, it's not constantly producing 800 watts, either? How do the fish's electrocytes work in this instance, where just lazing about is powering the Christmas tree?

Electric eels are cited as being about to produce about 860 watts of energy. But I haven't been able to find information on how long they can sustain their charge.  In another question, it was shown that they can continually power a Christmas tree, albeit the lights flicker, just when it's hanging about and doesn't appear to be defensive. This suggests that it has some ability to sustain a low level of current... so I'd be surprised if there is no study that has measured the potential Wh. Sadly, I cannot find it. Does anyone know any estimates for the energy an electric eel can produce over the course of a day?


Problem: Determine the derived series of $\mathfrak{b}_n (\mathbb{C})$, in which $\mathfrak{b}_n (\mathbb{C})$ is the space of all upper triangular matrices.   We knew that the derived series of a Lie algebra $L$ is $L^{(0)}=L, L^{(1)}=[LL],L^{(2)}=[L^{(1)}L^{(1)}], \dots, L^{(i)}=[L^{(i-1)}L^{(i-1)}]$.  How do I finding the derived series of $\mathfrak{b}_n (\mathbb{C})$?  First edited: $L = \mathfrak{b}_n (\mathbb{C})$, so for $n=2$, the basis of $\mathfrak{b}_2 (\mathbb{C})$ is $e_1=\begin{pmatrix}1 & 0\\ 0 & 0 \end{pmatrix}, e_2 =\begin{pmatrix}0 & 1\\ 0 & 0 \end{pmatrix}, e_3=\begin{pmatrix}0 & 0\\ 0 & 1 \end{pmatrix}$   $[e_1 e_2] = e_1, [e_1 e_3]=0, [e_2 e_3]=e_3$  $L^{(1)}=[LL] = \langle e_1,e_3 \rangle$  $L^{(2)}=[L^{(1)} L^{(1)}] = 0$  How to continue the computation?

I am trying to show that the Lie algebra of strictly upper triangular matrices $\mathfrak{u}(n,\mathbb{C})$ is soluble for all $n\geq 2$. This is not an assessed question, but is an exercise in the notes. I am having real difficulty visualising the derived series. I know how to calculate it, and have done some test cases for $n=2$, $n=3$ and $n=4$. But I just can't quite visualise what is going on to generalise it. I know the formula for the bracket of the basis vectors $e_{ij}$ and $e_{jk}$: $$[e_{ij},e_{kl}] = \delta_{jk}e_{il}-\delta_{il}e_{kj}$$  and have obtained the following  for $L = \mathfrak{u}(2,\mathbb{C})$  $$ L^{(1)} = \left\{0\right\} $$  for $L = \mathfrak{u}(3,\mathbb{C})$  $$ L^{(1)} = \left<e_{13}\right>_\mathbb{C} $$  $$ L^{(2)} = \left\{0\right\} $$  and for $L = \mathfrak{u}(3,\mathbb{C})$  $$ L^{(1)} = \left<e_{13}, e_{14}, e_{24}\right>_\mathbb{C} $$  $$ L^{(2)} = \left\{0\right\} $$  but I can't visualise what is actually going on here and explain it, and that is preventing me from going any further.  How should I visualise this? I do notice that $L^{(1)}$ always removes the entries on the next diagonal, but I don't understand why this is the case.


In a book* I was reading, it said that a neutron star is formed when the pressure is so large that the electrons in a white dwarf interact with the protons, forming neutrons. The neutrons then collapse until the Pauli Exclusion Principle stops any further collapse.  However, my issue is with why, when the mass is even greater, how the neutron star collapses into a black hole:  The book says that the pressure is so high, and therefore the temperature is so high, that the neutrons start to move close to the speed of light. At this speed, the Pauli Exclusion Principle doesn't apply any more and the neutron star goes on to implode.  Why does the Exclusion Principle stop working at high speeds?  * The book was  by Brian Cox and Jeff Forshaw. The subject of this question can be found in the chapter Epilogue: The Death of Stars

From  (emphasis mine):     Neutron degeneracy is a stellar application of the Pauli Exclusion Principle, as is electron degeneracy. No two neutrons can occupy identical states, even under the pressure of a collapsing star of several solar masses. For stellar masses less than about 1.44 solar masses (the Chandrasekhar limit), the energy from the gravitational collapse is not sufficient to produce the neutrons of a neutron star, so the collapse is halted by electron degeneracy to form white dwarfs. Above 1.44 solar masses, enough energy is available from the gravitational collapse to force the combination of electrons and protons to form neutrons. As the star contracts further, all the lowest neutron energy levels are filled and the neutrons are forced into higher and higher energy levels, filling the lowest unoccupied energy levels. This creates an effective pressure which prevents further gravitational collapse, forming a neutron star. However, for masses greater than 2 to 3 solar masses, even neutron degeneracy can't prevent further collapse and it continues toward the black hole state.   How then, can they collapse, without violating the Pauli Exclusion Principle? At a certain point does it no longer apply?


Let $f$ be a real valued measurable function on $\mathbb R^2$ such that each section $f_x$ is Borel measurable and each section $f^y$ is continuous, where $f_x(y)=f(x,y)$ and $f^y(x)=f(x,y)$.  We need to show that $f$ is Borel measurable.  I am not getting how to approach for it.   Any suggestion would be appreciated. Thanks in advance.

I have to prove the following:  Let $f: \mathbb{R^2}\to \mathbb{R}$ such that $f_x:y\to f(x,y)$ is Borel measurable for all $x\in\mathbb{R}$ and that $f^y:x\to f(x,y)$ is continuous for all $y\in\mathbb{R}$. Prove that $f$ is Borel measurable.  What I have tried to do is to find a sequence of functions $f_n(x,y)$ s.t for a fixed $y$ $f_n(.,y)$ is a linear approximation of $f(.,y)$..


Another way of asking: Why does someone "belly flop" when they hit the surface of a pool on their stomach rather than just going straight into the water?  Does it have something to do with the surface tension? Hydrogen bonding? Surface area of the projectile? I have a decent understanding of chemistry but I am having difficulty explaining this phenomenon.  Thank you for reading!

If I jump from an airplane straight positioned upright into the ocean, why is it the same as jumping straight on the ground?  Water is a liquid as opposed to the ground, so I would expect that by plunging straight in the water, I would enter it aerodynamically and then be slowed in the water.


In ZFC, is the collection $\mathcal{N}$ of nonempty subsets of $\mathbb{Z^{+}}$ a class or set? Please correct me if I am wrong, but so far as I understand the notion of class, a class is a collection of objects which satisfy a certain property $P$. In this example, let $P$ be the property that $A$ is a nonempty subset of $\mathbb{Z^{+}}$. Take $N=\{S|PS \}$. Then is $N$ not just our collection $\mathcal{N}$, and is $N$ not a class?

In ZFC with class terms a class is merely a unary predicate $\varphi$ of the language which we then write as  $$\{X\mid\varphi(X)\}$$  which only suggests that we have built a collection out of these objects. We write $Y\in\{X\mid \varphi(X)\}$ for $\varphi(Y)$. Further we say that such a class (term) $\mathcal C$ is a set if   $$\exists X\forall Y[Y\in X\leftrightarrow Y\in\mathcal C].$$  In NBG and similar set theories (which build on classes instead of sets) every set is also a class. But is this true for this ZFC approach? For me it seems that a class is just a formula. And there are sets that I cannot fully describe using such a formula, e.g. a set given to me by the axiom of choice.     Are sets and classes in ZFC (with class terms) just different concept, each one not a "sub-concept" of the other?     After Asaf's answer:  I do not feel very well when writing $\{X\mid X\in A\}$ for arbitrary sets $A$ because for me $A$ is not a symbol of the language. However, when my set $A$ is definable by a predicate $\varphi$ with   $$\mathrm{ZFC}\vdash \exists A \varphi(A) \quad\text{ and }\quad \mathrm{ZFC}\vdash\varphi(A)\wedge \varphi(B)\to A=B,$$  then I could write $\{X\mid \forall A[\varphi(A)\to X\in A]\}$, and this would feel okay. But my problem are the sets for which there is no such $\varphi$. I do not know how I can include such an abbreviating notion (like $\{X\mid X\in A\}$) into a formal proof without feeling not quite sure what I am actually doing.


Following, this question -   Rennin does not exist.  And   Rennin exist.   What do I know is-  Rennin is found in calves and acts on milk to curdle it.   Pepsin acts as rennin at pH of 6-6.5 and curdles milk.  Humans have pepsin, in infants as well as adults. Pepsin can perform both functions in humans.  So, in infants, is curdling of milk done by rennin or the rennin like activity of pepsin?

At school, we've been taught that human infants produce rennin/chymosin (which aids in the digestion of milk). More specifically, it is the peptic cells in the stomach which secrete prorennin, the inactive form of rennin (in addition to pepsinogen, the pepsin proenzyme).  User @another'homosapien's answer  also seems to concur with this (excellent answer by the way, I enjoyed reading it).  However  According to Mod. @AliceD's answer  (yet another excellent answer):     ...in humans there is only a chymosin pseudogene present...   Which (probably?) implies that humans (infant or otherwise) do not produce rennin.  I managed to get my hands on the Textbook of Medical Physiology (Guyton and Hall, South-Asian edition), and according to the book (Chapter Gastric secretions, page 406) peptic cells produce a large quantity of pepsinogen. There is, however, no mention of prorennin. I even flipped over to the Appendix at the back to look up "Rennin", but it turns out there is absolutely no mention of rennin in the book.    My questions,   Some sources claim that rennin is produced in human (infants). Is this true? Other sources claim that rennin is not produced in humans ( we have a pseudogene for it though). Is this correct (I mean the "rennin-is-not-produced" bit, not the "pseudogene" bit)? If rennin is produced in humans only during infancy, what stops it from being produced as we mature? (I'm asking this because every source I've seen that claims that rennin is produced in humans, explicitly states that is done so during infancy...which would suggest that rennin is not produced in adults)


I want to select all records form database using WHERE IN, using values form an array that I have. Is there a way to actually pass the array to the query?  I tried SELECT id FROM tag WHERE name IN "+myArray.toString()+". But, of course, it is destined to fail) I could use preparedStatement, but number of values is always different and quite large - 5000 or so. Or maybe I should take a different approach?

What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? placeholder represents one value, rather than a list of values.  Consider the following SQL statement:  SELECT my_column FROM my_table where search_column IN (?)   Using preparedStatement.setString( 1, "'A', 'B', 'C'" ); is essentially a non-working attempt at a workaround of the reasons for using ? in the first place.    What workarounds are available?


I frequently hear:     What am I doing wrong?   But shouldn't it be     What am I doing wrongly?   instead?  A quick ngram search reveals the latter is never used.  Why is there no -ly?  Isn't the former wrong?

Which is grammatically correct?         He wrote it wrong.   He wrote it wrongly.


we are executing following code from .php file.  $result1 = shell_exec("R CMD Sweave /var/www/html/r/r_latex_sweave.Rnw");  $result2 = shell_exec("pdflatex /var/www/html/r/r_latex_sweave.tex");  But, we are getting this errors :  $result1 = shell_exec("R CMD Sweave /var/www/html/r/r_latex_sweave.Rnw"); [11:53:55]  $result2 = shell_exec("pdflatex /var/www/html/r/r_latex_sweave.tex");  can you please help us on this?  thanks.

We are using following code in .php script for generate .pdf file.  $result1 = exec("R CMD Sweave /var/www/html/r/r_latex_sweave.Rnw");  $result2 = exec("pdflatex /var/www/html/r/r_latex_sweave.tex");   but, we are getting this errors when we are executing .Rnw and .tex files.  ! I can't write on file `r_latex_sweave.log'. Please type another transcript file name:  ! Emergency stop !  ==> Fatal error occurred, no output PDF file produced!  Note: We have .tex and .Rnw folder in /var/www/html folder?


Jon Snow,      grandson of Aerys Targaryen,   or Daenerys Targaryen, daughter of Aerys Targaryen?  After "The Dragon and the Wolf" (Game of Thrones, S07E07), we learn that      Jon is the legitimate son of Rhaegar Targaryen.    So, how do the factors like:   Sex One being first generation and other being second generation descendant of the their family's last king. Second one's previous marriage   affect these 2 characters' claim to the Iron Throne?

In "Eastwatch" (Game of Thrones, S07E05), in the scene with Gilly and Sam, Gilly is reading from the records of High Septon Maynard. From this scene, we can infer that this High Septon performed an annulment for Rhaegar Targaryen and married him in secret. I think that it is safe to assume that it was to Lyanna Stark.   From earlier episodes, we know that this was the coupling that produced Jon Snow. Now, given that they were married and that Rhaegar was the eldest of the siblings, does this make Jon the actual heir over Daenerys?


Occasionally I get a downvote. Just a downvote. No comments, or other type of feedback whatsoever... and i think that it is frustrating. I mean, i like my points, i dont have many, so i cherish every-single-one.  So, i would like to pitch a idea i'm calling "WHY" (its not a acronym...). The whole thing would work like this:    If you get a downvote (on a question, or answer) you would be able to call out why the person who downvoted would receive a email/notification and be prompted to explain "why" of the downvote  in a given amount of time (something like 24h) this person would go back to the "downvoted" item and  either comment, explaning why of the downvote or  the points would be "returned" to the "poster" as if the downvote had never occured, BUT the "downvoter" would not get his points back!   I think this is viable and interesiting idea because it would drive feedback to new and old guys, and possibly increasing posts overall quality!

OK, I know this has been discussed before ,   but I'd like to make a new suggestion.  Problem: drive-by downvoting - people downvote without explaining why. And when you downvote, legitimately, you lose rep, as does the questioner / answerer. This strikes me as being a lose / lose situation.  Previous solutions: e.g.  and  have required forcing comments.  Solution: How about this instead: keep the current system (downvoter loses rep) unless the downvoter adds a comment in which case no rep is lost. I think this is win/win. The downvoter can choose to enter comments but is encouraged to do so, which increases the feedback to the original questioner / answerer.


Im currently studying PHP and came across the concept of an interface. I understand that they are used as a templating structure for the program,  but in what occasion would they be used?

allow you to create code which defines the methods of classes that implement it. You cannot however add any code to those methods.    allow you to do the same thing, along with adding code to the method.   Now if you can achieve the same goal with abstract classes, why do we even need the concept of interfaces?   I've been told that it has to do with OO theory from C++ to Java, which is what PHP's OO stuff is based on. Is the concept useful in Java but not in PHP? Is it just a way to keep from having placeholders littered in the abstract class? Am I missing something?


hi,I am pretty new to the blender and trying to render a scene by using a free vehicle model that I have downloaded,the model seems very detailed and texture ready,however I have noticed lot of grain around edge of the celling window.I have switched between eevee and cycles and crancked sample number to 1000 but unfortunately the grain still remain,does anybody has had similar problems?I'm here for a help,thanks in advance!

I was following  on creating a watch and noticed that when I rendered the watch, some pieces were messed up.  I'm new to 3D modeling and I've just learned Blender, I can't explain it well, so here's a picture:    Other examples:     I don't know if it's a problem with my World texture, the object, or the object's texture/material, so I can't even guess how to fix it. What causes this? Is it possible to fix it?


i have a problem, code run till half showing error, this is the delete function at **arrayList.remove(which_item);** this line have problem showing   java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.remove(int)' on a null object reference   Can someone tell what happen to this?              @Override             public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {                 final int which_item = position;                  new AlertDialog.Builder(addProduct.this)                         .setIcon(android.R.drawable.ic_delete)                         .setTitle("Are you sure?")                         .setMessage("Do you want to delete this item")                         .setPositiveButton("Yes", new DialogInterface.OnClickListener() {                             @Override                             public void onClick(DialogInterface dialog, int which) {                                 **arrayList.remove(which_item);**                                 adapter.notifyDataSetChanged();                             }                         })                         .setNegativeButton("No",null)                         .show();                 return true;             }         });

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  can't install npm.Whenever i try to type   sudo apt-get install npm   this comes  `E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?' what should i do

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


Which of these two forces is stronger: The force of static friction or the force of kinetic friction? I am having a hard time understanding this concept of , so please explain your answer!

I was recently wondering what would happen if the force sliding two surfaces against each other were somehow weaker than kinetic friction but stronger than static friction. Since the sliding force is greater than the maximum force of static friction, $F > f_s = \mu_s F_N$, it seems that the surfaces should slide. But on the other hand, if the force of kinetic friction is greater than the applied force, there'll be a net force $\mu_k F_N - F$ acting against the motion, suggesting that the surfaces should move opposite to the direction they're being pushed! That doesn't make sense.  The only logical resolution I can think of is that the coefficient of static friction can never be less than the coefficient of kinetic friction. Am I missing something?


"If that was so, it was a shameful deed; but not his (Saruman's) worst." Unfinished Tales - Part III, The Third Age: The Disaster of the Gladden Fields  Saruman, in his 'fall from grace', did a lot of despicable stuff. In this quote, it seems to imply that one of his deeds were known as his worst. I do know that Saruman was not originally evil, but upon being seduced by the One Ring he did many shameful deeds. What are the most despicable of these deeds that he performed?

There is a quote from the History of Middle-Earth (Morgoth's Ring) - supplied in  - that states:     There is no doubt that long afterwards, in the Third Age, Saruman rediscovered this, or learned of it in lore, and in his lust for mastery committed this, his wickedest deed: the interbreeding of Orcs and Men, producing both Men-orcs large and cunning, and Orc-men treacherous and vile.   OK, I get it that creation of Orcs as an act was a Bad Juju by Morgoth (or Sauron?) originally. But:   Why is merely breeding men and orcs so bad now that Orcs exist? Somehow, breeding Elves and men is a Highly Commendabe Thing (Aragorn and Elrond are both products of this). Even assuming that the breeding was not consensual on human part and this was the reason for marking the deed bad, this surely was not - by far - the wickedest thing Saruman ever did.


I am unable to use printf command when I am inside tmux.  The command for changing background on the fly is:  printf "\e]20;/home/alexsson/Downloads/alternativ.png;\a"   I can do this directly in urxvt:    Also inside screen:    But this printf command is simply not working in tmux:     Any idea how to make it work in tmux?  PS: There is a similar question here: . However, it is difficult to find that question if not using correct searching terms. I think my post will be interesting for a lot more users out there not knowing which searching terms to use but more common (like  simply changing background). There is also not much written in the documentation about this.

I try to resize terminal window from command line on my MacOSX  I can resize the width and heigh of the terminal with following command(Control Sequence Introducer CSI)  printf '\e[8;100;200t' "resize to 200x100   but when I use tmux in my terminal, then the command(printf '\e[8;100;200t' ) is not longer working  Any suggestion would be apprecaited.  Here is my tmux config file:  bind r source-file ~/.tmux.conf \; display "Reloaded!"  #Reload with ctrl-r set-window-option -g mode-keys vi                       #copy-mode vim-like  set -g prefix `                                         #prefix from ctrl-b to ctrl-a unbind C-b                                              #allow ctrl-b for other things set -sg escape-time 1                                   #quicker responses bind ` send-prefix                                      #Pass on ctrl-a for other apps set -g base-index 1                                     #Numbering of windows setw -g pane-base-index 1                               #Numbering of Panes bind \ split-window -v                                  #Split panes horizontal bind v split-window -h                                  #Split panes vertically  unbind-key j bind-key j select-pane -D # Similar to 'C-w j' to navigate windows in Vim unbind-key k bind-key k select-pane -U unbind-key h bind-key h select-pane -L unbind-key l bind-key l select-pane -R  unbind-key Left  bind-key  Left resize-pane -L 10  unbind-key Right  bind-key  Right resize-pane -R 10  unbind-key Up  bind-key  Up resize-pane -U 10   unbind-key Down  bind-key  Down resize-pane -D 10   set -g window-status-current-style fg=red set -g default-command "reattach-to-user-namespace -l /bin/bash"


I set my scene to 'meters' and the unit scale to 1.0 since I need to know the size of the parts of the scene in meters.  Every time I add a cube or any other of the mesh primitives it starts WAY to big/large/huge and I need to scale it down.  Is there any way to instruct blender to not to throw such massive primitives at me? Where can I adjust this - if possible?

I am using blender most of the time to model things for my 3d printer. So a default unit in "meters" is not really helpful!  Within the scene settings it is simply possible to set the units to millimeter and the unit scael to 0.001 so everything seems to work as I want it to work...   But if I add a new primitive it uses its old default sizes in meters... so a new cube get's 2000 x 2000 millimeters instead of 2x2 or whatever will be useful..  Same for all other new objects...  How can I change the default sizes of new objects permanently?   And how can I change the settings in the application templates? Right now using ctrl+u changes the "general" template - perhaps because I loaded it before...   Thanks a lot and best regards Stefan


I have the following Meta-Code  var Parent = function(){} Parent.prototype.doSomething = function(){   console.log("As a parent I did like a parent"); }  var Child = function(){} Child.prototype = new Parent(); Child.prototype.doSomething = function(){   console.log("As a child I did like a child");   //This is where I am not sure what to put }   What I would like it 2 lines  As a child I did like a child As a parent I did like a parent   Of course the first one is simple but I am not sure how/if I can call a parent function once it has been overridden.

Is it possible to call the base method from a prototype method in JavaScript if it's been overridden?  MyClass = function(name){     this.name = name;     this.do = function() {         //do somthing      } };  MyClass.prototype.do = function() {       if (this.name === 'something') {         //do something new     } else {         //CALL BASE METHOD     } };


Let $A$ be a square matrix. Prove (or disprove) the following: $$\det(qA) = q^{n} \det(A).$$     I tried disproving it with counterexamples but I could not find one. Is there a counterexample I'm overlooking?

Let $A$ be an $n \times n$ matrix and $k$ be a scalar. Prove that $\det(kA)=k^n\det A$.   I really don't know where to start. Can someone give me a hint for this proof?


the following is true in Java  "abc"=="abc"   Why? The two Strings are two different objects, they should not have the same object identity?

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


I have a simple table. I found that some of the Mathematical expressions cross the border of the cells. How to fix this problem?  I have the second question please which is also related to my table: I have merged five cells; how I can split it into two equal cells?  Thanks in advance.  \documentclass[10pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{caption} \usepackage{amssymb} \usepackage{graphicx} \usepackage{multirow} \begin{document} % \begin{table}[] \centering \caption{First Table} \label{my table} \begin{tabular}{|l|l|l|c|c|l|} \hline Name & \multicolumn{1}{c|}{a}               & \multicolumn{1}{c|}{b} & c                     & \multicolumn{1}{l|}{Test-1} & Test-2                                      \\ \hline 1    & aa                                   & bb                     & \multirow{5}{*}{same} & \multirow{2}{*}{222-a}      & \multicolumn{1}{c|}{\multirow{2}{*}{333-a}} \\ \cline{1-3} 2    & cc                                   & dd                     &                       &                             & \multicolumn{1}{c|}{}                       \\ \cline{1-3} \cline{5-6}  3    & ee                                   & ff                     &                       & \multirow{3}{*}{222-b}      & \multirow{3}{*}{333-b}                      \\ \cline{1-3} 4    & $\sin^{2}\left(\frac{\pi}{M}\right)$ & gg                     &                       &                             &                                             \\ \cline{1-3} 5    & hh                                   & ii                     &                       &                             &                                             \\ \hline \end{tabular} \end{table} % \end{document}

The table that I'd like to make does not display fractions with enough space between lines. What's the reasoning for this? (Not enough rep to be able to post a picture yet unfortunately.)  \documentclass{article} \usepackage{amsmath,amsfonts} \usepackage{booktabs}  \begin{document} \begin{table} \centering \begin{tabular}{lcccc} \toprule \textbf{Care type} & $\mathbb{P}(Pat \cap H)$ & $\mathbb{P}(Pat \cap H')$ & $\mathbb{P}(Pat' \cap H)$ & $\mathbb{P}(Pat' \cap H')$\\ \midrule Direct care  &$\displaystyle \dfrac{58}{197}$  &  $\displaystyle \dfrac{48}{197}$  & $\displaystyle \dfrac{21}{197}$* &$1-\displaystyle \dfrac{58}{197}$ \\ Housekeeping &$\displaystyle \dfrac{12}{17}$  &  $\displaystyle \dfrac{2}{17}$  & $\displaystyle \dfrac{5}{17}$* &$1-\displaystyle \dfrac{12}{17}$\\ \bottomrule \end{tabular} \caption{Probabilities of hand hygiene given direct patient contact} \label{tab:handwash_given_pat} \end{table} \end{document}   Edit: Image added and MWE completed.


"John Smith and all of us at ABC Corp ARE proud to support..." or "John Smith and all of us at ABC Corp IS proud to support..."

A friend wants to write,   There is no hardware to purchase, no additional software to install and no key fobs to worry about.   This is awkward because the verb "is" doesn't match up with the third item, which is plural and demands "There are" as the subject. However,    There is no hardware to purchase, no additional software to install and there are no key fobs to worry about.   sounds awkward as well.  Is there a good workaround for this problem where some list items are singular and some are plural, so they don't share a common verb?


I think it is about time I learn the difference.  I have seen how to use these, but the tutorials have been kinda vague.  I have a very basic knowledge on the syntax and how to use them to a very small extent.  Pointers have always seemed kinda scary and confusing.  I have heard once you learn to use them they are great, and I want something great :).  So how can I use these and at what time should I use each one?  One more thing, I am using C++.  Thank you!

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


Couldn't find an official source for an installer/download of supported Mac OS versions. Everything I found goes to the App Store which prompts for an Apple ID.

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


My program is using the following code  String mobile=""; if(mobile!="") System.out.println("++++++"); System.out.println("------");   But if statement always set true. how it is possible? how to correct the code to get false for if condition?


Be $\mathbb{K}=\mathbb{R}$ or $\mathbb{C}$, be $V$ and euclidean or unitary $\mathbb{K}$-vector space and be $v_1,\ldots,v_n \in V$.  For the $n\times n$ matrix  $$A:=(\langle v_j,v_k\rangle)_{j,k=1,\ldots,n}$$  then applys $A=A^*$ and $A\succeq0$.  Then $A$ is positive definite if and only if the vectors $v_1,\ldots,v_n$ are lineary independent.  I just can't seem to find a proof for this, and can't really proof it myself. Thanks in advance for any kind of help.  edit: the linked question doesn't talk about positive definity, or does it? Sorry if it does.

Given a set of vectors $v_1 \cdots v_n$, the $n\times n$ Gram matrix $G$ is defined as $G_{i,j}=v_i \cdot v_j$  Due to symmetry in the dot product, $G$ is Hermitian.  I'm trying to remember why $|G|=0$ iff the set of vectors are not linearly independent.


Besides "jeans", "glasses", "statistics", and "shorts", what are some other plural nouns in English that end on "-s" and don't become their corresponding singular-noun counterparts by merely dropping "-s"?

Some nouns,  exist in the plural only. Is there a list of such nouns, or a rule or pattern that describes the set, and can be used to figure out if a singular form of a plural noun does or does not exist?


The School of Divination for a wizard has the feature  at level 6 (PHB, p. 116):  Expert Divination When you cast a divination spell of 2nd level or higher using a spell slot, you regain one expended spell slot. The slot you regain must be of a level lower than the spell you cast [...]  The wording of the feature is confusing to me. If a 6th-level wizard used a 3rd-level spell slot to upcast Mind Spike (a 2nd-level spell), does the Expert Divination feature count it as a 2nd-level spell (the original level of the spell) or a 3rd-level spell (since it was cast with a 3rd-level spell slot)?

As the title says: Is a 1st-level spell cast using a 4th-level slot a 1st-level spell, or a 4th-level spell?


Why after sending the Russian text: много текста ... можно настра?! ?вать свой ....много текста.... р?! ?бочих letters are lost and substituted: ?! ?   - ? The main thing comes across 2 - 3 words from the whole text. Has anyone encountered such a problem? And how can this be solved.

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


If $A$ and $B$ two matrices of order $n\times n$ such that $AB=I$ then $A$ and $B$ are commutative and Give any two reasons for A and B commutative.   I know what   ... one matrix is the Identity matrix.  ... one matrix is the Zero matrix.  ... both matrices are 2×2 rotation matrices. (basically case #2)  ... both matrices are Diagonal matrices.  how to prove part one

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


I'm looking for my autofill settings on Firefox 64.   According to the :        Click the menu button  Fx57Menu and choose Preferences.    Click the   Privacy & Security panel.    In the Forms & Passwords section, put a   check mark next to Autofill addresses to turn it on, or remove the   check mark to turn it off.      However, on Firefox 64 (for Ubuntu), this doesn't appear to exist:     Firefox version: 64.0(64-bit) Mozilla Firefox for Ubuntu canonical-1.0

I quote to this  at Mozilla.org  Turn autofill on or off   Click the menu button Menu and choose Preferences. Click the Privacy & Security panel. In the Forms & Passwords section, put a check mark next to Autofill addresses to turn it on, or remove the check mark to turn it off.   I have a Privacy & Security panel but no Forms & Passwords section nor an Autofill option.  This is an updated version of Firefox on an updated version of MacOS.  Where are these options? Searching for them using the preferences search returns nothing.


I have folder with the following structure  folder    subfolder(empty)    subfolder    file1.bat    file2.bat    file3.bat  How do I go about writing a batch file to zip the contents of the above folder without using external softwares like winrar or 7zip?  I tried the below code. But it would copy the contents to the specified temp folder without the empty folder and when attempting to zip the folder it would only zip file1 and file2 and ignore rest of the contents.  I would like to be able to zip the folder as it is without affecting the structure.  I could not find the reason for the issue. Any help is appreciated.  set FILETOZIP=D:\OutputZipFiles\TestWorkDemo   set TEMPDIR=D:\OutputZipFiles\TempDir rmdir %TEMPDIR% mkdir %TEMPDIR% xcopy /s %FILETOZIP% %TEMPDIR%  echo Set objArgs = WScript.Arguments > _zipIt.vbs echo InputFolder = objArgs(0) >> _zipIt.vbs echo ZipFile = objArgs(1) >> _zipIt.vbs echo CreateObject("Scripting.FileSystemObject").CreateTextFile(ZipFile, True).Write "PK" ^& Chr(5) ^& Chr(6) ^& String(18, vbNullChar) >> _zipIt.vbs echo Set objShell = CreateObject("Shell.Application") >> _zipIt.vbs echo Set source = objShell.NameSpace(InputFolder).Items >> _zipIt.vbs echo objShell.NameSpace(ZipFile).CopyHere(source) >> _zipIt.vbs echo wScript.Sleep 2000 >> _zipIt.vbs  CScript  _zipIt.vbs  %TEMPDIR%  D:\OutputZipFiles\someArchive.zip  pause

Is the ZIP compression that is built into Windows XP/Vista/2003/2008 able to be scripted at all? What executable would I have to call from a BAT/CMD file? or is it possible to do it with VBScript?  I realize that this is possible using ,  and other external applications, but I'm looking for something that requires no external applications to be installed.


I've been fiddling with this for a bit but I can't get it to run. Everything works except for the last section where I want it to give the month as a number. Is there a better way to do this? What I'm getting is that, whenever I run the program, the section where I want it to give me the number month always gives me the else value of 0. Yes, I know I can use a switch, and I have a version that works completely fine as a switch, but I need it to work as an if/else.  Is there anything I can do in this case?  import java.util.Scanner;  public class Months {      static Scanner userInput = new Scanner(System.in);      public static String idString(){           return "Months, Kain R, csscXXXX";      }      public static void main(String[] args) {          System.out.println("Enter the month:");          String userMon = userInput.nextLine();          if (userMon.charAt(0) > 90 ) {             userMon = userMon.substring(0,1).toUpperCase() + userMon.substring(1);         }          else {             userMon = userMon;         }          System.out.println("You entered " + userMon);          userMon = userMon.substring(0, 3).toUpperCase();           System.out.println("Its abbreviation is " + userMon);           if (userMon == "JAN") {             userMon = "1";         }         else if (userMon == "FEB") {              userMon = "2";         }         else if (userMon == "MAR") {             userMon = "3";         }         else if (userMon == "APR") {             userMon = "4";         }         else if (userMon == "MAY") {             userMon = "5";         }         else if (userMon == "JUN") {             userMon = "6";         }         else if (userMon == "JUL") {             userMon = "7";         }         else if (userMon == "AUG") {             userMon = "8";         }         else if (userMon == "SEP") {             userMon = "9";         }         else if (userMon == "OCT") {             userMon = "10";         }         else if (userMon == "NOV") {             userMon = "11";         }         else if (userMon == "DEC") {             userMon = "12";         }         else {             userMon = "0";         }           System.out.println("This is month number " + userMon);     } }

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


I wanted to give my housecarl a new weapon so I dismissed my current follower (Jenasa) and quickly had my housecarl follow me. I gave her the weapon, Had her return home, and caught Jen as she was at the door. I re-hired her. She confirmed it, then walked out the door. I waited a second and she didnt come back. I stepped outside and she wasnt there.  I found her in the Drunken Huntsman and she said I already had a follower. I tried going back to my housecarl and she said the same thing. I even tried Lydia. And no I'm not doing the companions quest. I can't reload without doing some severe backtracking. (I guess I got unlucky with my auto saves) can anyone help me? I do not have any acess to console commands.

I went to do  quest where you need to get Eldergleam Sap. The pilgrim (Maurice Jondrelle) died in a fight on the way there so I was forced to battle with the Spriggans.   They were beating me, so I decided to just book it, hoping Faendal would follow me. I noticed a while later he was gone but didn't think anything of it.   Anyway, he didn't show up and I killed the dragon, getting Lydia to join me, when I asked her to she said it looks like someones already in my group, so I looked for Faendal, finally found him back at his house after I broke in and slept in his bed.  However, he isn't in my party and when I ask him to follow me he says I've already got someone with me. I think the game still thinks Faendal is following me because I never told him to stay put, or go our own ways.  I've even tried killing Faendal, paying my fine, then getting Lydia. But she still thinks someone is with me. When I talk to Faendal, the only option I have is to improve my archery or have him follow me.  How can I unlock my follower slot so Faendal (or someone else) can join me again?


I trying to read a file, but I always get a NullPointerException. Somebody know what may be the problem? I get NullPointerException at java.io.Reader, java.io.BufferedReader, at elte.hu.eltecom.file.FileManager.readGraph and at elte.hu.eltecom.Main.main  Main:  public static void main(String[] args) {  //   if (args.length == 0) return;      FileManager fm = new FileManager();     Manager manager;     manager = fm.readGraph("szia");     User user = manager.getUserById(3);      if  (user instanceof AdminUser){         ((AdminUser) user).kickUser(manager.getUserById(1));         ((AdminUser) user).kickUser(manager.getUserById(2));          User grabowski = new User("Grabowski", Language.HUN);          manager.createUser(grabowski);          manager.linkUsers(grabowski,user);      }     fm.writeGraph(manager,args[0]); }     File Manager:  static public Manager readGraph(String s) {      FileReader fr = null;     try {         fr = new FileReader(s + "/input.txt");     } catch (FileNotFoundException e) {      }     BufferedReader br = null;     br = new BufferedReader(fr);     String sCurrentLine = null;      try {         sCurrentLine = br.readLine();     } catch (IOException e) {      }      int x = Integer.parseInt(sCurrentLine);      Graph graph = null;     graph = initGraph(x);        Manager manager = null;     manager = new Manager(graph);      int temp = 0;     boolean lineLeft = true;      try {         sCurrentLine = br.readLine();     } catch (IOException e) {     }      User users[] = new User[x];      while(lineLeft){         if (temp < x){             String line[] =  sCurrentLine.split(" ", 2);             Language language = Language.valueOf(line[0]);             User user;             String name = line[1];             if (line[1].contains("#")){                 name = name.substring(1);                 user= manager.createAdminUser(name, language);             }             else{                 user = manager.createUser(name, language);             }             users[temp] = user;         }         else {             String line[] = sCurrentLine.split(" ");             for (int i = 0; i < line.length ; i++){                 if (Boolean.valueOf(line[i])){                     graph.linkNodes(users[temp-x], users[i]);                 }             }         }          try {         if ( (sCurrentLine = br.readLine()) == null)             lineLeft = false;          } catch (IOException e) {          }         temp++;     }      return manager; } }

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?


What do you call somebody who can read but cannot write?  I found the term semiliterate, the  says        Having achieved an elementary level of ability in reading and writing.      But  defines it as      semi-literate: Unable to read or write with ease or fluency; poorly educated:   I want a word that means a person who only knows how to read. Is there such a word?

I'm looking for a term to accurately describe a person who can only read but cannot write. While I'm primarily concerned with people who have never learned to write, I would also be interested in any additional terms used to represent people who have lost the ability to write as a result of disuse.  Both illiterate and unlettered imply an inability to read as well as to write.


i've been wondering how does the interface List in java store data. An interface is a set of methods that must be implemented by a class (please correct if i'm wrong) and thus a list can't have variables to store data. For instance, List<Integer> list1 = new ArrayList<>(); list1.add(5); where will the integer 5 be stored ? Does the list1 use the ArrayList's attributes  to store data ? What really happens when i create an interface ? Does it create an object of a certain class to operate on it ? Thank you

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


Heyyo all :), I'm a bit stuck, I'm working on a 3d packshot and I want it to have a reflection below the pack but without a visible surface underneath as the PNG image will be used in various places but can have a background except a reflection under it. As you can see I've made the reflective surface no issue but its the white haze in the horizon that i want to get rid of :S Cheers Calpol

I'd like to make a glossy surface which reflects objects above it, but that also reflects a transparent background in the final render.  So in effect, the final render would contain only the reflections, not the surface itself.  Is this possible please?


I am sshing to my remote CentOS 5 server and want to run a script that takes long time.  How can I have it keep running even after I close ssh session?

If I run emacs from the shell:  $ emacs foo &   and then kill that shell, emacs dies.  How can I run a command so that it will not die when the shell dies?  I found references to nohup, but that does not seem to help:  $ nohup emacs foo &   still kills emacs when shell dies.


I am wondering if I can restore Ubuntu 18.04 as fresh installation. As new copy

I've had a lot of problems lately and now I'm having problems logging in at the login screen. I'm giving up and just want to reset and start over. How can I "factory reset" Ubuntu, in this situation, or, for future reference, in general?


I am aware of some theorem that says that if $M$ is non singular, $\det(M) \neq 0$, then: $$\mathrm{card}(\mathbb{Z}^n/M \mathbb{Z}^n)= |\det(M)|.$$ How does one prove this? Figured if I put in the context of the rational canonical form, this would help, but cant piece it together.  Thanks.  This result is mentioned in the first answer of this question:  .

The following problem came up from a though I had while reading:  Let's say we have $M=\mathbb{Z}^n$ and we have another free $\mathbb{Z}$-module, $N$, inside of $M$ also with rank $n$.  We know we can make a matrix $A$ that changes $N$ to its representation in $M$ (ie has as columns the basis $N$ expressed in coordinates coming from the basis of $M$). If the index of $N$ in $M$ is $m$, I am pretty sure just from tinkering that the determinant of $A$ should also be $m$, however, I have not been able to show this.  It is unclear to me how to proceed. I though maybe I could do something related to the points in $\mathbb{Z}^n$ that are within the unit box of $N$, but I cannot really make sense of this.  Thank you for any help or direction.


As a security nut case, I should have taken the last Drupal Core security update seriously. I did not, as we're in the process of building a brand new version of the website, and were planning on launching it onto a brand new server within the next month or two.  Until today, when I read more about it, and said "oh, yikes!" to myself.  Note that I do not have evidence that the website or the server was compromised. Everything done below was completed as a precaution.   After realizing to my horror that my MySQL backups hadn't run in quite a long time and realizing that restoring from backkups was out of the question, I pulled fresh code for Drupal Core, all of the drupal modules, and Zen.  I then deployed to a brand new server (fresh install of CentOS 7), which incidentally was a nice upgrade from the older CentOS 6 I had been using), taking a copy of the database I made today.  Obviously, the code is freshly downloaded, but my Zen subtheme and the database remains.  Before dumping the MySQL database from the old server, I did a spot check in /admin/people (This is purely an anonymous user site except for the site admin - me), the list of the content (/admin/content), and the settings on our webforms.  I didn't look at each individual page, but out of this list of what I did do, nothing seemed out of the ordinary. I also reviewed bandwidth & CPU graphs for the server, and didn't see any out-of-the-ordinary spikes in traffic.   I also ran a scan of the site using , ran a check on  (and mentally compared it to previous scans I've run), and check blacklists using .  All come up clean.  Are there any additional measures I should take to either a) ensure the website is "cleaned up" and b) check for backdoors, malware, etc...?

I just updated all my sites using the patch method of resolving the Drupal SA-CORE-2014-005 exploit. I just read reports that just yesterday there is someone from a Russian IP infiltrating drupal sites.     My main concerns are now:   How do I tell if my sites have been comprised? What should I search for in my apache access logs to detect if my site was a victim or not? So far what are these hackers doing to comprised sites?


Could you recommend a pump that can inflate this?  I want to jump off a bridge right now :/

I can't seem to fit my bike pump onto my son's bike. The tires are too small, and there isn't enough of a gap to put the head of a bike pump on the valve.  Are there any valve extenders (not permanent) that I can use when I need to inflate his bike tires?


I know this is a duplicate of past questions... But I've tried the suggestion in the first question and it didn't work. And I can't reply to the initial post, so I have to make a duplicate.  My power saver settings are off. And the popup still pops up.

I seem to have run into a bit of a challenge on one of our Android/Samsung devices...   On the device, regardless of what's open, when the battery reaches 25% on discharge, the below screen pops up and covers the entire screen, with MUCH difficulty to get rid of. I've tried to trace it to a certain app, but was unsuccessful in doing so.     Can someone perhaps help with some advice on this, on how to get rid of it?


Ok, I have no trouble setting up my server, or connecting to said server with my personal machine, but when my friend attempts to join we get this message:  Internal client error: java.net.UnknownHostException: session.minecraft.net   A quick google search seems to suggest that this is because his version is different than mine, except he's running MY FILES. (I copied my .minecraft folder and transferred them to his laptop, then we had him login once using his credentials to finalize the transfer)

My LAN server won't let my cousin join me or me join my cousin. It won't show up on the multiplayer screen - it keeps saying "scanning for LAN servers" but it never finds it. I am at his house and we use different computers but it won't connect. How can I fix this?


I am learning Reissner-Nordstrom black holes and I have learnt that the black hole contains a net charges. The static field due to it ( through the Energy Momentum tensor) exists even outside the event horizon. But I also know that nothing can escape out of an event horizon. So I have two questions-:  Why does the electric field ( static ) of a charge on the Reissner-Nordstrom black hole exists even outside the event horizon of the black hole?  If the black hole gains a some more charge ( say a charged particle does fall in the time like singularity) then the net charge on the black hole increases and a static condition is again reached. The electric field of the new static hole should also now increase. Will the change in electric field propagate outside the horizon also increase? If so how? This increase in the electric field could act as a causal influence which has now propagated outside the horizon but that should not have happened. ( The old hole had a horizon so nothing should pierce through it, and the new hole again reaches a static condition; so the change in the electric field has pierced through the horizon of the previous hole which shouldn’t have happened)

By the "No Hair Theorem", three quantities "define" a black hole; Mass, Angular Momentum, and Charge. The first is easy enough to determine, look at the radius of the event horizon and you can use the Schwarzschild formula to compute the mass. Angular Momentum can be found using the cool little ergosphere Penrose "discovered". However, I don't know how to determine the charge of the black hole.   How can an electromagnetic field escape the event horizon of a Reissner-Nordström black hole? Is there any experiment we could theoretically do to a black hole to determine its charge?


I have this Js/Ajax code:  <script type="text/javascript"> $(document).ready(function(){ $("#message").hide(); $("#addsliderimage").submit(function(e){     e.preventDefault();     dataString=$("#addsliderimage").serialize();     $.ajax({         type: "POST",         url: "addsliderimage_go.php",         cache: false,         data: dataString,         success: function(res){             //$("#message").show();             $("#message").html(res);             $('#message').fadeIn('slow');             if(res.indexOf("success")!=-1)             {                 window.location.href = res.substr(8);             }         }     }); }); }); </script>   when the form is submitted, the page with the form on doesn't change the page is just submits the data to the URL in the ajax code.  i know this works as im using it on other forms however on this particular form im uploading images/files so i need a way to set the enctype to multipart/form-data

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


I am using SingleEmailMessage api for sending emails. I want to know the email limit quota usage, so that I can prevent further exceptions. Is there any way to know the quota usage in apex, so that I can handle exception with ease.

my email limit is exceeded after sending 10-12 emails..what could be the problem..as i have seen the limit is 1000 emails/day.i am not able to find out what could be the problem..Can some give me some suggestions. As i also know we can send 10 emails in a single transaction.I am sending emails in a batch class.  I am calling this batch class on button click and filling emailList with emailsId's.                      String query='Select id from Lead';//No use of this query                     Batch_send_emails bse=new Batch_send_emails();                     bse.query=query;                                                         bse.resendEmails=emailList;                     database.executebatch(bse);           **Batch Class**           if(!resendEmails.isEmpty())           {               for(String s:resendEmails)                {                   emailsLeads.add(s);                }           }           Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();         mail.setToAddresses(emailsLeads);        // mail.setCcAddresses(ccAddresses);         String subject='GoToMeeting Invitation Details for '+subject;         String body='test';          mail.setHtmlBody(body);          mail.setSubject(subject);         Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });          }


How can I have total protection of a lens from fungus?

Recently I was using an old Pentax 50mm f/2 that had a quite big green spot, and later I was informed that it was a fungus.  A couple of questions raised from this:   Why does fungus form inside the lenses? What kind of "food" does it find in a glass element? How does it form? Due to condensation? Due to bad storage? Does it have any impact in the final image? Some scratches in a lens will probably not appear in the image because to they will be very out of focus. Is this also true for fungus? Finally, when a lens is "fungused": How do you get rid of it?     What to do about mold/fungus in a camera lens?  by   I am living in a tropical country where humidity is pretty high.  I never thought it would be possible that something could grow inside a lens, so I haven't been so careful with my canon camcorder.  Now I see there is a white spore growing on the inside of the camera lens (see photo below).  Is there any way, short of finding a camera shop (doubtful there are any in the country that can handle this), to remove this?  The spore is the white dot in the centre (it's opaque), and the dusty patch on the right of the lens is also on the inside, must be the same stuff.


In the following instances of possessive, genitive:   1)      It has taken Dan's father's breath away.   Is the possessive grammatically, correctly used?  or should it be:     It has taken Dan's father breath away.   We have 2 possessives here: first, the father of Dan, and next the breath of the father...  2)   In the following instance:     The smoke was terrible for Dan's and everyone else's health.   or, better would be:      The smoke was terrible for Dan and everyone else's health.   Tnx,

Is this the proper way to use two possessive nouns in a row?     I am going over to Lauren's parents' house this evening.   or     The store's manager's niece was quite attractive.   What about three?*     The United States Army's general's wife's dog is on the lamb, somebody stop it.   *Three seems both unrealistic, and in the specific example I used you could make a case for adding a fourth United State's Army's but I think that seems even more unrealistic.  Additionally, I would never write this in any sort of setting other than the purpose of knowing what the rules are.  Thanks in advance, I apologize in advance if this is duplicate


Suppose $X$ is a random variable with finite variance. Let $m$ denote the median of $X$ and $\mu$ the mean of $X$, i.e. $\mu=\mathbb{E}(X)$. Show $$(m-\mu)^2\leq\text{var}(X)$$  Intuitively this is definitely correct, i.e. the median and mean can not be too far. How to show it? I was thinking of using Jensen's inequality on $\text{var}(X)=\mathbb{E}(X-\mu)^2$, but it does not work.

For a unimodal distribution that is moderately skewed, we have the following empirical relationship between the mean, median and mode: $$   \text{(Mean - Mode)}\sim  3\,\text{(Mean - Median)} $$ How was this relationship derived?   Did Karl Pearson plot thousands of these relationships before forming this conclusion, or is there a logical line of reasoning behind this relationship?


I am using ubuntu 12.04. I tried to install Eclipse so I followed some steps from a website in that they have mentioned the following steps:  sudo su chown -R root:root /home/downloads/eclipse && mv /home/downloads/eclipse /opt  ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse   To execute eclipse use  eclipse   But it showed me as eclipse not installed and it showed me to install it. When I tried to install it I had net problem so it didn't install. After that I found that Downloads directory was lost.

Total Ubuntu/Linux in general noob here.   What is the difference between /home and /Home ? I've noticed I need to use sudo to do anything in /home. /Home (home folder?) has pictures, videos, etc. in it so thats where I want to really create new folders and stuff but I can't seem to get to it using cd.


Let $(x_n)$ be a sequence that converges to a number x.  Define a new sequence $(s_n)$ by $s_n= \frac{1}{n}\sum\limits_{k=1}^n x_k$  Show that $s_n$ converges to $x$ as well.

Let $(a_n)_{n \in \mathbb{N}}$ be a convergent sequence with limit $a \in \mathbb{R}$. Show that the arithmetic mean given by: $$s_n:= \frac{1}{n}\sum_{i=1}^n a_i \tag{A.M.} $$ also converges to $a$.  I have read:  but unfortunately the answers there don't help me much because I don't understand their substitutions and most of it all, why their substitutions seem to work.   What I know from the problem is that since $a_n$ is convergent and $\epsilon >0$ is given, I can say that:   $$\exists N_1 \in \mathbb{N}, \forall n \geq N_1: |a_n-a|<\epsilon_1 $$ I also know that since $a_n$ is convergent, it is bound, so $(a_n) < M, \ \forall n \in \mathbb{N}$   I need to show that: $$\exists N_2 \in \mathbb{N}, \forall n \geq N_2: |s_n-a|< \epsilon_2$$ I started as follows: $$ \left|s_n-a \right| = \left|\frac{1}{n}\sum_{i=1}^na_i -a\right|= \left|\frac{1}{n}\sum_{i=1}^m(a_i-a)+\frac{1}{n}\sum_{i=m+1}^n(a_i-a) \right| \\ \leq \frac{1}{n} \sum_{i=1}^m|(a_i-a)|+\frac{1}{n}\sum_{i=m+1}^n|a_i-a|$$ I believe to understand that the left sum after the $\leq$ is finite, bound and doesn't depend on the values that $n$ takes on. However, I don't understand where all the substitutions come from and make this proof so seemingly easy to complete.   Is there a general idea I can follow to complete such proofs? Because I know that the last step is to show that the given sum is smaller than $\epsilon$. I also know that I should bring the condition $a_n < M$ into place somewhere, but I don't know where.  If I choose an $n \geq N: |a_n-a|< \epsilon'$ what does that tell me about $|a_i-a|$? I know that they are seemingly the same just with a different index.


Situation: I am trying to minimize the standard deviation between a series of points of differing heights in a list with the constraint that each point in the list can be raised anywhere from 0 to 2 units in order to minimize the standard deviation between points. Example: I have a list of points which are equidistant on the x axis but not the y axis. h = [20, 24, 28, 24 ,20 ,18, 20, 32 ,30, 28, 20 ,24] Where each number in the list represents that point's height. I also have the constraint that each point in the list can be raised by a c value anywhere from 0 to 2 in order to help achieve a smaller standard deviation. I am trying to create an algorithm that does the optimization of minimizing the standard deviation of the points of h with the constraint that each point in h can be raised by 0 <= c <= n for an h of any length with any values and with any n > 0 I am very new to optimization problems and although I have seen problems that look similar to my question, I have not seen any that I've been able to gather enough information to help push me further towards an answer. If possible, I was hoping someone would help me define the objective function, constraints, and other necessary functions that would lead me to an answer. This is not a homework problem so therefore I have no course material to help guide me to an answer. The only guidance I have is from the comments and answers to this post. Please understand that I am in no way a mathematician so I really need all the help I can get. Thanks!

Suppose we have a list of values, $L = (x_1, x_2, ..., x_n)$, and another list of numbers, $Q = (q_1, q_2, ..., q_n), q_i$ being the maximum value we can subtract from $x_i$ (so from $x_i$ we can subtract any number in $[0; q_i]$. I want to find a combination of subtractions such that the standard deviation of the resulting list will be minimal. (In other words, I want to find a set of values, $R = (r_1, r_2, ..., r_n)$, $r_i \in [0; q_i]$ such that the standard deviation of $L' = (x_1-r_1, x_2-r_2, ..., x_n-r_n)$ is minimal.) A graphical example (the blue points are the plotted $x_i$):  Any help would be appreciated. Thanks.


I met a guy through Snapchat and he says he’s a sugar daddy. He claims he’ll pay me an allowance weekly through Cash App. But before he starts giving me an allowance he wants me to download and create an account on this Bitcoin app. I told him I did but now he wants the login information I created. Is this a scam? He’s sent me pictures of himself through Snapchat and even posts on his story. I’m having a hard time determining if this is real or not. I’ve had scammers message me and I’ve read things online, but this seems different. Please help!

Someone is offering to pay me in a sort of sugar daddy/sugar baby arrangement. They want to make online deposits to me, and they're asking me for my online banking username and password. Is that information alone enough for them to be able to take my money out of my account, or am I safe?


This OS is a nightmare to learn. What does it mean to 'install'?...

After upgrading to 15.04, I have one additional driver (it did not appear in 14.10). What is the purpose of this driver and should I enable it?


I've been contemplating asking this question (for no reason other than satisfying my curiosity) on a Stack Exchange but don't know which one to ask it on.     Following a fork() call in Linux, two processes (one being a child of   the other) will share allocated heap memory. These allocated pages are   marked COW (copy-on-write) and will remain shared until either process   modifies them. At this point, they are copied, but the virtual address   pointers referencing them remain the same. How can the MMU (memory   management unit) distinguish between the two? Consider the following:         Process A is started   Process A is allocated a memory page, pointed to by the virtual address 0x1234   Process A fork()s, spawning process B   Process A and B now share virtual address 0x1234, pointing to the same physical memory location   Process B modifies its 0x1234 memory page   This memory page is copied and then modified   Process A and B both have virtual address 0x1234, but this points to different physical memory addresses         How can this be distinguished?

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


Whenever we define a physical quantity, we know what 1 unit of that quantity tells us. For example, when we say 5 Pa, we're saying 5 N force acts perpendicularly on every unit area of the material but I've never been able to understand this for moment of force. What is 1 N$\cdot$m exactly telling me?

As a 8th grader I am still a newbie at science and I have problems understanding the forces that I can not imagine and one of these "forces" is the moment.  We are told that,  $$\text{moment}= Nm$$ but how can a certain force (i.e. $N$) be applied when there is $m$? How does it depend on the length of the considered object?  And how can 1 moment be defined on the basis of that representation?  And what would be the effect if the moment value is increased by the newton part as opposed to the effect when the value is increased by the length part.  Or is the result the same in both cases?


What is the shortest distance from the ellipse $x^2+\frac{y^2}{4} =1$ and the point (2,2).  I know that this is the projection of (2,2) onto the ellipse. How do I go about finding the shortest distance between this point and the curve?

Problem  An ellipse has the formula:  $$\frac{x^2}{9} + \frac{y^2}{4} = 1$$  What is the shortest distance from the ellipse to the point $P = (a,0)?$  Attempted solution:  I have previously solved the same problem with P = (1,0) and P = (2,0). For P = (1,0), the minimum where x = 1.8 and y = 1.6 and a distance of $\frac{4\sqrt{5}}{5}$.  For P = (2,0), the local minimum was larger than the distance between P and the ellipse at y = 0., which was equal to 1. So there is some threshold for $a$ for which the local minimum is not truly the smallest distance.  Basic strategy:  1) Solve the ellipse formula for y and put that into the distance formula for the distance between the ellipse and the point (Pythagorean theorem).  2) Take the derivative.  3) Set the derivative to 0 and solve for x.  4) Use the ellipse formula to solve for y.  5) Put in x and y in the distance formula and get the distance.  However, at some threshold the distance between the point and the ellipse where y = 0 is even shorter. So the shortest distance will have one of two cases, one between 0 and just below the threshold and one for the threshold value and above.  I figured that I could apply the same method I did for the previous cases of P = (1,0) and P = (2,0) and see if I can find some way to find this threshold.  Use the ellipse formula and solve for y:  $$\frac{x^2}{9} + \frac{y^2}{4} = 1 \Rightarrow y = \sqrt{4\Big(1-\frac{x^2}{9}\Big)}$$  Write down distance formula  $$D = \sqrt{(x-a)^2 + y^2}$$  Put in y from the ellipse formula  $$D = \sqrt{(x-a)^2 + \Big(\sqrt{4\Big(1-\frac{x^2}{9}\Big)}\Big)^2}$$  Simplify:  $$D = \sqrt{\frac{5}{9} \cdot x^2 - 2ax +4}$$  Take the derivative:  $$D' = \frac{\frac{10}{9}x-2a}{2\sqrt{\frac{5}{9}x^2 - 2ax +4}}$$  Set the derivative to zero and solve for x:  $$\frac{10}{18}x -a =  0 \Rightarrow x = 1.8a$$  Use ellipse function and solve for y:  $$y = \sqrt{4\Big(1-\frac{(1.8a)^2}{9}\Big)} = a\sqrt{0.76}$$  Putting in x and y to the distance formula  $$D = \sqrt{(1.8a-a)^2 + (a\sqrt{0.76})^2} = \sqrt{0.64a^2 + 0.76a^2} = \sqrt{1.4a^2} = a\sqrt{1.4}$$  ...but I feel like I am not getting anywhere. This is not the correct distance and the threshold is nowhere to be seen.  Expected answer is:  $$\sqrt{4-\frac{4}{5}a^2}$$  for $0 < a < \frac{5}{3}$ and  $$|a-3|$$  if $a \geq \frac{5}{3}$


*Is there a correct answer to the number of tenses in the English Languages? How can a mark be given in an examination to the question," How many tenses are there in English?" It seems that highly educated people can't come to an agreement on this issue. Can we stop debating and give an acceptable answer? Some of us are trying to learn.

Do we have 16 tenses in English?  With   future present past future in the past   in these forms   simple continuous perfect perfect continuous   Can we manipulate these together to create English tenses? For example, "present perfect" or "future perfect continuous"?


Given 2 sequences: $\quad a_1 \ge a_2 \ge \ldots \ge a_n$ $\quad b_1 \ge b_2 \ge \ldots \ge b_n$    $a_1b_1 + a_2b_2 + \cdots + a_nb_n \ge a_1b_{\pi(1)} + a_2b_{\pi(2)} + \cdots + a_nb_{\pi(n)}$    where $\pi(1), \pi(2), \ldots, \pi(n)$ is any permutation of $1, 2, \ldots, n$    is the Rearrangement Inequality.  Given 2 sequences: $\quad a_1 \le a_2 \le \ldots \le a_n$ $\quad b_1 \le b_2 \le \ldots \le b_n$    Does anyone know if there is a name for the following inequality?  $\left| a_1 - b_1 \right| + \left| a_2 - b_2 \right| + \cdots + \left| a_n - b_n \right|  \le \left| a_1 - b_{\pi(1)} \right| + \left| a_2 - b_{\pi(2)} \right| + \cdots + \left| a_n - b_{\pi(n)} \right|$

If $x_1 \ge x_2 \ge \cdots \ge x_n$ and $y_1 \ge y_2 \ge \cdots \ge y_n$ are real numbers, and $\sigma$ is any permutation, then $$ \sum_{i=1}^n |x_i - y_{\sigma(i)}| \ge \sum_{i=1}^n |x_i - y_i|. $$ This must be a known inequality. What is it called, and how is it proven? (Just a reference is OK.)    The conditions are similar to . The inequality is a simple statement about minimizing the $\ell^1$ distance between a finite sequence and any rearrangement of another finite sequence.  I searched around and clicked through various pages but couldn't find something relevant. If it is true, perhaps a proof could be constructed by decomposing the permutation into a sequence of transpositions.


The question is this:  Prove that $\mathrm{Aut}(\mathbb Z_{11})$ is isomorphic to $\mathbb Z_{10}$.    I tried to construct a mapping from $f\colon\mathbb Z_n\to \mathbb Z_n$ and $f([k])=[ka]$ where $f$ is in $\mathrm{Aut}(\mathbb Z_n)$ (I have proven that..) But I still have no idea how to keep think along this idea. Maybe it is not helpful.I am not sure..  I also confused about is that, $\mathrm{Aut}(\mathbb Z_{11})$ is a group that has a bunch of mappings, and $\mathbb Z_{10}$ is a group. How can I have a mapping, that maps from a mapping to a element of group?  How to understand about that?  Could you give some hints about this problem or help me better understand, if possible?  Thanks!

I've tried, but I can't solve the question. Please help me prove that:  $\operatorname{Aut}(\mathbb Z_n)$ is isomorphic to  $U_n$.


How do I login to Ubuntu 15.10 directly using root account?

I don't care if I mess up the system (which is likely if I do things like this), or the potential security issues that this could imply. Note, that I don't just want to "", but run my GUI from bottom-up as root. I don't want to type my password for anything but just for login and have total control over it.  Of course, I want any application running as root, like Firefox, LibreOffice, etc. without having to mess up with the terminal. So, how do I do this?     This question tries to address users that do not like the current permission system with root being separated from normal users. I do not endorse such behaviors, but if a user wants to, for whatever reason, this question should fit their corncerns.   Not advisable for new users


I a am writing a simple report with bibliography in a separate .bib file. I have one bibliography entry like:  @Misc{SVD,   title={myTitle},   author= { Kotidis , Faloutsos ,Labrinidis},   howpublished = {\url {http://..}}, }   but when I see the result in references it is     where names are out of order but mainly between Name 1 and 2 there is no comma.  To load my bibliography I use:  \usepackage{natbib} ... \bibliographystyle{plain} \bibliography{references}   Any possible explanation for this behavior?  Thanks for any reply

I use  to store all articles I need and bibtex4word add-on (in MS Word) to maintain the reference list. So, I would like to know how to properly fill the "author" field in Jabref with multiple authors to appear them correct in the reference list.  For example, I've got the article with several authors:      E. Orti, J.L. Bredas, C. Clarisse   And I would like them to appear in this manner. But instead I get this:     C. C. E. Orti, J. L. Bredas


So, long story short: An Halogen (MR16/GU5.3) light in my bathroom went out and I replaced it with an led light (from Wilko UK, 3 pack). I know nothing of electrics, but thought heck, I should be able to change a light bulb, right?  A couple of weeks go by and the Led goes out, too. I still had 2 bulbs in the "3pack" I bought, maybe this one was just dodgy? Replaced with new Led. 2 weeks later, same thing happens.  I'm wondering if, based on the supplied images, anyone could guide me in terms of what bulb to buy (Halogen or Led!), so I can stop wasting money buying the wrong bulbs.  First picture shows the old bulb (top of my hand) and the new led I bought (bottom).  Second picture shows the transformer.  Did I buy the wrong bulbs or is my issue somewhere else?

I have two GU5.3 bulbs in my bathroom - one of them went off a month or so ago so I bought the following 3 pack:   I've gone through 2 of the new bulbs in the space of weeks. I have never seen the bulbs fade out while being on, it's only when we turn the light switch on that they don't come back on (like this morning, I was first in the bathroom and the bulb was off again). No fuses blown or any indication of tripping.  How should I approach this?


Basically, I just want to know the significance of the 2nd derivative of a function, or what does it tell us.

What is your interpretation of Laplace operator? When evaluating Laplacian of some scalar field at a given point one can get a value. What does this value tell us about the field or it's behaviour in the given spot?  I can grasp the meaning of gradient and divergence. But viewing Laplace operator as divergence of gradient gives me interpretation "sources of gradient" which to be honest doesn't make sense to me.  It seems a bit easier to interpret Laplacian in certain physical situations or to interpret Laplace's equation, that might be a good place to start. Or misleading. I seek an interpretation that would be as universal as gradients interpretation seems to me - applicable, correct and understandable on any scalar field.


The links are blue and underlined, but the link is not preserved. I'm aware of freepdfconverter, but I was hoping of some other way which does not require me to put my document up on the web.

How can I convert a Word document to PDF and preserve all hyperlinks?  I have Word 2011 and Acrobat XI available on OS X.  Save As -> PDF from Word doesn't preserve hyperlinks.  Acrobat's File -> Create -> PDF... from the .docx file also doesn't preserve hyperlinks.  When testing this, please use a link whose text is not identical to the URL it is pointing to.  Many PDF readers will recognize URLs and automatically make them clickable, even if the PDF doesn't actually contain hyperlinks.


We are building our application with static libraries of Microsoft Visual Studio 2012 (Update 2).  We encounter on scenario where one bug was fixed in the library ATL-based applications and released in the MSVS2012’s 3rd update. We forced to rebuild this application with Microsoft Visual Studio 2012 (Update 3) and shipped in the production.  My question is how we can avoid such situation in the future.  Does dynamic linking solve such issue? But we need to install the redistribution package on the production environment.  Our application is in C++.

Back in the 90s when I first started out with MFC I used to dynamically link my apps and shipped the relevant MFC DLLs.  This caused me a few issues (DLL hell!) and I switched to statically linking instead - not just for MFC, but for the CRT and ATL.  Other than larger EXE files, statically linking has never caused me any problems at all - so are there any downsides that other people have come across?  Is there a good reason for revisiting dynamic linking again?  My apps are mainly STL/Boost nowadays FWIW.


I submitted a suggested edit on a tag wiki (both wiki and excerpt, both approved). That tag apparently ended up being deleted for some reason or another. This is how it shows up in my activity tab:      — still shows up as edit to "orphan wiki"  — 500 Internal Server Error   The weird thing is, looking up the  (ID of the tag wiki + 1) still works fine.

If a user makes an edit to a tag wiki that subsequently becomes orphaned, the activity entries on their profile are left looking a bit broken. For example,  shows the following:    I believe that it used to say something like "orphaned wiki" in the marked sections, which would be preferable to nothingness.


Someone who is visiting Florida and goes over the “6 month” deadline. What happens if they were to re-enter Canada? How much trouble is to be had if they were found out? Currently I've overstayed for about a week, but don't look to return to Canada anytime soon.

A Canadian was recently denied a weekend visit from Toronto to NY due to two previous overstays for about a year.   What is the the penalty for this overstay? How does he correct this so the next planned weekend doesn't get denied?


I have $\frac{1}{2}(3^{k+1}-1)+3^{k+1}=\frac{1}{2}3^{k+2}-1$  Not sure where to go from here.  First post on Mathematics, please correct me if I did anything wrong.

For some choice of $\lambda \in \mathbb{R}$ and $n$, what would be a general formula for  $$ \sum_{k=1}^{n} \lambda^k $$  as a function of $\lambda$ and $n$?


I have dozens of folders like this in my C:\ drive, I'm not sure what exactly they do (I think they may be related to Windows 7 updates) and I'm running very low on space so i'd like to be able to figure out if I can get rid of them or not.  I'm using Windows 7,  thanks in advance.

Possible Duplicate:          I have a folder named "ed6b7b66d9c1d645bfce0f8b33c3" under C: of Windows 7. I was wondering what its purpose is and if it is safe to delete? Thanks!  It takes up 120 MB. Its content is as follows:


The insulin-sensitivity check index (QUICKI) has an excellent linear correlation with the glucose clamp index of insulin sensitivity (SI_Clamp) that is better than that of many other surrogate indexes. However, correlation between a surrogate and reference standard may improve as variability between subjects in a cohort increases (i.e., with an increased range of values). Correlation may be excellent even when prediction of reference values by the surrogate is poor. Source: Chen H, Sullivan G, Quon MJ. . Diabetes. 2005 Jul;54(7):1914-25.  Based on the above I am supposed to answer how it is possible to have a high correlation while at the same time having 'poor' prediction capacity, probably due to the increased range of values. The way I interpret this is a high $R^²$ or $r$ and 'relatively' wide prediction intervals. While I have previously seen this occur in a paper as well, I don't quite get it how it is possible when I look at the formulas: $$R^² = \frac{SSR}{SST}\qquad {\rm or} \qquad1 - \frac{SSE}{SSTO}$$ And the variation that determines the width of the interval: $$\newcommand{\mean}{{\rm mean}}S^²({\rm prediction}) = MSE \frac{1 + 1/n + (X_h - X_{\mean})^² }{\sum(X_i - X_{\mean})^²}$$ With $MSE$ is mean squared error, $X_h$ is the value of $X$ for which you want to set up a prediction interval, $X_{\mean}$ is mean of all $X$ values, $X_i$ is the value of $X$ in observation $i$. To my understanding, if we were to have the same sample size ($N$) but for a  wider range of $X$s, then your $R^²$ may increase as $SSR$ increases. But at the same time, due to the wider range of $X$s the $S^²({\rm prediction})$ will also decrease as the denominator in the formula for $S^²({\rm prediction})$ gets bigger. Also, if $SSR$ increases while $SSTO$ remains the same, this also implies $SSE$ decreases. Thus, am I right to say that this ($R^²$ high, predictions poor) can only occur when the $MSE$ remains unchanged and is relatively high, while $SSR$ and $SSTO$ increase (so that your $R^²$ increases)? Or should I say: that the proportions of all elements in the $R^²$ formula (i.e.: $SSR, SSTO, SSE$) remain the same, but increase in absolute numbers. So that the MSE increases for the $S^²({\rm prediction})$, having less precise predictions, while $R^²$ remains high?

I've fitted my model and am trying to understand whether it's any good. I've calculated the recommended metrics to assess it ($R^2$/ AUC / accuracy / prediction error / etc) but do not know how to interpret them. In short, how do I tell if my model is any good based on the metric? Is an $R^2$ of 0.6 (for example) sufficient to let me proceed to draw inferences or base scientific/business decisions?     This question is intentionally broad, to cover a wide variety of situations that members frequently encounter; such questions could be closed as duplicates of this one. Edits to broaden the scope beyond the metrics mentioned here are welcome, as are additional answers - particularly those that offer insight about other classes of metrics.