webmark

Git

CS Visualized: Useful Git Commands

Learn git concepts, not commands

了解 Git 的工作方式,而不仅仅是了解命令

Learn the workings of Git, not just the commands

开源分布式版本控制工具 —— Git 之旅

Git 改变了分布式 Web 开发规则

Git 分支管理最佳实践

面向 Subversion 用户的 Git,第 2 部分: 实施控制

java

Java 9 新特性概述
https://www.ibm.com/developerworks/cn/java/the-new-features-of-Java-9/index.html

Java 10
https://www.ibm.com/developerworks/cn/java/j-5things17/index.html

局部变量类型推断是一个充满争议的热门话题,但 Java 10 为 JVM 中的垃圾收集和容器感知带来了一些受欢迎的改变。

Creating DSLs in Java, Part 1: What is a domain-specific language?
Learn DSL concepts and where they’re used in real-world programming
https://www.javaworld.com/article/2077865/core-java/core-java-creating-dsls-in-java-part-1-what-is-a-domain-specific-language.html

Apple Push Notification with Java Spring Framework

Why Kotlin is my next programming language

ElasticSearch
https://www.elastic.co/cn/

Spring

Spring Framework 5 中的新特性

Exploring Micro-frameworks: Spring Boot
https://www.infoq.com/articles/microframeworks1-spring-boot

Spring Boot with Docker

Running Spring Boot in a Docker Container

Rod Johnson Discusses Spring 3.0

DL

TensorFlow 的主要优势在于分类和推理。
例如,Google 在 TensorFlow 中实现了 RankBrain,
这是对 Google 搜索结果进行排序的引擎。

了解您的深度学习框架,第 1 部分
Keras 入门
探究此基于 Python 的深度学习库
https://www.ibm.com/developerworks/cn/cognitive/library/cc-get-started-keras/index.html

了解您的深度学习框架,第 2 部分
PyTorch 入门
了解这个原生 Python 包如何在 Python 中重新设计和实现 Torch
https://www.ibm.com/developerworks/cn/cognitive/library/cc-get-started-pytorch/index.html

了解您的深度学习框架,第 3 部分
Deeplearning4j 入门
探究此基于 Python 的深度学习库
https://www.ibm.com/developerworks/cn/cognitive/library/cc-get-started-deeplearning4j/index.html

了解您的深度学习框架,第 4 部分
TensorFlow 入门
探索这个用于机器学习的开源库
https://www.ibm.com/developerworks/cn/cognitive/library/cc-get-started-tensorflow/index.html

CSS

Bulma

https://bulma.io/

Bulma is a free and open source CSS framework based on Flexbox.

比Bootstrap更轻量化、更易用的框架

其他

理解OAuth 2.0
http://www.ruanyifeng.com/blog/2014/05/oauth_2_0.html

Practical MQTT with Paho
https://www.infoq.com/articles/practical-mqtt-with-paho

Authentication Strategies in Microservices Systems

七牛CEO许式伟:服务端开发那些事儿

http://todomvc.com

电商网站的初期技术选型

架构其实是妥协的结果,受投入、团队技术水平多方面影响的,够用就好。

人是最重要的,有个靠谱的CTO其实已经成功了一大半,CTO的经验决定了未来产品的技术栈啊。

http://linphone.org

Linphone is an open source Voice Over IP phone (or SIP phone) that makes possible to communicate freely with people over the internet, with voice, video, and text instant messaging.

The steady rise of GraphQL

GitHub is moving to GraphQL for v4 of our API because it offers significantly more flexibility for our integrators.

RESTful API Design Tips from Experience

Force Expiring of JWTs with Refresh Tokens

https://learn-anything.xyz/

An open source search engine that will help you learn pretty much anything

The Future of App Development: Beyond Prototypes

“Why do I have to spend all this time doing the same thing over and over again?”

Why waste a bunch of time and money to get a product developed when you can produce something that “feels” real and get feedback on it with a prototype?

For example, we spend a lot of time on prototypes to get user feedback, but they still don’t allow teams to use them as the basis for development.

加密

Elliptic curve cryptography,缩写为ECC

ECC的主要优势是在某些情况下它比其他的方法使用更小的密钥——比如RSA加密算法——提供相当的或更高等级的安全。ECC的另一个优势是可以定义群之间的双线性映射,基于Weil对或是Tate对;双线性映射已经在密码学中发现了大量的应用,例如基于身份的加密。不过一个缺点是加密和解密操作的实现比其他机制花费的时间长。

hexo

Deploy HEXO to Github

When Hexo static site meets GitHub pages and Travis CI

Hexo 是台灣人寫的、速度比 Octopress 快、default 支援 GitHub Flavored Markdown
Hexo 是一個 static site generator

Hexo is a fast, simple and powerful blog framework. You write posts in Markdown (or other languages) and Hexo generates static files with a beautiful theme in seconds.

Hexo, Github Pages, CloudFlare, SSL : Holy Shit

