Quantcast
Channel: Damir's Corner
Browsing all 484 articles
Browse latest View live
↧

Cordova 6 Bug with Plugin Variables in Gradle

Cordova plugins can use variables for project specific values which must be entered when installing them. For example, Google Maps plugin uses them for setting the API keys. When these variables are...

View Article


Image may be NSFW.
Clik here to view.

Configurable Select Control in Ionic Navbar

There are lots of components included with Ionic framework, but not many of them can be used inside a Navbar. If you want find an out-of-the box solution for putting a select or a dropdown into the...

View Article


Namespace Imports in TypeScript

I've written about TypeScript imports on my blog before, but as I recently learned, I haven't covered all the cases. It all started when I wanted to use the Google Maps JavaScript API in my Ionic...

View Article

Code Generation with Maven CXF Plugin

Apache CXF is a common choice for calling SOAP web services from Java. It's most convenient to use when you generate proxy client classes from the web service WSDL file. There's a command line tool...

View Article

Implementing Basic Authentication with CXF

Generating the proxy client classes for a web service is only the first step. While the official documentation includes a basic sample for invoking a method on the web service, I had a hard time...

View Article


No Custom Conversions for Interfaces in C#

There's a lot of flexibility in type conversions in C#. On top of built-in implicit and explicit conversions, you can also define custom conversions. However, you might not be aware that these are not...

View Article

FormattableString as Method Parameter

Interpolated strings in C# 6 introduced a simplified syntax for most use cases of String.Format. So, instead of writing: var name = "World"; var formatted = string.Format("Hello, {0}!", name); We can...

View Article

Using JSONLayout for Log4j with Hippo CMS

If you want to post-process the application logs, using the JSON format will usually make it easier. In Log4j, there's the JSON Layout available for that purpose. Making it work in Hippo CMS took me...

View Article


Initializing Log4j MDC in Hippo CMS

In Log4j, Mapped Diagnostic Context (MDC) can be used to provide additional context information for every log message. In server applications it will usually be initialized for every request in a...

View Article


Jackson ObjectMapper Config in Hippo CRISP

The recommended way for integrating external services in Hippo CMS is the CRISP API. The official documentation provides detailed enough instructions for installing, configuring and using it. However,...

View Article

Handling Empty POST Response in Hippo CRISP

One could argue that a JSON REST service should never return an empty body, but you might not always have a say in how a service you need to call will behave. Unfortunately, CRISP API in Hippo CMS...

View Article

What is a Valid Hippo Head Contribution?

In Hippo CMS, a page is generated from a hierarchy of Freemarker templates. The root template will typically take care of the basic HTML page structure, i.e. its head and body. If other templates need...

View Article

Image may be NSFW.
Clik here to view.

Freemarker Loop Variables in Translation Keys

Freemarker, the Hippo CMS template language, includes special directives for working with sequences. Additional built-ins can be used to get more information about the loop variable. However, I've...

View Article


Image may be NSFW.
Clik here to view.

Freemarker Loop Variables in Translation Keys

Freemarker, the Hippo CMS template language, includes special directives for working with sequences. Additional built-ins can be used to get more information about the loop variable. However, I've...

View Article

Configuring Multiple Maven Repositories

I recently started colaborating on a project which had a couple of private Maven dependencies. The client owning the project hosted these dependencies in a private Nexus repository which was also...

View Article


Image may be NSFW.
Clik here to view.

Unicode Properties Files in IntelliJ IDEA

In Java, .properties files are used for storing key-value pairs, most typically for text localization. However, by default they are saved in ISO-8859-1 encoding, not in Unicode. Since many languages...

View Article

Error Handling When Chaining Promises

The Promise.catch method is a convenient tool for handling errors anywhere inside the promise chain up to the method call. Promise.resolve().then(() => { // chained code, executed after outer...

View Article


Get SQL for EF Core Queries

There's no built-in solution in EF Core for getting the SQL query that is going to be sent to the database. I could find an implementation by Nick Craver which worked fine with EF Core 2.0.0, but fails...

View Article

No Support for Tuples in Expression Trees

Tuples, as added to C# 7, can be a nice alternative to anonymous types in LINQ when you only want to return a subset of values from the queried type. Before tuples, this was only possible by creating...

View Article

Image may be NSFW.
Clik here to view.

Add Any Amount to Your Steam Wallet

Recently I received a prepaid card with a fixed amount from a reward program. Since online resellers typically don't allow using multiple payment methods for a single purchase I was looking for a way...

View Article
Browsing all 484 articles
Browse latest View live