Skip to content

Instantly share code, notes, and snippets.

View can-can's full-sized avatar
:shipit:
vibe coding

C.C. can-can

:shipit:
vibe coding
View GitHub Profile
@can-can
can-can / ChineseNumberConverter.java
Created January 23, 2016 04:56
convert international number to Chinese number
import java.util.Stack;
/**
* <p>把阿拉伯数字转换成中文数字
* <p>只支持到亿吧,后面单位我也不清楚 兆在大陆是百万,在台湾是万亿
* <p>暂时只支持整数把,小数用不到
*
* 通过分析中文数字的读法可以发现如下规则:
* 0.从左到右看作是从高位到低位
* 1.中文数字以万分组,即十亿表示为10,0000,0000 对应 英文中用千分组,即十亿表示为 1,000,000,000
import java.util.Locale;
public class LocaleTest{
public static void main(String[] args){
System.out.println(Locale.getDefault());
}
}
@can-can
can-can / automerge.sh
Last active May 27, 2016 01:50
自动从 trunk merge develop 并在develop上skip trunk的提交
#!/usr/bin/env sh
#项目的目录
baseDir=$1
#项目的svn trunk目录
mergingDir=$2
#项目的svn develop目录
mergedDir=$3
#在trunk上提交时的comment
commitComment=$4
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/>
</parent>