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.demo; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.List; | |
import org.apache.oro.text.regex.MalformedPatternException; | |
import org.apache.oro.text.regex.MatchResult; | |
import org.apache.oro.text.regex.Pattern; | |
import org.apache.oro.text.regex.PatternCompiler; |
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.text.DecimalFormat; | |
import java.text.NumberFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
public class MyEclipseCrack { | |
public static final void main(String[] args) { | |
String id = "binjoo";// 改为你的注册ID | |
String num = "428";// 改为1-999的整数 | |
String date = "-1404280";// 意思是2014年4月28日到期 |
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.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
/** | |
* 【转】URL短地址压缩算法 微博短地址原理解析 | |
* http://www.cnblogs.com/jinzhao/archive/2012/04/08/2437188.html | |
* | |
*/ | |
public class ShortUrl { | |
public static String[] generateCode(String url) { |
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
/** | |
* 从EXECL中拷贝多行数据,粘贴至HTML INPUT控件中。 | |
* event 用户键盘操作对象 | |
* obj 被粘贴的控件对象 | |
* num 第几行 | |
**/ | |
function copyValue(event, obj ,num){ | |
if (event != null && event.ctrlKey && event.keyCode == 86) { | |
var text = window.clipboardData.getData("Text"); | |
var input = document.getElementsByName(obj.name); |
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
@echo On | |
@Rem 删除SVN版本控制目录 | |
@PROMPT [Com] | |
@for /r . %%a in (.) do @if exist "%%a\.svn" rd /s /q "%%a\.svn" | |
@Rem for /r . %%a in (.) do @if exist "%%a\.svn" @echo "%%a\.svn" | |
@echo Clear SVN Mission Completed. | |
@echo On |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>JQuery Flickr Loading Animation</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
var wwidth = $(window).width(); | |
var bluewidth = $("#shapeblue").width(); |
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
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
-- ============================================= | |
-- Author:<liangjian> | |
-- Create date: <2012-11-02> | |
-- Description: <删除远程表,并且将本地数据同步拷贝到远程表中。> | |
-- args1 : 数据库表名,多个用半角逗号分开 wh_location,wh_storehouse,wh_area |
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
public class UtilTools { | |
/*************************************************************************** | |
* 将花费的时间转换为自然语言描述。 | |
* | |
* @param ms | |
* @return | |
*/ | |
public static String getTimeDes(long ms) { | |
int ss = 1000; | |
int mi = ss * 60; |
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
public class Test { | |
public static void main(String[] args) { | |
int[] a = new int[100000000]; | |
for (int i = 0; i < a.length; i++) { | |
a[i] = (int) (Math.random() * 10); | |
} | |
int[] b = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | |
long start = System.currentTimeMillis(); | |
for (int i = 0; i < a.length; i++) { | |
b[a[i]] += 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
<script language="javascript"> | |
/* | |
* 写成类的方法格式如下:str.trim() | |
*/ | |
String.prototype.trim=function(){ //删除左右两端的空格 | |
return this.replace(/(^\s*)|(\s*$)/g, ""); | |
} | |
String.prototype.ltrim=function(){ //删除左边的空格 | |
return this.replace(/(^\s*)/g,""); | |
} |