Git is cryptographically secure, but it’s not foolproof. If you’re taking work from others on the internet and want to verify that commits are actually from a trusted source, Git has a few ways to sign and verify work using GPG.
Introduction to GPG First of all, if you want to sign anything you need to get GPG configured and your personal key installed.
hzxie@XieHaozhe-PC:~$ gpg --list-keys /home/hzxie/.gnupg/pubring.gpg ------------------------------ pub 1024D/381BA480 2007-02-15 uid Johannes Ranke (CRAN Debian archive) <jranke@uni-bremen.de> pub 4096R/3DBF9592 2016-03-28 uid Haozhe Xie (GPG key for GitHub) <cshzxie@gmail.com> sub 4096R/BFEB9969 2016-03-28 If you don’t have a key installed, you can generate one with gpg --gen-key.
Introduction In mathematics and statistics, random projection is a technique used to reduce the dimensionality of a set of points which lie in Euclidean space. Random projection methods are powerful methods known for their simplicity and less erroneous output compared with other methods. According to experimental results, random projection preserve distances well, but empirical results are sparse.
Consider a problem as follows: We have a set of n points in a high-dimensional Euclidean space $\mathbf{R}^d$. We want to project the points onto a space of low dimension $\mathbf{R}^k$ in such a way that pairwise distances of the points are approximately the same as before.
What’s a decision tree? A decision tree is a flowchart-like structure in which each internal node represents a “test” on an attribute (e.g. whether a coin flip comes up heads or tails), each branch represents the outcome of the test and each leaf node represents a class label (decision taken after computing all attributes). The paths from root to leaf represent classification rules.
Overview A decision tree is a flowchart-like structure in which each internal node represents a “test” on an attribute (e.g. whether a coin flip comes up heads or tails), each branch represents the outcome of the test and each leaf node represents a class label (decision taken after computing all attributes). The paths from root to leaf represent classification rules.
NOTE: The behaviors in this article are for HotSpot, other JVM might behave differently.
What is JVM? The Java Virtual Machine is the cornerstone of the Java platform. It is the component of the technology responsible for its hardware- and operating system independence, the small size of its compiled code, and its ability to protect users from malicious programs.
The Java Virtual Machine is an abstract computing machine. Like a real computing machine, it has an instruction set and manipulates various memory areas at run time. The JVM doesn’t understand Java typo, that’s why you compile your *.java files to obtain *.class files that contain the bytecodes understandable by the JVM.
Today, the Spring Framework was released to 4.2 RC2. In Spring 4.2, better application events and Server-Sent Event(SSE) are supported.
In this article, I’ll introduce you to the two new features.
What’s Server-Sent Event Server-sent events (SSE) is a technology where a browser receives automatic updates from a server via an HTTP connection. The Server-Sent Events EventSource API is standardized as part of HTML5 by the W3C.
Server-sent event is a standard describing how servers can initiate data transmission toward clients once an initial client connection has been established. They are commonly used to send message updates or continuous data streams to a browser client and are designed to enhance native, cross-browser streaming through a JavaScript API called EventSource, through which a client requests a particular URL in order to receive an event stream.
This guide walks you through the process of creating a “hello world” application that sends messages back and forth, between a browser and the server. WebSocket is a very thin, lightweight layer above TCP. It makes it very suitable to use “subprotocols” to embed messages. In this guide, we’ll dive in and use STOMP messaging with Spring to create an interactive web application.
Maven Dependencies First, we need to add the Spring messaging modules in the POM file:
Last few months, I’m working on a project with Spring MVC and Hibernate. Now, I want to try MyBatis. In this article, I’ll tell you how to useMyBatis with Spring MVC.
According to Wikipedia, database transactions should provide an “all-or-nothing” proposition, stating that each work-unit performed in a database must either be completed in its entirety or have no effect whatsoever. Further, the system must isolate each transaction from other transactions, results must conform to existing constraints in the database, and transactions that complete successfully must get written to durable storage.
A few days ago, I created TestZilla on Aliyun Elastic Compute Service.
However, with the increment of PV, I decided to use CDN to cache static files(images, CSS, and javascript).
But there’s no information on how to use CDN with Spring MVC, so I asked a question on StackOverflow.
Setup Spring Configuration First of all, you need to use PropertyPlaceholderConfigurer in Spring Configuration(such as dispatcher-servlet.xml)
<!-- Property File Location --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:/testzilla.properties</value> </list> </property> </bean> <util:properties id="propertyConfigurer" location="classpath:/testzilla.properties"/> <context:property-placeholder properties-ref="propertyConfigurer" /> Of course, you need to add XML Namespaces: