This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| public enum City implements BaseEnum { | |
| /** | |
| * 北京 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.hibernate.Criteria; | |
| import org.hibernate.HibernateException; | |
| import org.hibernate.criterion.CriteriaQuery; | |
| import org.hibernate.criterion.Order; | |
| /** | |
| * Created by veryyoung on 2015/5/7. | |
| * Extends {@link org.hibernate.criterion.Order} to allow ordering by an SQL formula passed by the user. | |
| * Is simply appends the <code>sqlFormula</code> passed by the user to the resulting SQL query, without any verification. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sh /data/tomcat8/bin shutdown.sh | |
| cd /data/source && git pull origin branch | |
| mvn clean package -Dmaven.test.skip=true | |
| sh /data/tomcat8/bin startup.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.nio.channels.FileChannel; | |
| public class FileGathering { | |
| public static void main(String[] args) throws IOException { | |
| combineFiles(args); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO `pp_common_city` (city_code, city_name, area_code, pinyin, simple_pinyin, city_type) VALUES ('110000', '北京市', '010', 'beijing', 'bj', 'PROVINCE'); | |
| INSERT INTO `pp_common_city` (city_code, city_name, area_code, pinyin, simple_pinyin, city_type) VALUES ('120000', '天津市', '022', 'tianjin', 'tj', 'PROVINCE'); | |
| INSERT INTO `pp_common_city` (city_code, city_name, area_code, pinyin, simple_pinyin, city_type) VALUES ('310000', '上海市', '021', 'shanghai', 'sh', 'PROVINCE'); | |
| INSERT INTO `pp_common_city` (city_code, city_name, area_code, pinyin, simple_pinyin, city_type) VALUES ('500000', '重庆市', '023', 'zhongqing', 'zq', 'PROVINCE'); | |
| INSERT INTO `pp_common_city` (city_code, city_name, area_code, pinyin, simple_pinyin, city_type) VALUES ('130000', '河北省', '', 'hebei', 'hb', 'PROVINCE'); | |
| INSERT INTO `pp_common_city` (city_code, city_name, area_code, pinyin, simple_pinyin, city_type) VALUES ('140000', '山西省', '', 'shanxi', 'sx', 'PROVINCE'); | |
| INSERT INTO `pp_common_city` (city_code, city_name, area_code, pinyin, simpl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/Bash | |
| # config in crontab 30 23 | |
| # 30 23 * * * sh /root/backup/backup.sh>>/root/backup/backup.log | |
| DB_USER='root' | |
| DB_PASSWORD='' | |
| DB_NAME='test' | |
| BACKDIR='/root/backup' | |
| currentDate=`date +%F` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/sh/bash | |
| ### | |
| ### 查询当日 uv, 接收 yyyyMMdd 格式的参数, 默认日期为今天 | |
| ### | |
| LOG_PATH='/var/log/nginx/' | |
| FILE_PREFIX='access.log-' | |
| date=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/sh/bash | |
| ### | |
| ### 查询当月 uv, 接收 yyyyMMdd 格式的参数, 默认月份为当月 | |
| ### | |
| LOG_PATH='/var/log/nginx/' | |
| FILE_PREFIX='access.log-' | |
| month=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/sh/bash | |
| ### | |
| ### 查询当月的每日 uv 详情, 接收 yyyyMMdd 格式的参数, 默认月份为当月 | |
| ### | |
| LOG_PATH='/var/log/nginx/' | |
| FILE_PREFIX='access.log-' | |
| month=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main(void) { | |
| int nums[] = {1, 2, 3 , 4, 5}; | |
| int length = sizeof(nums) / sizeof(nums[0]); | |
| for(int i=0; i<length; i++){ | |
| printf("%d,", nums[i]); | |
| } | |
| printf("%c", 8); | |
| return 0; |
OlderNewer