How do we deduce that an ellipse, when defined as a "stretched circle", has foci?

I've learned two separate ways to define an ellipse:   It's a stretched circle. We get the formula for a unit circle, $X^2 + Y^2 = 1$, and stretch it by dividing the terms like so: $(\frac{X}{a})^2 + (\frac{Y}{b})^2 = 1$. In order to satisfy the same equation, for every $Y$ we previously had, $X$ must get stretched by a factor of $a$, and for every $X$ we previously had, $Y$ must be stretched (multiplied) by a factor of $b$.  An ellipse is the set of all points whose sum of the distances from two points, the foci, is a constant. We can represent this with the equation $\sqrt{(x+f)^2 + y^2} + \sqrt{(x-f)^2 + y^2} = c^2$,  where $c = 2a$ from the previous equation, $f$ is the distance from a focus to the origin, and $x$ and $y$ are the variables.    But as far as I've learned, it all seems like everything having to do with the foci in the first definition comes from first accepting that the foci DO indeed exist from the second definition. I can't seem to find a connection between them (the first definition doesn't even have an $f$ in it!!!).      How can we deduce that such "foci" exist from the first explanation?  Every explanation of ellipses I've seen seems to use the stretched circle equation, and then go on to deduce the rest of the characteristics of the ellipse but only ASSUMING that the foci exist in the first place.   Thank you!


Finitely generated group which is not finitely presented

Is there any easy group theoretical way of showing that the wreath product $G$ of two infinite cyclic groups is not finitely presented?  I was looking for a finitely presented group with a central subgroup isomorphic to the free group of countable rank and whose factor group is isomorphic to $G$; in this way assuming that $G$ is finitely presented we get a contradiction.   Any ideas?


Factorising fourth power polynomial with 5 terms

I've searched all over the internet and cannot seem to factorise this polynomial.  $x^4 - 2x^3 + 8x^2 - 14x + 7$  The result should be $(x − 1)(x^3 − x^2 + 7x − 7)$  What are the steps to get to that result? I've tried grouping but doesn't seem to work...


Select all rows that have '_' in a given column

I want to select the rows that have a  '_' character in a given column from SQL. when I try to run this query, it returns all the rows in the table  SELECT * FROM [Attribute] where LibID=26 and Name like '%_%'   but the following query yields what I need  SELECT * FROM [Attribute] where LibID=26 and CHARINDEX('_', Name) > 0   why my first query is not returning expected result. Maybe I am missing some information/knowledge of SQL.


"Those who hold ..." vs "Those whom hold ..."

Random English exercise for myself because I like words:   Those who hold the plant will die.  Those whom hold the plant will die.    Which sentence is grammatically correct?  Opinion: It is the first sentence because it sounds better... but who 'm I to judge? (Sorry for the pun :P) I tried to structure the two sentences differently like the following, and see which sounded better:   He who holds the plant will die. Him who holds the plant wil die.   From what I can tell, "he" refers to "who" and "him" refers to "whom". In my opinion, these both sound ok... but when I change "he" to "she" and "him" to "her", the second sentence sounds awful:   Her who holds the plant will die. (yikes!)   So I believe the first sentence most above is correct (i.e. the one with "who" as opposed to "whom").  Made-up word: Enshadow: verb  1. envelop in shadow (e.g. The moon will enshadow us once the eclipse begins.)  2. hide something discreetly (e.g. We thought he was honest, but the truth was enshadowed.)


Why isn't it safe to use EF-S lenses on fullframe?

I've heard that EF-S lenses are not compatible with full frame bodies and that using such lenses could damage the mirror.  Are the EF-S lenses not compatible with full frame bodies in terms of "not optimal image quality with larger sensors" or are there more important problems like damage of equipment? Does the same issues apply for both fixed lenses and zoom lenses?


proving that a recursive sequence is monotonic and bounded

Let $\{a_n\}$ be a sequence such that $a_1 = 1 , a_{n+1} = \sqrt{6+a_n}$. We want to prove that this sequence is monotonic (increasing) and it is also bounded. So we can prove that it is convergent. I don't know how to start proving it that it is bounded. It is very easy to see that it is convergent to 3 by testing some number or if we think that we know it is convergent and then finding its limit in infinity. But I don't know how I can prove that it is bounded and monotonic so I can prove that it is convergent.


$p$ smallest prime dividing $G$ subgroup with index $p$ normal in $G$

I am struggling to understand this proof. Suppose that $p$ is the smallest prime that divides $|G|$ show that any subgroup of index $p$ is normal in $G$. Proof Let $\phi \rightarrow S_p$ be the homomorphism given by the generalized Cayley theorem. We claim $ker(\phi)=H$ which implies $H$ is normal. By first isomorphism theorem $|G/Ker \phi|$ divides $|S_p|=p!$ON the other hand $|G/Ker \phi|$ divides $|G|$ by lagrange's theorem. Since $ker\phi \leq H$ and $p$ is the smallest prime factor of $|G|$, $ker\phi=H$. I am struggling to understand this if anyone could help explain this?


Suppress field "pages" when page is specified in postnote with verbose citations

I'm using the ext-verbose-trad2 biblatex style. When I specify the page of the citation using the command \cite the output prints the pages field of the entry, resulting in a redundant page reference. Here a brief code as an exemplification \documentclass[12pt, a4paper, openright, twoside]{memoir}  \usepackage[italian]{babel}  \usepackage[style = ext-verbose-trad2, articlein=false, firstinits=true, ibidpage=true]{biblatex}   \begin{filecontents*}{\jobname.bib}  @inbook{InbookCecchi,    author   = {Cecchi, C.},   title= {Perseverare},   bookauthor = {Cecchi, C.},   booktitle = {Diabolic issues},   editor = {Faffi, F. and Jollie, J. K.},   date = {1980},   pages = {15-18}, }  @article{ArticleTotti,    author   = {Totti, Q.},   title= {Grammatica sbagliata},   journaltitle = {Proceedings in errors},   number = 12,   volume = {XV},   date = {2025},   pages = {223-567}, }  \end{filecontents*}  \addbibresource{\jobname.bib}  \begin{document}    \cite[16]{InbookCecchi}.    \cite[240-251]{ArticleTotti}.  \end{document}  This gives the result:  I want to avoid the underlined pages reference, corresponding to the pages field in the respective entry, since I’m already specifying at which page I’m referring to.


the witcher 2: kayran infinite healing bug

When I fight the first boss, Kayran (difficulty: Dark, version: 3.3.3.1, no mods), I attack the tentacles but they don't get cut. The life of the monster goes down a bit with each attack until disappointingly the bar returns full or almost full, in an infinite cycle. Nothing else happens.  How can I defeat Kayran?


Execute `ls` whenever user does a `cd` on terminal

I know bashrc is executed on terminal startup. But my use case is something like this,    To execute a specific command, say ls, whenever user executes another specific command, say cd, on the terminal.  My current solution is overriding cd command. But again that I feel is not a good solution. But my restriction here is that my user-group may not be aware of this new command that I may create and continue using cd.


Why DOES == sometimes work on Strings in Java?

I have the following code:  Circle c1 = new Circle(); Circle c2 = new Circle(); System.out.println(c1 == c2);   Which outputs False, as expected. This is because c1 and c2 are reference types and "==" checks if they refer to the same type (which they don't).  However, I recently tried this:  String a = "hello"; String b = "hello"; System.out.println(a == b);   Which for some reason outputs True. Why is this? String is a reference type and a and b refer to different memory locations. I was always taught that you need to use .equals() for this to work, which this does not!  See:   UPDATE THIS IS NOT A DUPLICATE! I know the proper way to compare strings is using .eqauls()  UPDATE 2 This question may have an answer in: , but the question there wasn't asking what I am asking and the answer just went in more detail than required.   Therefore searching with my same question (on Google or otherwise) means users won't be sent to that question or may dismiss it entirely due to the title of the question. Therefore it may be a good idea to keep this up for benefit of other users!


What is the best way to load and reuse List objects in MVC controller

I am developing a MVC project though I am new in MVC, where I have a function which is loading database values. I am using this function in different places within the same controller. When I have checked the SQL profiler, I found that everytime its running the procedure where I used that function.  My question is what is best way to use the function which will call the procedure in the first time and from next time, it will use the same value.  Thanks in advance  Updated:  public List<DataRow> SalesCount() {               List<DataRow> lstSales = new List<DataRow>();     string str_salesClass = adding session value here;         return lstSales = SalesRepository.SalesCount(SessionValue);         }


Old Ubuntu Desktop Failing to Update (Failed to fetch)

My colleagues and I are attempting to run some updates on a computer with Ubuntu 12.10, which has been unused for some time. However, when we try running sudo apt-get update the terminal returns several error messages, of which here is a sample:  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/main/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/universe/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]   The full log is here:   I've heard some have had the same problem, apparently Ubuntu cannot handle large amounts of updates? At the moment, we have about 500 to install :(  How would we go about fixing this problem? Thanks for the assistance.


How can older players play for a U-21 team in England

This question may apply to other leagues in other places, but recently I saw an article about  and . Both players are over 21 and make semi-regular starts for the Manchester United senior squad. How are they also allowed to play for the U-21 reserve team when they're obviously over-age?


How do I collect arguments from the command-line?

I am very new to shell scripting and using CLI all together. However, I want to create a simple program that can collect arguments from a user.  Optimally, I want my shell script to get a network name and instance name from the user, and assign the values to variables.  I know that $# can be used to gather arguments, but are there any other ways? I often notice when I make a command, there is, for example, something like this: $create --instance_name NAME . Can I gather an argument by using -- to specify the parameter? If so, here is an example of the command:  $collect_variable.sh --network NETWORK_NAME --instance_name INSTANCE_ID  Once again, thank you for any help. I am very new to stack overflow and unix all together, and any help is appreciated.


Word meaning A journey of self discovery and introspection

What would be an appropriate word for "A journey of self discovery and introspection" or possibly, "To discover that you are not how you conceptualized yourself"?


Let $f:\mathbb{C}\to\mathbb{C}$ be a complex valued function of the form $f(x,y)=u(x,y)+iv(x,y)$. Suppose that $u(x,y)=3x^2y$. Then  $f$ cannot be holomorphic on $\mathbb{C}$ for any choice of $v$.  $f$ is holomorphic on $\mathbb{C}$ for a suitable choice of $v$.  $f$ is holomorphic on $\mathbb{C}$ for all choices of $v$.  $u$ is not differentiable.    () well, I have calculated by applying CR equation, getting the option $1$ is correct? could anyone tell me  just am I right?thank you.


Which country visa should i apply to? - Schengen

My port of entry and exit is Frankfurt, Germany. However i will only be spending a day or two there. I am visiting Spain and Portugal for a week each. So should I be applying to Spain embassy or German embassy? I am an Indian citizen.


Move a portion of a sector along the tangent of a circle

I have to rotate a portion of a sector of the circle at an angle θ and then move the region along the tangent for a distance 'lateral offset' as given in the following image.  I used the below logic:  Rotate the tangent point at angle θ. Calculate start and end angle of the sector using the width of the sector. Translate the the center of the circle with lateral offset in the direction of our target point Apply start and end angles from the new center point to filter out the translated sector region.  The idea is to move the center of the circle parallel to the tangent to identify the translated sector points. Is this approach correct? Is there any other optimal way to solve this problem?


What's the hierarchical relationship between a Module and a Class?

In .NET, we have the types interface and class. There are a few relationships between these two types. In this example, we have all the relationships in .NET:  class Vehicle { }  interface IMovable {    void Move(); }  class Engine { }  class Car : Vehicle, IMovable {    private readonly Engine _engine;    public Car(Engine engine) { _engine = engine; }     public void Move() {} }    Car extends Vehicle - a Car is-a Vehicle Car implements IMovable - a Car can-do IMovable Car needs an Engine to create itself - a Car has-a Engine   But I don't understand Ruby's modules because they have functionality but they aren't interfaces (in that they define method bodies, so they are more akin to subclassing), but they aren't superclasses (because multiple inheritance is not done in Ruby).  Can someone help me understand the usage of modules in Ruby and possibly give an analogy to .NET?  EDIT: Seeing the 3 votes to close due to duplicate, I must clarify. I am asking what is the relationship between classes and modules (given that classes implementing interfaces is can-do in .NET). The 'duplicate' answer does NOT address that question.


What do you call food that is hot in temperature?

For example, do you say "hot soup"? I ask this because the word "hot" is ambiguous. It could mean "spicy." If "hot soup" is ambiguous, what do you call it? The shorter, the better.


Repeating the question from the title:  Question. Let $(a_i)_{i=1}^{\infty}$ be a sequence. How to show that $\liminf_{n \rightarrow \infty} ≤ \limsup_{n \rightarrow \infty}$?  So far I've only managed to show that the inequality holds in one specific case, that is, the case where $\limsup_{n \rightarrow \infty}$, $\liminf_{n \rightarrow \infty}$ are the elements of sequences $(a_{i}^{+})_{i=1}^{\infty}$ and $(a_{i}^{-})_{i=1}^{\infty}$, respectively (in this case the proposition holds, since for arbitrary $N,M ≥ 1$, we have $\sup(a_i)_{i=N}^{\infty} ≥ \inf(a_i)_{i=M}^{\infty}$, even if $N ≠ M$). I've tried to generalize by using contradiction, but it led me nowhere. More concretely, if for the sake of contradiction we assume that $\liminf_{n \rightarrow \infty} > \limsup_{n \rightarrow \infty}$, then it must be the case that $\liminf_{n \rightarrow \infty} > a_n$ for all $n≥N$ and some $N$ (this is the result from the previous exercise in the textbook). This doesn't lead to any contradiction though, since there are sequences where limit inferior is larger than all elements of the sequence past a specific point (e.g., consider the sequence $0.9,0.99,0.999,\cdots$; limit inferior in this case is $1$, which is larger than any element of the sequence)


I have seen that soccer fields vary in size. However, I believe there must be an agreed upon dimension for professional fields (Premier League, La Liga, MLS, etc.) What are these dimensions??  Either feet, yards, or meters works fine.


I was reading a book on cryptology and thought it would be a cool idea to write a small program that encodes and decodes a message.  I started out with a simple substitution cipher which would substitute a letter with a different letter, shifted a certain set amount. IE. one example would be: a->c, b->d, etc. just shifted by 2.  My code doesn't seem to be substituting the letters correctly. It always outputs the same thing I input, even thought the Key is set. Here is my code:  public class Keyshift {  public static int Key = 0;  public static void selectKey(){     Scanner in = new Scanner(System.in);     System.out.println("Enter an integer");     int a = in.nextInt();     Key = Key + a; }  public static void encode(){      String input = "";     Scanner in = new Scanner(System.in);     System.out.println("Enter a string");     input = in.nextLine();      String[] inputLetters = input.split("");     String[] output = new String[inputLetters.length];      String dictLowercase = new String("abcdefghijklmnopqrstuvwxyz");     String dictUppercase = new String("ABCDEFGHIJKLMNOPQRSTUVWXYZ");     String[] dictLowerArray = dictLowercase.split("");     String[] dictUpperArray = dictUppercase.split("");       for(int i=0;i<inputLetters.length;i++){         for(int c=0;c<25;c++){             if (inputLetters[i]==dictLowerArray[c]){                 output[i] = dictLowerArray[((c+Key) % 26)];             }             else if (inputLetters[i]==dictUpperArray[c]){                 output[i] = dictUpperArray[((c+Key) % 26)];             }             else {                 output[i] = inputLetters[i];             }         }     }     System.out.println("Your encoded message is: ");     System.out.println(Arrays.toString(output));        //System.out.println(Key); } /**  * @param args the command line arguments  */ public static void main(String[] args) {     // TODO code application logic here     selectKey();     encode(); }  }


I know the question sounds silly, however all I could find is the mathematical proof justifying the same but the convincing inference is still missing. My intent basically was to ask for the better comprehension of "there is only one way of arranging no objects."  Please be polite.


While developing a PHP application, I ran into this strange quirk.   Apparently, the string '01' == '1', '05' == '5', '03111' == '3111'. I tried this -    php > $numbers = ["1", "2", "3", "4", "5"]; php > in_array("01", $numbers); true php > var_dump("01" == "1"); true php > var_dump("00003333" == "3333") true   How do I prevent this (i.e return false for the in_array call) , and why is it happening in the first place?


What is the name of this moveable multiselect list?

This is killing me. I am trying to find out what is the name of this UI component that has two multiselect controls, where the left is a list of available items and the right is the list of selected items, with some buttons for moving in-between.    I have a need for a rather large list of available selections and the user needs to also be able to see those selections. I am open to alternative components that can accomplish the same goal, but since the number of items selected will be rather large, the "tag" approach seen with multiselect components like  are not optimal.


Purpose of the hidden variables in a Restricted Boltzmann Machine

From the part titled Introducing Latent Variables under subsection 2.2 in this :  Introducing Latent Variables. Suppose we want to model an $m$-dimensional unknown probability distribution $q$ (e.g., each component of a sample corresponds to one of m pixels of an image). Typically, not all variables $\mathbf{X} = (X_v)_{v \in V}$ in an MRF need to correspond to some observed component, and the number of nodes is larger than $m$. We split $\mathbf{X}$ into visible (or observed) variables $\mathbf{V} = (V_1,...,V_m)$ corresponding to the components of the observations and latent (or hidden) variables $\mathbf{H} = (H_1,...,H_n)$ given by the remaining $n = |\mathbf{V}| − m$ variables. Using latent variables allows to describe complex distributions over the visible variables by means of simple (conditional) distributions. In this case the Gibbs distribution of an MRF describes the joint probability distribution of $(\mathbf{V},\mathbf{H})$ and one is usually interested in the marginal distribution of $\mathbf{V}$ which is given by: $$p(\mathbf{v}) = \sum_{\mathbf{h}} p(\mathbf{v},\mathbf{h}) = \frac{1}{Z} \sum_{\mathbf{h}} e^{-E(\mathbf{v},\mathbf{h})}$$ where $Z = \sum_{\mathbf{v},\mathbf{h}} e^{-E(\mathbf{v},\mathbf{h})}$. While the visible variables correspond to the components of an observation, the latent variables introduce dependencies between the visible variables (e.g., between pixels of an input image).  I have a question about this part:  While the visible variables correspond to the components of an observation, the latent variables introduce dependencies between the visible variables (e.g., between pixels of an input image).  Given a set of nodes $\mathbf{X}$ in a Markov Random Field $G$, the joint distribution of all the nodes is given by: $$p(\mathbf{X}) = \frac{1}{Z} \prod_{c \in C} \phi(c)$$ Where $Z$ is the partition function and $C$ is the set of cliques in $G$. To ensure that the joint distribution is positive, the following factors can be used: $$\phi(c) = e^{-E(c)}$$ Such that: $$p(\mathbf{X}) = \frac{1}{Z} e^{-\sum_{c \in C} E(c)}$$ Where $E$ is the energy function. I am not sure why there is a need to introduce hidden variables and express $p(\mathbf{v})$ as a marginalization of $p(\mathbf{v},\mathbf{h})$ over $\mathbf{h}$. Why can't $p(\mathbf{v})$ be expressed as: $$p(\mathbf{v}) = \frac{1}{Z} e^{-\sum_{v \in \mathbf{v}} E(v)}$$ directly? I think it may be because the factors only encode dependencies between variables in cliques, and so may not be able to encode dependencies between variables that are in two separate cliques. The purpose of the hidden variables are then to encode these "long-range" dependencies between visible variables not in cliques. However, I am not sure about this reasoning. Any help would be greatly appreciated.


Remove 2 vote requirement to approve suggested edit

What is the reasoning for the 2 vote requirement to approve a suggested edit?  If a 2000+ rep user has the ability to edit on their own, then why do they need to vote to approve a suggested edit?  I propose removing the 2 vote requirement for 2000+ rep users as those users have the ability to edit on their own without a vote.


segmentation fault during char pointer operation

I am new to C programming and was try on some simple code. I got a "segmentation fault" for below code, please help.  The code as below:  #include <stdio.h>  int del_substr(char *str,char const *substr);  int main(void) { char *str="welcome"; char *substr="com"; int result;  result=del_substr(str,substr); if(result==1) {     printf("find and deleted! new string is %s\n",str); } else {     printf("did not find the substr\n"); }  return 0; }  int del_substr(char *str,char const *substr) { int i=1; char *temp=NULL; while(*str!='\0') {     if(*str==*substr)     {         while(*(substr+i)!='\0' && *(substr+i)==*(str+i))         {             i++;         }         if(*(substr+i)=='\0')         {             printf("We find it!\n");             temp=str;         }     }     if(temp!=NULL)     {         break;     }     else     {         str++;         i=1;     } } if(temp!=NULL) {     while(*(temp+i)!='\0')     {         *temp=*(temp+i);         temp++;     }     *temp='\0';     return 1; } else {     return 0; }  }   This code is meant to find substr in str and then delete substr from str, moving everything behind substr forward, return 1. else if failed in the searching, return 0 instead.  when the code runs to below line, a segmentation fault is showing up.  *temp=*(temp+i);   Can anyone help? Thanks so much in advance.  Thanks.


How can I increase the loudness of Firefox on Windows 10 over 100%

If there a way in Firefox on Windows 10 to increase the sound when I play a YouTube video at 100% loudness with 100% loudness on the system level as well?


A canonical construction proving $\left|HK\right| = \left|H\right|\left|K\right| / \left|H \cap K\right|$?

Let $H$ and $K$ be subgroups of a finite group $G$.  A standard result is the formula $$\left|HK\right| = \frac{\left|H\right|\left|K\right|}{\left|H \cap K\right|}$$ for the cardinality of the set $HK$. The proofs of this that I've seen always involve some arbitrary choice, such as the choice of a transversal for $\{hK \colon  h \in H\}$. Is there a way to show that these quantities are equal without making such an arbitrary choice?  For example, can they be shown to be the respective dimensions of a pair of canonically isomorphic modules?


I installed additional 8 Gb of RAM on a system recently. Everything was running fine before I observed that the system randomly froze, I don't know what the proper term is, but the screen just hangs up on a static frame, and the PC, just hangs up. And it usually happens when I am playing games on it;  I took following steps to check what is wrong: Updated all the drivers Clean OS install  Removed the newly installed RAM sticks Removed the old ones and checked with the new ones only  Removed any additional peripheral  Memtest, with no errors  Check disk, no errors System file verification, no errors  One thing strange thing happens, when the system hangs up, my keyboard just powers down, and it's a Logitech G510, and with power downs I mean that it goes blank, and that is rare since even during crashes, usually the keyboard backlight is there.  The specs of PC are:  Windows 7 professional x64 Intel core i3 3rd generation(3240) Intel Z75 based m-ATX motherboard(Intel DZ75ML-45K) Nvidia 550ti  2*2gb ram sticks @1333(corsair) 2*4gb ram sticks @1333(transcend) Microsoft wireless combo  Logitech G510 keyboard  450w cooler master smps  Htpc cabinet   The temperatures are within range during load; they rarely cross 70C  GPU stress test sometimes crashes the system, and sometimes goes on for hours without any crash.  Any guess what might be wrong?  (Sorry for not being able to give exact specifications of PC, and I hope this is the right section for asking such questions)


I am making a new animation for a company, based on their previous version that I have received. The previous version is at some arbitrary scale, but since I am updating and adding geometry (new product) it would be nice to have the scene to scale. (1 blender unit = 1m) Just resizing everything is not enough, as some objects pop back in place & size due to animation keyframes.  Is there an easy way to scale the whole scene, including camera animation, textures etc. so that I can work on it "to scale"?


The set of formal power series over a fieldis a local ring?

Let $\mathbb{K}$ be a field, and consider $\mathbb{K}[[x]]$, the ring of formal power series with coefficients in $\mathbb{K}$, i.e. the set of expressions of the form $$\sum_{n=0}^{\infty}a_n x^n,\quad a_n\in\mathbb{K}$$ with the usual rules for addition and multiplication. How to show that $\mathbb{K}[[x]]$ is local ring ?  Thank you in advance


Python Classes properties and namespaces

I have a few questions regarding programming terminologies.  1)I have the following code:  class Dog(object):         population = 0               ## class variable--for every instance of Dog, population will be increase by 1                     def __init__(self, name):                self.name = name                     self.num_legs = 4             Dog.population += 1     ## <== add 1 to Dog population         def get_num_legs(self):                  return self.num_legs  dog1 = Dog('dog1')   dog2 = Dog('dog2')  print(Dog.population) print(dog1.population)   ## What happened?##   dog1.num_legs = 2  #changes the instance property of dog1 print("Dog1 has {} legs".format(dog1.get_num_legs())) print("Dog2 has {} legs".format(dog2.get_num_legs())) Dog.num_legs = 10  #changes the class variable of Dog Class dog1 = Dog('dog1')  ## An instance of class dog  dog2 = Dog('dog1')  print("Dog1 has {} legs".format(dog1.get_num_legs())) print("Dog2 has {} legs".format(dog2.get_num_legs()))   The output to this code is 2,4,4,4, and I would think that the reason why the class variable num_legs will not ever be shown to be 10 when we do print(instance.num_legs) is we always check whether the instance has a property of num_legs before we try to read from the class variable(In this case there will always be that property).      However, this is just my laymen interpretation and I'm trying to find out what's the explanation with programming terminologies. Is it something similar to the namespaces and scopes in nested functions?