Hexo Tutorial — How to have a nice static files blog and drop wordpress

web

iScroll

Smooth scrolling for the web
https://github.com/cubiq/iscroll

iScroll, smooth scrolling for the web
http://iscrolljs.com/

Matteo Spinelli’s Cubiq.org
http://cubiq.org/iscroll-5

RH

Riemann Zeta Function
https://github.com/math-io/riemann-zeta

riemann.js
https://github.com/chroniton/riemann.js
An implementation of the Riemann Zeta function and a colorwheel graph generator.

An electro-mechanical investigation of the Riemann zeta function in the critical strip
http://projecteuclid.org/euclid.bams/1183511148

Java-Riemann-Zeta-Function
https://github.com/md100play/Java-Riemann-Zeta-Function

Java utility for calculating the Riemann Zeta function for arbitrary values

Calculations of Riemann zeta function
https://github.com/anotherstickman/riemann-zeta-fast-calc

RiemannZetaEstimation
https://github.com/hhartwell/RiemannZetaEstimation

small toy program to estimate the Riemann-Zeta function

ZetaBeta
https://github.com/dhrushilbadani/ZetaBeta
A novel algorithm that calculates the value of the Riemann Zeta function (if the input is even) or the Dirichlet Beta function (if the input is even). Designed in Java.

Riemann Zeta
https://github.com/Orangalo/RiemannZeta
Riemann Zeta Function Calculator

FFmpeg

Download FFmpeg for Windows
http://ffmpeg.zeranoe.com/builds/win64/static/
http://ffmpeg.zeranoe.com/builds/

Basic commands to FFmpeg

  • $ ffmpeg -h
  • $ ffmpeg -h long
  • $ ffmpeg -h full
  • $ ffmpeg -formats
  • $ ffmpeg -codecs

Using ffmpeg to get video informations

To get information about a file (say video.mp4), run the following command. Remember you have to specify an ouput file, but in this case we only want to get some information about the input file.

$ ffmpeg -i movie.mp4 -hide_banner

Great Software: FFmpeg

Fabrice Bellard is one of the modern computer science greats. He created FFmpeg, an indispensable tool for audio and video conversion.

memo1st

mysql

Generate random string in MySQL

1
2
SELECT SUBSTRING(MD5(RAND()) FROM 1 FOR 6) AS password
SELECT LEFT(UUID(), 8);

mysql忽略主键冲突、避免重复插入的几种方式

方案一:使用 ignore 关键字
方案二:使用 replace into
方案三:ON DUPLICATE KEY UPDATE
方案一:使用 ignore 关键字

Linux

查看版本信息

1
2
3
cat /proc/version
lsb_release -a
cat /etc/issue

Java

Spring

Dynamic DataSource Routing
https://spring.io/blog/2007/01/23/dynamic-datasource-routing/

web

Web 是一个巨大的技术堆栈。实际上,您访问的每个网站都是库、语言与 Web 框架的一种独特组合。

跨域

同源策略

同源策略是浏览器上为安全性考虑实施的非常重要的安全策略

URL由协议、域名、端口和路径组成,如果两个URL的协议、域名和端口相同,则表示他们同源

浏览器的同源策略,限制了来自不同源的”document”或脚本,对当前”document”读取或设置某些属性。从一个域上加载的脚本不允许访问另外一个域的文档属性。在浏览器中,<script>、<img>、<iframe>、<link>等标签都可以加载跨域资源,而不受同源限制,但浏览器限制了JavaScript的权限使其不能读、写加载的内容。

Ajax跨域

Ajax (XMLHttpRequest)请求受到同源策略的限制。
如果我们又想利用XMLHTTP的无刷新异步交互能力,又不愿意公然突破Javascript的安全策略,可以选择的方案就是给XMLHTTP加上严格的同源限制。XMLHTTP则根本上限制了跨域请求的提交。

JSONP

JSONP就是利用<script>标签的跨域能力实现跨域数据的访问,请求动态生成的JavaScript脚本同时带一个callback函数名作为参数。其中callback函数本地文档的JavaScript函数,服务器端动态生成的脚本会产生数据,并在代码中以产生的数据为参数调用callback函数。当这段脚本加载到本地文档时,callback函数就被调用。

JSON

JSON.stringify() 方法

可以将任意的 JavaScript 值序列化成 JSON 字符串

JSON.parse()

解析JSON字符串, 可以选择改变前面解析后的值及其属性,然后返回解析的值。

工具

Fiddler

一个http调试代理,可用于手机app开发的真机抓包
Tools -> Fiddler Options…-> Connections页签,选中Allowremote computers to connect

LLVM

