Tag Archives: java

Spring Boot: How to disable @Scheduled in unit tests

Spring framework exposes a nice feature to schedule some task: @Scheduled annotation. But this features makes very difficult unit test process – all scheduled tasks start work in any unit test where Spring scanning is used. It means  Advertisements

Rate this:

Posted in java, Programming, Scala, Test | Tagged , , , , , , | Leave a comment

Types of Observables in RxJava

This is a short reminder about Observable types in RxJava. Observable is the simplest Observable which can emit more than one value. Flowable is a Observable which can emit huge numbers of values which can’t be consumed by the Observer. Single … Continue reading

Rate this:

Posted in java, Programming, rxjava | Tagged , , , , , , , , | Leave a comment

Vertx: Difference between io.vertx.reactivex and io.vertx.rxjava

Each time, when I return to development with Vertx, I have to decide what package to use: io.vertx.rxjava or io.vertx.reactivex? This is a reason, why I created this post. io.vertx.rxjava package uses RxJava 1. io.vertx.reactivex package uses current RX extension – RxJava 2.

Rate this:

Posted in java, Programming, vertx | Tagged , , , | Leave a comment

Functional error handling in Scala

Functional error handling in Scala alvin February 13, 2017 – 11:08am Here are a few nice blog posts on functional error-handling in Scala: – Easing into functional error handling in Scala – How do I error handle thee? – Designing … Continue reading

Rate this:

Posted in java, Programming, Scala | Tagged , , | Leave a comment

Java: Stream and Classic Loop – Benchmark

Java 8 has rich possibilities to process the collections. One of them is stream. The main goal of stream, as I see it, is changing of programming paradigm: from “how to do” to “what to do”. Focusing

Rate this:

Posted in java, Programming | Tagged , , , , , | 1 Comment

How to build map from stream – examples

Java 8 suggests  nice ways to create maps from stream. You can see some code examples on GitHub: https://github.com/ysden123/ys-pjava/blob/master/basics/src/main/java/com/stulsoft/pjava/basics/stream/CollectExamples.java

Rate this:

Posted in java, Programming | Tagged , , , , , | Leave a comment

Usage of CompletableFuture

Java 8 gives flexible ways to perform asynchronous tasks. One of a such ways is usage of CompletableFuture.

Rate this:

Posted in java, Programming | Tagged , , , , , , , , | Leave a comment

Void function as argument in Java and Scala

Simple example shows how to pass a function to a method. The function doesn’t have argument and doesn’t return a result.

Rate this:

Posted in java, Programming, Scala | Tagged , , , , , , | Leave a comment

Java Utility for Smugmug site

I started a project on code.google.com – http://code.google.com/p/yssmugmug-utils/ This a console application on Java. The application allows to perform some actions with site on Smugmug. Current version includes only one action – to build tree of categories, sub-categories, and albums. … Continue reading

Rate this:

Posted in Photography | Tagged , , , , , , , , , , | Leave a comment