How do I get the surface area of a mesh? Preferably no python involved.


How much damage could a 'C' in Abstract Algebra Course cause? and How to minimize the effect?

I'm an undergraduate math major student in my junior year. I've taken Abstract Algebra 1 last fall. I got  a C in that class (I got 65%). In most of my previous courses I got A's, and in some courses I got B's. I know that such a grade would cause much damage to my application (I intend  for graduate programs that I intend to apply for next winter, while being in my senior year).  I want to point out some things regarding my situation:   In my college, we can not re-take a passed course no matter what, that is, I can not re-take the course (I wished if I got F in that class so that I can re-take it and get a better grade, but I passed it with 65 point from 100). So I can not re-take it and it will be in my final transcript which will be sent to the programs I'm applying for.  This semester, I'm taking Abstract Algebra II and I'm aiming to get as high grade as I could, I wonder if doing so would minimize the damage of this C.  My GPA was 3.8 of 5 (~88%) before my fall semester, now it's 3.6 (86%), in a great part due to this C.   My question is: how much damage such a grade would cause? What are the best ways to minimize those damages? Do I have any chances to get admitted to good school with this C in my transcript? What about top schools like Berekely etc? Do I even have a chance?  Regarding the possible duplicate: Although the answer in the proposed question is great, I think that my question may have more specific answer since it is directed towards a specific field namely, mathematics. So, an emphasize on reference letters, research experience  or motivation letters may be more significant and crucial in math more than in other disciplines. Hence, I believe a more specific and tailored answer can be provided to my question rather than a general answer for bad grades.  Some (Clarifying but un-important) remarks:   Some people may think that I'm not good enough and this was the reason I got C in that class but I want to point some facts regarding that:   In my university, this course is not a challenging course, so it's normally easy to pass it with a good grade because the material and the treatment is not advanced or demanding. I got A's in the most demanding courses in my department. Regarding getting a C, this was due to several factors: First of all, I faced some problems in the two days before the exam, I went to the final exam without any sleep for a period of nearly 30-35 hours and I was very tired, I was sleeping in the exam and fully exhausted mentally. I faced some psychological problems for most time in this fall semester which had bad effect on my grades in general, but specially, the situation was catastropic in the algebra course. This C is not due to my lack of knowledge: in fact, I've mastered the topics in the course since High School (It's a Group Theory course - I went through most of Dummit and Foote doing almost all of the exercises in my high school years). It was due to an urgent problems at the time.  I'm not a bad student, as an indication for that: in the same semester, I've attended two graduate courses, one in Module Theory and the second in Forcing (set theory) and both of the professors considered me as one of the best students in the class although I was the only undergraduate. Sadly, we can not take graduate courses for credit in my uni, so my attendance was not official, I was attending because I wanted to learn the stuff. Also, I've attended a graduate course in Algebraic Logic in my sophomore year, and same impressions were made by the professor. In my sophomore year, I was meeting some professors regularly to guide me to self-study Category theory and Commutative Algebra.  My GPA is currently the HIGHEST GPA among my fellows in the same program, which may indicate that such a C is not normal for me.  Some people may ask, why did you take this course if you already know the material? Answer: in my college, most courses are mandatory, so I must take them even if I've mastered the content. This course is one of those mandatorycourses.


How do I get junk off a reluctant toddler's teeth?

I have a two-year-old son who is extremely mild-mannered but hates having his teeth brushed. He cries, squirms, clamps his mouth shut, sticks out his tongue to block the toothbrush, etc. He's been getting better about this lately, but I still don't get a lot of time to brush his teeth before he starts making it very difficult.  My wife and I have noticed that he seems to have a significant amount of... something... built up on his bottom teeth around his gums. Even when he allows me to brush his teeth vigorously for a minute, I can't get the buildup off. What is this stuff? Is this dangerous to his oral health? How can I get it off?  At this point we still haven't brought him to a dentist. I can't imagine any possible way will allow a stranger to stick his hands in my son's mouth for any extended period of time to clean his teeth.


How does voltage behave in a parallel circuit?

I am studying the series and parallel combinations of capacitors and resistors. I do know that voltage is divided in series whereas it's the same for all circuit components in parallel combination and the vice versa for current, I just want to know the logic behind it. I have read other posts about it, but I don't quite understand them so I'd just like a summarized, to the main point answer. Any help would be appreciated.


Determine if a given function is a Polynomial

How i can show that if $\lim_{z\rightarrow\infty}\frac{|f(z)|}{|z|^{m}}=0$ then $f(z)$ is a polynomial of degree $< m$? Note: $f(z)$ is a polynomial in $\mathbb{C}[x].$ Thanks,


Exception in thread "Thread-2" java.lang.NullPointerException ObjectInputStream

I am a beginner in java I am trying to make a communication with serialPort, however at the time of executing the method that receives data it throws me the error.     Exception in thread "Thread-2" java.lang.NullPointerException at   Controlador.ControladorMain$4.run(ControladorMain.java:354) at   java.lang.Thread.run(Thread.java:748)   I do not understand that it is failing, I have tried the code on another computer and there it does not throw the error I am confused, someone can help me.  public void receiveFile() {     final InputStream in=serialPort.getInputStream();     Thread t;     t = new Thread(new Runnable() {         @Override         public void run() {             System.out.println("listening...: ");              while (true) {                 FileOutputStream file = null;                 ObjectInputStream out = null;                  try {                                             out = new ObjectInputStream(in);                      if (view.jCheckBoxArchiboR.isSelected())                          file = new FileOutputStream("File.txt");                     else                          file = new FileOutputStream("content.txt");                       byte[] buf = new byte[1024];                      while (true) {                         if (!view.jCheckBoxArchiboR.isSelected())                            view.jTextAreaBinRecibido.setText(textoABinario(fileRead("content.txt")));                          int len = out.read(buf);                          if (len == -1)                              break;                          file.write(buf, 0, len);                     }                     if(out.available()<1)                         sendFile("ack.txt");                   } catch (IOException ex) {                     ex.printStackTrace();                     System.out.println("An error occurred while receiving the file");                  } finally {                     try {                     out.close();                     } catch (IOException ex) {                         ex.printStackTrace();                     }                 }             }         }     }     );     t.start(); }   line 354 where the error appears is this.   out.close();


Locate .srt files in different directories and change character encoding

I have a great script that I use to convert encoding in srt.files.  I also created an alias for that script so I can enter the directory where I want to run the script and use my alias konvert.  However, I have now the the following scenario: more then 20 directories with srt.files inside. What should I do in order to point my script to all those directories with just one command?  Luckily all these directories are together inside one main directory, so I believe there should be an easy way to do this.   Content of the script  #!/bin/bash for file in *.srt; do iconv -f CP1250 -t UTF-8 -o "$file".utf "$file" && mv "$file".utf "$file"; done


Scoping rule - let keyword - TypeScript/JavaScript

In the below sample code,  let a: number = 1; // Global(G) function f(){     // let a: number = 1; // Enclosing(E)     return function g(){         // let a: number = 1;  // Local(L)         return a;     } }  console.log(f()());     Does let keyword follow LEGB rule for variable lookup, similar to python?


Best place to discuss question relate to angularjs2.0 transition

I have a discussion need to post about AngularJS 2.0 and people's opinion on js framework's future.  Where is the best place to post such discussion?  Thanks!


Difference in usage of power series and Fourier series

Both a power series and a Fourier series can be used to approximate a function.  How do you use these differently?


Rotate an object smoothly on the Y axis in Unity

I am attempting a simple script to swing a door open in Unity.  This requires a smooth rotation of 90 degrees around the Y axis.  I have seen that one way to do this is using Unity's Quanternion object.  I believed that this should work:  public class DoorOpenScript : MonoBehaviour  {      public float smooth = 20;      // Use this for initialization     void Start ()      {            SwingOpen ();     }      // Update is called once per frame     void Update ()      {      }      void SwingOpen()     {            Quaternion newRotation = new Quaternion(transform.rotation.x,transform.rotation.y,transform.rotation.z,transform.rotation.w);;         newRotation *= Quaternion.Euler(0, 90, 0); // this add a 90 degrees Y rotation         transform.rotation= Quaternion.Slerp(transform.rotation, newRotation,20 * Time.deltaTime);            }  }   However, this just opens the door completely. I have tried playing with the third parameter to Slerp but with no results. What am I doing incorrectly?


Windows 8 hibernation option missing from power options

Windows 8 Professional 32-bit running on Laptop. And the Hibernation option is missing from the Power Options in the System Settings. Even after I enable hidden power features by giving admin privileges.  How can I fix this?    Also the option to enable hibernation is missing from the advanced power plan options.      SOLUTION UPDATE:  Thanks to  I have found that you need to enable hibernation using a command prompt.   Get to the Start menu, type 'CMD' this will begin the search. Press the CTRL+SHIFT+ENTER to start the command prompt with administrative privileges. Type powercfg -h on and press enter


Where does the energy come from in the Dune ecosystem?

In Frank Herbert's Dune books, the planet Arrakis has an interesting and well thought-out alien ecology. As summarised in , the sandworms eat sandplankton (which consists, at least in part, of larval sandworms), while the sandplankton eat the spice, which is produced by side-effects of the sandworm life cycle.  However, one thing has always bothered me about this: where does the energy come from? On Earth, most ecosystems are powered ultimately by sunlight, while others are powered by . But either way, you need a source of energy or life can't survive.  There seems to be no substantial photosynthesis on Dune, since the planet is almost all either open sand or bare rock. (Some plants are mentioned, but they are all familiar Earth species and were presumably brought there by humans.) Perhaps the sand plankton, or even the sandtrouts or the sandworms themselves, are  --- but if so, where do they get their energy from? In short, where are the  of the Dune ecosystem, and what do they eat?  To the best of my knowledge, this issue isn't mentioned in the original book, but Herbert wrote a lot of sequels, and it seems that having a plausible ecology is something he cared about, so I'm wondering if he addressed this point in any of his later works.


Use of "the" - I think [the] tiger is one of the most impressive creatures

I think the tiger is one of the most impressive creatures.   I read this sentence  and wondering why "the" is used in the sentence. I think it is not any of . I don't think the author is talking about that particular tiger either. Is this a mistake?


Product of sums of square is a sum of squares.

Given $a,b,c,d \in \mathbb{Z}$, there is $x,y$ such that  $$(a^2 + b^2)(c^2 + d^2) = x^2 + y^2$$  One can show this by considering the complex number $a + bi$ and $c+ di$, using complex properties to deduce that $x = ac - bd, y = ad + bc$ is a solution.   However, given that either $a^2, b^2$ are distinct or $c^2,d^2$ are distinct, then how can one can find nonzero solutions $x,y$?  Sorry, I am assuming $a,b,c,d$ are nonzero.


Please have patience and if you answer please explain like you would explain a moron. I have 2 routers ,router 1 is ppoe and conected with a nuc server and ddns from noip .Router 2 is conected to router 1 with DHCP.and a raspberry pi webserver also another dns from noip . When I connect wirelessly to router 1 or 2 I can access http://my address.com from raspberry webserver (router 2) without any problems ( when I connect over the web like  4 g ) connection is refused . Raspberry pi also have a ddns from noip. DMZ is activated for Nuc server on router 1. If I stop DMZ on router 1 I can't access anymore Nuc webserver which is conected to router 1. Now, my question is , why I can't access raspberry webserver over the internet? I would like also to take this opportunity to thank you very much for your help.


Can I schedule Do Not Disturb for specific days?

I currently have Do Not Disturb on my iPhone (iOS 9) scheduled to run while I am at college. The only issue is that I am not at college every day.   Is there a way I can schedule Do Not Disturb for certain days? (For example: Tuesday-Thursday)


I just tried to suggest an edit from the iPad app, but it said my account couldn't edit.  I was able to make the edit from the website (still on iPad).  Is there a known bug with suggesting edits?  Here's a link to the suggestion:


Is there any "Show Brush On Surface" option in sculpt mode?

I found  in the threads from GSoC 2010 or 2011, but can't find it now in blender. Is there an option somewhere or an addon that project brush circle on top of the surface of your model?


Existence of Python import that isn't reached causes earlier error

I have a curious bug in my Python code (tried under both 2.7 and 3.4) that I was able to nail down to a minimal use case, and can be replicated below. Does anyone understand what is happening here?  $ ls mymodule/ mymodule2.py  runner.py  $ touch mymodule/__init__.py  $ cat mymodule/mymodule2.py import mymodule  class MyClass(object):     @staticmethod     def my_method():         pass  $ cat mymodule/runner.py import os import sys  testdir = os.path.dirname(__file__) sys.path.insert(0, os.path.abspath(os.path.join(testdir, "..")))  import mymodule import mymodule.mymodule2  def main():     mymodule.mymodule2.MyClass.my_method()     return     import mymodule  main()   This gives me this result:  Traceback (most recent call last):   File "mymodule/runner.py", line 14, in <module>     main()   File "mymodule/runner.py", line 11, in main     mymodule.mymodule2.MyClass.my_method() UnboundLocalError: local variable 'mymodule' referenced before assignment   If I comment out the line import mymodule, everything runs without error or output. The line of code is never hit, but its existence changes what happens.  Can someone explain my gap in understanding here? Much appreciated!


I'm writing a two sided document (it will be printed as a book) and I've got two figures which takes up a whole page each. These two figures are related so I want them to be side by side in the resulting book, i.e. figure1 should be placed on an even page and figure2 should be placed on the following (odd) page.  Is there any way I can automatically achieve this?  This is how I'd like the resulting pages in the book to be:  |p2--------||p3--------| |          ||          | | Fig1     || Fig2     | |          ||          | |          ||          | |(caption) ||(caption) | |----------||----------|


How to hide address bar and tab bar in Firefox?

How to hide the address bar and tab bar of Firefox 51?  I want to create a floating window with just the title bar and content but no other bars of any kind visible.   no need for disabling them completely just hide them pressing F11 doesn't do the trick (no floating window) solutions without add-ons preferred


Are the 3 generations of matter somehow connected to 3 dimensions of space?

I notice that each generation of matter is associated with a Lie group with that many degrees of freedom. Does that imply that 3 generations of matter is a direct result of 3 spatial dimensions?


How can I achieve converting a list to 2d list this using itertools or collections with high performance

By simply technique i can think of, I am converting a list to 2d list, However is it possible to achievie this with higher performance either by itertools or collections?  n = 2 lst = ['a', 'b', 'c', 2, 'e'] for i in  range(0, len(lst), n):     print lst[i:i+n]   Expected output:  [['a', 'b'], ['c', 2], ['e']]


Is it safe to reuse a ECDSA nonce for two signatures if the public keys are different?

We denote the s value of an ECDSA signature $(r, s)$ on a message $m$ as: $s=\frac{H(m)+xr}{k}$  Assume two ECDSA signatures sharing the same nonce $(r, s_1) , (r, s_2)$ on two messages $m_1, m_2$, that verify under two pubkeys $x_1G, x_2G$.    If the two public keys are equal then the secret keys should be equal $x_1 = x_2$ and we can easily recover the $k$ using the standard attack on nonce reuse. Once we know $k$ we can recover the secret key.  $\frac{H(m_1)-H(m_2)}{(s_1 - s_2)} =\frac{k(H(m_1)-H(m_2))}{H(m_1)-H(m_2)+x_1r - x_2r}$  $x_1 = x_2 \rightarrow x_1r - x_2r = 0$  $\frac{H(m_1)-H(m_2)}{(s_1 - s_2)} =\frac{k(H(m_1)-H(m_2))}{H(m_1)-H(m_2)} = k$  My question is can this attack be made to work if the secret keys are not equal i.e. $x_1 \ne x_2$:  $\frac{H(m_1)-H(m_2)}{(s_1 - s_2)} =\frac{k(H(m_1)-H(m_2))}{H(m_1)-H(m_2)+x_1r - x_2r} = \frac{k(H(m_1)-H(m_2))}{H(m_1)-H(m_2)+ (x_1 - x_2)r}$  If you know either $x_1 - x2$ or $\frac{x_1}{x_2}$  you should be able to compute $k$ as long as $s_1 \ne s_2$.  You can calculate $x_1 - x_2 = \frac{H(m_2) - H(m_1)}{r}$ in case where $s_1 - s_2 = 0$. However this case seems to reduce to the hardness of ECDSA since anyone can compute the pubkey for a new message $m_2$ that verifies under first signature $(s, r)$ using public key recovery.  If $s_1 \ne s_2$ you can compute $\frac{x_1 - x_2}{k}$ which allows you to convert $s_1$ into $s_2$ and vice versa.


How to set default value for Auto-Implemented Properties in ASP.NET

I came to know that C# 3.0 comes with a new feature of Auto-Implemented Properties,I liked it as we don't have to declare extra private varible in this (compare to earlier property),  earlier I was using a Property i.e.   private bool isPopup = true; public bool IsPopup {     get     {       return isPopup;     }     set     {       isPopup = value;     } }   Now I've converted it into Auto-Implemented property i.e.  public bool IsPopup {     get; set; }   I want to set the default value of this property to true without using it not even in page_init method, I tried but not succeeded, Can anyone explain how to do this?


Using placeholder audio while animating?

I was wondering if there's a way to hear audio when going through the timeline. So, if I animated a character talking between frames 0 and 40, when playing the animation not only I can see the movement in the viewport but hear the sound.   Thanks in advance.


Techqa.info - is this site related to Stack Exchange?

Consider this question on Stack Overflow,    The same question is on .    Are the sites related or is it just spam?


C# three forward slashes: can the template be changed?

In C#, XML comments begin with three forward slashes (///).  For example:  /// <summary> ///  /// </summary> /// <param name="sender"></param> /// <param name="e"></param>   Is there any way to change the generated comment, for example to add additional tags?  I thought there might be a snippet file that defines the XML, but I can't find one.  Can anyone help?  UPDATE: As far as I can tell, the first answer to the existing  simply provides a snippet that inserts code on demand.  Specifically, summ+tab+tab to insert a summary line.  It doesn't seem to involve changing the XML inserted by ///, which is what I'm looking for.  Additional answers to that question say it can be done with macro InsertDocComments (but I don't think that's what's invoked by ///, or I don't know how to cause it to be), and another answer says it can't be done.  So, if it really can't be done, oh well, but I'm still hoping.


Why is ACE2 not used as drug against covid?

Can ACE2 be produced and used as drug against covid? I read it is the receptor molecule. If it is in the organism the virus should bind to it and could not attack cells anymore? Is that right?


My original sentence was:     ... an array of ...   However I decided I wanted to elaborate on this, as "(traditionally two-dimensional) array".  We usually use parentheses for extra detail not necessary to the sentence, that the reader could safely ignore. With that in mind, for which reader to I optimise 'an'/'a'?     ... a (traditionally two-dimensional) array   or     ... an (traditionally two-dimensional) array   My immediate thought was to 'work around' it - perhaps using 'original' instead of 'traditional', or taking the clause out of parentheses.  However even if I end up doing that for readability, I should be interested in your answers to what I consider to be quite a (interesting) predicament.


Someone knows how can I use android apps in my pc using software from the Ubuntu archive ?


Mid-2010s Kernel Panic GPU - best options?

I'm having issues with kernel panics on a mid-2010 Macbook Pro 15 inch. I have read many threads about this () and the thread that links to are good examples. The panics seem to be related to GPU/especially video for me. Mavericks made them less frequent, but they didn't go away.  Apple was able to tell me that the logic board has already been replaced (before the computer came into my hands, presumably as part of the extended warranty that was intended to fix this problem).   Given the age of my computer, I'm wondering what my best options are. Is a new graphics card certain to fix the problem? If so, is it best to send it to Apple or to try to order one and install it myself?


Flash Player does not work on Android 4.0 and upwards

Please check my attached about Flash Player error on my android phone. I can see Utube, Facebook videos very well but some of the website showing like that error. How could I solve this problem?  Phone : Huawei U9200 P1 Version : ICS 4.0.3 Flash Player Ver : Adobe Air and Adobe Flash Player 11.1


Is the ideal $(2,X+1)\subset\Bbb{Z}[X]$ prime, maximal or neither?

I'm currently considering the ideal $(2,X+1)\subset\Bbb{Z}[X]$. I'm trying to figure out if this is a prime ideal, a maximal ideal, or neither. So far I have attempted to look at the quotient ring $\Bbb{Z}[X]/(2,X+1)$. I know that if this quotient ring is a field, then our ideal is maximal, since $\Bbb{Z}[X]$ is commutative. However I'm stuck on how I should be viewing this quotient ring.


Seeking Normalize class equivalent in Apex

The below is feasible in Java. Is there a way to do the same in Apex? String subjectString = "öäü";  subjectString = Normalizer.normalize(subjectString, Normalizer.Form.NFD);  String resultString = subjectString.replaceAll("[^\\x00-\\x7F]", "");                 => will produce "oau"


Minimal polynomial and diagonalization of a block diagonal matrix.

Let $A \in \mathbb C^{m\times m}$ and $B \in \mathbb C^{n\times n}$, and let $C=\begin{pmatrix} A & 0 \\ 0 & B\\ \end{pmatrix} \in \mathbb C^{(m+n)\times (m+n)}$.   Calculate the minimal polynomial of $C$ based on the minimal of $A$ and the minimal of $B$.  Prove that $C$ is diagonalizable if and only if $A$ and $B$ are.   The attempt at a solution  I have no idea how to prove 1). For 2) I got stuck in a lot of parts:  $\Leftarrow$ If $C$ is diagonalizable, then $C=P^{-1}DP$ where $D$ is a diagonal matrix. Somehow, I must construct from D two diagonal matrices $D_1 \in \mathbb C^{m\times m}$ and $D_2 \in  \mathbb C^{n \times n}$ and two invertible matrices $Q$ and $S$ so that $A=Q^{-1}D_1Q$ and $B=S^{-1}D_2S$, I don't know how to construct all these matrices.  $\Rightarrow$ Suppose $A$ and $B$ are diagonalizable, so $A=Q^{-1}D_1Q$ and $B=S^{-1}D_2S$, with both $D_1$ and $D_2$ diagonal matrices. My guess is $C$ can be written as   $\pmatrix{Q^{-1}&0\\ 0&S^{-1}}\pmatrix{D_1&0\\ 0&D_2}\pmatrix{Q&0\\ 0&S}$.   Now, I would have to prove that $\pmatrix{Q^{-1}&0\\ 0&S^{-1}}\pmatrix{Q&0\\ 0&S}=Id_{m+n}$ and that $C=\pmatrix{Q^{-1}&0\\ 0&S^{-1}}\pmatrix{D_1&0\\ 0&D_2}\pmatrix{Q&0\\ 0&S}$ in order to show $C$ is diagonalizable.  I would appreciate help in all these points where I am stuck and any suggestion or hint with regard to 1.


