This file contains 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
/** | |
* CODETANK | |
* Copyright (c) 2012, Tencent AlloyTeam, All rights reserved. | |
* http://CodeTank.AlloyTeam.com/ | |
* | |
* @version 1.0 | |
* @author AlloyTeam | |
* | |
* .d8888b. 888 88888888888 888 TM | |
* d88P Y88b 888 ''''888'''' 888 |
This file contains 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
package net.binjoo; | |
import java.io.File; | |
public class UpdateMp3Name { | |
public static void main(String[] args) { | |
String oldPath = "E:\\BaiduMusic\\Songs"; | |
File file = new File(oldPath); | |
File[] files = file.listFiles(); |
This file contains 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
/* | |
* Amount2RMB.java 2008-6-15 | |
*/ | |
package test; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Amount2RMB { | |
private static final Pattern AMOUNT_PATTERN = |
This file contains 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.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class HTMLSpirit{ | |
public static String delHTMLTag(String htmlStr){ | |
String regEx_script="<script[^>]*?>[\\s\\S]*?<\\/script>"; //定义script的正则表达式 | |
String regEx_style="<style[^>]*?>[\\s\\S]*?<\\/style>"; //定义style的正则表达式 | |
String regEx_html="<[^>]+>"; //定义HTML标签的正则表达式 | |
Pattern p_script=Pattern.compile(regEx_script,Pattern.CASE_INSENSITIVE); |
This file contains 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
/** | |
* 生成随机字符串 | |
* | |
* @access public | |
* @param integer $length 字符串长度 | |
* @param string $specialChars 是否有特殊字符 | |
* @return string | |
*/ | |
public static function randString($length, $specialChars = false) { | |
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
This file contains 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
Windows Registry Editor Version 5.00 | |
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Sublime Text 2] | |
[-HKEY_CLASSES_ROOT\*\shell\Sublime Text 2] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Sublime Text 2] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\Sublime Text 2\command] | |
@="D:\\微云网盘\\105871875\\Soft\\SublimeText2\\sublime_text.exe \"%1\"" |
This file contains 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
package net.binjoo.wechat; | |
import java.io.IOException; | |
import java.util.Arrays; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
This file contains 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.BufferedInputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.util.zip.CRC32; | |
import java.util.zip.CheckedOutputStream; | |
import org.apache.tools.zip.ZipEntry; | |
import org.apache.tools.zip.ZipOutputStream; |
This file contains 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
package com.utils; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
/*** | |
* | |
* @ClassName CopyUtils |
This file contains 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
/** | |
* 对Date的扩展,将 Date 转化为指定格式的String | |
* 月(M)、日(d)、12小时(h)、24小时(H)、分(m)、秒(s)、周(E)、季度(q) 可以用 1-2 个占位符 | |
* 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) | |
* eg: | |
* (new Date()).pattern("yyyy-MM-dd hh:mm:ss.S") ==> 2007-07-02 08:09:04.423 | |
* (new Date()).pattern("yyyy-MM-dd E HH:mm:ss") ==> 2007-03-10 二 20:09:04 | |
* (new Date()).pattern("yyyy-MM-dd EE hh:mm:ss") ==> 2007-03-10 周二 08:09:04 | |
* (new Date()).pattern("yyyy-MM-dd EEE hh:mm:ss") ==> 2007-03-10 星期二 08:09:04 | |
* (new Date()).pattern("yyyy-M-d h:m:s.S") ==> 2007-7-2 8:9:4.18 |