Web performance metrics
Web performance metrics
Web performance metrics
Nice way to handle try catch error
Cookie SameSite attribute will not consider the same origin site for the public suffix list.
Docker scout can check vulnerabilities in the docker image.
Chrome browser is building the following context on rendering HTML page.
What CSS is triggering what on rendering
Another interesting framework called server islands to improve web rendering speed
Josh explained about event driven architecture with Spring Modulith
Another nice video for understanding Spring Security for Spring Boot application
Java thread dump with JSON
Another nice talk about SpringBoot test in Java
Armeria can provide services for HTTP, HTTP2, gRPC, Thrift etc.
React19 release is hold because of changes in Suspend
JavaScript ecosystem story telling YouTube channel
We need to aware of cancellation safety on using select. Rust doc will describe the method the cancellation safety on IO operations.
Rust blogs from Without.boat
Creating a new custom(custom.jfc) JFR configuration from the existing profile.jfc
Nice example how Javascript can have a unit test with fetch call by mocking.
Signal will be standard in JavaScript?
LangChain JS example with Llama cpp for embeddings and prompt.
Mastering Llama Math
Why signal is better choice in React application.
The following library will help on defining the prompt for AI.
Nice youtube video for Java Spring DB performance
LlamaHub provides many data loader for OpenAI.
Frontend Master course for Open AI with NodeJS
A code-first agent framework for seamlessly planning and executing data analytics tasks.
Enable CDS steps.
Example of getting input and output from system in Node
https://github.com/opensearch-project/opensearch-hadoop/issues/153#issuecomment-1551501905
Tailwind workshop from Front End Master
PySpark example to groupby then concatenate values to list in a separated column.
The following command will create React App with Vite.
For the following type, we want to get val.value but if it is null or undefined, it should be 10.
A quick tip for checking CPU pressure with JFR in JDK21. It can support a JFR file recorded in JDK17.
PySpark custom aggregation count example in groupBy.
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.
Electron application development from front end master course.
VS code plugin to visualize V8 engine deoptimization for JavaScript and TypeScript
Open Async API standard similar to Open API
It’s worth to watch a video for explaining clean architect with DDD
SpringBoot Authorization Server Example
SpringBoot GraphQL supports a pagination on query by Window mechanism which will use the key to remember current position of cursor.
@SpringBootTest annotation will search entire beans which @SpringBootApplication defines in ApplicationContext so it requires to have all dependent component...
The following Youtube shows an example of building SpringBoot application supporting multi tenants.
The following Youtube videos show useful operations with pandas dataframe.
The following PySpark code will upsert target dataframe with source dataframe even though source column is null when key column matched.
The following blog show how to use Azure BlobClient to download/upload blobs
It’s hard to setup the Spark cluster to run PySpark job locally or CI system. The following github repository will show how we can use dev container feature ...
As a part of loom project, JDK21 will support the structured concurrency to handle multiple concurrent tasks in a structured way.
Playwright - another e2e testing tool which can replace Cypress. Playwright can support multiple browsers and running test in parallel
New JavaScript unit testing framework which can replace jest.
Gradle supports BOM project to define all dependencies.
Installing Ruby 3.1.2 for M1 Mac
The following should be the first line of code to reset box sizing.
Cassandra5 is going to fully support ACID by using Accord protocol(leaderless consensus algorithm).
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...
The following Front End Masters course will explain how password less login using web authentication technology.
The following github will show how we can use redux tool kit with typescript.
Very useful utility type definition when we need to define a type having partial mandatory properties in a type.
Spring data is using a proxy pattern to implement the interface only class at runtime. The following example will show how it will override findById function...
The following Github project will show TypeScript types for React project. Such as children, hooks, HTML event handlers and Context etc.
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. The following link will show how Javascript testing framework works and provide very useful resources to master Javascript testing.
We can control gradle auto detecting JDK and auto download options as shown in below.
The following course will be one of good material for web development beginner. Especially, I strongly recommend to see CSS part.
React testing library provides a way to test a custom hook by using renderHook from @testing-library/react.
SWC can replace most popular bundlers such as Webpack, Parcel etc. It is super fast than all existing JavaScript based bundler.
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 provides multiple features such as routing, observability, circuit breaker and security(OpenID, OAuth2). The following Youtube will show detai...
The following youtube shows a case how to apply data mesh architecture in airline booking industry.
The following talk will show a nice overview how Spring can provide a solution for distributed system.
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...
Java virtual threads applies structured concurrency concepts. The following blog explains what structure concurrency is.
Java 19 preview improved the pattern matching language feature. The following code shows how we can leverage them with virtual threads.
JDK 10+ has introduced a feature called CDS(class data sharing) which will improve the launching time of Java application.
SpringBoot allow to define the exception handler inside of Controller. The following code shows an example.
The following article show String boot GraphQL authorization with bearer token. This will be a good source to understand how Spring security work too.
Frontend master course
React redux fundamentals
Please switch to a branch named fed for a final solution.
Data visualization - Plot
openssl command to verify TLS connection
TypeScript type challenges for practice TS type system
Type script for mapping between event name and event type
Run type script compiler to check types only. Format checking with prettier
In order to use confluent schema registry, the following python package should be installed in a spark cluster
Reading data from Azure Storage Account.
Pyspark can explode the nested structure in object
Pyspark can create a new column with concatenating other columns
Josh Long showed us another very nice Spring tips for supporting multiple tenants with JDBC. Spring provide the AbstractRoutingDataSource to support multiple...
Rust async diagnostics and debugging tool
Youtube with science
Rust Cassandra driver is not matured enough so far but the blogger recommended the C++ driver for production.
Alternative rust linker to speed up from https://www.lpalmieri.com/posts/session-based-authentication-in-rust/
RxJS from Frontend master
Progressive Web Application course in FrontEndMaster
Rust benchmark library based on statistics
We can use the following tools to improve the readability of web contents
The following steps will show how to config ssh connection.
CSS variables provide a nice way to change styles. The following blog will show how ReactJS framework can work with CSS variables.
Frontend master brilliant course for CSS
Ultimate vimrc supports to install your own vim plugins.
Another great front end master course for developer productivity.
Anyone who is caring about the web application network performance needs to read the book.
WebSocket server implementation with Node JS.
PySpark and Kafka with Schema registry
Spring boot security example
The following github shows the real world working application example with SpringBoot. It is demonstrating how to use Spring Data, OAuth, WebClient and REST ...
Rsocket CLI
Spring boot with a Spock testing framework
There are often times to use the external services inside of Kubernetes. The following article explain how to set up in Kubernetes.
Spring boot provides a integration testing framework with docker in Junit tests. It is using the test container library as an underline framework.
The following Youtube shows how spring boot provides a common framework on supporting MariaDB, MongoDB and Neo4J.
Modern command line tools replacement
Spring Data JDBC
PyBuilder will provide an easy way to setup python project.
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...
Groovy missing method is used by the gradle syntax
Apache Beam with Spark streaming runner on Youtube
Spark Structured Streaming Watermark Concept.
Kafka has two types of record on producing and consuming Kafka messages which are called GenericRecord and SpecificRecord. Main difference between GenericRec...
Gradle 7+ removed compile configuration so all existing gradle projects using compile configuration should be migrated. Instead java-library plugin was intro...
Apache Beam has the following key concepts.
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.
Vim fundamental from FrontEndMaster course
With Jersey and Jackson combination, we can build the streaming API for serializing very large size of data.
Pessimistic distributed transaction will use the following concepts to achieve ACID(Atomic, Consistency, Isolation, Durable).
In order to build distributed caches, we need to solve the following three problems.
Zookeeper has a znode to describe the hierarchical accessing data such as kafka/node001
What is difference between Set and Set<?>
JFR unit test framework allow to have a performance regression test by using JFR events.
Rust Tower library provides an abstraction mechanism for network communication with asynchronous request/response. In Rust, in order to define the trait with...
Introduction React Server Component
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...
Linearizability
ZooKeeper mini transaction logic
The following pseudo logic shows how ZooKeeper is supporting a lock. ```java void acquire_lock() { while (true) { if create(‘f’, ephem=true) { re...
C++ lock free programming in Youtube video https://www.youtube.com/watch?v=qdrp6k4rcP4
Most common misconception on Rust programming language. One of favorite explanation is about static lifetime.
Another good resource to learn about Rust async/await with future.
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 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 ...
Adding a git tag with the latest commit date. 1 2 $ GIT_COMMITTER_DATE=$(git log -n1 --pretty=%aD) git tag -a -m "Release 0.0.1" 0.0.1 $ git push --tags
AsRef is useful for generic function on accepting specific reference such as str or Path as trait bounds.
From JDK 11, the following command will start recording JFR 1 $ jcmd [pid] JFR.start duration=60s filename=myrecording.jfr
Rust procedural macros.
How Rust is handling cancellation for async operation
Rust does not have an exception mechanism for error handling they provided the following two types.
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...
How Rust serde library works. https://www.joshmcguigan.com/blog/understanding-serde/
Rust web crawler with async-std and surf
A article about building a web application with Actix-web Rust framework. It seems like that final output of this blog will be a book.
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.
The following git hub shows how Rust can implement Json parser by applying functional programming approach.
Cargo whatfeatures can display features, versions and dependencies of crates
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...
The following example will show how to create a request session with retries.
The following example will show how to add a newline in zsh prompt.
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 ...
Python(3.2 later version) has a feature to run IO tasks in parallel by using futures and ThreadPoolExecutor.
reqwest is a HTTP client in Rust. https://github.com/seanmonstar/reqwest
Cheat sheet https://vim.rtorr.com/
Nice articles on using Cassandra and Kafka
The following example shows difference of iterating vector items between for and with iter() method
flip function The flip function in Buffer is equivalent to the following operation which means that it will set limit with current position and set current p...
QUIC is a multiplexed stream transport over UDP. By using this protocol, it can dramatically reduce the connection establishment time for TCP+TLS.
Git commands when merge conflicts happened.
Learning basic development tools and environment setting such as using it, VIM editor etc
The following example shows the basic form submit handling with React
We can detect the page exit in useEffect Hooks
Intellij idea supports multi cursors for all occurence with the following shortcuts
The following article explain the background of Rust lock free data structure library called Crossbeam
Amethyst: Tiling Windows Manager for Mac OS
The following youtube video will show how rust life time logic works for reference
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...
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...
Youtube channel for Spring live virtual events. This channel contains various topics from industrial experts and company including Confluent, Okkta and Pivot...
List all file paths recursively ```python import os
By adding the following configuration in _config.yml file, we can see the code block line number 1 2 3 4 kramdown: syntax_highlighter_opts: block: ...
The following github project shows how to create an WASM application with Rust and React framework
https://mostly-adequate.gitbooks.io/mostly-adequate-guide/
https://os.phil-opp.com/async-await/
Start with (?s) 1 (?s)\[sometag\](.*?)\[\/sometag\]
Dropwizard can allow to access the attributes in a request as shown in below example. Full layout logback format details can be found from http://logback.qos...
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
extended Berkeley Packet Filter Linux application performance tracing tool http://www.brendangregg.com/blog/2019-01-01/learn-ebpf-tracing.html
https://www.youtube.com/watch?v=6v_BDHIgOY8 https://github.com/kristenjacobs/container-networking
SpringBoot WebFlux 2.2.x requires to load the request body by using an input stream. Below example will show how it can convert the json data into the expect...
create-react-app allow to configure the proxy setting on calling API. documentation: https://create-react-app.dev/docs/proxying-api-requests-in-development/ ...
Creating a history with a memorySource will allow to work for Electron application with reach/router 1 2 3 4 5 6 7 8 9 10 11 12 import { Router, createMemory...
Setting nodeIntegration true in webPreferences section in main.js will allow to use Node feature in renderer process such as require. And setting webSecurity...
Please find the following github for details steps and example. https://github.com/nsclass/ns-electron-app
VS code can do that
The following three functions are very useful on inspecting methods and properties in any Javascrip object. Github code: https://github.com/nsclass/describe-...
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...
Each script file can use a env command to specify the location of command. Below example will show how a shell can find a python3 command location with a env...
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" }, "...
https://github.com/sdras/design-for-developers
https://gridbyexample.com/ https://labs.jensimmons.com/ https://cssgridgarden.com/ https://codepen.io/
CSS Flex and Grid examples. https://github.com/jen4web/fluent2018 CSS definition guide. https://estelle.github.io/
I think that ACID is a main mechanism to maintain the application consistency but it's hard to make it highly scalable and available system because of synchr...
The following example will show how to define the custom Spring configuration for unit test with @ContextConfiguration annotation. Full example can be found ...
The easiest GC log analysis web site. https://gceasy.io/ Profiling Adding a JVM Option +XX:+PreserveFramePointer https://github.com/jvm-profiling-tools/perf-...
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...
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...
https://www.youtube.com/watch?v=6NdxUY1La2I
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...
Getting days of clocks - Linux: clock_gettime(CLOCK_REALTIME) - Java: System.currentTimeMillis() Getting monotonic clocks - Linux: clock_gettime(CLOCK_MONOTO...
Various database called partitioning in various name. It's interesting but they are all same. HBase: region Cassandra: vnode MongoDB: shard Elasticsearch: sh...
https://medium.com/@olehdokuka/mastering-own-reactive-streams-implementation-part-1-publisher-e8eaf928a78c
It is worth to read through The Reactive Manifesto definition. https://www.reactivemanifesto.org/glossary
/etc/sysctl.conf CENT OS example 1 # sysctl -w net.core.wmem_default=262144 # default socket memory buffer per a socker net.core.wmem_default=131072(128KB) ...
Websocket protocol details. http://lucumr.pocoo.org/2012/9/24/websockets-101/
It is an amazing tool to monitor Java application such as thread cpu usage etc. https://github.com/aragozin/jvm-tools
It's worth to read Python code as examples of using list comprehension semantics. http://norvig.com/spell-correct.html
How Software Engineer can be a ML engineer. https://www.youtube.com/watch?v=u0kyJeLvi0w
Alex Petrov talks about modern storage system approaches, discussing storage internals in QCon 2018 https://www.youtube.com/watch?v=wxcCHvQeZ-U https://mediu...
https://medium.com/netflix-techblog/scaling-time-series-data-storage-part-i-ec2b6d44ba39 https://medium.com/netflix-techblog/scaling-time-series-data-storage...
https://www.confluent.io/blog/event-sourcing-cqrs-stream-processing-apache-kafka-whats-connection/
Eventually consistency mechanism in distributed systems. https://medium.com/@istanbul_techie/a-look-at-conflict-free-replicated-data-types-crdt-221a5f629e7e ...
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::...
Github https://github.com/rust-lang-nursery/error-chain Example) https://github.com/rust-lang-nursery/error-chain/blob/master/examples/quickstart.rs
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...
https://tobert.github.io/pages/als-cassandra-21-tuning-guide.html
1 2 cqlsh:test_keyspace> COPY test_table TO 'test_table.csv' WITH HEADER=true; cqlsh:test_keyspace> COPY test_table FROM 'test_table.csv' WITH HEADER=t...
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...
https://github.com/linux-china/awesome-rsocket/blob/master/README.md
https://github.com/mre/idiomatic-rust
1 2 3 4 5 6 -XX:StartFlightRecording=\ disk=true, \ dumponexit=true, \ filename=recording.jfr, \ maxsize=1024m,\ maxa...
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...
1 2 3 4 5 $ cat ~/.gdbinit set history save on set print pretty on set pagination off set confirm off
1 sudo docker run -d -v /mnt/ramdisk/:/var/lib/cassandra/ -e CLUSTER_NAME=TEST -e CASSANDRA_ENDPOINT_SNITCH=PropertyFileSnitch -p 9160:9160 -p 9042:9042 -p 7...
Software based packet routing mechanism without NAT. https://blog.laputa.io/kubernetes-flannel-networking-6a1cb1f8ec7c
HTTP 1.1 has the following header option to deliver the streaming data to clients by opening a TCP connection. 1 Transfer-Encoding: chunked With above heade...
https://www.edureka.co/blog/mapreduce-example-reduce-side-join/
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-...
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 ...
Sometimes, it is required to load all rows in the Cassandra table but it is very slow if loading is performed by a single thread. Let’s say we have the follo...
Interesting generative programming in C++ 17. I think that this explains why compile time reflection and declarative programming approach is required for cle...
1. Stateless - HTTP request/respond structure. 2. Idempotence - database snapshot, recovering data. 3. Monoid - map/reduce, parallelizing operations.
Installing nsenter in /usr/loca/bin directory 1 $ sudo docker run -v /usr/local/bin:/target jpetazzo/nsenter Get the process id of container 1 PID=$(docker ...
https://www.bfilipek.com/2017/01/cpp17features.html https://theboostcpplibraries.com/
https://www.fluentcpp.com/2018/07/10/105-stl-algorithms-in-less-than-an-hour/ http://www.fluentcpp.com/getTheMap/
https://github.com/Microsoft/ProcDump-for-Linux
-DCMAKE_C_FLAGS_DEBUG="-D_DEBUG" -DCMAKE_BUILD_TYPE=Debug
Resources for CMake https://github.com/onqtam/awesome-cmake Modern CMake example with third-party library https://github.com/nsclass/Optional
https://github.com/algermissen/rustz
http://nikgrozev.com/2016/03/14/functional-programming-and-category-theory-part-1-categories-and-functors/ http://nikgrozev.com/2016/04/11/functional-program...
I think that the following features in Rust will make it special. 1. Package manager. 2. Functional style programming. 3. No exception. 4. No garbage collect...
Below code comes from https://memorynotfound.com/ignore-certificate-errors-apache-httpclient/ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ...
Annotation definition. 1 2 3 4 5 @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) @Retention(RetentionPolicy.RUNTIME) public @interface Measur...
Spring is heavily using the CGLIB for it's framework implementation. CGLib is high performance code generation library. It is using to extend JAVA classes an...
As modern CPU shared memory architecture, false sharing is the major performance bottleneck on multi-thread application. False sharing is caused by sharing t...
The following blog explain how Cassandra has been improved the column oriented row. https://www.datastax.com/dev/blog/cql3-for-cassandra-experts
Create service for multiple name providers 1 2 3 4 5 6 7 8 9 10 11 interface NameProvider { String name(); } @Service public class SomeName implement Nam...
Java will guarantee that all thread will see correct values of final fields that were set by the constructor, regardless of how object is published.
https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md
https://github.com/Microsoft/vcpkg
Modern CPU architecture has been enforcing me to create multi-threaded and concurrent enabled software. I have been creating multi-thread software with Gang ...
Applicative Functor has the following two properties. Pure: create a functor from value. Apply: a function taking arguments which are a Functor having a func...
IdentityHashMap class 1 Map<String,String> iMap = new IdentityHashMap<String,String>();
NavigableMap collection on Java provide methods to return the view of Map on sorted order of key. The most common methods are headMap, tailMap and subMap. he...
Guava example 1 2 3 Collection.sort(list, Ordering.from((Comparator<Item>) Comparator.comparingInt(item -> item.getId())) .compound(Comparat...
Example of a chained comparison statement. 1 2 3 4 5 6 7 public int compareTo(Foo that) { return ComparisonChain.start() .compare(this.aStri...
The following article is explaining the under the hood Java 8 Stream API. https://www.ibm.com/developerworks/library/j-java-streams-3-brian-goetz/index.html
1 2 3 4 5 6 7 8 Statement stmt = QueryBuilder().select().all().from('table'); ResultSet rs = session.execute(stmt); StreamSupport.stream( Spliterators.sp...
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...
1 2 3 4 5 6 7 8 9 10 11 @Value("classpath:/static/index.html") private Resource indexHtml; @Bean RouterFunction<?> routerFunction() { ...
1 2 3 4 5 6 7 try (final CSVReader reader = new CSVReader(new BufferedReader(new InputStreamReader(inputStream)))) { String[] line = null; while ((li...
http://www.baeldung.com/javax-validation http://andreinc.net/2017/10/02/writing-an-unified-validation-mechanism-for-rest-apis-using-spring-boot-and-jsr-380/ ...
Good explanation on ForkJoinPool in Java http://www.baeldung.com/java-fork-join
LOGGERS: loggers are responsible for capturing events and passing them to the appropriate appender. APPENDERS: also known as handlers, appenders are responsi...
Securing REST API with Spring Security. http://www.baeldung.com/securing-a-restful-web-service-with-spring-security
Command line to enable Java Flight Recording feature in Java9 to measure JVM performance. 1 $ java -XX:+UnlockCommercialFeatures -XX:StartFlightRecording=fil...
The following jdeps command will inspect any illegal usage in My.class and provide alternative way to fix problems. This tool exists in JDK9. 1 $ jdeps -jdki...
Do not use bounded wildcard as a return value This will force client to use wildcard types
How CPP express Monoid, Functor, Applicative Functor and Monad. The below documentation shows a good explanation. https://github.com/boostcon/cppnow_presenta...
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...
"~>" 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 ...
https://stackoverflow.com/questions/8481301/covariance-invariance-and-contravariance-explained-in-plain-english
https://stackoverflow.com/questions/6246719/what-is-a-higher-kinded-type-in-scala
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...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 def getProduct(id: String): Try[Product] def getPrice(product: Product): Try[Price] def calculateProductPrice(product: Pr...
Expression: by combining value and function, it will generate the value with some possible side-effect Statement: standalone unit of execution without return...
The following command will import a table(column family) to the destination Cassandra node. 1 $ sstableloader -d [destination IP address] -p [port number] [t...
Tmux switcher with fzf
1. Functor -> Mappable 2. Currying -> Currying 3. Applicative -> Applicative 4. Monad -> Chainable 5. Monoid -> Aggregatable 6. Catamorphism -...
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...
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...
MC commands ----- Esc ----- Quick change directory: Esc + c Quick change directory history: Esc + c and then Esc + h Quick change directory previous entry: E...
Combines the following concept. 1. Functor - Type constructor. - Value lifting. - class Functor f where fmap :: (a -> b) -> (f a -> f b) 2. Bi...
Pseudo C++ example implementation of map function of optional in Java8 for functional style programming. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2...
1 2 3 Collection.sort(list, Ordering.from((Comparator<Item>) Comparator.comparingInt(item -> item.getId())) .compound(Comparator.comparing(Item::g...
Nice article for C++17 features. http://www.bfilipek.com/2017/07/cpp17-details-simplifications.html
Adding the date in docker file so that user can update the data for every change. 1 2 FROM ENV REFRESHED_AT 2017-1-1
1 $ sudo vi /etc/default/docker modify the following section. DOCKER_OPTS="--bip 192.168.1.1/24"
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...
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...
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...
1 2 3 $ docker log <container id> // show logs $ docker port <container id> // show port mapping $ docker inspect <container id> // inspect...
1 2 3 4 5 6 7 8 9 10 11 public void completionService(ExecutorService executor) { CompletionService<CustomTaskResult> completionService = n...
Angular 2 Development with TypeScript https://www.manning.com/books/angular-2-development-with-typescript
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import time import http.client import ssl import json conn = http.client.HTTPSConnection("loca...
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...
https://www.gitbook.com/book/0xax/linux-insides/details
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>...
Memory utilization 1 2 3 4 5 vmstat 1 [/cpde] Disk utilization [code lang="C"] iostat -xm 5 Network utilization tool 1 nicstat Network connection status 1 ...
Java 8 -XX:+PrintGCDetails -XX:+PrintReferenceGC -XX:+PrintTenuringDistribution -Xloggc: -XX:+PrintGCTimeStamps Java 9 -Xlog:gc* ,gc+ref=debug ,gc+...
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...
Parse example 1 2 3 4 5 6 7 DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder(); DateTimeFormatter formatter = builder .parseCaseInsens...
Heap histogram 1 jmap -histo [pid] Heap usage 1 jmap -heap [pid]
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 private boolean isMatch(byte[] pattern,...
Interesting tool on measuring the execution time of C++ application in function level. https://github.com/namhyung/uftrace
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...
https://rominirani.com/announcing-gradle-tutorial-series-5fd134223bf8#.kzn6qpx5i
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
http://www.hierax.org/2014/01/grunt-proxy-setup-for-yeoman.html
an expression can be replaced with its result
C API definition to read data from a file in asynchronous way. 1 2 void async_read_completed_callback(void* pUserData, char cont* pBuffer, int size); void as...
Functional programming with C++ https://vittorioromeo.info/index/blog/cpp17_curry.html
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
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 ...
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...
The static initializer block is only executed when the class is loaded by the class loader. There is no instance of that class at that moment and you will on...
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...
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) ...
1 2 3 AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); Set<int> sets = new Set<int>(); ctx.getBeanF...
http://intellidzine.blogspot.co.uk/2013/11/cassandra-data-modelling-tables.html http://intellidzine.blogspot.com/2014/01/cassandra-data-modelling-primary-key...
1 2 git revert --no-commit 0766c053..HEAD git commit
1 2 npm install -g generator-gulp-angular yo gulp-angular
Please run the following commands, it will help 1 npm install grunt-karma karma karma-phantomjs-launcher karma-jasmine jasmine-core phantomjs-prebuilt --save...
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...
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...
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/
The following article has a useful information on handling the lifetime of DBContext in EF. http://mehdi.me/ambient-dbcontext-in-ef6/
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...
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
1 2 3 4 template <boolB, typename T> class enable_if {}; template <typename T> class enable_if<true, T> {typedef T type}; Above code will ...
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...
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...
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:/...
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...
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 public class XmlPartialMarshaller<T> { ...
pscp.exe -i [ppk_path] [file_to_copy] root@[ip]:[dest_path] ex) pscp.exe -i c:\test\id_rsa.ppk c:\temp\test.txt root@[fe80::217:88ff:fe20:4d1]:/tmp
Quiet amazing free software on capturing screen shot with GIF animation http://screentogif.codeplex.com/
1 2 3 4 5 6 7 8 9 10 public interface Operation { } public class enum TestEnum implements Operation { } public class Test { private static <T extends ...
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 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. ...
Normally in order to improve the responsiveness of application, there are two areas that should be considered in modern memory machine architecture. 1. reduc...
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...
You can get free 3 month certificate from the following URL. https://letsencrypt.org/
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...
The following example will show how to perform the custom operation when unsubscribing 1 2 3 4 5 6 7 8 9 10 Service service = new Service(); Observable<St...
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.
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 ...
https://github.com/trecloux/yeoman-maven-plugin
General article https://jwt.io/introduction/ http://odino.org/securing-your-http-api-with-javascript-object-signing-and-encryption/ Open source https://bitbu...
http://www.axiomatics.com/blog/entry/authentication-vs-authorization-part-2-saml-and-oauth-2.html
https://github.com/apache/cxf.git https://github.com/Talend/tesb-rt-se/tree/master/examples/cxf/jaxrs-oauth2
Recommended book for Java concurrency https://github.com/HackathonHackers/programming-ebooks/blob/master/Java/Java%20Concurrency%20in%20Practice.pdf
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...
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...
http://thbecker.net/articles/rvalue_references/section_01.html
How C++11 can help to make C++ meta programming easier http://jguegant.github.io/blogs/tech/sfinae-introduction.html
The following URL has a nice article about git flow http://yakiloo.com/getting-started-git-flow/
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...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include <iostream> #include <chrono> template<typename TimeT = std::chrono::milliseconds> str...
In order to initialize the Web application with Springframework, it is required to detect when context has been initialized. You can achieve it by defining a...
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/...
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...
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...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 String xml = getResourceString("/test_files/TestProperties.xml"); private String getResou...
In order to enable log4j settings in maven compilation, log4j.properties file should be in the test/resources directory. Sample unit test class 1 2 3 4 5 6 7...
Nice C++ implementation for Actor framework. https://github.com/actor-framework/actor-framework.git Git branch for vs2015 is remotes/origin/topic/visual_stud...
In order to load COM dll without searching from system registry key, application should include the manifest file in resource so that the application can cre...
If you have process having same name, it will be really difficult to collect performance counter. Here is a solution for this by modifying the registry key. ...
Make a package to be runnable including all dependent libs in a jar file 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 <buil...
Boost associative containers can increase the performance of your C++ applications for modern CPU architecture(shared memory architecutre) by minimizing cach...
The following code will iterate all available classpath in the application. 1 2 3 4 5 6 7 8 try { Enumeration<URL> resources = ApplicationContextPr...
Unit test Java classes should follow the following naming convention otherwise Maven can not find any unit testing class Test* *Test *TestCase If...
1 mach build-backend --backend=VisualStudio It can be found from the following path. [root source]\mozilla-central\obj-i686-pc-mingw32\msvc\mozilla.sln
VC++ compiler is trying to utilize the 16 registers in x64 CPU which is 8bytes capacity. Due to this reason, first 4 parameters will be placed in registers b...
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...
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...
1. Add the following code in applicationContext-config.xml 1 2 3 4 5 6 7 8 <bean id="myProperties" class="org.springframework.beans.factory.config.P...
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...
1. Bower - create a file .bowerrc in C:\Users\userId directory. - content example 1 2 3 4 { "proxy":"http://user:pass@host:portId", "https-proxy":"http://u...
1 2 3 4 5 6 7 import javax.ws.rs.core.Response; Entity entity = service.getById(uuid); if(entity == null) { return Response.status(Response.S...
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...
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...
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...
With the following command you can create an application directory quickly 1 2 mvn archetype:generate -DgroupId=com.demo.app -DartifactId=appDemo -Darchetyp...
If a class having move constructor needs to be in the container class, it should have "noexcept" qualification. If move constructor may throw exceptions, it ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 public class CommandFactory { public static <T extends Command<R>, R extends Comm...
1. Install logback in a tomcat\lib folder logback-access-1.1.2.jar logback-core-1.1.2.jar 2. Create a logback-access.xml in a tomcat\conf foler Example...
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 ...
mvn dependency:analyze -DcheckDuplicateClasses blog for details http://pettermahlen.com/2010/08/05/finding-duplicate-class-definitions-using-maven/
http://www.soapui.org/
com.google.common.eventbus is a quiet useful library if you would like to create a quick and simple solution for message bus. You can find more details from ...
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" ?> ...
In order to use Ioc to instantiate a WCF service class, Ioc should provide implementation of following two interfaces. IInstanceProvider IServiceBehavior Imp...
1. The Single Responsibility Principle 2. The Open Closed Principle 3. The Liskov Substitution Principle 4. The Interface Segregation Principle 5. The Depend...
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
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...
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...
Main bottle neck of modern CPU(shared memory architecture) is always related to accessing memory because memory is the slowest part in modern computer archi...
1 2 3 4 5 6 7 8 9 10 11 12 include<string> using std; std::to_string std::to_wstring stoi: converts a string to a signed integer stol: ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 private static void InitLoggingPath() { string progDataPath = Environment.GetF...
The following link contains useful information about make a static library for XCode project. http://www.blog.montgomerie.net/easy-xcode-static-library-subpr...
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...
The following link has a useful information about managing git branches. https://www.atlassian.com/git/workflows#!workflow-gitflow
Canvas size is always child driven so it will give infinite size for children. Also HorizontalAlignment and VerticalAlignment settings have no effect on a ch...
The following URL shows how to create custom control with Xaml. http://blogs.msdn.com/b/mim/archive/2013/03/19/create-a-custom-user-control-using-xaml-and-c-...
MVVM light provides an easy way of the strong typed RaisePropertyChanged with lambda. The following code shows how this can find the correct string for membe...
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...
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/
Throw by value. Catch by reference No dynamic exception specifications. Use noexcept. Destructors that throw are evil. Use RAII. (Every responsibility is an...
Scott Myer's word for design software. All interface should be easy to use correctly and hard to use incorrectly.
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...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 public static class ExceptionUtils { public static void PrintException(Exception e) { va...
The following code shows how to create IObserable object from EventHandler delegator. 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...
1 2 3 4 5 6 template <class T> inline void hash_combine(std::size_t & seed, const T & v) { std::hash<T> hasher; seed ^= hasher(v) + 0...
C++11 introduced std::exception_ptr. The main purpose of this class is to allow to tranport C++ exceptions to different threads. in 2012 C++ and Beyond Semin...
The following URL is talking about writing exception safe code for C++. http://exceptionsafecode.com/
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...
It is a good to try to test your C++ knowledge. http://cppquiz.org/
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...
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-...
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...
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-...
The following links shows a good example using AngularJS with TypeScript. http://www.software-architects.com/devblog/2013/10/17/AngularJS-with-TypeScript-and...
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...
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...
When you create a lambda and if the lambda create another lambda in asynchronous way by using thread, you need to be very careful on capturing values. If you...
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 '...
discrete inputs: read-only Boolean coils: read-write Boolean input registers: read-only integer(16 bits) holding registers: read-write integer(16 bits)
Server side configuration 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 static Binding CreateBindi...
1 2 3 4 5 6 7 8 9 10 // create certification for authority makecert -r -pe -n "CN=Tunnel Project Authority" -ss CA -sr CurrentUser -a sha1 -sky signature -cy...
When checking memory usage it might need to disable BSTR cache to avoid misleading information. Add the following environmental variable to disable BSTR cach...
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...
In WPF for binding model data to UI you can choose DependencyObject or INotifyPropertyChanged with POCO. I normally selected INotifyPropertyChanged with POCO...
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...
Resource XML. 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 <Windows.Resources> <Style x:Key="FadeOutButton"...
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...
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) {} ...
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(...
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 ...
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...
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...
The following article shows the good example how to use optimistic concurrency control in Entity Framework code first. http://msdn.microsoft.com/en-us/data/j...
1 2 3 4 5 6 7 8 9 10 11 using (var context = new BreakAwayContext()) { var davesDump = (from l in context.Lodgings where l.Name == "Dave...
If you create a file named [application].exe.config with the following contents in directory having your application, it can make logs on any socket connecti...
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 ...
Extended WPF toolkit provide the various UI for building WPF based application. You can find the details from the following link. http://wpftoolkit.codeplex....
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...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 class Invoker<T> where T : class { static void Invoke(T invokeClass, string methodName, object[] args) ...
.NET 4.0(vs2010) introduced the dynamic feature to support better integration of dynamic language such as Python, Ruby etc. Example) Without dynamic feature....
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...
Open an administrator command prompt at %windir%\System32\inetsrv\ Run the command below to update the appConcurrentRequestLimit attribute to a suitable numb...
Juval Lowy is an expert in WCF. http://www.idesign.net/Downloads
1 2 template <class T> auto add(T t, U u) -> decltype(t + u) is equal to 1 2 template <class T> decltype((*(T*)0) + (*(U*)0)) add(T t, U u);
http://blogs.msdn.com/b/dotnet/archive/2013/04/04/net-memory-allocation-profiling-with-visual-studio-2012.aspx
http://ericlippert.com http://ericlippert.com/category/monads/
http://msdn.microsoft.com/en-us/magazine/jj863136.aspx
1 2 3 4 5 6 7 8 9 bool EC_EnableMulticastLoopBack(SOCKET socket, bool IPv6, bool enable) { // enable/disable loop char loop = enable ? 1 : 0; if ...
1 2 3 4 5 6 7 bool EC_SetMulticastInterfaceIndex(SOCKET socket, bool IPv6, int index) { if (IPv6) { return setsockopt(socket, IPPROTO_IPV6, IPV6_...
1 constexpr explicit optional<T>::operator bool() const noexcept;
http://blogs.msdn.com/b/csharpfaq/archive/2010/06/01/parallel-programming-in-net-framework-4-getting-started.aspx
1 2 3 4 template<typename T, typename S> auto multiply(T lhs, S rhs) -> decltype(lhs * rhs) { return lhs * rhs; }
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; }...
1 2 3 4 git svn clone http://svn.example.com/project/trunk git commit git svn rebase git svn dcommit
Channel 9 videos about xperf, xperfview, WPR and WPA http://channel9.msdn.com/Events/Speakers/Michael-Milirud Article about xperf http://blogs.msdn.com/b/ntd...
1 2 3 4 5 6 7 class BaseClass : public std::enable_shared_from_this<BaseClass> { template <typename Derived> std::shared_ptr<Derived> G...
1 2 3 4 5 6 7 var ui = TaskScheduler.FromCurrentSynchronizationContext(); Task.Factory.ContinueWhenAll(tasks.ToArray(), result => { var ti...
1 2 git commit --reedit-message=HEAD --reset-author git commit -c HEAD --res
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...
when resizing or relocating memory in std::vector, if item supports move constructor std::vector can optimize on relocation operation.
http://bartoszmilewski.com/
1 2 1. git add -u 2. git rm $(git ls-files --deleted)
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...
http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-m...
http://nico.vahlas.eu/2010/03/30/some-thoughts-on-stress-testing-web-applications-with-jmeter-part-2/
ASP.NET iis resource toolkit For performance measurement WCAT 6.3 http://www.iis.net/downloads/community/2007/05/wcat-63-(x86) http://www.iis.net/downloads/...
context.Connection.Open() didn't help solving my problem so I tried enabling "Allow Remote Clients" in DTC config, no more error. In windows 7 you can open t...
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...
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...
1 2 var comparer = Comparer<T>.Default; Func<T,T,T> minOf = (x, y) => comparer.Compare(x, y) < 0 ? x: y;
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 public class ValueChangeData { public object oldValue; public object newV...
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 struct Wanderer { explicit Wanderer(std::vector<std::function>& u...
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 like predictable events but reality is every moment and events are unpredictable. I think that main purpose of software engineering is to make unpredi...
1 2 3 4 5 6 7 #pragma push_macro("min") #pragma push_macro("max") #undef min #undef max // call min, max #pragma pop_macro("min") #pragma pop_macro("max")
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...
https://github.com/rebcabin/DotNetExtensionsImproved From Wikipedia - information on Markov and Viterbi: A hidden Markov model (HMM) is a statistical Markov ...
When you compile OpenMPI on Windows, you should define the following preprocessor. OMPI_IMPORTS OPAL_IMPORTS ORTE_IMPORTS Example) c:\>mpicxx test.cpp -DO...
1 2 3 4 5 6 class FileDeleter { void operator()(FILE* fp) { fclose(fp); } }; unique_ptr<FILE, FileDeleter> fp = fopen("blah"); or even unique_ptr<FI...
Very useful tools for UML and documentation. Plant UML http://plantuml.sourceforge.net/ sphinx python documentation http://sphinx.pocoo.org/
database.driverClassName=org.postgresql.Driver database.url=jdbc\:postgresql\://localhost\:5432/
Fortunately, Spring Security has built-in functionality for remembering the URL that was originally requested, and redirecting your users there after they su...
https://groups.google.com/forum/?fromgroups=#!topic/httpfiddler/Az0xW2MJMqU There's tons of information scattered through the various Fiddler sites and this ...
http://stackoverflow.com/questions/6419885/how-to-add-a-tab-container-to-a-spring-roo-page
Good example http://himtech-spring.blogspot.com.au/2012/07/spring-mvc-with-google-chart.html
http://wofford-ecs.org/dataandvisualization/ermodel/material.htm
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...
@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...
@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...
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...
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 ...
1. Header 1 2 3 #define BOOST_TEST_MODULE TestExample #include using namespace boost::unit_test; 2. Linked library 1 libboost_unit_test_framework-vc100-mt-s...
I have found very useful articles for understanding COM threading model about Apartment. If you want to understand COM Apartment model, the following article...
오랜만에 다시 C++책을 읽으면서 아래의 C++ exception에 대한 자세한 사항을 늘어 봅니다. 1. exception object are always copied - 복사할때 항상 static type정보를 이용해서 복사한다는 사실. 2. exception are fewer...
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...
One of the hardest things is debugging a reference count leak. COM objects lifetime depends on the reference count (read here for more...). So each client of...
http://en.support.wordpress.com/code/posting-source-code/
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...
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...
오픈 소스 베이스로 만들어진 블로그 중에 괜찮은것 같고 모든 내용을 XML로 Export할 수 있다는 말에 선택하게 되었네요.
http://www.microsoft.com/downloads/details.aspx?familyid=8C09FD61-3F26-4555-AE17-3121B4F51D4D&displaylang=en
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 ...
http://blogs.msdn.com/jmstall/archive/2005/12/17/CLR-profiler-2-0-available.aspx</p>
http://msdn.microsoft.com/en-us/magazine/cc716528.aspx</p>
http://doc.sch130.nsc.ru/www.sysinternals.com/ntw2k/source.shtml
http://www.linuxjournal.com/article/6100
http://msdn.microsoft.com/en-us/library/ms379564(VS.80).aspx
http://blogs.msdn.com/greggm/archive/2008/06/09/writing-a-script-debugger-without-using-the-mdm.aspx
http://code.msdn.microsoft.com/debugenginesample/Release/ProjectReleases.aspx?ReleaseId=501
http://blogs.msdn.com/vcblog/archive/2008/06/12/interesting-visual-c-resources.aspx
http://msdn.microsoft.com/en-au/magazine/cc163327.aspx
http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
http://blogs.msdn.com/oldnewthing/archive/2005/02/22/378018.aspx
http://www.artima.com/cppsource/xml_data_binding.html
http://msdn.microsoft.com/en-au/magazine/default.aspx
http://objectmentor.com/resources/articles/TheHumbleDialogBox.pdf
http://msdn.microsoft.com/en-au/ms973913.aspx
http://msdn.microsoft.com/en-au/magazine/cc136757.aspx This article discusses: Unit testing philosophy Setting up WinUnit Building test fixture...
http://www.codeproject.com/KB/cpp/transactions.aspx </p> Languages » C / C++ Language » General Intermediate </p&g...
http://www.codeplex.com/DupliFinder
Commenter Jonathan Scheepers wonders about those programs that flash their taskbar button indefinitely, overriding the default flash count set by SystePara...