Tag: Java

Dozer Deep Property Mapping and Date Mapping Example

Dozer has Deep Mapping and String to Date Mapping available. This is a working example of using the two. The bread and butter lives in the Dozer.xml <?xml version=”1.0″ encoding=”UTF-8″?> <mappings xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://dozer.sourceforge.net” xsi:schemaLocation=”http://dozer.sourceforge.net http://dozer.sourceforge.net/schema/beanmapping.xsd”> <mapping> <class-a>com.recursivechaos.mappingtest.domain.SourceObj</class-a> <class-b>com.recursivechaos.mappingtest.domain.DestObj</class-b> <field> <a>nestedEnum.myEnum.value</a> <b>myEnum</b> </field> <field> <a>longDate</a>

Posted in Examples Tagged with: ,

Spring Boot Dependency Injection Into External Library Project

Here is an example of Spring injection of a property using annotated configuration classes. Near the bottom, you will find links to github repositories for both projects. We have a shared code library project, called injector-core, and we have a InjectorService that

Posted in Examples Tagged with: , , , ,

Dice and Dicebags – A dice rolling utility

Inspired by this prompt in /r/ProgrammingPrompts, I built a dice rolling utility. A user can roll one, or many dice at once, including multiple faces, and different numbers of sides. A user can hold dice, and re-roll others. It supports different

Posted in Projects Tagged with: , ,

Data Normalization for Analysis

I’ve been working on a project that attempts to find similar routes taken, given a list of location check-ins, represented by 2 chars. Unfortunately, not every route is exactly the same, and needs a bit of fudging to be able and

Posted in Examples Tagged with: , ,

How to read a CSV from a file by label, using Ostermiller.util.LabeledCSVParser

Here’s an example of how to use Ostermiller.util.LabeledCSVParser to read csv files. I’ve created a gist on github. And the documentation is pretty straightforward.

Posted in Examples Tagged with: ,