Wednesday 28 December 2011

How much memory on SunOS 5.1

prtconf -v | grep Memory

Kill all Java processes on Unix

ps | grep java | awk '{ print $1 }' | xarg kill -9

ps | grep java | cut -d' ' -f 2 | xarg kill -9

How to ask Unix ls to show only directories

ls -d */

Pentaho

Pantaho - a complete business intelligence platform that includes reporting, analysis (OLAP), dashboards, data mining and data integration (ETL). Use it as a full suite or as individual components that are accessible via web services. Ranked #1 in open source BI.

CUDA Parallel Programming

A good place to start learning something about CUDA.

Tuesday 27 December 2011

Oracle Java Certification Updates

Here is an article about the news in the Oracle Java Certification requirements.

Using a ThreadPoolExecutor to Parallelize Independent Single-Threaded Tasks

Here is a good article about the task execution framework, introduced in Java SE 5.0

SunOS 5.1 - how to get current time in seconds in bash

perl -e "print time()"

Sunday 25 December 2011

Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.
Dale Carnegie

Tuesday 20 December 2011

SunOS 5.1 - ps and ptree

/usr/ucb/ps auxwww | grep java
ptree

bash comparison operators

Good page for bash comparison operators: http://tldp.org/LDP/abs/html/comparison-ops.html

Bash for loop

Three expression loop:
for (( c=1; c<=5; c++ ))
do
 echo "Welcome $c times..."
done

Simple loop:
for i in {1..5}
do
     echo $i
done

For more details see http://www.cyberciti.biz/faq/bash-for-loop/

page down inside less on SunOS 5.1

d lets to scroll down a page inside less on SunOS 5.1

get command from history on SunOS 5.1

Ctrl + R, then type a keyword

vi on SunOS 5.1

a - append
i - insert
x - delete the current symbol
hjkl - move cursor on the screen (h - left, j - down, k - up, l - right)

Monday 19 December 2011

It is better to be prepared for an opportunity and not have one, than to have an opportunity and not be prepared.
Whitney Young, Jr.

Sunday 11 December 2011

People with goals succeed because they know where they’re going.
Earl Nightingale

Tuesday 6 December 2011

java.util.concurrent ReentrantLock vs synchronized() - which should you use?

An article about new ReentrantLock class and differences between it and the classical synchronized java code session.

Monday 5 December 2011

Sample of log4j.proprties

# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=INFO, CONSOLE
#log4j.rootCategory=INFO, CONSOLE, LOGFILE

# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=application.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.Threshold=INFO
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Getting the Current Working Directory in Java

String curDir = System.getProperty("user.dir");

DokuWiki Manual

Subversion Tag Fill Automatic Update

Inside JavaDoc section you write:

/**
 * @version $Date$ $Author$
 */

Inside file's properties you should set:
svn:keywords = LastChangedDate Author Id Revision HeadURL

Read this page for more details.

unalias

Unalias removes alias from the Unix command:
http://www.mkssoftware.com/docs/man1/unalias.1.asp

Sunday 4 December 2011

Goals are dreams with deadlines.
Diana Scharf Hunt