10/20/15

Ubuntu: Remmina Copy and Paste not Working

POSSIBLE WORKAROUND:
Ok, I was reading the README in the new source code. I got to the line were it says: install dependencies:
$ sudo apt-get install cmake intltool libgtk-3-dev libssh-dev libavahi-ui-gtk3-dev libvte-2.90-dev libxkbfile-dev
Once I installed that, I tested the old version I am currently using, Remmina 0.9.99.1 runs, (as it did) but copy paste functionality has resumed!
The source for version 1 still failed to compile, that's a bummer, but as long as i can copy and paste in a relatively new version, I'm ok with this solution. Try it if you like. I'll look into compiling the new version later.
At this point, the bug would seem to be a dependency issue. perhaps there are log files that will give more information about this.
A successful work-around (for me) was achieved by running the following (in one command-line):
sudo apt-add-repository ppa:remmina-ppa-team/remmina-next ; sudo apt-get update ; sudo apt-get install remmina remmina-plugin-rdp
You may have to reboot after this to see the new version of Remmina that this installs (I did).

10/14/15

STS shortcuts

Shortcuts
Description
“sysout” + Crtl + Space
Quick System.out.println()
Alt + Enter
Open project properties
Alt + Shift + R
Rename
Alt + Shift + S
Context menu with possible actions
Alt + Shift + S, C
Generate constructor from superclass
Alt + Shift + S, H
Generate hashCode() and equals()
Alt + Shift + S, O
Generate constructor using fields
Alt + Shift + S, R
Generate getters and setters
Alt + Shift + S, S
Generate toString()
ALT <- or ALT ->
Go to previous or next edit positions from editor history list
ALT SHIFT Z
Enclose block in try-catch
Crtl + Alt + Down arrow
Copy current line below
Crtl + D
Delete current line
Crtl + I
Indent lines
Crtl + L
Go To Line Number
Crtl + N
Open New file/project wizard
Crtl + Shift + C
Add / remove single line comments
Crtl + Shift + F
Format code
Crtl + Shift + L
Quick Text Search (STS only)
Crtl + Shift + O
Organize import statements
Crtl + Space
Autocomplete
Crtl + W
Close currently viewed file
CTRL /
Comment a line
CTRL E
Open a file (editor) from within the list of all open files
CTRL H
Java search in workspace
CTRL M
Maximize editor
CTRL O
List all methods of the class and again CTRL O lists including inherited methods
CTRL PAGE UP or PAGE DOWN
Navigate to previous or next file from within the list of all open files
CTRL SHIFT G
Search for current cursor positioned word reference in workspace
CTRL SHIFT P
Go to the matching parenthesis
CTRL SHIFT R
Open a resource
CTRL SHIFT U
Find reference in file
CTRL T
Show inheritance tree of current token.
F3
Go to the declaration of the variable.
F4
Show type hierarchy of on a class.
Shift + Enter
Insert blank line after current line
SHIFT F2
Show Javadoc for current element

10/12/15

Simply Singleton

An alternative thread-safe singleton implementation

Example 7 lists a simple, fast, and thread-safe singleton implementation:

Example 7. A simple singleton

public class Singleton {
   public final static Singleton INSTANCE = new Singleton();
   private Singleton() {
         // Exists only to defeat instantiation.
      }
}
The preceding singleton implementation is thread-safe because static member variables created when declared are guaranteed to be created the first time they are accessed. You get a thread-safe implementation that automatically employs lazy instantiation; here's how you use it:
Singleton singleton = Singleton.INSTANCE;
      singleton.dothis();
      singleton.dothat();
      ...
Of course, like nearly everything else, the preceding singleton is a compromise; if you use that implementation, you can't change your mind and allow multiple singleton instances later on. With a more conservative singleton implementation, instances are obtained through a getInstance() method, and you can change those methods to return a unique instance or one of hundreds. You can't do the same with a public static member variable.