Blog Posts

2024

Back to top ↑

2023

Scikit-learn simple training example

1 minute read

Main point of training data is to generate matrix(X) having features(columns) and samples(rows) from provided data which can be text or any form of data.

GraphQL - Pagination with SpringBoot

less than 1 minute read

SpringBoot GraphQL supports a pagination on query by Window mechanism which will use the key to remember current position of cursor.

SpringBoot - @SpringBootTest annotation

less than 1 minute read

@SpringBootTest annotation will search entire beans which @SpringBootApplication defines in ApplicationContext so it requires to have all dependent component...

PySpark - upsert two dataframe

less than 1 minute read

The following PySpark code will upsert target dataframe with source dataframe even though source column is null when key column matched.

JavaScript - vitest

less than 1 minute read

New JavaScript unit testing framework which can replace jest.

Cassandra - Support ACID

less than 1 minute read

Cassandra5 is going to fully support ACID by using Accord protocol(leaderless consensus algorithm).

Qwik - Resumable JavaScript framework

less than 1 minute read

Recently, SSR framework is getting popular such as NextJS, Remix etc. Qwik is quite interesting on optimizing the performance of JavaScript on client side. I...

TypeScript - RequireOnly

less than 1 minute read

Very useful utility type definition when we need to define a type having partial mandatory properties in a type.

React with Typescript

less than 1 minute read

The following Github project will show TypeScript types for React project. Such as children, hooks, HTML event handlers and Context etc.

VS code - prettier

less than 1 minute read

After enabling the format on save, please do not forget to set config for Prettier: Require Config so that VS code will format code for each project based on...

Javascript - Testing basics

less than 1 minute read

Javascript testing basics. The following link will show how Javascript testing framework works and provide very useful resources to master Javascript testing.

Back to top ↑

2022

React - Testing custom hooks

less than 1 minute read

React testing library provides a way to test a custom hook by using renderHook from @testing-library/react.

JavaScript - Rust based bundler SWC

less than 1 minute read

SWC can replace most popular bundlers such as Webpack, Parcel etc. It is super fast than all existing JavaScript based bundler.

JavaScript - Patterns

less than 1 minute read

The following site provides a useful information on JavaScript programming patterns. It covers various topics from the basic design patterns to the latest Re...

Spring Gateway

less than 1 minute read

Spring gateway provides multiple features such as routing, observability, circuit breaker and security(OpenID, OAuth2). The following Youtube will show detai...

Data Science - Data mesh

less than 1 minute read

The following youtube shows a case how to apply data mesh architecture in airline booking industry.

SpringBoot - GraalVM support

less than 1 minute read

SpringBoot for supporting GraalVM. The following youtube video will explain how SpringBoot 3.0 is working. The basic idea is that we need to provide hints fo...

Structure concurrency

less than 1 minute read

Java virtual threads applies structured concurrency concepts. The following blog explains what structure concurrency is.

Spring boot - Exception handling

less than 1 minute read

SpringBoot allow to define the exception handler inside of Controller. The following code shows an example.

Spring - Supporting multiple tenant for JDBC

less than 1 minute read

Josh Long showed us another very nice Spring tips for supporting multiple tenants with JDBC. Spring provide the AbstractRoutingDataSource to support multiple...

Rust - Cassandra driver

less than 1 minute read

Rust Cassandra driver is not matured enough so far but the blogger recommended the C++ driver for production.

Rust - linker

less than 1 minute read

Alternative rust linker to speed up from https://www.lpalmieri.com/posts/session-based-authentication-in-rust/

Back to top ↑

2021

React with CSS variables

less than 1 minute read

CSS variables provide a nice way to change styles. The following blog will show how ReactJS framework can work with CSS variables.

Spring Boot real world example

less than 1 minute read

The following github shows the real world working application example with SpringBoot. It is demonstrating how to use Spring Data, OAuth, WebClient and REST ...

Kubernetes using external service

less than 1 minute read

There are often times to use the external services inside of Kubernetes. The following article explain how to set up in Kubernetes.

Python - PyBuilder

less than 1 minute read

PyBuilder will provide an easy way to setup python project.

Apache Beam Model

less than 1 minute read

What: sum, average or machine learning? used to be done with classic batch processing. Where: windowing with event time such as fixed, sliding or session. Wh...

Kafka - GenericRecord vs SpecificRecord

2 minute read

Kafka has two types of record on producing and consuming Kafka messages which are called GenericRecord and SpecificRecord. Main difference between GenericRec...

Gradle - java-library plugin from 7.x version

less than 1 minute read

Gradle 7+ removed compile configuration so all existing gradle projects using compile configuration should be migrated. Instead java-library plugin was intro...

