Using grep to scan project files

Steve Neal Uncategorized Leave a Comment

To find a text pattern in a project, use grep to scan files: the –include directive can be used to select the file types to check (in this case all .properties and .java files), -rnw for recursive with line numbers and word search, the dot is for the current working directory, a finally -e for the regexp to match.

Creating a concurrent Set in Java

Steve Neal Uncategorized Leave a Comment

The concurrent collections are a great help for multi-threaded programming in Java, but there is no concurrent Set class provided in the API. The trick is to use the key set of a ConcurrentHashMap, wrapped by the Set interface. The Collections class provides a static method which will do this for you: Just pass an instance of a ConcurrentHashMap (of …

Putty and the disappearing cursor

Steve Neal Tool support, Uncategorized Leave a Comment

I’ve had this problem with Putty on and off for years. It’s default black background commonly hides the windows text cursor when the mouse rolls over the terminal window. When this happens I need to rummage around on the internet to find a solution, so I thought I’d make a note of it here on my blog this time instead. …