Displaying attachments on visual force page

I need to display attachments on a visual force page for the Case object.  This is the code I am using. I had it working for awhile, but it somehow broke down. It gets all the attachments, but it will not show the images.   <apex:repeat value="{!Case.attachments}" var="att">             <apex:panelgrid columns="1">                 <h1>Image/h1>                 <apex:image url="/servlet/servlet.FileDownload?file={!att.Id}"/>             </apex:panelgrid> </apex:repeat>


Delete own questions with upvoted answers is not allowed

The      "The Code of Conduct change has been pushed through and . – Tonepoet "   (as a few others)  refers to deleted  page. (The reason of deletion of the page is discussed on ).  I've noticed that     “This question was voluntarily removed by its author.”   But according to      You can't delete your own question if it has an answer with upvotes   I understand that  is relatively new, and may not know rule details, but I also read somewhere (unfortunately, could not find a quote) that shog9 consulted Cesar M and advises to delete the question.  Cesar M in his role of moderator can delete any post, but, according to the system, he deleted the question being in a role of author, which is not allowed.  As it was a genuine mistake, I suggest to Cesar to undelete the question ASAP.  There are multiple options of further steps, e.g.   Make the question locked, as suggested in many highly-upvoted answers here:  Ask some other moderator to delete the question, if they find, that there is no better way to do it. Change the system to not allow the question with upvoted answers to be deleted by the author, even the author is a moderator. Also update  to clarify that “You can't delete your own question (even you are a moderator)” Change the system to show that the question was removed by moderator, if the author and moderator is the same person. Also update  to clarify that “You can't delete your own question (unless you are a moderator)” Automatically redirect links to  or    I hope that Cesar will undelete the question to comply with existing rules. If not, will he potentially be suspended as not comply to the rules or suspension rules are applicable to elected moderators only?  I also have doubts, that “the question was voluntarily removed by its author.” Quite likely, that the decision about the deletion of the question was made by management, such as the Director of Public Q&A.


