Skip to content

Instantly share code, notes, and snippets.

View GuoJing's full-sized avatar
🎯
Focusing

GuoJing GuoJing

🎯
Focusing
View GitHub Profile
@GuoJing
GuoJing / film_clean.py
Created November 16, 2020 02:27 — forked from zhongql/film_clean.py
时间计算
import sys
def calculate(params, tm):
ex_stack = []
tmp = []
mutil = []
for p in params:
if (not p):
continue
@GuoJing
GuoJing / ProcessDefinitionGeneratorEx.java
Created December 11, 2017 11:29 — forked from winse/ ProcessDefinitionGeneratorEx.java
根据Activiti的processInstanceId得到流程图,高亮当前执行中的流程。 与官方提供的不同,该类仅仅是在原图的基础上添加高亮。这样可以不需要考虑汉字乱码的问题。
package com.winse.activiti.util;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
@GuoJing
GuoJing / README.md
Created May 31, 2016 03:09 — forked from majek/README.md
Passing TCP socket descriptors around

Passing TCP socket descriptors around

In linux, normally, it is impossible to "bind()" to the same TCP port twice. If you try to bind to the same port from second proces unix processes you'll see:

socket.error: [Errno 98] Address already in use

if (typeof (AC) === "undefined") {
AC = {}
}
AC.ImageReplacer = Class.create({
_defaultOptions: {
listenToSwapView: true,
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i,
filenameInsert: "_☃x",
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i,
attribute: "data-hires",