Installing Artifactory on Ubuntu box
This is a simple and straightforward guide on how to install Artifactory and import exisiting maven repository into it. 1. Download Artifactory from JFrog website 2. Unzip downloaded file in your home directory 3. Change to root user (su -) 4. Set your JAVA_HOME in /etc/environment JAVA_HOME=/usr/lib/jvm/java-6-sun/ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" 5. Set your JAVA_HOME in /etc/profile # […]
Read More →Getting started with Drools Flow
Today I will present my latest discovery called JBoss Drools and Drools Flow in particular. I am completely new to the drools framework and because I couldn’t find myself a quick and simple intro to the framework I will post it myself. Presented example is completely useless from the business perspective and it doesn’t describe […]
Read More →Android Series: Display device CPU and Memory info
Today I will post a short snippet on how to display cpu and memory info of our andorid device. The program uses external utilities to get the device info by calling cat on ‘/proc/meminfo’ and ‘/proc/cpuinfo’. The activity displaying the data from the ‘cat’ output is displayed in a TextView contained withing ‘ScrollView’. This is […]
Read More →Android Series: Download files with Progress Dialog
Today, I will present a short tutorial on how to download files in android displaying at the same time download progress based on the bytes downloaded. For the purpose of this tutorial we will use build in AsyncTask mechanism together with ProgressDialog class. The whole application consists of one activity displaying a ‘Start Download’ button. […]
Read More →Design Patterns Series – Part Five: Adapter pattern
According to wikipedia: In computer programming, the adapter pattern (often referred to as the wrapper pattern or simply a wrapper) is a design pattern that translates one interface for a class into a compatible interface. The adapter pattern is commonly used when there is a need to access an object through the interface which doesn’t […]
Read More →Android Series: Creating custom dialogs
Short tutorial on how to implement custom dialogs on the Android platform
Read More →Design Pattern Series – Part Four: Observer pattern
Today I’m adding another important design pattern to the toolbox. Observer Pattern is commonly used and quite powerful. The Observer Pattern defines one to many dependency between objects so that when one object changes state, all of it dependents are notified and updated. We can create a class structure for the pattern ourselves from scratch […]
Read More →Disable Ubuntu Desktop Screen Auto Locking
Is your Ubuntu desktop locking every time you leave it for a minute or two and its driving you nuts? I was looking for the solution to this today and finally I’ve found it. Not that I was looking so long, I have to admit I was lazy, as my Ubuntu screen was pissing me […]
Read More →The Biggest Java WTF
Today one of my co-workers send me the following link. As I couldn’t believe my eyes, I have tested it myself. WTF? package wtfjava; /** * This program really HANGS!!!! * @author kris */ public class Main { /** * @param args the command line arguments */ […]
Read More →Design Patterns – Part Three: Singleton
Today I will describe the Singleton pattern, one of the simplest, yet generating active discussions all over the net. Some people consider it to be an antipattern. We have many different flavours of this pattern, singleton can be thread safe, lazy loaded, eagerly loaded, implemented as a static class or enum. Simple thread safe implementation: […]
Read More →