i have class named sagum which has a method name paint  public void paint(Graphics g) {      int[] apw1 = null;     int n1 = 0;     for (int j = 1; j &lt;= n1; j++) {         g.drawRect(50, 50, (apw1[j] * 20), 30);         String[] p = null;         g.drawString("p" + p[j - 1], (55 + (apw1[j - 1] * 20)), 70);         g.drawString("" + apw1[j - 1], 50 + (apw1[j - 1] * 20), 100);     }     g.drawString("" + apw1[n1], 50 + (apw1[n1] * 20), 100);  }   im trying to call it   n1=count+1;  paint(g);   and im getting an error  non-static method paint(Graphics) cannot be referenced from a static context   im simply trying to call it after a method is executed to do an a graphical app of my method (scheduling algorithm).   please help
The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List&lt;String&gt; someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List&lt;String&gt; someList = someMethod();          }
Product and Box Topologies I am having a hard time understanding why the box topology is finer the the product topology. Of course I know that with finite product, the two are the same. With product topology, the basis elements are defined so that the $U_{\alpha}=X_\alpha$ except for finitely many $\alpha$. So how can this topology be contained in the box topology which has only the product of the  $U_{\alpha}$ as basis. I think it should have been the other way round. Am I missing something here? I need help with this because I have been confused over it for a long time. Is hyperref really the best way to add metadata to a TeX file? So I know one of hyperref's features is that it can add metadata to you PDFs. This is a nice feature and if you're putting stuff online, it's good to include metadata.  But is the hyperref package really the best way to do it? I mean, if you're using hyperref anyway, that's fine. But if you don't want hyperrefs in your document, it seems weird to include the package, and then turn off pretty much all its functionality. And given that hyperref is a shorthand for "package conflict nightmare", is seems insane that you should have to deal with it just for the sake of some metadata.  So I have two questions.   Is there a good reason that hyperref includes this functionality which is apparently unrelated to its primary purpose? Is there a better (smaller, less conflicty, easier...) option to include metadata in my PDFs? I used Sound Juicer to rip a CD of audio for a language learning book so that I could listen to them on my Android. However, Sound Juicer seems to only have the option of numbering files without leading zeros. Like this:  track_1.mp3 track_10.mp3 track_11.mp3   This leads to some confused ordering on my music player. So, I want to add some zeros to the name, so that they're ordered properly, like this:  track_01.mp3 track_02.mp3 track_03.mp3   How do I accomplish this? I tried using GPRename, but while it has the ability to add numbers, it doesn't seem to have any options for adding leading zeros.  Is there a better program or something I can do at the command line? Attaching towel rail to drywall Can you grapple/shove with the Hunter Ranger's Whirlwind Attack? The  states:     You can use your action to make a melee attack against any number of creatures within 5 feet of you, with a separate attack roll for each target.   The rules on "" state (the rules in shoving are effectively identical):     When you want to grab a creature or wrestle with it, you can use the Attack action to make a special melee attack, a grapple. If you're able to make multiple attacks with the Attack action, this attack replaces one of them.   I couldn't find any other features spells or abilities that allow a creature to make a flat "melee attack". If they had said "melee weapon attack" instead this would have meant the same thing but specifically have excluded grapple/shove as an option.  I am unsure whether the rules on grappling/shoving mean that the only time you can grapple/shove are when you take the Attack action, which you are not doing when using the Whirlwind Attack feature.   I would like answers to assume that the following ruling made in the  is correct:     Whirlwind Attack is unusual, in that it’s a single attack with multiple attack rolls... Which one is correct?   Neither my friend nor I feel my best in the morning. Neither my friend nor I feel her best in the morning. Neither my friend nor I feel our best in the morning.    I already know that the verb agrees with the subject closer to the verb:   Neither my friends nor my brother understands me. (correct) Neither my friends nor my brother understand me. (wrong)   AND   Neither my brother nor my friends understand me. (correct) Neither my brother nor my friends understands me. (wrong) Simplest Example of a Poset that is not a Lattice A partially ordered set $(X, \leq)$ is called a lattice if for every pair of elements $x,y \in X$ both the infimum and suprememum of the set $\{x,y\}$ exists. I'm trying to get an intuition for how a partially ordered set can fail to be a lattice. In $\mathbb{R}$, for example, once two elements are selected the completeness of the real numbers guarantees the existence of both the infimum and supremum. Now, if we restrict our attention to a nondegenerate interval $(a,b)$ it is clear that no two points in $(a,b)$ have either a suprememum or infimum in $(a,b)$.   Is this the right way to think of a poset that is not a lattice? Is there perhaps a more fundamental example that would yield further clarity? Cardinality of the Cartesian Product of Two Equinumerous Infinite Sets Is the cardinality of the Cartesian product of two equinumerous infinite sets the same as the cardinality of any one of the sets? I couldn't find this explicitly stated in any handout or text. This certainly seems to be true from the examples I have seen:  The Cartesian product of two infinitely countable sets is again infinitely countable. The Cartesian product of two sets with cardinality of continuum again has cardinality of continuum. How do I connect to a MSSQL database using Perl's DBI module in Windows? How do I connect to a MSSQL database using Perl's DBI module in Windows? What are those zigzagged folded paper things you see in supernatural anime? In a lot of supernatural anime, like Shin Sekai Yori, or Tokyo Ravens there often appear these large ropes with folded paper things hanging from them:    As far as I can tell, they serve to seal or mark places that are sacred or in some way supernatural, like shinboku, or holy trees:    What are these folded paper things, and what purpose do they really serve? Quantum mechanics scattering theory UK Visa in an expired Nigerian passport - what to use? How to format date and time in Android? Does $\sum_{n=3}^\infty \frac {1}{(\log n)^{\log(\log(n)}}$ converge? Does the following series converge:  $$\sum_{n=3}^\infty \frac {1}{(\log n)^{\log(\log(n)}}$$  I've tried all test I know... Any ideas ? Of course preventing them from getting stolen is the top priority, but invariably, someone is going to get jacked. What are some good practices to minimize the damage incurred when your PC is stolen?  Given most of our PCs contain our entire lives, its frightening to know that all this information can be in someone else's hands.   Some ideas i had (a bit paranoid, i admit).   keep encrypted backups.  Use truecrypt to have double encrypted (with strong password) volumes where you store your personal data. schedule Eraser to run every evening so that potential thieves couldn't undelete (and subsequently retrieve) sensitive data do all your banking in a virtual machine.  Keep the virtual machine volume encrypted, and on a portable usb drive that you carry with you / keep in a safe. have applications that phone home (or hit something to leave an IP trace) upon connection to the internet (can someone suggest a good solution for this?)   Does anyone have any other suggestions? Doing principal component analysis or factor analysis on binary data I have a dataset with a large number of Yes/No responses. Can I use principal components (PCA) or any other data reduction analyses (such as factor analysis) for this type of data? Please advise how I go about doing this using SPSS. Which novel involves vampires, burning satellites, space travel, and body modification? About a decade ago, I encountered a novel or a novella that I cannot locate.   The setting was Earth, about one century into the future.  I remember vampires and a mesh of satellites around the Earth that were burning up in the atmosphere.  This motivated a mission to deep space to find the intelligence responsible for the satellites.  Most of the novel focused on the crew of the mission &mdash; I recall that they were not "standard" humans.  They had modifications to their minds and bodies, possibly for the mission.  At the time, I had gone on a binge, reading many short stories, novellas, and novels in quick succession.  I fear that I might be combining several stories into one, especially the vampires and the deep-space first-contact mission, and so I am fully prepared for an answer of the form, "No such story exists."  Any assistance would be greatly appreciated. When is an Integer a Rational Number, and are All Ratios Rational, Even $\frac{\sqrt{7}}{2}$? $$\Bbb{Q} = \left\{\frac ab \mid \text{$a$ and $b$ are integers and $b \ne 0$} \right\}$$ In other words, a rational number is a number that can be written as one integer over another. For an integer, the denominator is $1$ in that case. For example, $5$ can be written as $\dfrac 51$.  Is $5$ a rational number? Or is $\dfrac 51$  a rational number? I'm not able to figure out what the definition is actually saying. What are the numbers that cannot be written as one integer over another?  Irrational numbers are the numbers that cannot be written as one integer over another. Roots of numbers that are not perfect squares are examples of irrational numbers.  However, what is this then: $\dfrac {\sqrt 7} {2}$? Where are temporary files in Chrome stored? Is there a way to show statistic info?