React for Vega Lite API

less than 1 minute read

Vega lite api provides an easy way to visualize data based on d3 framework. The following repository shows how react can integrate the vega lite api.

Pessimistic Distributed Transaction

less than 1 minute read

Pessimistic distributed transaction will use the following concepts to achieve ACID(Atomic, Consistency, Isolation, Durable).

Zookeeper - znode types

less than 1 minute read

Zookeeper has a znode to describe the hierarchical accessing data such as kafka/node001

Rust - Tower library

less than 1 minute read

Rust Tower library provides an abstraction mechanism for network communication with asynchronous request/response. In Rust, in order to define the trait with...

Thundering Herd Issue with Cache

less than 1 minute read

Thundering herd is a performance problem. When using a cache, if the cache item is expired or evicted by any cache eviction logic, many clients can try to ca...

Back to top ↑

2020

ZooKeeper - Lock Support

less than 1 minute read

The following pseudo logic shows how ZooKeeper is supporting a lock. ```java void acquire_lock() { while (true) { if create(‘f’, ephem=true) { re...

Rust - All About Pin

less than 1 minute read

Excellent explanation about pin API in Rust. 3 hours long video but it’s worth to watch all to understand how async and await are working in Rust with Future...

Rust - Idiomatic Rust API design

less than 1 minute read

Rust is great programming language because of default move semantic and trait system. Idiomatic Rust API is fully utilizing these concept to make it easy to ...

Rust - AsRef usage

less than 1 minute read

AsRef is useful for generic function on accepting specific reference such as str or Path as trait bounds.

Rust - Error Conversion

2 minute read

Rust does not have an exception mechanism for error handling they provided the following two types.

Lamport clock

less than 1 minute read

In distributed system, clock can be skewed so if system is relying on wall clock or local clock, it will face unexpected results such as overwriting an exist...

Rust - Understanding Serde

less than 1 minute read

How Rust serde library works. https://www.joshmcguigan.com/blog/understanding-serde/

Rust - Iterator delegation

less than 1 minute read

Often, container structure having a single vector field needs to expose an iterator. The following code shows how to achieve this in a simple way.

Rust - error handling with thiserror crate

less than 1 minute read

One of the most difficult decision to make on developing an application is how we can handle errors. The thiserror crate provide an easy way to handle errors...

Linux Container - Base Technologies

less than 1 minute read

As we all know, Docker didn’t invent a new technology for Linux container. But they provided a really convenient way to utilize the existing Linux container ...

Rust vector iteration

less than 1 minute read

The following example shows difference of iterating vector items between for and with iter() method

QUIC tranport protocol

less than 1 minute read

QUIC is a multiplexed stream transport over UDP. By using this protocol, it can dramatically reduce the connection establishment time for TCP+TLS.

Java - jhsdb command

1 minute read

jhsdb is a tool which can attach a Java process or launch a postmortem debugger to analyze the content of a core dump from a crashed Java Virtual Machine (JV...

Flame Graph - Cassandra and Java applications

less than 1 minute read

The following article show how to generate the flame graph for Cassandra performance but it is using a generic tools to generate flame graph any Java applica...

Spring - Live Virtual Event

less than 1 minute read

Youtube channel for Spring live virtual events. This channel contains various topics from industrial experts and company including Confluent, Okkta and Pivot...

Linux - Top 10 Performance commands

less than 1 minute read

1. uptime 2. dmesg | tail 3. vmstat 1 4. mpstat -P ALL 1 5. pipstat 1 6. iostat -xz 1 7. free -m 8. sar -n DEV 1 9. sar -n TCP, ETCP 1 10. top

Back to top ↑

2019

React - create-react-app proxy setting

less than 1 minute read

create-react-app allow to configure the proxy setting on calling API. documentation: https://create-react-app.dev/docs/proxying-api-requests-in-development/ ...

JavaScript - Promise.all getting response

less than 1 minute read

Promise.all guarantee the order of response in input promises so that caller can retrieve the result with array index number. 1 2 3 4 5 6 7 8 var allDone = P...

Parcel - Proxy setting

less than 1 minute read

In 'package.json', you can defined the proxy table. 1 2 3 4 5 6 7 8 9 10 11 { "proxy": { "/api": { "target": "http://localhost:8000" }, "...

CSS - Grid examples

less than 1 minute read

https://gridbyexample.com/ https://labs.jensimmons.com/ https://cssgridgarden.com/ https://codepen.io/

CSS - CSS Flex and Grid

less than 1 minute read

CSS Flex and Grid examples. https://github.com/jen4web/fluent2018 CSS definition guide. https://estelle.github.io/

JVM - Profiling and GC analysis tool

less than 1 minute read

The easiest GC log analysis web site. https://gceasy.io/ Profiling Adding a JVM Option +XX:+PreserveFramePointer https://github.com/jvm-profiling-tools/perf-...

Simple way to generate ssh pub/private key

less than 1 minute read

Very simple way to generate ssh pub/private key in Linux. 1 $ ssh-keygen -t rsa -P "" -m PEM -f filename Copy the content of .ssh/id_rsa.pub to .ssh/autho...

Spark - Cassandra connector example

less than 1 minute read

Github https://github.com/nsclass/spark-cassandra-example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 object SparkCassandra...

Kafka - Docker compose example for Kafka

less than 1 minute read

Kafka docker compose example. Please set value of KAFKA_ADVERTISED_HOST_NAME for local host IP address. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 version: '2...

Time - days of clock vs Monotonic clocks

less than 1 minute read

Getting days of clocks - Linux: clock_gettime(CLOCK_REALTIME) - Java: System.currentTimeMillis() Getting monotonic clocks - Linux: clock_gettime(CLOCK_MONOTO...

Reactive Programming

less than 1 minute read

It is worth to read through The Reactive Manifesto definition. https://www.reactivemanifesto.org/glossary

Java - JVM monitoring tool

less than 1 minute read

It is an amazing tool to monitor Java application such as thread cpu usage etc. https://github.com/aragozin/jvm-tools

CRDT - Conflict-Free Replicated Data Types

less than 1 minute read

Eventually consistency mechanism in distributed systems. https://medium.com/@istanbul_techie/a-look-at-conflict-free-replicated-data-types-crdt-221a5f629e7e ...

Rust - Enum serialization example

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 use serde::ser::{ Serialize, Serializer }; use serde::de::...

Rust - Index, mut Index operator example

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 use std::ops::{Index, IndexMut}; #[derive(Debug)] pub struct ImageArray2 { dat...

Back to top ↑

2018

Emacs - Learning Emacs

1 minute read

http://www.jesshamrick.com/2012/09/10/absolute-beginners-guide-to-emacs/ C-h C-h : help C-g : quit C-x b : switch buffers C-x right : right-cycle through bu...

Spark - join transformation

less than 1 minute read

join—Equivalent to an inner join in RDBMS, this returns a new pair RDD with the elements (K, (V, W)) containing all possible pairs of values from the first a...

Kubenetes - Example of Kubenetes

less than 1 minute read

https://blog.octo.com/en/how-does-it-work-kubernetes-episode-1-kubernetes-general-architecture/ https://blog.octo.com/en/how-does-it-work-kubernetes-episode-...

Docker - difference RUN, CMD and ETRYPOINT

less than 1 minute read

1. CMD vs ENTRYPOINT The ENTRYPOINT specifies a command that will always be executed when the container starts. The CMD specifies arguments that will be fed ...

C++ 17 - Generative Programming in C++ 17

less than 1 minute read

Interesting generative programming in C++ 17. I think that this explains why compile time reflection and declarative programming approach is required for cle...

High scalable application characteristics

less than 1 minute read

1. Stateless - HTTP request/respond structure. 2. Idempotence - database snapshot, recovering data. 3. Monoid - map/reduce, parallelizing operations.

C++17 - Learning STL algorithm

less than 1 minute read

https://www.fluentcpp.com/2018/07/10/105-stl-algorithms-in-less-than-an-hour/ http://www.fluentcpp.com/getTheMap/

FP - Another valuable article about Functor

less than 1 minute read

http://nikgrozev.com/2016/03/14/functional-programming-and-category-theory-part-1-categories-and-functors/ http://nikgrozev.com/2016/04/11/functional-program...

Cache - False sharing

less than 1 minute read

As modern CPU shared memory architecture, false sharing is the major performance bottleneck on multi-thread application. False sharing is caused by sharing t...

Angular - Proxy settings to avoid CORS

less than 1 minute read

Create a proxy.config.json 1 2 3 4 5 6 { "/api": { "target": "http://localhost:8080", "secure": false } } run ng serve with a configuration file...

Back to top ↑

2017

Java - Read CSV file from a stream

less than 1 minute read

1 2 3 4 5 6 7 try (final CSVReader reader = new CSVReader(new BufferedReader(new InputStreamReader(inputStream)))) { String[] line = null; while ((li...

Java - ForkJoinPool

less than 1 minute read

Good explanation on ForkJoinPool in Java http://www.baeldung.com/java-fork-join

Java - logging components and explanation

less than 1 minute read

LOGGERS: loggers are responsible for capturing events and passing them to the appropriate appender. APPENDERS: also known as handlers, appenders are responsi...

Scala - ~> [Tilde arrow] explanation

less than 1 minute read

"~>" is a place holder for type. Main reason to use "~>" is to make readable on type A goes to type B. This is possible because Scala allow to express ...

Scala - By Name Parameters

less than 1 minute read

Syntax: => A 1 2 3 4 5 def ifElse[A](test: Boolean, whenTrue: => A, whenFalse: => A): A = test match { case true => whenTrue case false =&g...

FP - expression vs statement

less than 1 minute read

Expression: by combining value and function, it will generate the value with some possible side-effect Statement: standalone unit of execution without return...

Monad - Definition of Monad with Monoid

less than 1 minute read

Monad is a binding function to connect two functions where are different types between returning value and input argument. So Monad will allow to compose two...

Monoid - Simple definition of Monoid

less than 1 minute read

1. Closure: Two same type pair operation results a new result with same type. 2. Associative: Doesn't matter or operation order wit a pair. 3. Identity: Ther...

Mid night commander short cuts

2 minute read

MC commands ----- Esc ----- Quick change directory: Esc + c Quick change directory history: Esc + c and then Esc + h Quick change directory previous entry: E...

Monad - simple example definition

less than 1 minute read

Combines the following concept. 1. Functor - Type constructor. - Value lifting. - class Functor f where fmap :: (a -> b) -> (f a -> f b) 2. Bi...

C++17 - new features in C++17

less than 1 minute read

Nice article for C++17 features. http://www.bfilipek.com/2017/07/cpp17-details-simplifications.html

Java - Spring boot with JAX-RS

less than 1 minute read

Enabling Spring boot to use JAX-RS https://dzone.com/articles/using-jax-rs-with-spring-boot-instead-of-mvc http://blog.codeleak.pl/2015/01/getting-started-wi...

Java 9 - useful commands to inspect Module

less than 1 minute read

List modules 1 2 $ java --list-modules $ java --list-modules java.base Diagnostic module dependencies 1 2 $ java -Xdiag:resolver -p mods [module name]/[clas...

Java 8 - general practice using Optional

less than 1 minute read

0. Never, ever use null for an Optional variable. 1. Optional should be only used as a return value. : never use it for a field in Class and a method para...

Docker - useful command

less than 1 minute read

1 2 3 $ docker log <container id> // show logs $ docker port <container id> // show port mapping $ docker inspect <container id> // inspect...

Java - Task polling example with Java 8

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 public void completionService(ExecutorService executor) { CompletionService<CustomTaskResult> completionService = n...

Angular 2 book

less than 1 minute read

Angular 2 Development with TypeScript https://www.manning.com/books/angular-2-development-with-typescript

Rake - useful command line options

less than 1 minute read

1 2 3 4 5 $ rake -P $ rake -T #display description $ rake -T buy #display contains "buy" in name $ rake -W buy #display path of task "buy" $ rake -D

C++ 14 - co-routine with boost library

less than 1 minute read

It is worth to read the following blog if interested in C++ co-routine support. https://blogs.msdn.microsoft.com/vcblog/2017/05/19/using-c-coroutines-with-bo...

Java - Java application monitoring tools

1 minute read

jcmd: Prints basic class, thread, and VM information for a Java process Example) 1 2 3 4 5 6 7 8 % jcmd <process_id> VM.uptime % jcmd <process_id>...

Java - Garbage collectors

less than 1 minute read

1. Serial -XX:+UseSerialGC JVM 2. Parallel default 3. CMS(Current Markup Sweep) -XX:+USeParNewGC 4. G1 –XX:+UseG1GC Note: Java8 and G1 collector can optimize...

Java - ZonedDateTime formatter for ISO-8601

less than 1 minute read

Parse example 1 2 3 4 5 6 7 DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder(); DateTimeFormatter formatter = builder .parseCaseInsens...

Cassandra - Resuming pagination

less than 1 minute read

Cassandra provides the page state information and it can be reused to get next iteration. 1 2 3 4 5 6 7 Statement stmt = QueryBuilder .se...

JVM-Cucumber: Setting up example

less than 1 minute read

http://qza.github.io/tutorial/development/2015/10/17/bdd-in-java-with-junit-spring-and-cucumber-jvm/ https://github.com/qza/bdd-cucumber-jvm-spring

Web - Font sizing unit rem

less than 1 minute read

It is worth to read about font size unit of rem other than pixel. https://snook.ca/archives/html_and_css/font-size-with-rem

Gulp - connect proxy example

less than 1 minute read

It will avoid CORS problem during development. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 var Proxy = require('gulp-connect-proxy'); ... // A local web server for dev ...

Back to top ↑

2016

C++ - Anonymous namespace

less than 1 minute read

The main reason of using anonymous namespace in C++ is to localize declaration in translation unit. The compiler will choose the unique name for unnamed name...

Cassandra - Allow Filtering example

less than 1 minute read

1 2 3 4 5 6 7 create table User( email text, name text, desc text, user_id uuid PRIMARY KEY((email), name, user_id) ) WITH CLUSTERING ORD...

Cassandra - Partition Key, Clustering key

less than 1 minute read

Partition Key: It will be hashed and saved across nodes. Clustering Key: It will group in the same partition key. PRIMARY KEY((partion key), clustering key) ...

Spring - adding a bean in code

less than 1 minute read

1 2 3 AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); Set<int> sets = new Set<int>(); ctx.getBeanF...

Java - generating a self-signed public key

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 1. Generate self-signed public key $JAVA_HOME/bin/keytool -genkey -alias test_alias --keyalg RSA -keystore test_key.jks -keysize 2048 -d...

Git diff and merge tool with Intellij Idea

less than 1 minute read

Windows 1 2 3 4 5 6 7 8 9 [merge] tool = intellij [mergetool "intellij"] cmd = cmd.exe //c "\"c:/Program Files (x86)/JetBrains/IntelliJ IDEA Communit...

C++ - Exception handling

less than 1 minute read

The following article provides a good way of using Exceptions in C++ http://www.acodersjourney.com/2016/08/top-15-c-exception-handling-mistakes-avoid/

C# - EF lifetime of DBContext

less than 1 minute read

The following article has a useful information on handling the lifetime of DBContext in EF. http://mehdi.me/ambient-dbcontext-in-ef6/

Java - exceptions

less than 1 minute read

Java has 3 different types of exceptions. 1. Checked exception - Use this exception for a case which can be recoverable. 2. Runtime exception - Use this exce...

Java - illegal generic array

less than 1 minute read

The following code will have a compile error 1 new List<E>[]; The reason is that it is not a typesafe. It will violate the generic type system in Java

C++11- enum class with underlying type

less than 1 minute read

C++11 allows us to specify the underlying type for enum class as shown below. If specified value is not in the range of the underlying type, compiler can cat...

Git - submodule

less than 1 minute read

Sometimes, a project can depends on another project which is in different git repository. Git can provide a way to maintain this dependencies by a command ca...

C++ - Unit test framework “doctest”

less than 1 minute read

This C++ testing framework is very light and only requires a header file to include. Above all it will allow to have testing code in production code. https:/...

C++ - loop optimization with Sentinel

less than 1 minute read

It is possible to make the loop faster by using an guarded value so it doesn't need to check the variable validation or extran comparing. https://en.wikipedi...

C++11 - Variadic template example

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #include <iostream> #include <sstream> #include <vector> std::vector&l...

Java - nested class and static class

less than 1 minute read

Java allows us to define a class within another class. Such a class is called a nested class. The class which enclosed nested class is known as Outer class. ...

Improving responsiveness

less than 1 minute read

Normally in order to improve the responsiveness of application, there are two areas that should be considered in modern memory machine architecture. 1. reduc...

C++11 - Understanding SFINAE

less than 1 minute read

SFINAE(substution failure is not an error) is hard to understand at glance but following article explains the concept of SFINAE eaiser way with a clear examp...

Rx - Difference Hot and Cold observer

less than 1 minute read

Hot: If observerable start emitting items as soon as created, it is called "Hot" Cold: Observerable will start to emit items when it is subscribed.

C++ - Build boost library with MinGW

less than 1 minute read

1. build bjam with boostrap.bat Example) bootstrap gcc 2. run the following command b2 toolset=gcc --build-type=complete architecture=x86 address-model=32 ...

Back to top ↑

2015

JOSE - How to encrypt your web api

less than 1 minute read

General article https://jwt.io/introduction/ http://odino.org/securing-your-http-api-with-javascript-object-signing-and-encryption/ Open source https://bitbu...

ApacheCXF - oauth 2 example

less than 1 minute read

https://github.com/apache/cxf.git https://github.com/Talend/tesb-rt-se/tree/master/examples/cxf/jaxrs-oauth2

Java - Java concurrency in practice

less than 1 minute read

Recommended book for Java concurrency https://github.com/HackathonHackers/programming-ebooks/blob/master/Java/Java%20Concurrency%20in%20Practice.pdf

Java - RxJava

less than 1 minute read

Recommended reading for RxJava http://akarnokd.blogspot.com.au/2015/06/subjects-part-1.html Another worth reading article about Rx https://gist.github.com/st...

Java - Predefined funtional interface

less than 1 minute read

1. Void return and zero paramter Use Runnable 1 2 3 4 5 6 void runTask(Runnable task) { task.run(); } runTask(()-> { // do something }); 2. Return v...

Java - Try with resources

less than 1 minute read

From Java7, it introduced the mechanism to release the resource automatically as C# does with using statement. In C#, you can use the using statement to rele...

ApacheCXF - an example of web.xml

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/...

Java - ApacheCXF web socket example

less than 1 minute read

Here is the git hub url for an example of ApacheCXF with websocket. https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/we...

Tomcat - setting for max HTTP header size

less than 1 minute read

you can specify the max HTTP header size for Tomcap by modifying the file in conf/server.xml as shown below. This example set max HTTP header size 24KB(24576...

C++ - Actor framework for C++

less than 1 minute read

Nice C++ implementation for Actor framework. https://github.com/actor-framework/actor-framework.git Git branch for vs2015 is remotes/origin/topic/visual_stud...

Tomat - install as a service for Windows

less than 1 minute read

1. run cmd.exe as an administrator 2. go to the bin directory of Tomcat installation 3. execute "service.bat install 'name of service'" by default it will be...

Log4j - setting for logging everying grobally

less than 1 minute read

The following example show how to configure log4j configuration file(log4j.properties) to log all messages. Main point is that rootLogger has to be configure...

Maven Release plugin

less than 1 minute read

Useful commands 1 2 3 4 5 6 7 8 9 10 1. Prepare mvn release:prepare 2. Perform release mvn release:perform 3. Update develop version number mvn release...

Java - Log4j fixed file size setting example

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 log4j.rootLogger=INFO, loggerId log4j.appender.loggerId=org.apache.log4j.rolling.RollingFileAppender log4j.appender.loggerId.rollingPoli...

Apache CXF - getting ServletContext in code

less than 1 minute read

It is common to get a Servlet context on implementing WEB API. Apache CXF has a little different approach to get this instance. The following code show how t...

Java - create a Java application with Maven

less than 1 minute read

With the following command you can create an application directory quickly 1 2 mvn archetype:generate -DgroupId=com.demo.app -DartifactId=appDemo -Darchetyp...

Back to top ↑

2014

Tomcat - Context in server.xml

less than 1 minute read

When Eclipse deploy web application in the existing Tomcat server, it will create Context element in server.xml. The details of Context element in Tomcat is ...

C# - Log4Net configuration example

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 <?xml version="1.0" encoding="utf-8" ?> ...

C# WCF - Ninject Ioc

1 minute read

In order to use Ioc to instantiate a WCF service class, Ioc should provide implementation of following two interfaces. IInstanceProvider IServiceBehavior Imp...

C++11 - Pointer casts

less than 1 minute read

C++11 introduced a new way to cast shared_ptr as shown below. std::dynamic_pointer_cast std::static_pointer_cast std::const_pointer_cast

C++11 - coroutine

less than 1 minute read

The following article is showing a nice example how C++11 can support coroutine feature. C# has already supported this feature from C# 2.0. http://paolosever...

C++11- good to know algorithm

less than 1 minute read

The following algorithm will make your code clean and faster 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1. std::all_of bool res = std::all_of(std::begin(conta...

XCode - Static library

less than 1 minute read

The following link contains useful information about make a static library for XCode project. http://www.blog.montgomerie.net/easy-xcode-static-library-subpr...

C++ - Simple Dynamic 2D array example

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5...

C++11 - default member initialization

less than 1 minute read

You can initialize the member variable as shown the following in C++11. It will save a lot of typing when you have many constructors. 1 2 3 4 5 6 7 8 9 10 11...

C# - MVVM light

less than 1 minute read

I think that MVVM light is the essential tool for XAML based framework such as WPF, Silverlight, Windows 8, WindowPhone 8 http://www.galasoft.ch/mvvm/doc/

C++11 - std::rethrow_if_nested

less than 1 minute read

std::throw_with_nested will create a class inherited from std::std::nested_exception and user exception then it will get current exception and user exception...

.NET - CLRMD crash dump and inspection API

less than 1 minute read

Microsoft announced the new API for inspection of dump file which is called CLRMD http://blogs.msdn.com/b/dougste/archive/2013/05/04/clrmd-net-crash-dump-and...

ASP.NET - Web API 2 article

less than 1 minute read

The following link explains about Web API2 with OWIN protocol http://blogs.msdn.com/b/webdev/archive/2013/09/20/understanding-security-features-in-spa-templa...

Boostrap3 - input file example

less than 1 minute read

The following URL shows a good example how to make a nice looking file input button with Boostrap 3 http://www.abeautifulsite.net/blog/2013/08/whipping-file-...

Back to top ↑

2013

AngularJS service code with ASP .NET WEB API2

less than 1 minute read

The following AngularJS service code shows how to login with bearer token authentication of ASP.NET WEB API2 to access exported restful APIs. 1 2 3 4 5 6 7 8...

ASP.NET - SPA with AngularJS

less than 1 minute read

The following url shows an example of SAP with AngularJS for ASP.NET http://www.codeproject.com/Articles/657139/A-Book-Store-Application-Using-AngularJS-and-...

AngularJS with TypeScript example

less than 1 minute read

The following links shows a good example using AngularJS with TypeScript. http://www.software-architects.com/devblog/2013/10/17/AngularJS-with-TypeScript-and...

ASP .NET - Individual account in WEB API

less than 1 minute read

From MVC5, Microsoft changed a lot on identification mechanism. Web API will also use the updated framework which is based on OWIN. The following article wil...

C# - Continuous task example

1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5...

Windbg - command types

1 minute read

Windbg has the following command types Native commands: it starts without any prefix vertaget, k, ~, s, lm, lmv m *clr* Meta commands(.): it starts with '...

Modbus - Coils, Discret Inputs etc

less than 1 minute read

discrete inputs: read-only Boolean coils: read-write Boolean input registers: read-only integer(16 bits) holding registers: read-write integer(16 bits)

Windows - disabling BSTR cache

less than 1 minute read

When checking memory usage it might need to disable BSTR cache to avoid misleading information. Add the following environmental variable to disable BSTR cach...

Performance - Windows application heap usage

less than 1 minute read

The following script will show how to profile the heap memory usage of Windows application with Windows Performance Toolkits 1 2 3 4 5 6 7 8 9 10 11 12 @echo...

C# WCF - communication tracing

less than 1 minute read

In order to diagnostic WCF communication, you can log all WCF activities by using tracing mechanism in .NET application. You can add the following section in...

C# WPF - customizing start up fuction in WPF

less than 1 minute read

When you create a WPF application with visual studio, you will always find app.xaml and app.xaml.cs file. In app.xaml file, you can find the StartupUri attri...

C++11 - Inherited constructors

less than 1 minute read

Now C++11 allow that derived class can inherit the constructors of base class as the following. 1 2 3 4 5 6 7 8 9 10 11 class A { public: A(int a) {} ...

C# - Simple UDP listener in asynchronous way

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 private Socket udpSock; private byte[] buffer; public void Starter(...

C# Performance measurement helper classes

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 ...

C++ Performance measuring utility classes

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5...

Performance Analysis for Windows - channel9

less than 1 minute read

The following URL contains the useful information about using xperf for analysis of Windows application and OS. http://channel9.msdn.com/Shows/Defrag-Tools/R...

C# SMTP client using CDO

1 minute read

The following code utilize the CDO service of Windows OS to send an email. In my research CDO SMTP client can only support SSL/TLS connection type for using ...

C# WPF extended toolkit

less than 1 minute read

Extended WPF toolkit provide the various UI for building WPF based application. You can find the details from the following link. http://wpftoolkit.codeplex....

C# WCF instance configuration

1 minute read

WCF has the confusing mechanism for management of instance on RPC call. The following separating shows an example of this situation. If you are more interest...

C# dynamic keyword

less than 1 minute read

.NET 4.0(vs2010) introduced the dynamic feature to support better integration of dynamic language such as Python, Ruby etc. Example) Without dynamic feature....

C# performance counter example

3 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5...

C++11 - defaulted function

less than 1 minute read

C++11 introduced the defaulted function as the following example. 1 2 3 4 5 6 7 class help { public: help() = default; private: std::string m_text; }...

Git - svn commands

less than 1 minute read

1 2 3 4 git svn clone http://svn.example.com/project/trunk git commit git svn rebase git svn dcommit

Git - renormalizing a repository

less than 1 minute read

1 2 3 4 5 6 git rm --cached -r .# Remove everything from the index. git reset --hard# Write both the index and working directory from git's database. git add...

Git - changing the committed comment

less than 1 minute read

Basic steps. git log --pretty=oneline -10 git rebase -i xxxx -> change 'pick' to 'reword' git commit git rebase --continue details is the following url. h...

Git - configuration to use p4merge for diff

less than 1 minute read

On Windows 1 2 3 4 5 6 7 8 9 10 [diff] tool = p4merge [difftool "p4merge"] path = c:\\Program Files\\Perforce\\p4merge.exe [merge] tool = p4merge [mergeto...

C# Observable dictionary

4 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5...

Simple Makefile example for MPI

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 CC=mpicxx CFLAGS=-c -Wall LDFLAGS= SOURCES=test.cpp OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=test all: $(SOURCES) $(EXECUTABLE) $(...

People want to predict every events

less than 1 minute read

People like predictable events but reality is every moment and events are unpredictable. I think that main purpose of software engineering is to make unpredi...

vim commands

3 minute read

Cursor movement 1 2 3 4 5 6 7 8 9 10 11 12 13 14 h - move left j - move down k - move up l - move right w - jump by start of words (punct...

Compiling open MPI application on Windows

less than 1 minute read

When you compile OpenMPI on Windows, you should define the following preprocessor. OMPI_IMPORTS OPAL_IMPORTS ORTE_IMPORTS Example) c:\>mpicxx test.cpp -DO...

Back to top ↑

2012

Spring MVC - Redirect to URL after login

less than 1 minute read

Fortunately, Spring Security has built-in functionality for remembering the URL that was originally requested, and redirecting your users there after they su...

How fiddler works

less than 1 minute read

https://groups.google.com/forum/?fromgroups=#!topic/httpfiddler/Az0xW2MJMqU There's tons of information scattered through the various Fiddler sites and this ...

Tab UI example in spring roo

less than 1 minute read

http://stackoverflow.com/questions/6419885/how-to-add-a-tab-container-to-a-spring-roo-page

Windows 7 memory profiling another example

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 @echo off set _NT_SYMBOL_PATH=f:\src\Debug\;srv*c:\WebSymbol*http://msdl.microsoft.com/downloads/symbols xperf -on Base+Cswitch...

Windows 7 memory profiling example

less than 1 minute read

@echo off set _NT_SYMBOL_PATH=F:\src\Release\;srv*c:\WebSymbol*http://msdl.microsoft.com/downloads/symbols</p> xperf -on base xperf -start heapsession...

Windows 7 CPU performance profiling example

less than 1 minute read

@echo off set _NT_SYMBOL_PATH=f:\src\Debug\;srv*c:\WebSymbol*http://msdl.microsoft.com/downloads/symbols</p> xperf -on Latency -stackwalk profile echo...

Load a binary file with C++

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 bool LoadBinaryFile(std::wstring const& path, std::vector<unsigned char>& data) { try { std::basic_ifst...

Load a text file with C++

less than 1 minute read

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 std::wstring fromAscii(const char* str) { std::wstring sOutput; int inputLength ...

Back to top ↑

2011

Understanding COM threading model(Apartment)

less than 1 minute read

I have found very useful articles for understanding COM threading model about Apartment. If you want to understand COM Apartment model, the following article...

Something about .NET profiler

less than 1 minute read

The following link explains about how .NET profiler works. http://blogs.msdn.com/b/davbr/archive/2007/03/22/enter-leave-tailcall-hooks-part-1-basics.aspx Usi...

Back to top ↑

2010

Build boost 1.43 for iPhone SDK 4.0

less than 1 minute read

1. modify user.config.jam in tools/build/v2 directory 1 2 3 4 5 6 7 8 9 10 using darwin : 4.2.1~iphone : /Developer/Platforms/iPhoneOS.platform/Developer/usr...

Link Boost library for iPhone

less than 1 minute read

Once you compile the boost libraries you want, right click your target after you made your project, and click Get Info. Then go to the Build Tab and find the...

블로그 시작

less than 1 minute read

오픈 소스 베이스로 만들어진 블로그 중에 괜찮은것 같고 모든 내용을 XML로 Export할 수 있다는 말에 선택하게 되었네요.

Back to top ↑

2009

Mac OSX NVCAP

3 minute read

URL: http://nvinject.free.fr/forums/viewtopic.php?t=214   Thanks to Arti and the lot of experiments we've been doing last weeks on hackintoshes and PowerPC ...

Check out CLR Profiler 2.0

less than 1 minute read

http://blogs.msdn.com/jmstall/archive/2005/12/17/CLR-profiler-2-0-available.aspx</p>

Back to top ↑

2008

MSDN magazine home

less than 1 minute read

http://msdn.microsoft.com/en-au/magazine/default.aspx

The Humble Dialog Box

less than 1 minute read

http://objectmentor.com/resources/articles/TheHumbleDialogBox.pdf

Undo and Redo the “Easy” Way

24 minute read

http://www.codeproject.com/KB/cpp/transactions.aspx   </p> Languages » C / C++ Language » General     Intermediate </p&g...

Back to top ↑