I saw many of article , clearly saying that pointer is applicable for jvm not for programming level and also if define null to object level(reference),and performing any operation on that object it will give NullPointerException. if any suggestion  please  public class ItCaseContrext_Group {      @Test(expectedExceptions=NullPointerException.class)     @DataProvider(name="td")      public Object[][] datamethod(ITestContext context) throws Exception      {         Object[][] data=null;          for(String g:context.getIncludedGroups())         {             System.out.println(" i am in for loop");             if(g.equalsIgnoreCase("A"))              {             data= new Object[][]                          {                     {"10","20"},                     {"30","40"}                         };                  System.out.println(" A");                         break;             }             else if(g.equalsIgnoreCase("B"))             {                 System.out.println(" B");                 data = new Object[][]                          {                     {"abdul","kalam"},                     {"Steve","jobs"}                         };                         break;             }         }         return(data);     }     @Test(dataProvider="td",groups= {"A"})     public void m1(String a, String b)     {         System.out.println(a+" "+ b);      }         @Test(dataProvider="td",groups= {"B"})     public void m2(String a, String b)     {      System.out.println(a+" "+ b);     }   }


Powers of numbers containing negative numbers

I  just came across this question and thought if i could ask help. How do you solve problems that have powers with a negative number? Ex. 2^(-2)


