October 30, 2013

DOT NOT use Filezilla anymore. Use winSCP.

I have been using Filezilla for a while now, and just discovered the following things that made me removed Filezilla from my computer immediately:


  1. Filezilla stores all sites username and passwords in clear text in a fixed location: %APPDATA%\fielzilla\sitemanager.xml
  2. Even if you do not use site manager to save your passwords, Filezilla saves all "quick connections" to a file "recentservers.xml", again with all username and passwords in clear text.
  3. A bug has been filed for Filezilla to encrypt the passwords with a master password over 3 years ago, yet no action has been taken.
This is more than bad practice. This is almost deliberately to help hackers/worms steal passwords.

Switch to "WinSCP", which is also open source, and allow you to encrypt all stored passwords with a master password.

October 20, 2013

Merriam Webster Pronunciation Table

For some reason, Merriam Webster users a different pronunciation table than the standard one. So here is their special version:

October 1, 2013

Add context menu copy/paste to a Java JTextArea

suppose you have the variable "ta" as the textarea:


  ta.addMouseListener(new MouseAdapter() {
   public void mouseReleased(final MouseEvent e) {
    if (e.isPopupTrigger()) {
     final JPopupMenu menu = new JPopupMenu();
     JMenuItem item;
     item = new JMenuItem(new DefaultEditorKit.CopyAction());
     item.setText("Copy");
     item.setEnabled(ta.getSelectionStart() != ta.getSelectionEnd());
     menu.add(item);
     menu.show(e.getComponent(), e.getX(), e.getY());
    }
   }
  });