<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Snippet on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/snippet/</link>
    <description>Recent content in Snippet on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Mon, 18 Sep 2023 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/snippet/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Object Audit with Java and Javers</title>
      <link>https://www.hascode.com/object-audit-with-java-and-javers/</link>
      <pubDate>Mon, 18 Sep 2023 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-audit-with-java-and-javers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;object-audit-javers-cover-image.webp&#34; alt=&#34;object audit javers cover image&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Object Audit with Java and Javers&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Just a quick snippet
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_integration&#34;&gt;Maven Integration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;org.javers&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;javers-core&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;${javers.version}&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_calculate_changes_in_object_graph&#34;&gt;Calculate Changes in Object Graph&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package io.hascode;

import org.javers.core.Changes;
import org.javers.core.Javers;
import org.javers.core.JaversBuilder;
import org.javers.core.diff.Diff;

public &amp;lt;T&amp;gt; Changes diff(T snapshot, T latest) {
  Javers javers = JaversBuilder.javers().build();
  Diff diff = javers.compare(snapshot, latest);
  return diff.getChanges();
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_resources&#34;&gt;Resources&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://javers.org/&#34;&gt;Javers Website&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Forwardings Requests to static content in Spring Boot Webflux</title>
      <link>https://www.hascode.com/forwardings-requests-to-static-content-in-spring-boot-webflux/</link>
      <pubDate>Tue, 16 Aug 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/forwardings-requests-to-static-content-in-spring-boot-webflux/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following &lt;code&gt;WebFilter&lt;/code&gt; redirects incoming requests for &lt;code&gt;/&lt;/code&gt; to a static HTML file, &lt;code&gt;index.html&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;ToIndexPageRedirection.java&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.tutorial;

import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;

@Component
public class ToIndexPageRedirection implements WebFilter {
    @Override
    public Mono&amp;lt;Void&amp;gt; filter(ServerWebExchange exchange, WebFilterChain chain) {
        if (exchange.getRequest().getURI().getPath().equals(&amp;#34;/&amp;#34;)) {
            return chain.filter(
                exchange.mutate().request(
                    exchange.getRequest().mutate().path(&amp;#34;/index.html&amp;#34;).build()
                ).build()
            );
        }

        return chain.filter(exchange);
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Ressources:&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/server/WebFilter.html&#34;&gt;JavaDocs WebFilter&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Fast Link Checks using Filiph Linkchecker and Docker</title>
      <link>https://www.hascode.com/fast-link-checks-using-filiph-linkchecker-and-docker/</link>
      <pubDate>Mon, 02 May 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/fast-link-checks-using-filiph-linkchecker-and-docker/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This &lt;a href=&#34;https://github.com/filiph/linkcheck&#34;&gt;Linkchecker&lt;/a&gt; claims to be way faster than blc and wummel/linkchecker.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Docker, we may validate our site’s links in no time and without complex setup.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker run --rm tennox/linkcheck hascode.io&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/filiph/linkcheck&#34; class=&#34;bare&#34;&gt;https://github.com/filiph/linkcheck&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up multiple Postgresql Instances with docker-compose</title>
      <link>https://www.hascode.com/setting-up-multiple-postgresql-instances-with-docker-compose/</link>
      <pubDate>Tue, 08 Feb 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/setting-up-multiple-postgresql-instances-with-docker-compose/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A simple setup when two Postgres databases prefilled with schema/data needed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;docker-compose.yml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;version: &amp;#39;3.6&amp;#39;
services:
    postgres1:
        image: postgres
        restart: always
        environment:
            - DATABASE_HOST=127.0.0.1
            - POSTGRES_USER=root
            - POSTGRES_PASSWORD=root
            - POSTGRES_DB=root
        ports:
            - &amp;#34;15432:15432&amp;#34;
        volumes:
            - ./postgres1-init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql

    postgres2:
        image: postgres
        restart: always
        environment:
            - DATABASE_HOST=127.0.0.1
            - POSTGRES_USER=root
            - POSTGRES_PASSWORD=root
            - POSTGRES_DB=root

        ports:
            - &amp;#34;25432:25432&amp;#34;
        volumes:
            - ./postgres2-init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;And our sample init scripts:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;CREATE USER tester WITH PASSWORD &amp;#39;tester&amp;#39; CREATEDB;
CREATE DATABASE testdb
    WITH
    OWNER = tester
    ENCODING = &amp;#39;UTF8&amp;#39;
    LC_COLLATE = &amp;#39;en_US.utf8&amp;#39;
    LC_CTYPE = &amp;#39;en_US.utf8&amp;#39;
    TABLESPACE = pg_default
    CONNECTION LIMIT = -1;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Factory Reset for Google Pixel-C Android Tablet</title>
      <link>https://www.hascode.com/factory-reset-for-google-pixel-c-android-tablet/</link>
      <pubDate>Sun, 13 Jun 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/factory-reset-for-google-pixel-c-android-tablet/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Reboot the system by pressing &amp;#34;Power&amp;#34; and &amp;#34;Volume down&amp;#34; simultaneously&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boot menu should appear, use &amp;#34;Volume up/down&amp;#34; to select the menu item &amp;#34;Android Recovery&amp;#34;, &amp;#34;Power&amp;#34; to confirm&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;System reboots, a screen appears with a message &amp;#34;No command&amp;#34; - this is no error though it looks like one&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press &amp;#34;Power&amp;#34; and &amp;#34;Volume up&amp;#34; together and a menu &amp;#34;Android Recovery&amp;#34; appears&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use &amp;#34;Volume up/down&amp;#34; to select the menu item &amp;#34;Wipe data/factory reset&amp;#34;, &amp;#34;Power&amp;#34; to confirm&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User data on the device is deleted and the original meu is shown&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select the menu item &amp;#34;Reboot system now&amp;#34; and confirm by pressing the &amp;#34;Power&amp;#34; Button&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The device reboots and you may configure the Android system …​&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up an OAuth2 Authorization Server and Resource Provider with Spring Boot</title>
      <link>https://www.hascode.com/setting-up-an-oauth2-authorization-server-and-resource-provider-with-spring-boot/</link>
      <pubDate>Sun, 13 Mar 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/setting-up-an-oauth2-authorization-server-and-resource-provider-with-spring-boot/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;OAuth2 is a frequently used standard for authorization and with Spring Boot it is easy to set up authorization and resource server in no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to set up an OAuth2 authorization server as well as a connected and secured resource server within a few minutes using Java, Maven and Spring Boot.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;springboot-and-oauth2-in-action-1024x346.png&#34; alt=&#34;springboot and oauth2 in action 1024x346&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OAuth2 Flow with Spring Boot in Action&lt;/div&gt;</description>
    </item>
    <item>
      <title>JAX-RS Server API Snippets</title>
      <link>https://www.hascode.com/jax-rs-server-api-snippets/</link>
      <pubDate>Sun, 28 Sep 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/jax-rs-server-api-snippets/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Because a lot of my current projects are using JAX-RS in different versions I’d like to write down and share some frequently used snippets for implementing RESTful web-services with the JAX-RS specification here.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_using_regex_in_path_expressions&#34;&gt;Using RegEx in Path Expressions&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes we need to extract multiple parameters from a path expression e.g. in the following example where year, month and day are fragments if the path.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;@GET
@Path(&amp;#34;/orders/{year:\\d{4}}-{month:\\d{2}}-{day:\\d{2}}&amp;#34;)
@Produces(MediaType.TEXT_PLAIN)
public Response getOrders(@PathParam(&amp;#34;year&amp;#34;) final int year, @PathParam(&amp;#34;month&amp;#34;) final int month, @PathParam(&amp;#34;day&amp;#34;) final int day) {
	return Response.ok(&amp;#34;Year: &amp;#34; + year + &amp;#34;, month: &amp;#34; + month + &amp;#34;, day: &amp;#34; + day).build();
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Mixing Scala, Java in a Maven Project</title>
      <link>https://www.hascode.com/snippet-mixing-scala-java-in-a-maven-project/</link>
      <pubDate>Fri, 23 Mar 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/snippet-mixing-scala-java-in-a-maven-project/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having just returned from the Atlassian Camp 2012 I just toyed around with Java and Scala and wanted to share the following snippet that demonstrates how to mix code from both languages in a Maven project using the maven-scala-plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setting_up_the_maven_project&#34;&gt;Setting up the Maven Project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First create a new Maven project in your IDE or by running &lt;em&gt;mvn archetype:generate.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the next step, add the dependency for &lt;em&gt;scala-library&lt;/em&gt; and the scala maven repositories to your &lt;em&gt;pom.xml&lt;/em&gt; and hook the &lt;em&gt;maven-scala-plugin&lt;/em&gt; to Maven’s lifecycle. My &lt;em&gt;pom.xml&lt;/em&gt; finally looks like this one:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create an Android App using Google’s App Inventor</title>
      <link>https://www.hascode.com/how-to-create-an-android-app-using-googles-app-inventor/</link>
      <pubDate>Wed, 04 Aug 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-an-android-app-using-googles-app-inventor/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at Google’s App Inventor feature that offers programming-novices a nice possibility to enter the fabulous world of Android App programming without deeper knowledge of the API or complex SDK installations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets build some stuff ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://java.oracle.com&#34;&gt;Java 6 JDK&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://appinventor.googlelabs.com/learn/setup/index.html&#34;&gt;App Inventors Extras Software&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A Google App Inventor Beta Account – request one &lt;a href=&#34;https://services.google.com/fb/forms/appinventorinterest/&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_what_we_are_going_to_build&#34;&gt;What we are going to build&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;We are building a simple GUI with a Textbox and a button&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A click on the button starts an event that queries the acceleration sensor for coordinates&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the sensor is active and enabled then the coordinates are displayed in the text box&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a simple Gesture App with Android</title>
      <link>https://www.hascode.com/creating-a-simple-gesture-app-with-android/</link>
      <pubDate>Fri, 14 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-simple-gesture-app-with-android/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The integration of gestures into your android app adds some nice functionality and is made very easy using Google’s GestureBuilder application and the integrated GestureLibrary and Gesture Overlay API – so let’s build a sample app.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you need some basic information regarding gestures on android first – take a look at &lt;a href=&#34;../android-gestures/&#34;&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_gesture_library&#34;&gt;Creating a gesture library&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First you need to define the gestures that should be captured in the application later. For this reason there’s the &lt;em&gt;GestureBuilder&lt;/em&gt; delivered with the Android SDK. You can find the app in the samples directory of your android sdk – e.g. &lt;em&gt;&amp;lt;installation-directory&amp;gt;/android-sdk-linux_86/platforms/android-2.1/samples/GestureBuilder&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Playing around with QR Codes</title>
      <link>https://www.hascode.com/playing-around-with-qr-codes/</link>
      <pubDate>Tue, 11 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/playing-around-with-qr-codes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes QR codes are a nice way to distribute information like calendar events, contact information, e-mail, geo-locations or internet addresses.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article we’re going to encode information to QR code images using the ZXing library and afterwards decode information from a given QR code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally we’re taking a look on online QR code generators and how to integrate the ZXing library in a Maven project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;qr-code-article.png&#34; alt=&#34;qr code article&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_zxing_library&#34;&gt;The ZXing Library&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Download the ZXing Libraries from &lt;a href=&#34;http://code.google.com/p/zxing/downloads/list&#34; class=&#34;bare&#34;&gt;http://code.google.com/p/zxing/downloads/list&lt;/a&gt; – the file name is &lt;em&gt;ZXing-&amp;lt;version&amp;gt;.zip&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Unpack the downloaded archive somewhere&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change to the extracted directory and run &lt;em&gt;ant&lt;/em&gt;. If you don’t have JavaME installed – and you don’t have to for the samples below – run &lt;em&gt;ant buildwithoutj2me&lt;/em&gt; – that will do the job&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Having compiled the libraries you’re now free to include the &lt;em&gt;core.jar&lt;/em&gt; from &lt;em&gt;zxing-&amp;lt;version&amp;gt;/core/&lt;/em&gt; and the &lt;em&gt;javase.jar&lt;/em&gt; from &lt;em&gt;zxing-&amp;lt;version&amp;gt;/javase&lt;/em&gt; as dependency in your project&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippets: Getting License Information from the Confluence API</title>
      <link>https://www.hascode.com/snippets-getting-license-information-from-the-confluence-api/</link>
      <pubDate>Thu, 06 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippets-getting-license-information-from-the-confluence-api/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes one needs to look up license details of a running Confluence system .. perhaps for creating a commercial plugin or to display recommendations dependant from the license used. For this reason there are a few possibilities for receiving some license information from the Confluence API or the velocity context.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;quoteblock&#34;&gt;
&lt;blockquote&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Note: This article is outdated since the Atlassian Marketplace was launched and a shiny new licensing API was added. Until this article is updated I strongly recommend to take a closer look at the detailed information that Atlassian is providing in the &lt;a href=&#34;https://developer.atlassian.com/display/UPM/How+to+Add+Licensing+Support+to+Your+Add-on&#34;&gt;Developer Documentation&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Observability Snippets</title>
      <link>https://www.hascode.com/observability-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/observability-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_use_methodology&#34;&gt;The USE Methodology&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;USE&lt;/strong&gt; stands for &lt;strong&gt;Utilization&lt;/strong&gt;, &lt;strong&gt;Saturation&lt;/strong&gt;, and &lt;strong&gt;Errors&lt;/strong&gt;. Developed by Brendan Gregg, it’s a low-level diagnostic tool for infrastructure and system resources.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Utilization&lt;/strong&gt; – How much of a resource is used? (e.g., 70% CPU)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Saturation&lt;/strong&gt; – Is the system over capacity? (e.g., CPU run queue)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Errors&lt;/strong&gt; – Are there hardware or system faults? (e.g., disk errors)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;: Bottleneck analysis on servers, network, disk, memory&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Source: &lt;a href=&#34;https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/best-practices/&#34; class=&#34;bare&#34;&gt;https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/best-practices/&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_red_methodology&#34;&gt;The RED Methodology&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;strong&gt;RED&lt;/strong&gt; focuses on service-level performance and is tailored for microservices and HTTP-based systems.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
