I am designing a web application with plug able component architecture (plugins). My requirement is to add new plugin jar (classes) into application without restarting the application, it should be dropped in web application's lib or plugin directory and application should able to pick it up.  I tried this with tomcat server but it can not load the jar file dropped into its lib directory once its started.  Can anyone suggest a best way to do this ?
Why is it so hard to do this in Java? If you want to have any kind of module system you need to be able to load JAR files dynamically. I'm told there's a way of doing it by writing your own ClassLoader, but that's a lot of work for something that should (in my mind at least) be as easy as calling a method with a JAR file as its argument.  Any suggestions for simple code that does this?
What do you call a person that won’t act? What would you call a person that just stands by and won't act? Is kind of acting like a spectator when in reality that person should do something?  I know there is a word for this because I knew what it was a few hours ago but now I can’t remember it. On what criteria should I evaluate domain registrars? Though I've been a web developer for a fair amount of time, I am going for the first time to buy a few domain names.  I have looked into the domains I'm going to buy and know that they're available, and I've been looking into which sellers to use.  After doing a lot of research, the main ones I'm considering are 1&amp;1, Namecheap, and Gandi.  The problem is, when continuing to research, I'm not really sure what makes one domain seller distinct from another.  I don't need much in the way of services--definitely not hosting, since I plan to use Heroku for that.  I mainly only need the domain itself and DNS management, as well as possibly SSL certificates and WHOIS protection.  Question:  What makes one domain seller different from another?  How can I go about evaluating which one is the best for me?  Note:  This question is not which domain seller is the best, but rather, what criteria can I use to evaluate them and rank one over another.  I'm trying to find out what makes one domain seller different from another, since they all seem to be pretty similar to me right now. What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -&gt; 0.91239 0.912300 -&gt; 0.9123   What is the best way to achieve this in Java? Proving an infinite number of primes of the form 6n+1 The proofs given on other sites weren't that clear and used different methods that I have yet to learn.    Prove that there are an infinite number of primes of the form 6n+1.  The hint that was given was: Let p = p1, p2, ..., pk + 1, where p1 = 2, p2 = 3,...pk are the first k primes.  Show that p is prime.  (p1 means p sub 1, p2 means p sub 2, and pk is p sub k.  Wasn't sure how to write it on this.)    Can someone explain this hint on how they came about of p1 = 2, p2=3, etc, and prove this please?    Also, how would the proof change if the form changed?  ("Prove that there are infinite number of primes of the form....") The Aleph numbers and infinity in calculus. Atmospheric pressure experiment using a cup with a fluid to hold a glass plate When I was in high school, my teacher did an experiment to show the power of atmospheric pressure.  Experiment: Prepare a glass bottle, fill with water, put a glass plate on the bottle, make sure there is no air in the bottle, just water. Hold the glass bottle and plate, and invert them. Slowly, release the hand which hold the plate. Because the atmospheric pressure, the glass plate will not fall down.    Question 1: As we know, if we didn't put water into the glass bottle, just air in the glass bottle the glass plate will fall down. So, If we use other liquid instead of water, this liquid has smaller density than water, like alcohol, the plate will not fall down. But, if we continue to chose the smaller density liquid until the liquid has density like air the plate will fall down. So, if there is a threshold density of liquid make the plate between falling  down and not falling down?  Question 2: If we put the bottle and plate into water slowly, when the plate and part of bottle are in the water but part of the bottle still above the water, will the plate fall down?  Question 3: Continuing question 2, when both bottle and plate are in the water I know the plate will fall down. So, how does the pressure of water and atmosphere change?  Is there a good description of this phenomena?  Why does the trick continue to work with lower density fluids and why does placing the plate in the water cause it to fall? Looking for the title of a book about alien invasion, mining asteroids and using lasers to defend earth What I remember of this novel/series is that the main character creates solar laser satellites and mines asteroids to create more satellites to defend Earth from aliens. Later on, he uses the hollowed out asteroids as a base and eventually as an armored fortress to repulse the alien fleets. I last remember the main character attempting to hollow out more asteroids to defend and attack the aliens eventually. Is it possible to add new alphabets to unicode-math? In ordinary LaTeX, one can easily add new math alphabets by using \DeclareMathAlphabet. One is then able to use, say, cmsy, eus, and rsfs letters side-by-side. Unfortunately, there does not seem to be a similar mechanism in unicode-math, or at the very least \DeclareMathAlphabet doesn't do what it's supposed to do.  Question. How can I set up my own math alphabets in unicode-math?   Attempted workarounds  Since unicode-math has lots of math alphabets, one workaround might be to replace an unused alphabet with the desired one using \setmathfont[range=...-&gt;...]. This doesn't quite work right in my example:  \documentclass[12pt]{article} \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text}  \usepackage{unicode-math}  \scrollmode  \setmathfont{xits-math.otf} \setmathfont[range={\mathscr,\mathbfscr},StylisticSet=0]{xits-math.otf} \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{xits-math.otf} \setmathfont[range={\mathtt-&gt;\mathcal}]{latinmodern-math.otf}  \begin{document} \[ \begin{array}{c} \mathcal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathscr{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathtt{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \end{array} \]   I suspect the problem is that the codepoints of the calligraphic letters in Unicode are not contiguous.   Using \mathversion seems to work better:  \documentclass[12pt]{article} \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text}  \usepackage{unicode-math}  \setmathfont{xits-math.otf}  \setmathfont[version=eucal]{latinmodern-math.otf} \newcommand{\eucal}[1]{\mathchoice %   {\mbox{\mathversion{eucal}$\displaystyle\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\scriptstyle\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\scriptscriptstyle\mathscr{#1}$}}}  \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{xits-math.otf}  \begin{document} \[ \begin{array}{c} \mathcal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathscr{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \eucal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \end{array} \] \end{document}   But this feels very inefficient. Are Stack Overflow people *still* nice? The title is a reference to . We had the good fortune, to start this experiment with a really positive culture and have managed to hang onto it through vast growth and several fairly bitter internal arguments. But that does not guarantee we'll keep it forever. Lately I've had a unscientific feeling that Stack Overflow has been a bit rougher on newbie mistakes. The actual composition of this question was triggered by the comment thread on  (now with pending delete votes, so it is in danger of being 10k only). The  currently has 3 reputation points and has been a member for all of two days. The question bear the obvious (to me, at least) hallmarks of being written by a non-native English speaker with a shaky grasp of the tongue, and it is a rather simplistic question that could be answered fairly easily by Google. Question body:  Sir, I am mc student, I have knowledge in c,c++,J2EE. I want to ask you should I command in Linux with J2EE. Is it worth?  Instead of trying to improve the question, to discern exactly what the OP meant, or explaining how the question should be improved we get this comment thread instead (without wanting to call out these posters in particular, this was just the thread that got be off my duff):  2 Can you elaborate? – Dave McClelland 21 hours ago 1 Absolutely yes! If it can run on your Blu-Ray player, imagine the possibilities it can do on Linux. – The Elite Gentleman 21 hours ago 1 Basically, it's as worth as running Java on any other platform. – Alexander Gessler 21 hours ago 1 @The Elite Gentleman, You can try run it on your sim-card too) – Stas Kurilin 21 hours ago 1 @STas Kurilin, really? What heapspace size must I give? sarcastic laugh – The Elite Gentleman 21 hours ago 1 @The Elite Gentleman I don't know. But there are some) See for details oracle.com/technetwork/java/javacard/overview/… – Stas Kurilin 21 hours ago @The Elite Gentleman, you're absolutely right given a full fledged desktop machine with Linux, Java would run so fast his program could go back in time and rescue whales from extinction. – Quaternion 21 hours ago @Stas Kurlin, if you have a program that runs on a sim-card isn't it hard to get output? I've always found processorless environments problematic. – Quaternion 21 hours ago @Quaternion - It was a joke) I've newer wrote such programs. But, I think there should be some processor. – Stas Kurilin 20 hours ago @Stas Kurlin, I was joking too, but I have to apologize after reading that page you liked to. You can run Java off a smart card... that's crazy and cool. +1 on account of good learning for the day. – Quaternion 20 hours ago @Quaternion Thanks. I heard about this stuff several weeks ago. Java at a sim card is a really cool argument) – Stas Kurilin 20 hours ago @Quaternion, lol, without having to worry about Segmentation Faults along the way. – The Elite Gentleman 19 hours ago  I've been leaving comments on threads like this from time to time, asking them to be a little more forgiving, but that is a drop in the bucket. Nothing flag-worthy here, but not a &quot;nice&quot; as things once were. There is very little effort to understand what the question may really be, nor why to explain why the question has been closed, what other resources exist, or how that decision could be reversed. With a brand new user who probably has a hard time with English. Ouch. Do we need an official re-iteration of &quot;Be nice.&quot;? Is there something else we can do to encourage our big city to keep the small-town feel we grew up with? How do I move a line in a text file up or down by one line? Tangent lines to ellipse from external point "Try and" versus "Try to"? Prevent back button after logout Which resources are available to self-study GAP? Background: This year I'll do another Group Theory course ( Open University M336 ). In the past I have used Mathematica's AbstractAlgebra package but (although visually appealing ) this is no longer sufficient (i.e. listing subgroups of $S_4$ takes ages). So, I want to learn more about GAP. I worked through beginner tutorials that I found via the . Currently, I am not making much progress with GAP. The  does not help me much at this stage.  Question: Which resources are available to self-study GAP? How does one become proficient in GAP? What ( books, tutorials ) should you study? What is the technical term for when people thinks the actions of the few represent the many.  Like when people thinks everyone in a specific group behaves a certain way cause of how a few people in the group behave, including non stereotypical behaviours. I thought it was "generalisation" but I couldn't find any articles using that term. Hi I have to proof that for $\Omega$ a nested family of odd subsets of $V$ with $V$ finite, we have that $|\Omega|\leq\frac{3}{2}|V|$. I can prove that for certain constructions of $\Omega$, it is satisfies $|\Omega|\leq \frac{3}{2} |V|$, the problem I encounter is that I have to proof that my construction of $\Omega$ is optimal. (Since I have to prove that this holds for every family of odd subsets) Can anyone give me a hint on how to proof that every $\Omega$ satisfies this equation.    $\Omega$ is nested if for all $A,B\in\Omega$ either $A\subseteq B$, $B\subseteq A$, or $A\cap B=\varnothing$; a set is odd if its cardinality is odd. Why is the gravitational force always attractive? Let $f$ be a real-valued function continuous on $[a,b]$ and differentiable on $(a,b)$. Suppose that $\lim_{x\rightarrow a}f'(x)$ exists. Then, prove that $f$ is differentiable at $a$ and $f'(a)=\lim_{x\rightarrow a}f'(x)$.    It seems like an easy example, but a little bit tricky. I'm not sure which theorems should be used in here.    ==============================================================  Using @David Mitra's advice and @Pete L. Clark's notes I tried to solve this proof. I want to know my proof is correct or not.  By MVT, for $h&gt;0$ and $c_h \in (a,a+h)$ $$\frac{f(a+h)-f(a)}{h}=f'(c_h)$$ and $\lim_{h \rightarrow 0^+}c_h=a$.    Then $$\lim_{h \rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=\lim_{h \rightarrow 0^+}f'(c_h)=\lim_{h \rightarrow 0^+}f'(a)$$   But that's enough? I think I should show something more, but don't know what it is. Do you have to pass delete the same pointer that was returned by new, or can you pass it a pointer to one of the classes base types?  For example:  class Base { public:     virtual ~Base();     ... };  class IFoo { public:     virtual ~IFoo() {}     virtual void DoSomething() = 0; };  class Bar : public Base, public IFoo { public:     virtual ~Bar();     void DoSomething();     ... };  Bar * pBar = new Bar; IFoo * pFoo = pBar; delete pFoo;   Of course this is greatly simplified.  What I really want to do is create a container full of boost::shared_ptr and pass it to some code that will remove it from the container when it is finished. This code will know nothing of the implementation of Bar or Base, and will rely on the implied delete operator in the shared_ptr destructor to do the right thing.  Can this possibly work? My intuition says no, since the pointers will not have the same address.  On the other hand, a dynamic_cast&lt;Bar*> should work, so somewhere the compiler is storing enough information to figure it out.  Thanks for the help, everybody who answered and commented. I already knew the importance of virtual destructors, as shown in my example; after seeing the answer I gave it a little thought, and realized the whole reason for a virtual destructor is this exact scenario. Thus it had to work. I was thrown by the absence of a visible means of converting the pointer back to the original. A little more thinking led me to believe there was an invisible means, and I theorized that the destructor was returning the true pointer for delete to release. Investigating the compiled code from Microsoft VC++ confirmed my suspicion when I saw this line in ~Base:  mov eax, DWORD PTR _this$[ebp]   Tracing the assembler revealed that this was the pointer being passed to the delete function. Mystery solved.  I've fixed the example to add the virtual destructor to IFoo, it was a simple oversight. Thanks again to everyone who pointed it out. $\ker T\subset \ker S\Rightarrow S=rT$ when $S$ and $T$ are linear functionals