Why hibernate,spring and struts provide annotation based configuration and what is difference between xml configuration and annotation based configuration, please tell with example?
In a few large projects i have been working on lately it seems to become increasingly important to choose one or the other (XML or Annotation). As projects grow, consistency is very important for maintainability.   My questions are: what are the advantages of XML-based configuration over Annotation-based configuration and what are the advantages of Annotation-based configuration over XML-based configuration?
How are multiple volunteers handled during the Reaping? While skimming through the first few chapters of The Hunger Games to answer another question, I noticed this sentence when Katniss is describing the rules surrounding volunteers after Prim's name is called (at the beginning of the second chapter):     In some districts, in which winning the reaping is such a great honor, people are eager to risk their lives, the volunteering is complicated.   The only reason I can see for volunteering being complicated is if there's more than one volunteer for a particular year, and I don't recall this ever being addressed in the books.  Is there anything in the books that I've missed or any reliable, external sources (interviews or other supplementary material by the author) that explain exactly how this situation is resolved? Why does demand for stock rise when a company appears to have high future value? So a company decides to raise money by selling shares of its stock. The stock is offered at an initial price of their determination. The stock is then traded in a market where forces of supply and demand, as well as speculation, affect its price.  When a company performs well (or makes decisions that will likely increase the company's earnings in the future), more people want to buy that stock than do people wanting to sell it. This creates demand for that stock which causes its sell/bid prices rise. When a company performs poorly, the opposite occurs; more people want to sell the stock than want to buy. This creates a surplus that causes sell/bid prices to fall.  Understanding this, people speculate over company performance to determine the future behavior of a stock, and attempt to "buy low, sell high" or "borrow high, return low" in order to make a profit.  But my question is regarding the first part of that process. What is it about company performance that causes the perceived value of its stock to rise? This is especially perplexing since I would guess that most people don't exercise their voting rights, and many stocks don't pay dividends.  It's not like a shareholder has any direct financial gains from increased company earnings (speculative stock pricing notwithstanding).  What is the intrinsic value of the stock?  It seems to me that all participants in a stock market tacitly agree that stock price will have a direct correlation with company performance. So another way of asking the question is, would an opposite agreement hold? What financially (this isn't a question about logistics, communication, or feasibility) stops all participants in a market from agreeing to value a particular company's stock inversely with respect to the company's performance?  Since I feel like I can't quite nail down my question, another form of it would be, why is stock market behavior driven by company performance? Bevel specific edges Package natbib Error: Bibliography not compatible with author-year citations I have a basic tex file and a bibliography which is exported from Mendeley  However, when I want to cite in the author-year style, I get the error:   Package natbib Error: Bibliography not compatible with author-year citations. (natbib) Press &lt;return&gt; to continue in numerical citation style.  Any clue what's wrong?  Minimum working example:  \documentclass[letterpaper, 10pt]{article}  \usepackage[authoryear]{natbib} \usepackage{lipsum}  \begin{document}  \lipsum[1-4] \nocite{*}  \bibliographystyle{apalike} \bibliography{articles}  \end{document}    A snippet of my .bib library:  @article{shortcode, author = {Lastname, Firstname}, file = {:/path/to/file.pdf:pdf}, journal = {Journal name}, number = {xx}, pages = {x--xx}, title = {Title}, volume = {xx}, year = {xxxx}     } Are getters and setters poor design? Contradictory advice seen I'm currently working on a simple game in Java with several different modes. I've extended a main Game class to put the main logic within the other classes. Despite this, the main game class is still pretty hefty.  After taking a quick look at my code the majority of it was Getters and Setters (60%) compared to the rest that is truly needed for the logic of the game.  A couple of Google searches have claimed that Getters and Setters are evil, whilst others have claimed that they are necessary for good OO practice and great programs.  So what should I do? Which should it be? Should I be changing my Getters and Setters for my private variables, or should I stick with them? When do mobs despawn in Minecraft? I understand monsters only spawn in a 9 x 9 grid of chunks centered on the player, and I assume they stay around while they remain within that distance of you. But do they despawn as soon as you move away from them? Or do they remain? If so what (if anything) causes them to despawn? Are the rules any different for passive mobs?  Will running far away from an area and then coming right back clear it of monsters? Why do people call their characters "toons"? I've seen that in games like MMORPGs and the Diablo series, where the player has an "arsenal" of several characters, people refer to their characters as "toons".  What is the origin of this term? Best answer versus best solution How can I make a more realistic glass shader? deleting windows system folder I want to use an old drive as a secondary hard drive without reformatting. But this old hard drive contains my old Vista installation which takes up gigs of space.  I tried changing ownership and it works to some extent but I can not delete anything in Windows/System32 folder.  Is there an easy way to change permissions so I can delete everything?    The solution is to use Takeown as Wil suggested and use cacls to take full control of the files. Since cacls doesn't seem to be recursive, I fired up cygwin and ran this command to recursively change all the files:  for d in $(find directory-of-interest -type d);do   cacls $d'/*' /e /G username:F; done   where directory-of-interest is in my case /cygdrive/g/Windows and username is my username.  I had to manually run it on directories that had spaces in its name. But after all this, I can now delete the directory. Warning: it seems to me that cacls can potentially royally screw things up if improperly used. Why won't this command work? /summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:371,Count:15},sell:{id:264,Count:4}}   I'm using this as a recycler villager, and I can't get the first trade to work. What's going on? Proof of convergence of sequences Problem: Show that if $x_n\to 5$ then $\dfrac{x_n +1}{\sqrt{x_n -1}} \to 3$.  So I know $|x-5|&lt;\epsilon$ and I need to show that $\left|\dfrac{x_n +1}{\sqrt{x_n -1}} -3\right| &lt; \epsilon$.  I tried applying the triangle inequality (and a bit of algebra) to get $$\left|\frac{x_n +1}{\sqrt{x_n -1}} -3\right| \leq |x_n -5| \left |\frac{1}{\sqrt{x_n -1}}\right| + \left|\frac{6}{\sqrt{x_n-1}} -3\right|.$$  From this I know that $|x_n -5| &lt;\epsilon$ and can show that $\left |\dfrac{1}{\sqrt{x_n -1}}\right|&lt;1$. So my only problem is the second part of the sum. I have no idea what to do with it to get everything to be less than $\epsilon$. Installing MinionPro fonts on Ubuntu 10.04 running TexLive 2012 I followed the instructions to install MinionPro fonts from this website.   However, when I tried to run the tex file at the bottom, I have this error message:  ! LaTeX Error: File `MinionPro.sty' not found.   Running the command kpsewhich MinionPro.sty gives the following output:  /usr/local/share/texmf/tex/latex/MinionPro/MinionPro.sty   So the system knows where MinionPro.sty is, so why can't the file compile? Why did Itachi say that he needs to get someone's MS to get EMS while Sasuke only had a normal Sharingan? Is there a symmetry associated to the conservation of information? Conservation of information seems to be a deep physical principle. For instance, Unitarity is a key concept in Quantum Mechanics and Quantum Field Theory.  We may wonder if there is an underlying symmetry, in some space, which may explain this conservation of information. What are the best methods to show a data table in mobile / tablet view? Can I change a user's keyboard input? How should an educational institute woo good faculty? How does one prove that the Klein bottle cannot be embedded in $R^3$? I'm talking about smooth embeddings. Invariant Subspace of Two Linear Involutions I'd love some help with this practice qualifier problem:  If $A$ and $B$ are two linear operators on a finite dimensional complex vector space $V$ such that $A^2=B^2=I$ then show that $V$ has a one or two dimensional subspace invariant under $A$ and $B$.    Thanks!