Blog: Java, the Programming, and Everything

Browse H2 in-memory database in tests

If you sometimes want to look into H2 tables during the test, there is a problem, because by default in-memory H2 database is accessible only from the process where it was created. Simple way to brows...

Wyświetlenia 608

OK 0

NOK 0

Git reset soft/mixed/hard

What is the difference between git reset soft, mixed and hard? When doing reset in git, you can add --soft, --mixed or --hard switch, or leave it, --mixed is the default. What do this switches do? C...

Wyświetlenia 297

OK 0

NOK 0

Develop, test and deploy standalone apps on CloudBees

CloudBees is a cloud platform providing repository, CI service (Jenkins) and server for your apps. So everything you need to develop, test and deploy. There are many options, e.g. repository can be Gi...

Wyświetlenia 431

OK 0

NOK 0

Validation of parameter passed to mock call in Spock

If you use Spock, sometimes you want to check mock method call. You can of course do it like this: Problem here is that when the parameter passed to the method is wrong, you won't know what is wrong...

Wyświetlenia 332

OK 0

NOK 0

Do not underestimate the power of the fun

Do you like your tools? Are you working with the technology, programming language and tools that you like? Are you having fun working with it? When a new project is being started, the company has to...

Wyświetlenia 280

OK 0

NOK 0

Do not underestimate the power of the fun

Do you like your tools? Are you working with the technology, programming language and tools that you like? Are you having fun working with it? When a new project starts, the company has to decide wh...

Wyświetlenia 298

OK 0

NOK 0

Spock testing framework

Some time ago I gave presentation about Spock on Szczecin JUG. Later I gave this presentation also on my company SoftwareMill meeting.  I think it's high time to share it on my blog too: ht...

Wyświetlenia 681

OK 0

NOK 0

FEST Assertions for Joda Time

Do you write unit tests? Of course you do. Do you use Joda Time? I think so. Do you use FEST Assertions? You should try it if you haven't yet. With FEST Assertions we can write fluent code like this: ...

Wyświetlenia 444

OK 0

NOK 0

Get specific PC IP from "arp -a"

I want to extract IP of machine leonidas. arp -a returns such line (among others):  leonidas.home (192.168.1.5) at 0:1c:c0:de:8f:28 on en1 ifscope [ethernet]  To have only IP: arp -a | grep...

Wyświetlenia 276

OK 0

NOK 0

My encounter with a small bug in Hibernate

var dzone_url = 'http://pawelstawicki.blogspot.com/2011/12/my-encounter-with-small-bug-in.html'; var dzone_title = 'My encounter with a small bug in Hibernate'; var dzone_blurb = ''; var dzone_...

Wyświetlenia 468

OK 0

NOK 0

My encounter with a small bug in Hibernate

The problem At work, I needed to use entities with @DiscriminatorColumn inheritance. It means all types are kept in the same table, with value in this column showing what type given row is of....

Wyświetlenia 309

OK 0

NOK 0

Easy way to convert file encoding

Easy way to convert text files to UTF-8 on Ubuntu. Install package enca and you are able to: enconv -L pl -x UTF-8 myfile.txt Where after -L is language specified (necessary for enca to recognize file...

Wyświetlenia 410

OK 0

NOK 0

First CodeRetreat in Pozna?

On 15th January I had a pleasure to participate in first Code Retreat in Pozna?. The event was organised by Adam Dudczak and Pozna? JUG. If you don't know what Code Retreat is, take a look here. It is...

Wyświetlenia 425

OK 0

NOK 0

Scala script to find duplicate files

Here is simple Scala script finding duplicate files and moving them to another directory. It searches album-with-duplicates for duplicates of files in main-album. All duplicates found are moved to cop...

Wyświetlenia 505

OK 0

NOK 0

JSF2.0 component for cross-field validation

Have you ever had problems with cross-field validation in JSF? Me too, so I created this component. You can validate few UIInput components and have their values as List in validator. The component is...

Wyświetlenia 502

OK 0

NOK 0

GWT table row as UiBinder

Some time ago I wanted to dynamically add rows to a table in GWT, but I wanted to define row template using UiBinder. Programatically it is no problem. You can create FlexTable and add widgets to it. ...

Wyświetlenia 637

OK 0

NOK 0

Warsjawa 2010. Impressions.

My impressions after this year's Warsjawa are very positive. Well, in fact I could expect this :) Presentations were interesting, meeting other IT people is always good too. I met Bartek Zdanowski, wh...

Wyświetlenia 394

OK 0

NOK 0

Convert JME application to Android

Here is the story: I bought Android phone. Earlier I was using Windows Mobile phone, and I had one j2me application on it that was very important to me. It was "TokenGSM", application which serves th...

Wyświetlenia 451

OK 0

NOK 0

Flash scope in JSF 2.0 (nothing about Adobe Flash)

In JSF 2.0, amongst Request, Session etc, there is the new scope called Flash. (However there is no annotation @FlashScope, and you can't put bean in this scope). It's concept is taken from Ruby on Ra...

Wyświetlenia 459

OK 0

NOK 0

JSF 2 templating

var dzone_url = 'http://pawelstawicki.blogspot.com/2010/08/jsf-2-templating.html';var dzone_title = 'JSF 2 templating';var dzone_blurb = 'JSF 2 templating with <ui:...> tags';var dzone_style = '...

Wyświetlenia 443

OK 0

NOK 0

Polskie blogi o JAVIE

                                                                                                                                       

dailylog

Wpisów: 34

Ostatni (2014-10-06):
PageLogic

    

jdn.pl

Wpisów: 163

Ostatni (2015-01-09):
Chamberconf