I am working an application with Java, Hibernate and Postgres. The point of my question is the pass of throws because I don't catch Exception generated, ¿What I must correct?  public void seleccionarEquipo() throws Exception {     try{          this.integrantes = consultarIntegrantes();     }catch(Exception e){         System.out.println("{ERROR: " + e.toString() + "}");     } }  public List&lt;Usuario&gt; consultarIntegrantes() throws Exception {     System.out.println("calling...");     List&lt;Usuario&gt; usuarios = new ArrayList&lt;Usuario&gt;();     Session session = NewHibernateUtil.getSessionFactory().openSession();     Transaction transaction = session.beginTransaction();     try {         System.out.println("try...");         Query query = session.createQuery("Anything");         usuarios = query.list();     } catch (Exception e) {         System.out.println("error detected");         throw e;     }finally{         transaction.commit();         session.close();         return usuarios;     } }   Output:  Info:   calling... Info:   try... Info:   error detected   My application doesn't execute: System.out.println("{ERROR: " + e.toString() + "}");. What I do?  Thank you!
I was surprised recently to find that it's possible to have a return statement in a finally block in Java.  It seems like lots of people think it's a bad thing to do as described in ''. Scratching a little deeper, I also found '' which shows some pretty horrible examples of other types of flow control in finally blocks.  So, my question is, can anyone give me an example where a return statement (or other flow control) in a finally block produces better / more readable code?
Best way to implement keyboard shortcuts in a Windows Forms application? Can anyone point me to a reference (preferably either something online or something a small liberal arts school would be likely to have in its library) that goes through a derivation of the minimum uncertainty wavefunction in more detail than in the Griffiths?  Edit I've moved the second part of my original question to a separate post: Installing Ubuntu 13.04 on a MSATA SSD I am trying to install Ubuntu 13.04 on my 24Gb MSATA SSD. In my laptop, I've also got a 500Gb SATA HDD. I realize that in order for this to work I need to put my /home directory on the 500Gb HDD.   I've tried installing it by creating a ext4 partition on the SSD and a 8Gb swap partition on my HDD. This resulted in an error saying something similar to Cannot install bootloader, please select an other location for the bootloader.   Now before I waste any more time trying to get it to work I'm going to ask a bunch of questions:   Where should I put the swap partition? How big should I make the swap partition? (I've got 12Gb RAM) My 500Gb HDD is currently in Raid mode. Should I change that (to AHCI or IDE)? Where should I put the bootloader if the error message occurs again? How do I make the home directory point to the HDD instead of the SSD? Can I configure Ubuntu to install software/packages on the HDD instead of the SSD? How to measure supply currents ranging from 1μA to 10mA? A friend asked me to help her with her old iPhone 4 (she has upgraded to a 7). When I turn it on, it says, "iPhone is disabled" and "connect to iTunes."  When I do so, iTunes reports that it is locked with a passcode, and that I need to type that in to continue. However, the iPhone does not display a keypad or allow any sort of input.  Apple suggests the only solution is a wipe, but this will lose all of her photos.  Can photos be retrieved (at a minimum) from a disabled iPhone 4? Looking at the following dataset:   Date        Visits   Carts      carts       Orders                       Created   converted    Created 2011-11-11    12277     161        9          36   2011-11-12    11871     93         5          19     2011-11-13    13072     107        8          8      2011-11-14    13594     112        4          34     2011-11-15    12741     129        8          43     2011-11-16    15491     261        16         57  2011-11-17    13418     186        17         42       I've been asked to plot this on a graph, using the Date has the X-Axis and the rest of the data on the Y-Axis. The problem is that the scale of the data is dramatically different. where Visits are in the thousands and Orders Created are in the low tens, the data doesn't plot well on a graph.     I was wondering what a statistician would do in this scenario, I could divide the the Visits by a 1000 and then put in the description (Visits (K)), but then I start to have the same problem with Carts Created, as they are in the hundreds and everything else is in the low tens.  What kind of thing is done in this scenario? Trying to format USB (using Linux/fdisk) so it shows up on my Mac I have a USB drive that I can see/access/modify/etc in Linux/Ubuntu but it doesn't show up on my Mac OSX.  I did sudo fdisk /dev/sdb (where my USB is) and then g to create a new GPT partition table, n to make a new partition, used all default settings, then w to save and exit.  Then I did sudo mkfs.fat -F32 /dev/sdb1 to format the partition with a FAT32 filesystem.  I ejected the USB and put it in my Mac and it doesn't show up / get detected.  What did I miss? Why are light rays able to cross each other? See the image first:   Why are light rays able to cross each other? Air isn't able to. Graphics crop in guest welcome window I don't expect that any user should have noticed this, since only guests will see them.  Well, it seems that the Stack Overflow welcome splash, containing the basic info of the site, is cropped from the bottom.    Please don't mind the sides, I cropped them to fit on the screen. Just on the bottom is my concern. Matrix given by $a_{ij} = 1/(i+j)$ is non-singular. Closure of the set of degree $n$ polynomials with $n$ real roots A very beautiful (but maybe classic) exercise:   Consider the set $\Omega_n$ of polynomials of degree $n$ with real coefficients and $n$ distinct real roots.   What is the closure of $\Omega_n$ in $R_n[x]$?  ($R_n[x]$ denotes the set of polynomials with real coefficients of degree at most $n$)    The answer is the set of polynomials in $R_n[x]$ all of whose roots are real, plus the constant polynomials. Showing that this set is contained in the closure is not too hard, however the reverse implication is more difficult and I'm wondering what is the most elementary method to prove it (without talking about holomorphic functions for example). How to compress entire drive C in Windows including locked files? Predicator vs. Predicate BACKGROUND According to Oxford Dictionaries Online:   means &quot;(In systemic grammar) a verb phrase considered as a constituent of clause structure, along with subject, object, and adjunct.&quot;  means &quot;The part of a sentence or clause containing a verb and stating something about the subject (e.g. went home in John went home).&quot;  In the latter example of John went home, it seems, the predicate is went home whereas the predicator is went, home being an adjunct and thus not part of the predicator as defined. Now, I looked further in  to better understand the difference. The article recognizes two competing notions of the predicate in theories of grammar:  (1) Predicates in traditional grammar (e.g., went home in John went home) (2) Predicates in modern theories of syntax and grammar (e.g., went in John went home)  Which, according to the article, causes confusion as to what exactly the term predicate mean, and some grammarians came up with a new term &quot;predicator&quot; specifically for use (2), says the article. No problem thus far. What bothers me: The article in its explanation of (2) says, &quot;Other function words -- e.g. auxiliary verbs, certain prepositions, phrasal particles, etc. -- are viewed as part of the predicate.&quot; (Emphasis mine.) Now, remember this definition of the predicate, i.e., (2) above, corresponds to the new term &quot;predicator&quot;. I understand that auxiliary verbs are part of this definition of predicate, because an auxiliary verb can be part of a verb cluster. But can certain prepositions and phrasal particles also? The article has these example sentences (Words belonging to &quot;predicate&quot; (2) are boldfaced as in the article itself; My comments in parentheses.):  The butter is in the drawer. (preposition in being part of the predicate) You should give it up. (particle up being part of the predicate) Susan is pulling your leg. (I don't know why leg is marked as part of the predicate. Maybe a typo?)  QUESTION Except for the last one, which I suspect is a typo, I'd like to know whether the preposition in and the particle up belong to the predicate as presented in (2) and thus belong to the new term &quot;predicator&quot;. TikZ is undergoing lots of development with new features being added, but the versions distributed with standard TeX releases are often a little old. How do I get the latest version? If I want to be sure that I get the latest stable version, how do I do that?    Note: I'm not asking this question for myself, but because a question like this seems to be useful for pointing to it when a new feature of TikZ is mentioned in an answer to some other question. Feel free to post answers for any operating system/TeX distribution combination. View history of commands run in terminal Is there a way to save all my typed terminal commands and view it like history in a log book? How to prevent applications from discovering my phone as being Rooted I have to install an application that has discovered my device to be rooted.  So this is a two part question.   How did it discover in the first place that my phone has been rooted How to prevent the application from discovering my phone as being rooted Basically, I would like to make it so that the lighter a pixel is (the more white it has) the more transparent it becomes. Black pixels would be opaque, white pixels would be transparent.  I currently use the slider in blending options on the first tab to get rid of the white and make it transparent but find it works slightly better if I use the magic wand tool with delete.  I figure that there is some blending option out there but there are so many and I'm not sure which to use to achieve my goal.  (Using Photoshop CS6) What is the VTable Layout and VTable Pointer Location in C++ Objects in GCC 3.x and 4.x? If apostrophe + s is the acceptable way of denoting a genitive in English, is it possible that possessive pronouns, such as hers, ours and yours, started life as possessive adjectives with apostrophe + s?  E.g. her's, our's, your's, their's? Perhaps, even his' ? Its and my obviously stick out from this tempting pattern.  Is there any evidence that this might be the case, or is the 's completely unrelated? Can I enter the UK with a Schengen visa?