1 application.properties 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 import org.springframework.beans.factory.annotation.Value; import com.alibaba.fastjson.JSONObject; import org.apache.http.entity.ContentType; class MessageRestController { @Value("${restService_url: default_url}") private String url; @RequestMapping("/message") String getMessage() { CloseableHttpClient httpClient = HttpClients.createDefault(); String body; if (param instanceof String) { body = (String) param;
Spring Context
1 applicationContext.xml 1 <context:component-scan base-package="org.example"/> Classpath scanning and managed components
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/> </bean> <tx:annotation-driven transaction-manager="txManager"/> <tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="create*" propagation="REQUIRED" timeout="300" rollback-for="java.lang.Exception" /> <tx:method name="delete*" propagation="REQUIRED" timeout="300" rollback-for="java.lang.Exception" /> <tx:method name="update*" propagation="REQUIRED" timeout="300" rollback-for="java.lang.Exception" /> <tx:method name="get*" propagation="REQUIRED" read-only="true" timeout="300" /> <tx:method name="*" propagation="REQUIRED" read-only="true" timeout="300" rollback-for="java.
Spring Practice
vo 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 package com.someapp.vo; public class UserVO { private int id; private String username; private String hashedPassword; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.
Link custom domain to Github pages
Register Domain Name All you need is one domain name, and everything else can live as a subdomain off it.
For long-term, I’d suggest Cloudflare. At least for now there is no price gouging and yearly costs stay the same.
Cloudflare Registrar
Cloudflare sell domains at the Registry cost price.
You are forced to use Cloudflare DNS. I didn’t even notice this because I would use their DNS anyway since their free tier is awesome imo.
read open source
Awesome project lists using Gin web framework: gorush: A push notification server written in Go. fnproject: The container native, cloud agnostic serverless platform. photoprism: Personal photo management powered by Go and Google TensorFlow. krakend: Ultra performant API Gateway with middlewares. picfit: An image resizing server written in Go. gotify: A simple server for sending and receiving messages in real-time per web socket. cds: Enterprise-Grade Continuous Delivery & DevOps Automation Open
flink
Reference Apache Flink Documentation
Apache Flink 1.10 Documentation
The Flink Ecosystem: A Quick Start to PyFlink
Apache Flink Web Dashboard
PyFlink: Introducing Python Support for UDFs in Flink’s Table API
flink-playgrounds
Stream Compute Service
Hive Tutorial
Hive is a data warehousing infrastructure based on Apache Hadoop.
Hive is not designed for online transaction processing. It is best used for traditional data warehousing tasks.
Getting Started Set up Hadoop and Hive using Docker Pull Hadoop Docker Image:
1 docker pull sequenceiq/hadoop-docker Run a single-node Hadoop Container:
1 docker run -dit --name hadoop --privileged=true -p 50070:50070 -p 8088:8088 -p 9000:9000 sequenceiq/hadoop-docker /etc/bootstrap.sh -bash Verify that Hadoop is running by executing Hadoop commands such as:
Map Reduce
Python 内置的map和reduce (groupby) 两个函数,在单机单核下运行的,在微线程下运行的,而且这两个函数是所有函数式编程必备的两个函数。 计算模型Map/
Cloud Computing
Introduction and Course Logistics Data Analytics Big Data Analytics Elasticity and Auto Scaling Containers and Kubernetes Serverless Computing and Functions-as-a-Service Flat Files and Databases & Team Project Social Network, Heterogenous Storage and DBaaS & Team Project Replication and Consistency and Team Project Phase 1 Team Project Phase 1 Iterative Batch Processing in Spark and Team Project Phase 2 Team Project Phase 2 and Live Test Machine Learning on the Cloud and Team Project Phase 3 Team Project Phase 3 and Live Test Stream Processing with Kafka & Samza Reference https://www.
Introduction to Cloud Infrastructure Technologies
Chapter 1. Virtualization Introduction and Learning Objectives Introduction to Cloud Computing and Technologies Historically, the word cloud was used as a metaphor for Internet. Later on, it was used to depict the Internet in computer network diagrams. To find out more about the origin of the cloud, you can take a look at the details provided on Wikipedia.
Cloud computing can be referred as the allocation of resources on the cloud.
Hackintosh Install Full Guide
Step 0: Preparation You will need a computer running macOS already to follow this guide. If you do not have a Mac you will need to spend some time setting up a virtual machine on your Windows/Linux PC first.
vmware workstation vmware macos unlocker workstation unlocker: https://github.com/paolo-projects/unlocker.git Download macOS Catalina Image file for VMWare Step 1: Download macOS Catalina Download Catalina 10.15 from the Mac App Store
For machines that need a specific OS release or can’t download from the App Store, you can use the gibMacOS utility.
Algorithms
算法和数据结构 122.已知: 1 2 AList = [1,2,3] BSet = {1,2,3} (1) 从 AList 和 BSet 中 查找 4,最坏时间复杂度那个大? (2) 从 AList 和 BSet 中 插入 4,最坏时间复杂度那个大? 123.用 Python
machine learning
说一下什么是决策树,决策树可以解决什么问题 ID3,C4.5和CART三个有什么区别呢 项目中用到的XGBoost的原理是什么?为什么项目选择用
Python Algorithms
二分查找 1 2 3 4 5 6 7 8 9 10 11 12 13 def binary_search(array, target): lower, upper = 0, len(array) while lower < upper: mid = lower + (upper - lower) // 2 val = array[mid] if target == val: return mid elif target > val: if lower == mid: break lower = mid elif target < val: upper = mid 插入排序
Logging
ELK stack
Spring
import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.DefaultTransactionDefinition;
import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.util.ClassUtils;
import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.ReflectionUtils; import org.springframework.util.StringUtils;
The Java 3rd Library
import org.alibaba.fastjson.JSONArray; import org.alibaba.fastjson.JSONObject; import com.amazonaws.Request; import com.amazonaws.utils.StringUtils; import com.atomikos.datasource.xa.StringUtils;
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.core.io.JsonStringEncoder; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache;
import com.google.gson.Gson;
import com.ibm.db2.jcc.am.re;
import com.jayway.restassured.RestAssured; import com.jayway.restassured.path.json.JsonPath; import com.jayway.restassured.config.RestAssuredconfig; import com.jayway.restassured.response.Response; import com.jayway.restassured.response.ValidatableResponse; import com.jayway.restassured.specification.RequestSpecification;
import freemarker.template.Template; import freemarker.template.TemplateException;
import groovy.json.internal.JsonFastParser; import groovy.json.internal.ValueMap;
The Java 3rd Library
import org.apache.ws.security.WSSecurityException; import org.apache.ws.security.util.Base64;
The Java 3rd Library
net.sf.json JSONArray JSONNull JSONObject org.activiti.engine https://blog.csdn.net/fanxiangru999/article/details/79381966?utm_medium=distribute.wap_relevant.none-task-blog-baidulandingword-1 commons beanutils BeanUtils; collection CollectionUtils collections CollectionUtils httpclient DefaultHttpMethodRetryHandler HttpClient; HttpException HttpMethod; HttpStatus; NameValuePair; UsernamePasswordCredentials URIException; methods GetMethod; PostMethod; PutMehod RequestEntity StringRequestEntity; .HttpConnectionManagerParams; params. HttpMethodParams; io FileUtils Lang ClassUtils; StringUtils; EqualsBuilder HashCodeBuilder time DateUtils StopWatch lang3 BooleanUtils StringUtils time DateFormatUtils org.apache.http.client.H
The Java 3rd Library
net.sf.json JSONArray JSONNull JSONObject org.activiti.engine https://blog.csdn.net/fanxiangru999/article/details/79381966?utm_medium=distribute.wap_relevant.none-task-blog-baidulandingword-1 commons beanutils BeanUtils; collection CollectionUtils collections CollectionUtils httpclient DefaultHttpMethodRetryHandler HttpClient; HttpException HttpMethod; HttpStatus; NameValuePair; UsernamePasswordCredentials URIException; methods GetMethod; PostMethod; PutMehod RequestEntity StringRequestEntity; .HttpConnectionManagerParams; params. HttpMethodParams; io FileUtils Lang ClassUtils; StringUtils; EqualsBuilder HashCodeBuilder time DateUtils StopWatch lang3 BooleanUtils StringUtils time DateFormatUtils org.apache.http.client.H