Java Servlet @Override Annotation Should I add @Override annotation when overriding doGet() and doPost() methods from javax.servlet.http.HttpServlet?  For example:  @WebServlet("/") public class MyServlet extends HttpServlet {     @Override     protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {         /* my code */     } }   I've never seen code that adds @Override annotation to servlet code.
When do you use Java's @Override annotation and why? What are the best practices for using Java's @Override annotation and why?     It seems like it would be overkill to mark every single overridden method with the @Override annotation.   Are there certain programming situations that call for using the @Override and others that should never use the @Override?
Book where wizards learn magic by bonding with crystals that imbue them with powers I read this book a long time ago, but I'm guessing it was written sometime in either the 80's or early 90's. It was a rather long/large book.  Plot summary: Set in a fantasy land of wizards and magic, some kids (maybe) are recruited to learn magic. In the process they find out that wizards are created by being placed in a crashed spaceship that bonds them with crystals that imbue the powers. One of them is able to bond with many/multiple crystals to become very powerful. Concurrently interleaving execution of Lua and TeX in LuaTeX The usual way to interleave Lua and TeX in generating documents is by invoking Lua from Tex through the \directlua facility and generate Tex from Lua using tex.print().  For example, consider the Plain LuaTeX:  \directlua{     es=""; someluatex = function () tex.everypar="PAR!" end     tex.print("one", es, "two")     someluatex()     tex.print("three", es, "four") } five\bye   Looking at the document LuaTeX generates for that input, we see that someluatex() is run before the Tex backend does anything with the output: the PAR!s will be inserted before "one" and "two", as well as after "three".  Is there best practice for ensuring that TeX code issued by some Lua code is issued before some other LuaTeX code?  There are several ways to do this: with some code I am working with I am trying the following scheme:   Wrap the code executed by the \directlua in a coroutine, call it myco; At the point we want to ensure the Tex so far tex.print-ed is executed, use:  tex.print("\\directlua{coroutine.resume(myco)}") coroutine.yield()  If everything is in order, the Lua will resume after the Tex is processed.   This is not ideal, however: we must ensure that the TeX backend is in the right state to understand the \directlua command, which may not always be the case.  Is there a better way to achieve this? How does Dijkstra's Algorithm and A-Star compare? Closed form for $\int_0^1\log\log\left(\frac{1}{x}+\sqrt{\frac{1}{x^2}-1}\right)\mathrm dx$ Could give some examples of nonnegative measurable function $f:\mathbb{R}\to[0,\infty)$, such that its integral over any bounded interval is infinite? Return single column from a multi-dimensional array I want my Qt application to be able to save simple vector graphics to clipboard in a compatible way. On windows I want to be able to paste the graphics into Microsoft Word or Powerpoint. On Linux I want to be compatible with the Open Office.   Which format would you recommend? Can Qt generate EMF in an easy way? Is SVG an option?  Update:  My current plan is to add a piece of native win32 code to render the graphics to emf on windows. This code will not be available on linux. In sysctl, the /proc/sys/net/ipv[46]/conf/ keys have the following subkeys: all, default, and a key for each network interface. For example, on a machine with a single network interface eth0, it will look like this:  iserv ~ # ll /proc/sys/net/ipv[46]/conf/ /proc/sys/net/ipv4/conf/: insgesamt 0 dr-xr-xr-x 0 root root 0 12. Sep 23:30 all/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 default/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 eth0/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 lo/  /proc/sys/net/ipv6/conf/: insgesamt 0 dr-xr-xr-x 0 root root 0 12. Sep 23:30 all/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 default/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 eth0/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 lo/   All the respective settings exist in each key separately. For example, if I want to disable IPv6 Router Advertisements with the accept_ra value, this value exists four times:  iserv ~ # sysctl -a 2&gt;/dev/null | grep "accept_ra " net.ipv6.conf.all.accept_ra = 1 net.ipv6.conf.default.accept_ra = 1 net.ipv6.conf.lo.accept_ra = 1 net.ipv6.conf.eth0.accept_ra = 1   My question now is: which of these values do I need to change? I figured all (to change all existing interfaces) and default (to change all new interfaces that may appear later), but changing these still leaves the value at 1 for lo and eth0:  iserv ~ # sysctl -w net.ipv6.conf.all.accept_ra=0 net.ipv6.conf.all.accept_ra = 0 iserv ~ # sysctl -w net.ipv6.conf.default.accept_ra=0 net.ipv6.conf.default.accept_ra = 0 iserv ~ # sysctl -a 2&gt;/dev/null | grep "accept_ra "   net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 net.ipv6.conf.lo.accept_ra = 1 net.ipv6.conf.eth0.accept_ra = 1   Will the machine now accept Router Advertisements on eth0, or will it not? Let $x_n$ be a sequence of the type described above. It is not monotonic in general, so boundedness won't help. So, it seems as if I should show it's Cauchy. A wrong way to do this would be as follows (I'm on a mobile device, so I can't type absolute values. Bear with me.) $$\left|x_{n+1} - x_n\right| \leq \frac{1}{n^2}.$$ So, we have $$ \left|x_m -x_n\right| \leq \sum_{k=n}^{m} \frac{1}{k^2}$$ which is itself Cauchy, etc., etc. But, of course, I can't just use absolute values like that. One thing I have shown is that $x_n$ is bounded. Inductively, one may show $$ \limsup_{n \to \infty} x_n \leq x_k + \sum_{k=n}^{\infty} \frac{1}{k^2},$$ although I'm not sure this helps or matters at all. Thanks in advance.  Disclaimer I've noticed that asking a large number of questions in quick succession on this site is often frowned upon, especially when little or no effort has been given by the asker. However, I am preparing for a large test in a few days and will be sifting through dozens of problems. Therefore, I may post a couple a day. I will only do so when I have made some initial, meaningful progress. Thanks. How to duplicate a div in JavaScript I am trying to construct a theoretical Diffie-Hellman key exchange protocol. However, i cannot understand the difference between choosing an additive group or a multiplicative group. I believe an additive would make it much more simple, but would a multiplicative group make it more difficult to break? What would be the difference between the use of those 2 kinds of number groups? Converting FLV to MP4 Using FFMPEG and Preserving the Quality Im trying to use ffmpeg to convert my flv files to mp4 to play them on iOS devices but the converted video has a much worse quality than the original one.  Here is the command i use:  ffmpeg -i input.flv -ar 22050 output.mp4   I would really appreciate if someone could provide me with the best settings for flv to mp4 conversion. How well does jQuery support backward compatibility? We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to start using several plugins that require it. Will we have any issues if we get rid of the older version? what exactly is mathematical rigor? I am a programmer moving up to computer science and even in my past life as a mechanical engineer I used sufficient maths to get by but I have always wondered what exactly is this thing called rigor.  Please make me understand it. As a(n) noun vs as only another balls and bins question I've seen many variations of this problem but I can't find a good, thorough explanation on how to solve it. I'm not just looking for a solution, but a step-by-step explanation on how to derive the solution.  So the problem at hand is:   You have m balls and n bins. Consider throwing each ball into a bin uniformly and at random.    What is the expected number of bins that are empty, in terms of m and n? What is the expected number of bins that contain exactly 1 ball, in terms of m and n?   How would I approach solving this problem?  Thanks! How to calculate the costs of a weapon enchantment? I am currently reading about the interactions between light and matter, but I keep coming across conflicting explanations.  My initial understanding (using classical electrodynamics) was that light (EM) waves do not actually travel through glass. Instead, they are absorbed by the atoms and/or electrons within the glass, which then emit new EM waves. The new EM waves emitted by the energised particles make up the forward-radiation, which is the light observed from the opposite side of the glass. So it appears as if light is travelling through the glass, but it's actually being absorbed and then re-emitted with (mostly) the same properties.  The article  by Chad Orzel, based on a related SE question, confirms the above:      To understand the propagation of a wave through a medium, you can   think of each component of the medium– atoms, in the case of a glass   block– as being set into motion by the incoming wave, and then acting   as a point source of its own waves.   But an answer to a different but related question,  conflicts with the above:     the electrons in glass are tightly bound to atoms so they are not free   to move like the electrons in a metal and therefore they do not absorb   the photons.   I know the above is referring to the quantum electrodynamics understanding, but I think it still conflicts as it claims that EM waves are not absorbed by the electrons in glass because they are too tightly bound to their atoms.  Also, the  provides a small explanation of the mechanics behind refraction within glass, which kind of conflicts with both of the above:     In the case of dielectrics such as glass, the electric field of the   light acts on the electrons in the material, and the moving electrons   generate fields and become new radiators. The refracted light in the   glass is the combination of the forward radiation of the electrons and   the incident light. The reflected light is the combination of the   backward radiation of all of the electrons.   From my understanding, the above claims that some of the light is absorbed and re-emitted by the electrons (which conflicts with the linked answer), and that the rest of the incident light travels through the glass (makes up the rest of the refracted light) (which I think conflicts with the linked article, claiming the light is absorbed (although the article doesn't technically state whether all of the light is absorbed and re-emitted, so maybe that's where I'm going wrong(?))  I'm sure this is my misunderstanding, so I would be very grateful if you could clear it up for me:  When a light wave is incident on a sheet of glass, do the particles that make up the glass absorb the waves and re-emit them in the forward direction? Or do the light waves manage to travel through the glass, without being absorbed and then exit the glass? Neural Network: MLP for regression with 3 continuous features, 1 categorical I am starting to study Neural Network. I want to build a MLP where I will feed it:   3 features which are continuous one feature which is categorical (48 classes)   How can I do this?  Before adding the categorical feature, I was using 'relu' activation function and 'lbfgs' as a solver in MLPRegrssor in sklearn.  I was wondering: how can I integrate this variable into the network? Should I do one-hot encoding? Should I keep relu as activation function or should I try sigmoid, softmax or something like that? How many actuations are "too many actuations"?