Blog: myshittycode

213 blogs updated: 11 min. ago
ES6 + Mocha + Sinon: Mocking Imported Dependency
PROBLEM Let's assume we have the following 2 files:- apis.js service.js Let's assume we want to test the logic in service.js without using n...
10-05-2017 23:14:05 myshittycode Advanced
Synology NAS: Running CrashPlan in Docker Container
BACKGROUND The reason to run CrashPlan in Docker container is to prevent any future Synology's DSM updates from breaking the CrashPlan app. ...
26-04-2017 05:09:02 myshittycode Advanced
Java: Exploring Preferences API
BACKGROUND In any written scripts or rich client apps, there is almost a need to persist the user preferences or app configurations. Most of...
20-04-2017 19:09:32 myshittycode Advanced
Spring + Ehcache: XML-less Spring Configuration for Ehcache 2.x vs Ehcache 3.x
BACKGROUND The documentation on the web regarding Ehcache 3.x configuration using Spring is rather lacking. There is apparently a very disti...
12-04-2017 04:20:24 myshittycode Advanced
Design Pattern: Re-accommodate
WHAT Forcefully evict a random entity from the system due to overcapacity problem caused by own fault. Then, spend countless of hours cleani...
11-04-2017 16:06:39 myshittycode Advanced
Groovy + GPars: Handling Concurrency
PROBLEM Let's assume given a list of user IDs (ex: 1, 2, 3, 4, and 5), we need to query 2 data sources to get the names and the addresses be...
07-04-2017 05:42:01 myshittycode Advanced
Groovy: Log Annotation
PROBLEM My personal goal of 2017 is to write less useless-yet-neccessary code, such as initializing a logger:- SOLUTION Groovy provides seve...
04-04-2017 03:26:36 myshittycode Advanced
UnboundID: The entry contains attribute ‘XXXX' which is not defined in the schema
PROBLEM Let's assume we have the following LDIF file containing custom attribute(s), such as managedBy:- When running the code on UnboundID'...
29-03-2017 04:49:49 myshittycode Advanced
LdapTemplate: javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name ‘…'
BACKGROUND Let's assume we have the following LDAP configuration When running any LDAP query, the following exception is thrown:- SOLUTION T...
27-03-2017 00:31:10 myshittycode Advanced
LdapTemplate: AttributesMapper vs ContextMapper
BACKGROUND When using Spring's LdapTemplate, there are two ways to transform the queried results: AttributesMapper and ContextMapper. Here's...
26-03-2017 18:25:22 myshittycode Advanced

© Jiri Pinkas | this project on GitHub | related: JavaVids | Maven Central Repository Search | Java školení | Top SQL Blogs | monitored using: sitemonitoring

Top Java Blogs is a Java blog aggregator (with English-written blogs only) focused on Java SE, Java EE, Spring Framework and Hibernate.