LLVM编译环境是一个集合项目,为面向C或基于C的语言提供新一代高效易用的虚拟机环境。LLVM起源于2000年伊利诺伊大学发起的开源项目,起先主要在学术研究领域中有所应用。在2005年,Apple为LLVM提供了支持以帮助其发展,并保持LLVM与Xcode良好的兼容性,使其成为一个开发者易于使用的编译器。相比较传统的GCC,LLVM的设计更为现代化和模块化。LLVM为开发者提供了中间代码和编译基础设施,并且LLVM能够与IDE紧密地交互和集成,作为IDE的底层支撑基础,为代码补全、重构等功能提供辅助,同时在程序编译、连接、运行环境执行过程中实现全新的编译优化策略。值得一提的是,LLVM还提供了很多编译器以外的辅助工具,如对代码进行静态检查并生成HTML格式的分析报告等。

LLVM将编译器的许多优秀机制模块化,人们可以根据自己的语言、处理器、运行平台等需要,为自身应用定制编译器,在恰当的时机,快速地获得高性能的编译结果(Bitcode),然后链接其他编译结果或库,获得性能、资源使用效率、兼容性兼备的可执行代码。

工作流引擎

Flowable runs on a JDK higher than or equal to version 7.

The Java BPM Engine
http://www.flowable.org

https://github.com/flowable
当年JBMP的主创Tom已经离开Alfresco多年,后辈们也开始步前人后尘。Tijs Rademakers、Joram Barrez等Activiti的原班核心人马,由于与Alfresco公司在项目的未来发展方向上出现分歧,于是选择集体出走,创建了Flowable,并且将第一个版本定义为5.22,而且在两周前发布了6.0版本!要知道,Activiti当前版本依然还是5.22,6.0处于Beta阶段。

flowable是activiti的原班核心人员从activiti分离出来的一套工作流引擎(这和activiti的诞生如出一辙),其核心是超快速、稳定的BPMN2流程引擎,易于与 Spring集成使用。简单一句话:Flowable是activiti的升级版.

规则引擎

Why should I use Drools?

A system that needs a rules engine will have complex business logic.

How do I program using Drools?

Drools Rule Engine 初探

faq pearls

miscellaneous

excel简单统计

  • excel重复列统计:COUNTIF(B$2:B2,B2)
  • 统计大于等于5的单元格个数:countif(A1:A10,”>=5”)

Windows命令

查看文件的MD5/SHA1/SHA256

  • certutil -hashfile yourfilenameaddress MD5
  • certutil -hashfile yourfilenameaddress SHA1
  • certutil -hashfile yourfilenameaddress SHA256

Verifying the MD5 Checksum

  • shell> md5sum mysql-standard-5.7.11-linux-i686.tar.gz
  • shell> md5.exe mysql-installer-community-5.7.11.msi

网络

查看端口占用

  1. netstat -aon|findstr “port”
  2. tasklist|findstr “pid”

netsh

  1. netsh interface show interface 显示接口

iOS

APNs

如果收不到 Apple 推送通知

  • TCP 端口 5223,用于与 APNs 通信。
  • TCP 端口 2195,用于向 APNs 发送通知。
  • TCP 端口 2196,用于 APNs 反馈服务。
  • TCP 端口 443,需要在设备激活过程中使用,以及之后当设备无法通过端口 5223 连接 APNs 时用于回退(只能通过 Wi-Fi)。

请与您的网络管理员核实,确保可以访问这些端口。
APNs 服务器使用负载平衡,因此您的设备不会始终连接到用于通知的同一公共 IP 地址。最好允许您的设备在整个 17.0.0.0/8 地址块(已分配给 Apple)范围内访问这些端口。

Apple 软件产品所使用的 TCP 和 UDP 端口

  • 2195 TCP Apple 推送通知服务 (APNS) — — 推送通知
  • 2196 TCP Apple 推送通知服务 (APNS) — — 反馈服务
  • 5223 TCP Apple 推送通知服务 — — iCloud DAV 服务(通讯录、日历、书签)、APNS、FaceTime、Game Center、照片流、回到我的 Mac

database

mysql

add user

1
2
3
4
CREATE USER 'usr'@'localhost' IDENTIFIED BY 'pwd';
flush privileges;
grant select,insert,update,delete,create,drop on tang_poetry.* to usr@localhost identified by 'pwd';
flush privileges;

load data

  • LOAD DATA INFILE Syntax: load data local infile ‘D:\data.txt’ into table exceltomysql fields terminated by ‘\t’;
  • LOAD XML Syntax: LOAD XML LOCAL INFILE ‘C:/data.xml’ INTO TABLE tb ROWS IDENTIFIED BY ‘‘;

npm

  • 升级你的 npm 到最新版本:npm install npm -g
  • npm install packge-name –save:会修改package.json
  • npm install参数的区别
    • save 会在package.json的dependencies属性下添加
    • save-dev 会在package.json的devDependencies属性下添加
    • 运行时需要用到的包使用save,否则使用save-dev

正则表达式

  • 用于匹配数字之间的空格: {1}(?=\d+)
  • \r\n 匹配空行

Java

Eclipse选择JDK

在eclipse.ini中加入

1
2
-vm
C:\Program Files (x86)\Java\jdk1.6.0_45\bin\javaw.exe