How come I can implicitly but not explicit cast?

I was testing around with Java and noticed that casting "physically" changes properties of an object. I don't quite understand what actually happens inside Java when casting is used, but I did notice this:  Here is my Super class InstanceVariable:  package inheritance;  public class InstanceVariable {     public int x = 1; }   Here is a class that inherits from it:  package inheritance;  public class InstanceVariable1 extends InstanceVariable {      public int x = 100;     public static int y = 2;       public static void main(String[] args) {         InstanceVariable1 one = new InstanceVariable1();         InstanceVariable two = new InstanceVariable1();         System.out.println(one.x + " " + two.x);         one = (InstanceVariable) one; //This is illegal     } }   First of all, the instance variable that were instantiated are overriden by the child class. And secondly, I can implicitly cast the super class (that is InstanceVariable) to two, but for some reason, I cannot explicitly cast it to one? What is the reason for this?


When I launch my macOS there running so many interfaces

When my Mac started, I check my interfaces: $ ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384     options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>     inet 127.0.0.1 netmask 0xff000000      inet6 ::1 prefixlen 128      inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1      nd6 options=201<PERFORMNUD,DAD> gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 stf0: flags=0<> mtu 1280 XHC20: flags=0<> mtu 0 en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     options=400<CHANNEL_IO>     ether a0:99:9b:17:50:07      inet6 fe80::cd8:2bd4:f767:a6ed%en0 prefixlen 64 secured scopeid 0x5      inet 192.168.2.228 netmask 0xffffff00 broadcast 192.168.2.255     nd6 options=201<PERFORMNUD,DAD>     media: autoselect     status: active en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500     options=460<TSO4,TSO6,CHANNEL_IO>     ether 82:13:08:b0:ec:c0      media: autoselect <full-duplex>     status: inactive en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500     options=460<TSO4,TSO6,CHANNEL_IO>     ether 82:13:08:b0:ec:c1      media: autoselect <full-duplex>     status: inactive bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     options=63<RXCSUM,TXCSUM,TSO4,TSO6>     ether 82:13:08:b0:ec:c0      Configuration:         id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0         maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200         root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0         ipfilter disabled flags 0x2     member: en1 flags=3<LEARNING,DISCOVER>             ifmaxaddr 0 port 6 priority 0 path cost 0     member: en2 flags=3<LEARNING,DISCOVER>             ifmaxaddr 0 port 7 priority 0 path cost 0     nd6 options=201<PERFORMNUD,DAD>     media: <unknown type>     status: inactive p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304     options=400<CHANNEL_IO>     ether 02:99:9b:17:50:07      media: autoselect     status: inactive awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484     options=400<CHANNEL_IO>     ether ba:2f:ce:01:6e:14      inet6 fe80::b82f:ceff:fe01:6e14%awdl0 prefixlen 64 scopeid 0xa      nd6 options=201<PERFORMNUD,DAD>     media: autoselect     status: active llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     options=400<CHANNEL_IO>     ether ba:2f:ce:01:6e:14      inet6 fe80::b82f:ceff:fe01:6e14%llw0 prefixlen 64 scopeid 0xb      nd6 options=201<PERFORMNUD,DAD>     media: autoselect     status: active utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380     inet6 fe80::5e2a:55ee:b7dc:1b30%utun0 prefixlen 64 scopeid 0xc      nd6 options=201<PERFORMNUD,DAD> utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000     inet6 fe80::62d2:7e57:5727:90c8%utun1 prefixlen 64 scopeid 0xd      nd6 options=201<PERFORMNUD,DAD>  in the beginning, I only use lo0, en0, maybe en1 and en2. I some times install the VMware Fusion and docker and other things. I don't know why there get some many interfaces out, when I launched my Mac there will start so many interfaces, this is a waste of the computing resources, how to delete them or stop them?


