Save enum id instead of ordinal value using Hibernate
Hibernate @Enumerated mapping
Poincaré inequality for a subspace of $H^1(\Omega)$ The following is the well known  for $H_0^1(\Omega)$:       Suppose that $\Omega$ is an open set in $\mathbb{R}^n$ that is bounded. Then there is a constant $C$ such that   $$ \int_\Omega u^2\ dx\leq C\int_\Omega|Du|^2\ dx\quad \textrm{ for all   }\ \ \color{red}{u\in H_0^1(\Omega)}. $$   Here is my questions:    Can the condition $u\in H_0^1(\Omega)$ be relaxed so that the inequality is still true? More precisely, suppose $H$ is a subspace of $H^1(\Omega)$ such that for any $u\in H$, $u|_\Gamma=0$, where $\Gamma$ is a ([Added:]nonempty) closed proper subset of the boundary $\partial\Omega$ and the idenity is in the sense of trace. In other words, $u$ is only zero on a part of the boundary. Do we still have the Poincaré ineqaulity in $H$?    [Added:] This question is motivated by the following exercise How can I prove this inequality in a triangle: $\frac{1}{(b+c-a)} +\frac{1}{(c+a-b)} +\frac{1}{(a+b-c)} \gt \frac{1}{a} +\frac{1}{b} +\frac{1}{c}$? If $a,b,c$ are the sides of a triangle then show that- $\frac{1}{(b+c-a)} +\frac{1}{(c+a-b)} +\frac{1}{(a+b-c)} \gt \frac{1}{a} +\frac{1}{b} +\frac{1}{c}$  I got this problem from an old book on algebra. I've been trying for a long time but can't reach the answer.  My try on the question-  We know that in a triangle, the sum of two sides is always greater than the third side  $b+c\gt a$ $\implies$ $b+c-a \gt 0$  $c+a\gt b$ $\implies$ $c+a-b\gt 0$  $a+b \gt c$ $\implies$ $a+b-c\gt 0$  Also,  $\frac {1}{(b+c)} \lt \frac{1}{a}$  $\frac{1}{(c+a)} \lt \frac{1}{b}$  $\frac{1}{(a+b)} \lt \frac{1}{c}$  Adding,  $\frac{1}{(b+c)} + \frac{1}{(c+a)} +\frac{1}{(a+b)} \lt \frac{1}{a} + \frac{1}{b} + \frac{1}{c}$  How do I proceed further? All genuine answers are welcome :) I would like to be able to change the default CSS used by chrome, such as removing the underlines for links, etc. However, I cannot find the default CSS file used by Chrome. Does anyone know where it is? In transformers, the ratio of the voltages equals the ratio of the turns - so double the output coil's turns and the output voltage doubles. Then, in order to conserve energy, current halves.  This makes perfect sense in terms of $\mathrm{P=VI}$, but what happened to $\mathrm{V=IR}$? Doubling voltage and halving the current seems to completely contradict this basic law. That is, of course, unless the resistance in the output circuit changes, with R proportional to $\mathrm{V^2}$ - but I don't see how this is possible.  So how can a transformer obey both laws? Can resistance change or am I missing something else? Show the post's comments on the "Suggested Edits" review interface Having recently reviewed a few suggested edits, I've found that not being able to see the comments on the post is hindering my understanding of the context of some edits.  In particular, there have been a few posts where someone has made a substantial edit to a question or answer which significantly alters its meaning. Typically I'd reject that as "too radical", since it can't be known that the new meaning of the post was what the original author intended.  However, in some cases it is clear from the comments that the original author is aware of the intended change, and as such the editor is not in fact misrepresenting the author's intentions. In these cases, it would have been useful to see the comments when making the review decision.  As an example, a common cause of this is when an inexperienced user is asked to clarify their question, and ends up writing a comment that would be better off as an edit to the question (due to length, excess code content, etc), presumably due to lack of awareness that the question can be edited. Often, other users will helpfully edit the question to include the information the OP put in the comment (see ,  and  for examples). In this situation, it is clear that the edit reflects the OP's intentions, but this information is only present in the comments which are not visible in the review interface.  Following is the suggested edit screen showing the suggested edit. It seems indentation is increased and one line is moved a few lines upwards and some empty lines added to increase readability. But it look like an invalid edit since changing the related line may cause alteration on the runtime. So not looks lie a valid edit. Better open the answer and examine it        Checking the Q&amp;A itself reveals that a talk had taken place between the OP and the answerer and revision done by the OP with the permission of the answerer. So it was indeed a valid edit.        In short: is there any particular reason comments are not displayed in the suggested edit review interface? I think it would add useful contextual information when making review decisions, and presumably this would be trivial to implement.  Note: this is not a dupe of , as it does not concern comments posted after the suggested edit. "No such file or directory" when trying to remove a file, but the file exists? I am trying to remove a png image that was uploaded to my server via a PHP script. Whenever I try to delete it both through ftp and terminal, I get the error   No such file or directory   However, when I ls in the dir, the file is listed and it is also listed in my ftp client. I have tried creating a file with the same name and I end up getting two files with the same name.   I can open the file that supposedly does not exist, but I still can't remove it. I have also tried rebooting my server. Any ideas what may be the issue? I am running a 64 bit version of Ubuntu, but I don't think its a 32/64 bit issue. I should also note I have removed many other png files uploaded by the same PHP script.  Output for ls -l  total 224  -rw-r--r-- 1 www-data www-data 222838 May 13 04:14 qyxdshyikfr_fishing_timeout.png  -rw-r--r-- 1 root root 272 May 14 06:54 upload.php   Output when trying to rm  rm: cannot remove ‘qyxdshyikfr_fishing_timeout.png’: No such file or directory   upload.php: How does ssh run a command? I'm using Bash on both client and server. When running a command over SSH:   ssh &lt;host&gt; 'declare' gives a list of shell variables. ssh &lt;host&gt; 'mount' gives a list of mountpoints.   However, declare is a Bash builtin, while mount is an external command. How does SSH know which to run if there is a shell builtin and an external command with the same name on the server? What is (meant by) a non-compact $U(1)$ Lie group? In John Preskill's  of monopoles he states on p. 471     Nowadays, we have another way of understanding why electric charge is quantized. Charge is quantized if the electromagnetic $U(l)_{\rm em}$ gauge group is compact. But $U(l)_{\rm em}$ is automatically compact in a unified gauge theory in which $U(l)_{\rm em}$ is embedded in a nonabelian semisimple   group. [Note that the standard Weinberg-Salam-Glashow (35) model is   not "unified" according to this criterion.]   The implication of the third sentence is that, in some circumstances, the $U(1)_{\rm em}$ gauge group may not be compact.  How could this be?  Since $U(1)$ as a differentiable manifold is diffeomorphic to $S^1$ isn't it automatically always compact?  The following paragraph:     In other words, in a unified gauge theory, the electric charge operator obeys nontrivial commutation relations with other operators in the theory. Just as the angular momentum algebra requires the eigenvalues of $J_z$ to be integer multiples of $\frac{\hbar}{2}$, the commutation relations satisfied by the electric charge operator require its   eigenvalues to be integer multiples of a fundamental unit. This   conclusion holds even if the symmetries generated by the charges that   fail to commute with electric charge are spontaneously broken.   is OK, but I don't follow what that has to do with the compactness of $U(1)$. I'm using the package braket for my physics notes, and this speeds things up a great deal but I'm constantly writing \ket{\psi} or \bra{\psi}, and because this specific pair of bra and ket appears so often, this gets repetitive and I would like a macro to speed this up.  However since the braket package works only in math mode, my attempt \newcommand{\ketp}{$\ket{\psi}}$ work when I'm writing in text mode, but when I'm writing in mathmode it breaks (unsurprisingly).  Is there any way I can get this command to work in both mathmode and textmode without having to define two different macros, one for each?    Thanks in advance for any help.  P.S. I'm certain this is a very simple question but I could find little to no explanation of this feature. Is  purely conceptual or does it represent some real "thing"?  Said another way, is superposition thought to have some tangible physical manifestation or is it simply the lack of physical determinism, except as defined by a wave function?  It seems like my question might be semantic.  For example, it is said that   superposition is obeyed, like a law superposition can be observed, like a phenomena superposition describes behavior   I guess my question is, can superposition be measured like an electrical charge, or is it simply the lack of knowable position. Precision of Coulomb's law Up to which precision has the coulomb law proven to be true? I.e.  if you have two electrons in a vacuum chamber, 5 meters appart, have the third order terms been ruled out? Are there any theoretical limits to measure the precision ( Planck's constant?). Obviously there are practical limitations ( imperfect vacuum, cosmic rays, vacuum fluctuation). Still, does anyone know what was the smallest amount ever correctly predicted by that law?    Edit : Summary  On the high end of the energy spectrum a precision of 10^-16 has been shown ( 42 years ago )  For electron point charges at large distances the law might brake down due to practical reasons.  For moving particles QED gives a correction to the law: Logical volume is not mounted but is in use. Please close all applications using this device (eg iscsi) How to keep the spaces at the end and/or at the beginning of a String? When posting an HTTPS url like https://stackoverflow.com/..., it does not onebox in chat. For example: How do I delete one of two Ubuntus on my PC What is the angle at which water is splashed when a vehicle tyre rides in water on the road? I would like to know the following:   What is the angle at which water gets splashed when I ride my vehicle through a water on the road? How does angle of water varies with speed? What is the relation between the distance the water goes with the speed of the vehicle?   Thanks! Small caps font warning in beamer using biblatex Consider the following MWE  \documentclass{beamer} \usepackage{silence} \WarningFilter{biblatex}{Patching footnotes failed}  \usepackage{lmodern} \usepackage[T1]{fontenc}  \usepackage[style=authoryear-comp,backend=biber]{biblatex} \addbibresource{biblatex-examples.bib}  \begin{document} \begin{frame}   \fullcite{sarfraz} \end{frame} \end{document}   This generates the warning:  LaTeX Font Warning: Font shape `T1/lmss/m/sc' in size &lt;10.95&gt; not available (Font)              Font shape `T1/lmr/m/sc' tried instead on input line 28.   Is there a way to avoid the warning without using the silence package? How does the Java 'for each' loop work? Consider:  List&lt;String&gt; someList = new ArrayList&lt;String&gt;(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax? Old phone cannot connect to computer, the "computer connection" icon appears on phone I would like to get some pictures and audio out of an AT&amp;T SGH-a687 phone onto my Mac computer. I first tried connecting it to a New PC Studio on a PC, but there was a problem after transfer 2 photos, so I tried again. But the PC could no longer detect the phone, even though the "connected to computer" icon appears on the phone. I tried a different cable, different USB ports. No use.  So I downloaded the Samsung Kies on my Mac. Same thing, it tries to search for the phone once I connect the phone, but the computer doesn't detect anything. The phone still shows the "connected to computer" icon.  There is also Bluetooth (no internet on the phone) on the phone, but it failed to send the picture each time I tried.  What can I do at this point? Please also suggest data extraction software for either Mac or PC, if that's the easier route. How to find all the available tools in mac terminal? I am trying to setup a bunch of development projects in my Mac. I have to run various tools like python, ruby, scala, groovy etc.  To see if a tool is available I use options like   ruby --version.    Instead I would like to see all the list of tools available in Mac terminal via a single command. What is the command/options for it?