SpringBoot creating UserDetailsService authentication with login and signup form example

There are plenty of online tutorials showing how to create database-based authentication for Spring. Some of them use SQL query to authenticate user and retrieve its roles, some use DAO… but none of them worked well for me and all of them had some major problems, even like SQL Injection. So, in this post I […]

Automated delivery and publication of apps using FDroid and GitLabCI

In my spare time I develop applications on Android. I also “maintain” F-Droid repository for some of my public projects. I wanted to automatically publish each build after: Compilation passed Test on a connected device passed Signed build completed So I made a simple setup with help of GitLabCI and own F-Droid repository. This post […]

Setting up SonarQube for Android Gradle project to improve code quality

I’m working on a new Android project which I inherited. Well, I forked it because I didn’t feel welcomed to contribute to the project and I see a lot of places where improvements are needed. First, I need to improve the codebase. Previous developers didn’t care about any Java coding guidelines from Oracle, Google, CERT […]

JHLabs for Android

My major project in Java (Android) involved image manipulation where I used JHLabs. I found there was no easy way to add JHLabs support for Android without extracting sources and manually adding them to the project. So there it is now: https://gitlab.com/agilob/JHLabs_android It’s compatible with gradle build system, so you can easily add it to […]

[Java] – Regular expression to match IPv4 address

I saw such question on SO. There was no solution with RegEx so… I was bored I think. public static boolean isValid(String ip) { boolean isvalid;   isvalid = ip.matches( "(([0-9]|[0-9]{0,2}|1[0-9]*{0,2}|2[0-5][0-5]|0{0,3}).){3}" + "([0-9]|[0-9]{0,2}|1[0-9]*{0,2}|2[0-5][0-5]|0{0,3})" );   return isvalid; }public static boolean isValid(String ip) { boolean isvalid; isvalid = ip.matches( "(([0-9]|[0-9]{0,2}|1[0-9]*{0,2}|2[0-5][0-5]|0{0,3}).){3}" + "([0-9]|[0-9]{0,2}|1[0-9]*{0,2}|2[0-5][0-5]|0{0,3})" ); return isvalid; }