Setting Firing Order Of SQL Triggers

At times there is a need to control order of execution of triggers. This could be due to business requirement but also as a way to control history of a record I usually don’ t see people put any way to prevent trigger nesting, example update trigger updating same records would fire the trigger again.

RabittMQ RPC Request/Response example

RabittMQ RPC Request/Response example using library Following example creates RPC client and then setups Async response handler, which follows by the request to get processed. Hoplin client supports both Direct-Reply and Queue per Request/Response patterns. This is the binding that is used to create our client. A lightweight RabbitMQ client for Java (built on top of rabittmq java client)

A lightweight RabbitMQ client for Java (built on top of rabittmq java client) Documentation and project available at GitHub repo To make working with RabbitMQ as simple as possible with minimum dependencies. Minimal dependencies, simple configuration and API. Subscriber client Publisher client Async RPC Client Creating simple RabbitMQ client can be done in couple different … Read more

Extended GIT Information in bash PS1

Extended GIT Information in bash PS1 This will generate shell similar to this : Multiline version: ┌──┤ greg: ~/dev/discovery/discovery-agent │ master ≡ !1 +2 -2 ≡ 2 weeks ago └── λ Format `branch ≡ changes additions deletions ≡ last commit`Example `master ≡ !1 +2 -2 ≡ 2 weeks ago` Since we are interested in interactive … Read more

Counting transitions in a bit string

We need to count a number of transitions in a bit string from 0->1 and 1->0. I needed this in order to determine Uniform Descriptor in Local Binary Patterns(LBP) Samples 0000 0000 (0 Transitions : Uniform) 0x0 1110 0011 (2 Transitions : Uniform) 0xE3 0101 0000 (4 Transitions : NonUniform) 0x50 0000 1010 (4 Transitions … Read more

Hamming distance calculation

This is a small snippet of how to calculate hamming distance in cpp with small bit of assembly for doing a population count. Code typedef unsigned long long hash_t; #include #include int popcount64(const hash_t& val) noexcept { int ret; __asm__ (“popcnt %1, %1” : “=r” (ret) : “0” (val)); return ret; } int hamming_distance(const hash_t& … Read more

Histogram Comparison for Image Analysis

DRAFT This is the first article in the series on Image Comparison using Local Binary Patterns.Complete code is on github lbp-matcher We will start off by looking at different methods of comparing histograms. Histogram Intersection Log Likehood Chi Squared Kullback Leibler Divergence All our operations will be performed on 8bpp(bits per pixel) images anything that … Read more