MongoDB 3 array query operations are very helpful and simplify digging in nested structures. In this post we’ll show how to create queries that match array elements in various ways.
Continue reading MongoDB 3 array query operationsjava
Towers of Hanoi is a well known puzzle, very often used to teach recursion. In this post we will show how to solve this puzzle recursively.
Continue reading Towers of Hanoi recursive versionTop 10 sites to practice programming
Continue reading Top 10 sites to practice programmingJava read XML using DOM Java DOM API is comfortable to work with not big XML documents. They can be easily loaded and modified in runtime. In this post we show how to do it.
Continue reading Java read XML using DOMJava create XML using DOM Java allows to work with XML in many different ways. In this post we show how to use Java DOM API to create a document and write it as XML file.
Continue reading Java create XML using DOMPrime numbers – Sieve of Eratosthenes A prime number is a natural number with only two divisors: 1 and itself. In this post we’re going to show how to find prime numbers using Sieve of Eratosthenes and explain how it works.
Continue reading Prime numbers – Sieve of Eratosthenes in JavaJava Singleton – enum implementation Singleton as enum is very simple to implement and very safe at the same time thanks to language guarantees for enum instantiation and serialization.
Continue reading Java Singleton – enum implementationJava Singleton – on demand initialization On demand initialization is extension of static final implementation. It will prevent eager initialization of the singleton instance, when other fields are accessed. Also known as Bill Pugh‘s solution.
Continue reading Java Singleton – on demand initializationJava Singleton – static final implementation It is the simplest and most common implementation of Singleton Design Pattern in Java. In this post we’ll show how to implement it correctly and explain why it works.
Continue reading Java Singleton – static final implementationJava CyclicBarrier is very convenient synchronization tool for writing concurrent simulations. In this post we’ll show how it works and write a game simulation.
Continue reading Java CyclicBarrier – game simulation