Years ago I was confronted with a (self imposed) problem, which unexpectedly resurfaced just recently... I don't know whether it makes sense to explain the background or not, so I'll be brief.  If I was given two points in a plane, and two lines passing through them would I be able to construct (or get a equation of) an ellipse to which those lines are tangents in given points? At a first glance, four equations (each point belonging to the ellipse, and each of the lines being a tangent in respective point) would be insufficient to solve for five unknowns (major and minor axis, coordinates of the ellipse centre and the angle for coordinate system transform)- so there would be infinite number of ellipses that could be drawn with those constraints. But it was intuitive to me that only finite number would indeed be possible... So, what is the correct answer to this?  Hopefully, I wont be considered rude- but there is a twist to this... Firstly, I believe to have solved this problem, but recently I was working in a top of the line CAD program, where those constraints seemed to yield an infinite number of solutions. This bit puzzled me greatly- because it doesn't seem correct (so I'm assuming the ellipses they use are not proper ellipses). Secondly, I hope it won't be taken against me because I'm trying to pick your brains and having a theory of my own... which I will disclose a bit later.


Can I use old Pentax lenses on newer Pentax DSLRs?

Can I use old Pentax lenses from the film days on the newer Pentax DSLRs?  Are there any caveats or exceptions? Are adapters or modifications needed?


/boot/ Full, not enough space to remove old kernels?

