public class Clan {     private String clanName;     static ArrayList&lt;Citizen&gt; list;     private int clanSize;    public Clan(String clanName, int clanSize) {      this.clanName = clanName;      this.clanSize = clanSize;      Clan.list = new ArrayList&lt;Citizen&gt;(clanSize);     //list.add(new Archer());    for (int i = 0; i &lt; clanSize; i++) {        Clan.list.add(Citizen.randomCitizen());    }  }     public static Citizen randomCitizen() {     Random randomReturn = new Random();      Citizen [] list = new Citizen[3];      list[0]=new Archer();     list[1]= new Barbarian();     list[2]= new Civilian();      return list[randomReturn.nextInt(list.length)];   }  This is meant to randomly fill the clan with random citizens whenever its called. The error I am having is if I create a new clan(toronto, 5) and another new clan(montreal, 6). They both have the same pattern of citizens. Its meant to be random for each call
To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?
Langage to declare a circuit board product distribution of two uniform distribution, what about 3 or more How to read numbers separated by space using scanf What are the downsides of removing ubuntu-desktop metapackage? What level is a spell if you cast it without expending a spell slot? There are ways to cast spells without expending a spell slot such as:  Master Transmuter (PHB 119):     Restore Life. You cast the raise dead spell on a creature you touch   with the transmuter’s stone, without expending a spell slot or needing   to have the spell in your spellbook.   Armor of Shadows (PHB 110):     You can cast mage armor on yourself at will, without expending a spell slot or material components.   Whispers of the Grave (PHB 111):     You can cast speak with dead at will, without expending a spell   slot.   See also: Channel Divinity: Read Thoughts (PHB 59-60), Mystic Arcanum (PHB 108), Beast Speech (PHB 110), Chains of Carceri (PHB 110), Eldritch Sight (PHB 110), Fiendish Vigor (PHB 111), Mask of Many Faces (PHB 111), Master of Myriad Forms (PHB 111), Misty Visions (PHB 111), Otherwordly Leap (PHB 111), Signature Spells (PHB 115), Spell Mastery (PHB 115), Shapechanger (PHB 119), Boon of Spell Mastery (DMG 232) and Boon of Spell Recall (DMG 232).  What level are these spells if you cast them without expending a spell slot? I'm still a newbie with Linux but I'm trying to learn. I have two USBs, one is 4GB and has the ISO install of Ubuntu (I think it's called live, the one with maximum of 4GB of permanent storage) and got a 64gb usb to make a permanent full install on it. I installed it following  tutorial and everything looks fine (I had to create the EFI partition with the Terminal though) but it just won't boot, the live install boots without problems.   I'm using the school's computers which have the UEFI menu password protected so I can't access that and I won't have a laptop for like 3 weeks (main reason why I'm doing this). I tested it with a friend's laptop disabling the Secure boot but it still wouldn't boot. I also saw that some tutorials don't add the EFI partition so I tried without that one and still won't work. And I know it's not the 64GB usb not booting because I had a live install on it too before and it booted fine.  Please, I have been trying to make it work for two days now, any ideas? I can barely understand this stuff so if you could explain step by step that would be awesome. First post and late answer review queues always empty? Prove the compactness of a set B We have $A=\left\lbrace 2019,1010,\ldots,(n+2018)/n,\ldots \right\rbrace$ and $B=A \cup \left\lbrace 1 \right\rbrace$  How can I show directly (that is, not using the compactness criterion in $\mathbb{R}$) that every open cover $G$ of $B$ admits a finite subcover?  moreover, I know that $A$ is not compact and I am aware that I would need a single example to prove it, any hint on how to find an open cover of $A$ that does not contain a finite subcover?  My first thought was to choose the set of all neighborhoods with radius r centered around each point of A but apparently this is wrong and I do not understand why. Are there any non-decreasing securities on the stock market? Are there any securities traded on the stock market (i.e. ETPs) that never decrease in value?    As an aside (in case anyone mentions bonds):  I'm aware there's ETFs for AAA-rated government bonds, but even these dip significantly.  For example, the  has dipped by 9% in a 85-day period before (21/08/2016 to 13/11/2016). Algorithms for automatic model selection I would like to implement an algorithm for automatic model selection.  I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though).   My problem is that I am unable to find a methodology, or an open source implementation (I am woking in java). The methodology I have in mind would be something like:   calculate the correlation matrix of all the factors pick the factors that have a low correlation to each other remove the factors that have a low t-stat add other factors (still based on the low correlation factor found in 2.). reiterate several times until some criterion (e.g AIC) is over a certain threshold or cannot or we can't find a larger value.   I realize there is an R implementation for this (stepAIC), but I find the code quite hard to understand. Also I have not been able to find articles describing the stepwise regression. How to prove $a^3 + b^3 +c^3 - 3abc =1 $, If a,b,c are infinite series as given in the description box below? How do I prove that $$ a^3+b^3+c^3−3abc = 1 $$ if   $ a = 1+\frac{x^3}{3!}+\frac{x^6}{6!}......$ , $b=x+\frac{x^4}{4!}+\frac{x^7}{7!}....$ , $c=\frac{x^2}{2!}+\frac{x^5}{5!}+\frac{x^8}{8!}......$ ?  I have tried the following :-  I discovered that $a+b+c=e^x$ and that $a=\frac{d(b)}{dx}$, $b=\frac{d(c)}{dx}$, $c=\frac{d(a)}{dx}$ . But I am unable to proceed further with these information. Cannot move file to trash warning when trying to delete a file in Nautilus I am trying to delete files in Nautilus and every time I try to delete one it always gives me this message:     Cannot move file to trash, do you want to delete immediately?   Then it gives me several questions. All I want is that when I press Delete in the keyboard, it sends it automatically to the trash can. Not to ask me every time.  The problem relates to NTFS partitions, external drives but also include Linux filesystems.  What are the reasons for nautilus beeing not able to move to trash? In Assa Auerbach's book (Ref. 1), he gave an argument saying that in the normal process of path integral, we lose information about ordering of operators by ignoring the discontinuous path.   What did he want to say? I don't think there is any problem related to the ordering of operators.  References:   Assa Auerbach, Interacting Electrons and Quantum Magnetism, p.102, just below eq. (10.6). Idiom: People caring about minor stuff while something terrible is happening Imagine a situation in which the whole place is on fire, a bomb is about to explode, everyone is running for their lives and someone is checking his looks on the mirror... pretty inappropriate for the situation, don't you think? I'm looking for an idiom or colloquial/slang/informal expression to describe such an indifferent stance. How does Ethernet know how long a frame is? passing values between forms (winforms) $$ A $$  Light is travelling away from the absolute center of the Schwarzchild black hole (i.e. none of that spinning/stretching field) at $\ C $, and so shouldn't $\ \Delta C$ need to be greater than $\ C $ in order for the light to collapse into the black hole, therefore violating the relativistic limit of $\ C $?    It seems like light would just 'hover' right in the center of a black hole then. Because if it goes away from it, the event horizon pulls it back, and if it goes into it, the velocity change must be greater than $\ C $ which violates general relativity; so technically there's no way for the light to move away, and so it would just be still.  The thing is that the light must move at the speed of light or general relativity doesn't work. It's massless... But in the center of a black hole, if the above is true (it can't move or escape), then it is not travelling at the speed of light. So it cannot be still.  It cannot be spinning in a constant orbit either, because that would require velocity in an outward angle. And it cannot move in an outwardly fashion, only in an inwardly one.  Is it spinning in an infinitely decaying spiral towards the center?  If so what happens to it if and when it reaches the direct and complete center, i.e. The case of it being 'shot' from the center.    $$ B $$  If you shot light at an angle towards a black hole, but not directly to the center of it  then that light from the outside will eventually become the same as the light that I said was shot from the center to the outside; because in both cases, they end up in an infinitely decaying spiral.    If so it would end up exactly like the light in the above paragraph, so then we need to figure out what happens to that light to figure this one out, or vice versa.    $$ C $$  If you shot light directly towards the center of a black hole it would have no spiral to decay into, so therefore it must stop at some point in the center of a black hole. If it stops though, it loses it's momentum and violates general relativity again because it's energy "disappears".    If so then it violates conservation laws. So I'm assuming this simply is not true.    Is the light travelling into a black hole somehow still travelling at the speed of light, in every direction possible where that direction keeps it facing towards the center?  If so, why is there not a point at which the only thing left for the light to do is stay still, since all other paths would increase the distance between it and the black hole's center, and therefore become Case A. And if there isn't, what would happen if there was?  Also, if it's a time and observation answer where it supposedly takes and infinite amount of time for C to hit the center, wouldn't it be the case that the black hole is 'eating' all of the available light in the universe and keeping it in stasis?  Also, what happens in a Kerr black hole then? Does it just rip the field of time/gravity at an angle such that the light would never get closer than the center? What are the differences between mocks and stubs on Rhino Mocks? I haven't play enough with this and usually use mocks, but I wonder what are the differences between this two and when to use one or the other on Rhino Mocks.  Update:  I also found the answer to my question in :  The difference between stubs and mocks You can get the actual definition of the these terms in this article: . I want to focus on the difference from the point of view of Rhino Mocks.  A mock is an object that we can set expectations on, and which will verify that the expected actions have indeed occurred. A stub is an object that you use in order to pass to the code under test. You can setup expectations on it, so it would act in certain ways, but those expectations will never be verified. A stub's properties will automatically behave like normal properties, and you can't set expectations on them.  If you want to verify the behavior of the code under test, you will use a mock with the appropriate expectation, and verify that. If you want just to pass a value that may need to act in a certain way, but isn't the focus of this test, you will use a stub.  IMPORTANT: A stub will never cause a test to fail. How do I help my third-grader focus on homework? My child just entered third grade, and the homework load is much higher this year, with a lot of writing and math drills. It is all work that she can do easily, but it's causing the whole family a lot of pain, because she's have a really hard time just sitting down and doing it — asking many questions about things she clearly actually knows, and getting distracted by the smallest thing going on around her. (Setting up a special quiet area isn't helping, because the distractions could be her pencil or a sudden burst of word association based on something in the lesson.)  So, a page of writing and a couple of pages of math which could be done in fifteen minutes total is taking an hour and a half. She can easily explain the reasoning behind the math problems, but when it comes to writing down what she just said, it's like pulling teeth. She'll slowly write a word, sounding it out in slow motion as she writes each word. And she'll say that she doesn't understand a question, but when she actually gets her mind pointed at it, she can write a great answer. And she's clearly picking up the concepts in class; I have no doubt that she actually understands, which is part of our frustration.  My wife feels like she's just wanting attention, but I think it's more about our daughter's own ability to focus. We both feel that sitting down and working painfully through each question isn't really helping her. That works, but my wife feels like it's just rewarding the behavior, and I feel like it's not really helping her learn any better focus on her own, which, you know, she'll need in actual life. And, we're happy to spend child with our kid, this pretty much the opposite of quality time.  Neither rewards or consequences seem to have any effect, and nor do charts. All of those things basically just seem to add another layer of complication, distraction, and misery. What else can we do? So in the image below there are two circles, how can I remove the internal vertices between them without messing up the outside shape. I'm working on a gun and this is just a simple way to illustrate the issue I'm dealing with. If I where to go in and delete the internal faces it would leave holes on the outside of the object, is there a fast way to get around this?