EDIT: following the instructions on , I attempted to remove my old/unused kernels but could not. It looks like there's not enough space for the operation, what do I do?  Output of ls /boot/:  abi-4.2.0-42-generic         initrd.img-4.4.0-57-generic abi-4.4.0-45-generic         lost+found abi-4.4.0-47-generic         memtest86+.bin abi-4.4.0-51-generic         memtest86+.elf config-4.2.0-42-generic      memtest86+_multiboot.bin config-4.4.0-45-generic      System.map-4.2.0-42-generic config-4.4.0-47-generic      System.map-4.4.0-45-generic config-4.4.0-51-generic      System.map-4.4.0-47-generic grub                         System.map-4.4.0-51-generic initrd.img-4.2.0-42-generic  vmlinuz-4.2.0-42-generic initrd.img-4.4.0-42-generic  vmlinuz-4.4.0-45-generic initrd.img-4.4.0-45-generic  vmlinuz-4.4.0-47-generic initrd.img-4.4.0-47-generic  vmlinuz-4.4.0-51-generic initrd.img-4.4.0-51-generic   Output of dpkg -l linux-image-\* | grep ^ii  ii  linux-image-4.2.0-42-generic       4.2.0-42.49  amd64        Linux kernel image for version 4.2.0 on 64 bit x86 SMP  ii  linux-image-4.4.0-45-generic       4.4.0-45.66  amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP  ii  linux-image-4.4.0-47-generic       4.4.0-47.68  amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP  ii  linux-image-4.4.0-51-generic       4.4.0-51.72  amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP  ii  linux-image-extra-4.2.0-42-generic 4.2.0-42.49  amd64        Linux kernel extra modules for version 4.2.0 on 64 bit x86 SMP  ii  linux-image-extra-4.4.0-45-generic 4.4.0-45.66  amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP   However, when I run sudo apt-get purge linux-image-4.2.0-42 linux-image-4.4.0-45, I get the following messages:   gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-4.4.0-47-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-4.4.0-47-generic (--remove):  subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing:  linux-image-extra-4.4.0-47-generic E: Sub-process /usr/bin/dpkg returned an error code (1)   Am I doing something wrong?  ORIGINAL:  I've been getting space errors whenever I try to upgrade, and on the dist-upgrade I tried just now I got the following errors:  gzip: stdout: No space left on device E: mkinitramfs failure find 141 cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-4.4.0-51-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-4.4.0-51-generic (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  linux-image-extra-4.4.0-47-generic  linux-image-extra-4.4.0-51-generic E: Sub-process /usr/bin/dpkg returned an error code (1)   The output of df is:  Filesystem                   1K-blocks     Used Available Use% Mounted on udev                           1787060        0   1787060   0% /dev tmpfs                           361572    10496    351076   3% /run /dev/mapper/xubuntu--vg-root 236014344 38503396 185499020  18% / tmpfs                          1807848      172   1807676   1% /dev/shm tmpfs                             5120        4      5116   1% /run/lock tmpfs                          1807848        0   1807848   0% /sys/fs/cgroup /dev/sda1                       240972   227218      1313 100% /boot tmpfs                           361572       36    361536   1% /run/user/1000   and the output of uname -r:  4.4.0-51-generic   I've tried several things based on solutions offered to some of these errors individually, but I haven't had any luck yet.  Thank you sincerely for any help!


Velocity of photon when changing direction

We know the speed of a photon is constant.  Yet when any other object changes direction, its velocity must go to zero. Thus,  my question is how does a photon avoid this? I assume that to change direction, a photon must be absorbed and then re-emmitted?


alternative of vinegar for preventing fruits from turning black?

We use vinegar to prevent fruit from turning black.When we don't have vinegar what alternative is used to prevent fruits from turning black.


Assigning objects with dynamic names in Java

I am trying to create an object of a class with dynamic naming    Object1 Object2 Object3   So, I am trying to create a dynamic name for an object of the class Adder.  Adder addar[];   and I am trying to store that object in the ArrayList.  ArrayList<Adder> list= new ArrayList<Adder>();   Inside a printer method I have used below code.  addar[count] = new Adder(); addar[count].addName(theName); addar[count].addAge(theAge); list.add(addar[count]);   When I try to run the program i get this exception  Exception in thread "main" java.lang.NullPointerException<br/>   at Moving.printer(Moving.java:65)   at OrPGan.main(OrPGan.java:7)   at line   addar[count] = new Adder();   What is causing this? How can I deal with this?  Your response would be greatly appreciated.


equivalent of metric spaces and their topology

how we can give an example of two metrics on a space that induce the same topology , but are not equivalent!(so do we can generalize our definition about equivalent of metrics?)


I am travelling to Netherlands on an Invitation letter.Should my point of entry and exit be same for Schengen visa?

I am travelling to Netherlands and Germany as a tourist. I have invitation letter from a friend in Netherlands. I am applying for a Schengen visa from Netherlands consulate. Should my point of entry and exit be necessarily Netherlands?I plan to enter Netherlands and return back from Germany


Let A be a countable set, and let $f : A \to B$ be a function. Prove that $f(A)$ is at most countable.

Let $A$ be a countable set, and let $f : A \to B$ be a function. Prove that $f(A)$ is at most countable. Therefore $A$ is bijective with positive integers. Since the function is defined, it is clear that every elements in $A$ will not map to a different elements in $B$, i.e., for every  $a\in A$ there exists a unique $b\in B$. So we don't care much whether the function is bijective or whatever. I also know that $f(A)$ is at most countable if it is either finite or countable. I think that $f(A)$ if proved as finite, should be a key to this proof, and to show if it is finite we may need to show something on the line that $|f(A)| < |A|$. I don't know how all these pieces fit together to construct a proof. Please help! Thank you.


Making a div clickable after placing it with .insertBefore

After I've used .insertBefore to place div the page, the div doesn't appear to be recognized as jQuery("#temp").  Is there something special I need to do to get it to be active and receive onClick actions?  jQuery( document ).ready(function() {      var temp_text = '
temp
';      if ( jQuery.temp("temp") )         console.log( 'FOUND temp' );     else         jQuery( temp_text ).insertBefore( "#top-bar" );  });  jQuery("#temp").on("click", function () {     console.log('clicked'); });


I've recently taken on a couple of new clients who are now interested in applying their branding to vehicle livery.   I've never really designed in this area before so could do with some advice.  Do I contact the printer that I am going to use to get hold of a template to work to, or is there somewhere that I can get hold of one online? (I have looked, but they all seem to be subscription services).  Any other advice would be much appreciated as this is new territory for me!  Thanks!


Is it a standard to have an empty `index.php` in root of Plugin?

Can anyone tell why in all plugins, the index.php is empty? What's the point of it, i can't understand, as it doesn't add any security at all to website, and makes the plugin structure "1-file" more.  p.s. Themes do have index.php,


Beamer \beamerdefaultoverlayspecification{} and \pause for texts below itemize environment

Consider the following MWE in which I need to add some texts below itemize environment and I use \beamerdefaultoverlayspecification{<+->}. When I add \pause above the texts, the result is that the slide with the two items is shown twice, which is undesirable. How can one show the slide only once?     \documentclass{beamer}      \beamertemplatenavigationsymbolsempty     \beamerdefaultoverlayspecification{<+->}      \begin{document}     \begin{frame}{A MWE}     \begin{itemize}         \item item 1         \item item 2     \end{itemize}     \pause     Some texts.     \end{frame}          \end{document}


Insignificant OLS results but significant IV regression results

I do a regression (Y is a dependent variable and X is an independent variable) OLS gets insignificant results, while the IV regression gets significant results. I based on literature to suggest X is an endogenous variable. I also did Underidentification test, Weak identification test, Sargan test and endogeneity test (used ivreg2, ivregress and estate endog). The results of these tests all supported my IV regression How can I interpret the results? Thanks for your help.


kali@kali:~$ sudo apt update Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB] Get:2 http://kali.download/kali kali-rolling/main amd64 Packages [16.6 MB] Err:2 http://kali.download/kali kali-rolling/main amd64 Packages                                                                                Hash Sum mismatch   Hashes of expected file:    - Filesize:16634563 [weak]    - SHA256:fbb326970ca4e9cdb4fef1aa9a8be44356dc8d9fdab37069e9a19e65ee3ae952    - SHA1:cea7b3e7681b2f1a8070ea788ad7779e5f178fb3 [weak]    - MD5Sum:e6fc65db75d4b81ea72b4f35e18d3b18 [weak]   Hashes of received file:    - SHA256:a2b234d6a45e017ca97ce9d720a0ca4f79fe6b4956692bef2864e75d845291bc    - SHA1:e7e682ffe978727c54f671b2424df435b48c26ca [weak]    - MD5Sum:e6fc65db75d4b81ea72b4f35e18d3b18 [weak]    - Filesize:16634563 [weak]   Last modification reported: Wed, 14 Oct 2020 12:07:19 +0000   Release file created at: Wed, 14 Oct 2020 12:08:13 +0000 Get:3 http://kali.download/kali kali-rolling/contrib amd64 Packages [100 kB]                                                                                Get:3 http://kali.download/kali kali-rolling/contrib amd64 Packages [100 kB]                                                                                Fetched 16.8 MB in 14s (1,219 kB/s)                                                                                Reading package lists... Done E: Failed to fetch http://kali.download/kali/dists/kali-rolling/main/binary-amd64/Packages.gz  Hash Sum mismatch    Hashes of expected file:     - Filesize:16634563 [weak]     - SHA256:fbb326970ca4e9cdb4fef1aa9a8be44356dc8d9fdab37069e9a19e65ee3ae952     - SHA1:cea7b3e7681b2f1a8070ea788ad7779e5f178fb3 [weak]     - MD5Sum:e6fc65db75d4b81ea72b4f35e18d3b18 [weak]    Hashes of received file:     - SHA256:a2b234d6a45e017ca97ce9d720a0ca4f79fe6b4956692bef2864e75d845291bc     - SHA1:e7e682ffe978727c54f671b2424df435b48c26ca [weak]     - MD5Sum:e6fc65db75d4b81ea72b4f35e18d3b18 [weak]     - Filesize:16634563 [weak]    Last modification reported: Wed, 14 Oct 2020 12:07:19 +0000    Release file created at: Wed, 14 Oct 2020 12:08:13 +0000 E: Some index files failed to download. They have been ignored, or old ones used instead.  The os is kali linux version 2020.3 . I just installed the operating system on virtualbox but when I use apt to install any package it doesn’t work and it gives me "Unable to locate packege". So I tried to use apt update but the result is the one above. can you help me to re-call apt?


I am still running the (very old) Kubuntu 14.04 and want to upgrade to Kubuntu 20.04. I plan to do this by simply installing Kubuntu 20.04 into some new partitions (logical volumes to be precise), since I have new space and delete the old installation once I am done with moving. What do I need to consider when moving? Especially, what directories should I take with me, which shouldn't I? Is there a good strategy or are there best practices, where I should look for program files that I might want to keep? Are there (official) moving guides out there?


I got this problem:  Is it true or not that for every matrix $A\in M_2( \mathbb C)$ there is a matrix $X\in M_2( \mathbb C)$ such that $X^2=A$? prove the answer.  I know that we can pass to Jordan form, and I proved that this claim is true for all the Jordan forms except  $$         \begin{pmatrix}         0 & 1  \\         0 & 0  \\         \end{pmatrix} $$ any suggestions what to do with this matrix? and also, there is a general version of this problem? thanks for helpers!


How do I replace cell values of a raster using values of another raster with differing extent?

I have two rasters (raster1 and raster2). The raster1 extent is smaller than raster2. I want to replace the value of raster2 pixels using raster1 pixels. How can I replace the values?


How long will an airline delay a flight for late checked-in passengers on an international flight?

Two months ago we were traveling to Japan. After checking in the luggage we realized that we forgot the voucher for the Railway Pass at home so we hurried back to the city to get it. But pure luck we got back just before boarding even started.  But we were curious recently. What would have happened in a parallel universe, where we didn't make it back on time? I know that they are not supposed to take off without you if you've checked in your luggage. But I guess that at some point they will do something about this.  Just to give a full account, there were no further flights from the airport to the connecting airport (where we had to spent a few hours anyway, so if there was a second flight two hours later, it would have been fine); and we weren't physically at the airport for the most part.  So what would happen if we had only managed to get back to the airport 30 minutes after boarding, an hour after boarding, or even two hours (say due to a minor train accident or whatever)?  (The airline was Turkish Airlines, if that matters, and we were flying from within the EU.)


So, our group (of which I'm the DM) was in a situation in which they wanted to drag each other during their turns (roughly an equivalent in increase of speed to the Dash action, as I pointed out) to escape a monster (well, a group of kobolds).    So, as to 'dragging' the others, they wanted to do something like grappling, but no skill checks or anything, just halving movement speed and dragging them. They took turns doing this and outpaced the kobolds, yep. I know that, RAW, this shouldn't be allowed, but I didn't see a problem realistically or within reason as per the rules? Might there be?


Quite often when I type the word "anymore" in software featuring built-in spell check, I get the following kind of warning:    (this one is courtesy of ).  i.e., the "anymore" word gets underlined as if it didn't exist. I'm not a native speaker, so every time I see the above, I'm in doubt.  Is "anymore" a word?  Grammarly seems to agree:    But then why on earth aren't software dictionaries up to date? I mean, anymore doesn't look like an esoteric word that would rarely be used, so I would expect, if the warning was a false positive, that it would have been quickly reported and corrected already?  Could it be that it's valid in BE, and not in AE, or the other way around?


Ok, this is a newbie-question i'm afraid to ask for some time .. how to use Drupal Hooks?  Yes, i know where to look for the code, but then? Put it in the template-folder, a block, a custom module?   When i google for a tutorial, the most results are for Drupal 6 / before 2010.


I cannot find the fix for these problems (if there is one) anywhere. Basically whenever I start it up it gets stuck at the same spot on the loading screen (unless I've just reinstalled it) and it takes forever to load. If it does end up loading, nothing will load on the map. No pokestops, no gyms, it shows no pokemon nearby, and no pokemon encounters. The only time the app works is if I just reinstalled it, but it always ends up doing the same thing once I've closed the app. It also makes me log into my google account every single time. Is my game just fucked or is there a way to fix this?


It is commonly asserted that no consistent, interacting quantum field theory can be constructed with fields that have spin greater than 2 (possibly with some allusion to renormalization). I've also seen (see Bailin and Love, Supersymmetry) that we cannot have helicity greater than 1, absenting gravity. I am yet to see an explanation as to why this is the case; so can anyone help?


The question is:     How many words can be formed by taking four letters at a time out of the letters of the word MATHEMATICS?   I know how to do it for non-repeating letters. You simply permute $4$ things taken from $11$ at a time. But how do I do this? How to subtract out the words that have repeated letters in them? What should I divide the total permutations with?


In the following code, I need to use +/- where I have used it, and plus/minus where I have used it.  \documentclass{amsart} \usepackage{lipsum} \usepackage{calc} \parindent=0 pt \parskip=12 pt plus 0 pt minus 0 pt \def\headsep{25pt} \newcommand{\LAYOUT}[5]{%   \setlength{\hoffset}{0pt}   \setlength{\voffset}{0pt}   \setlength{\topmargin}{#1 - 1in - \voffset - \headheight - \headsep}    \setlength{\oddsidemargin}{#2 - 1in - \hoffset}   \setlength{\evensidemargin}{\oddsidemargin}   \setlength{\textheight}{#3}   \setlength{\textwidth}{#4}   \setlength{\marginparwidth}{#5} } \newcommand{\FULLPAGE}{\LAYOUT{1in}{1in}{9in}{6.5in}{0.75in}}  \FULLPAGE \begin{document} \lipsum[1-10] \end{document}   If I replace the plus and minus in line 5 with + and - I get an enigmatic  "missing begin{document}" error.    If I replace the minus's in lines 10-11 with "-" I get an equally enigmatic error:  "Missing number, treated as zero. Illegal unit of measure (pt inserted)."   Can somebody please explain when one can use +/- and when one can use plus/minus?  Presumably there's a good reason why latex's error messages are so completely mystifying, and why inconsistencies like these keep appearing? It's really hard to explain to my coauthors, who regularly complain that latex is the most infuriating program ever devised by mankind.  Thanks very much for any advice!   Leo


LISP: when modifying a list (with `nth`), all elements change

Why, when I use nth to change a list element, do all elements change?  (setq mlist nil) (loop for aa from 1 to 10      do         (setq mlist (append mlist (list '(0 2)))) ) (print mlist) (setf (nth 0 (nth 0 mlist)) 9) (print mlist)   Expected result:  ((9 2) (0 2) (0 2) (0 2) (0 2) (0 2) (0 2) (0 2) (0 2) (0 2))   Result I got:  ((9 2) (9 2) (9 2) (9 2) (9 2) (9 2) (9 2) (9 2) (9 2) (9 2))


Access to journals for individuals outside of an institution?

For all that is said about the wealth of information that is freely available on the internet, the fact is that most of it is incomplete, dumbed down, lacking in context or downright wrong.   Individuals spend the best part of 20 years completely oblivious to the existence of journals and the process of peer review and even then we'd be lucky if 10% of those with access to journals (usually through an institution) actually bother to invest in them.   Granted that some journals will be totally inaccessible to those without a solid background in some particular field but by and large exposure is a good thing and there are many areas of research where individuals will benefit directly from having read these.  Where does this come from?  I decided I wanted to read Popular Politics in the Late Medieval City: York and Bruge in The English Historical Review today, mainly because it looks interesting and I'm hoping to invest more time into learning about British and European History. Incidentally I also wouldn't mind tucking into Super Stable Clocks, Nature 500, 505 (29 August 2013) and a number of data analysis and big data journals in order to advance my career.   Now, not being affiliated with an institution that subscribes to these journals means that I would typically have to pay between £5 ($10) and £15 ($25) per article that I read... I could probably spend £100 just to pass an hour by.  Question   What's being done to address the lockdown on 'higher' education material? I've noticed that the Directory of Open Access Journals publishes open articles and other firms are doing similar, mainly with journals in new fields? How could I, as an individual outside of an institution, gain journal access without it costing so much money?


Why do I need a credit card when I am downloading a free app from the app store on a iPad mini?

I am trying to download a free app but it keeps telling me to provide a credit card. I try to avoid it but it won't let me and I don't have a credit card.  How can I use App Store without a credit card?


Does the number of visits matters for SEO?

Considering I have a website and I have millions of direct views (entering directly by URL,  not by any other URL) and that there is no links to this site anywhere else (or that this views don't generate any external link to the site), will these visits increase my positioning in search engines such as Google?  Are search engines capable of measuring direct visits rather than links from other pages?


How might I take multiple pictures or videos of my computers log on screen?  It is unclear of me how to do such.  PrintScreen doesn't appear to work.  The linked question has no accepted answer as is.


RAM usage is increasing in database server with time. When we restart the SQL services it take around 4 GB but after day or two it increases to 11-12 GB and even further. Application is hosted on separate server. Please suggest what could be the reason.


I have the following SOSL:  FIND {*ball*} IN ALL FIELDS RETURNING Campaign(Name, Subscription_Center_Description__c)   I have the following 3 campaigns that SHOULD show up:   Name: Sportsball, Description: The sport that utilizes a ball and the players will do things with the ball to score many of the points. The one with the correct number of points at the end of the sportsball game will be victory. Name: Baseketball, Description: probably the silliest sport ever invented... Name: Football, Description: The one you play with your arm feet.   Note:   I also have Name: Futbol Description: The one you play with your foots.  But that's not relevant to the question.  The SOSL query is only displaying Sportsball as an acceptable result for the query and I am having a heck of a time trying to figure out why baseketball and football are not showing up.


What was the age of Adaline Bowman's daughter in The Age of Adaline?

I was rewatching The Age of Adaline and I got a little bit confused. What's the age of Adaline Bowman's daughter Flemming Prescott in the movie? She is aging normally and we eventually see her age ahead of her mother. The Narrator does mention Adaline doesn't age for the next 60 or 70 years. By that estimate wouldn't her daughter have already died?


It’s my turn. It is a two handed game. There is only one card left in the Stock pile. (In two handed canasta, the rule is "if a player draws from the stock, they must draw two cards instead of the normal one") Can I pick up the one card and play my hand or is the game over.


What is Series Where There is an AI Born on the Solar System-Wide Network

I had a memory surface today of something that I'd read a while ago, and I  can't remember what is was. What I remember was that there as an AI, female I think, who was born on the internet, or the star system-wide network maybe? She was connected/friends with a person, and at one point in the book, she is being sarcastic and he turns off his connection to her. It forces a big reevaluation of their relationship, and eventually, later in the book maybe, he "gives" her to a younger character to take care of?  Does any of this ring a bell with anyone?


want to download 3GB database table from my development mysql server

I need to download database structure with data. Total size of the DB is more than 3GB. If i use phpmyadmin it is not working. I have also tried by increasing the execution time in php.ini. I need some tool to import and Export the data base. My database server is Mysql server.  My requirement is any tool that will help to download Large database and Upload to another server. It should hold the download when internet fails. IF internet is ready it should continue the download process.  The answer already existing haven't worked for me. My issue is I need to export and import data from one server to other. if Internet Connection fails. It should not start a fresh export. It should continue the incomplete process.


I'm running dangerously low on disk space (about 300mb left of my 16gb capacity) and I need to find out how I could get rid of things I don't need.


How to switch off English International Keyboard in Windows 10

I have Win10 Home on my laptop in English (United States). Personally I need only two keyboard layouts: English (US) and Russian. But for some reason there appears a third one: English (INTL), which for example uses quotes etc to make symbols outside of standard English alphabet. This keyboard is not listed among those in Settings (I only see Russian and English US there). How do I removed it. Permanently. I never want for it to come back. Please.


How do I resolve the Unindent does not match any other indentation level syntax error in line 3 of this code?  if userInput==1:    oneD() elif userInput==2:     twoD() elif userInput==3:     threeD() elif userInput==4:     fourD() elif userInput==5:     fiveD()


Why does Stack Overflow have a different top navigation than other sites?

In the top navigation bar, why does SO have a different location for going to other SE sites (on the right side of navigation bar) but all other SE sites have that option on left side of navigation bar? The Inbox and Reputation buttons are also on a different side.       Why is it so? Why not a total uniform design like the other 169 SE sites?


I would like to share my files via LAN.  How to know IP address of mine and other's one by using terminal or anything else but without using Internet?  I'm using Ubuntu 14.04LTS


How should I use BibTeX in TeX Live 2013?

Can anybody simply tell me how should I use BibTeX in TeX Live 2013? I saved my references in a .bib file and I write the following in my .tex file:  \documentclass{article} \begin{document} \bibliographystyle{plain}%Choose a bibliograhpic style % author~\cite{Meyer2000}. % \bibliography{Master} \end{document}   What I should do afterwards?  I compile it with BibTeX and PDFLaTeX but it does not help.


I'm learning Go and I wrote this for a programming challenge. It is working (building and running) but I feel the code is not what Go code should be:  The code implements the steps a podracer takes to race over a 2D map. I input a target and a speed, and the code calculate where the pod will be at the end of the turn : rotating to point toward the target & moving (counting in previous speed).      In the playTurn() method below, I call each step. I reassign results (else they are not taken into account) because of scope I think.    It feels wrong for OOP code to have to reassign each step answer to the pod's attribute. What am i missing ?   Code :   package main  import (     "fmt"     "math"     "os"     "strconv" ) // Dot is king type Dot struct {     x, y int } // Pod is life type Pod struct {     position                Dot     vx, vy, angle, nextCpID int     hasShieldOn             bool }  func squaredDist(a, b Dot) int {     return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) } func distance(a, b Dot) float64 {     return math.Sqrt(float64(squaredDist(a, b))) }  func (pod Pod) getAngle(p Dot) float64 {     d := distance(p, pod.position)     dx := float64(p.x-pod.position.x) / d     dy := float64(p.y-pod.position.y) / d     a := math.Acos(dx) * 180.0 / math.Pi      // If the point I want is below me, I have to shift the angle for it to be correct     if dy < 0 {         a = 360.0 - a     }     return a }  func (pod Pod) diffAngle(p Dot) float64 {     a := pod.getAngle(p)     pangle := float64(pod.angle)      right := 0.0     if pangle <= a {         right = a - pangle     } else {         right = 360.0 - pangle + a     }      left := 0.0     if pangle >= a {         left = pangle - a     } else {         left = pangle + 360.0 - a     }      if right < left {         return right     }     return -left }  func (pod Pod) rotate(p Dot) int {     a := pod.diffAngle(p)      // Can't turn more than 18° in one turn !     if a > 18.0 {         a = 18.0     } else if a < -18.0 {         a = -18.0     }      pod.angle += int(math.Round(a))      if pod.angle >= 360.0 {         pod.angle = pod.angle - 360.0     } else if pod.angle < 0.0 {         pod.angle += 360.0     }     return pod.angle }  func (pod Pod) boost(t int) (int, int) {     if pod.hasShieldOn {         return pod.vx, pod.vy     }     pangle := float64(pod.angle)     pod.vx += int(math.Round(math.Cos(pangle) * float64(t)))     pod.vy += int(math.Round(math.Sin(pangle) * float64(t)))     return pod.vx, pod.vy }  // t shoud become a float later on func (pod Pod) move(t int) (int, int) {     pod.position.x += pod.vx * t     pod.position.y += pod.vy * t     return pod.position.x, pod.position.y }  func (pod Pod) endTurn() (int, int) {     // todo rounding position if needed     pod.vx = int(float64(pod.vx) * 0.85)     pod.vy = int(float64(pod.vy) * 0.85)     return pod.vx, pod.vy }  func (pod Pod) playTurn(p Dot, t int) {     pod.angle = pod.rotate(p)     pod.vx, pod.vy = pod.boost(t)     pod.position.x, pod.position.y = pod.move(1)     pod.vx, pod.vy = pod.endTurn()     fmt.Fprintf(os.Stderr, "\nPredicted Pod position : ")     fmt.Fprintf(os.Stderr, "\n(%d, %d) speed (%d,%d)", pod.position.x, pod.position.y, pod.vx, pod.vy) }


Cannot update grub with parameters on live USB

I have booted from a live USB ("Try Ubuntu"), that also has a persistent option set (I used  to create one) to do some tests for .  I'm trying to test  (like ) by doing this  sudo nano /etc/default/grub sudo update-grub   The problem is that that last command gives me this:  /usr/sbin/grub-probe: error: failed to get canonical path of /cow.   It looks like /cow is the file-system that is mounted on /, according to:  :~# df Filesystem     1K-blocks    Used Available Use% Mounted on /cow             4056896 2840204   1007284  74% / udev             1525912       4   1525908   1% /dev tmpfs             613768     844    612924   1% /run ....   Is there a way for me to run update-grub?


When can the isomorphism theorem for Groups be rewritten as a direct product?

Let $\phi:G\to H$ be a homomorphism of groups.  Under what conditions does  $\frac{G}{ker (\phi)} \simeq im(\phi)$ imply there exists an isomorphism $G\simeq im(\phi) \oplus ker(\phi)$, and why?  The answers in the possible duplicate question are not sufficient for me, as I do not have an understanding of category theory or exact sequences. I'm looking for a detailed answer that makes use of basic group theory alone.  In particular I am interested in knowing if $G$ or $H$ being abelian makes any difference.


After an apt-upgrade, my KDE dock/task manager icons in Kubuntu are all black

I recently ran do-release-upgrade to upgrade to Kubuntu 21.04 from 20.04 without issue. Other than some (expected) differences in configuration files, nothing failed. When I logged in to plasma, I was surprised to see all the sys tray's icons have been replaced with black placeholder squares -- see screenshot below. This is true even in alternative widgets, and in the the application launcher (all the icons are black squares).   There's nothing obvious in /var/log/syslog and I have an AMD gpu, which can happily run glxgears. The closest thing to a relevant error message is Jun 14 22:01:49 localhost org.kde.KScreen[6021]: kscreen.xcb.helper: Event Error:  147  I'd love some help debugging this. Does anyone have any ideas? Should I report this to the devs, or will I be a hindrance?


Prove $$\sum _{k=2}^{n} k(k-1) {n \choose k}=n(n-1)2^{n-2}$$  Proof by induction: true for $n=2$. Assume true for $n$ and see if $n+1$ is true.  $$\sum _{k=2}^{n} k(k-1) {n \choose k}=n(n-1)2^{n-2}$$  Then   $$\sum _{k=2}^{n+1} k(k-1) {n+1 \choose k}=\sum _{k=2}^{n+1} k(k-1) ({n \choose k-1}+{n\choose k})$$  From here I can separate the summ into 2:  $$\sum _{k=2}^{n+1} k(k-1) {n \choose k-1}+\sum _{k=2}^{n+1} k(k-1) {n \choose k}$$, where the latter is simply $n(n-1)2^{n-2}$ by the induction hypothesis. I assumed ${n\choose n+1}=0$.  However, I'm not sure what to do with $$\sum _{k=2}^{n+1} k(k-1){n \choose k-1}$$