code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
package com.zgm.tdd.third._2; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Template { // private String value; private Map<String, String> variables; private String templateText; public Templa...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2/Template.java
Java
asf20
1,431
package com.zgm.tdd.third._2; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class TemplateParse { /*public List<String> parse(String template) { return Collections.singletonList(template); }*...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2/TemplateParse.java
Java
asf20
813
package com.zgm.tdd.third._2; public class MissingValueException extends RuntimeException { private static final long serialVersionUID = 8359072372925065055L; public MissingValueException(String message) { super(message); } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2/MissingValueException.java
Java
asf20
242
package com.zgm.tdd.third._2_4; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Template { // private String value; private Map<String, String> variables; private String templa...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_4/Template.java
Java
asf20
1,353
package com.zgm.tdd.third._2_4; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class TemplateParse { /*public List<String> parse(String template) { return Collections.singletonList(template); }*/ /*public List<String> ...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_4/TemplateParse.java
Java
asf20
2,225
package com.zgm.tdd.third._2_4; public class MissingValueException extends RuntimeException { private static final long serialVersionUID = 8359072372925065055L; public MissingValueException(String message) { super(message); } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_4/MissingValueException.java
Java
asf20
244
package com.zgm.tdd.third._2_5; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Template { // private String value; private Map<String, String> variables; private String templa...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_5/Template.java
Java
asf20
2,246
package com.zgm.tdd.third._2_5; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class TemplateParse { /*public List<String> parse(String template) { return Collections.singletonList(template); }*/ /*public List<String> ...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_5/TemplateParse.java
Java
asf20
2,225
package com.zgm.tdd.third._2_5; public class MissingValueException extends RuntimeException { private static final long serialVersionUID = 8359072372925065055L; public MissingValueException(String message) { super(message); } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_5/MissingValueException.java
Java
asf20
244
package com.zgm.tdd.third._2_3; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Template { // private String value; private Map<String, String> variables; private String templateText; public Temp...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_3/Template.java
Java
asf20
1,433
package com.zgm.tdd.third._2_3; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class TemplateParse { /*public List<String> parse(String template) { return Collections.singletonList(template); }*/ /*public List<String> ...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_3/TemplateParse.java
Java
asf20
2,225
package com.zgm.tdd.third._2_3; public class MissingValueException extends RuntimeException { private static final long serialVersionUID = 8359072372925065055L; public MissingValueException(String message) { super(message); } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_2_3/MissingValueException.java
Java
asf20
244
package com.zgm.tdd.third._3_2; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Template { // private String value; private Map<String, String> variables; private String templa...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_3_2/Template.java
Java
asf20
2,653
package com.zgm.tdd.third._3_2; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class TemplateParse { /*public List<String> parse(String template) { return Collections.singletonList(template); }*/ /*public List<String> ...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_3_2/TemplateParse.java
Java
asf20
2,638
package com.zgm.tdd.third._3_2; public class MissingValueException extends RuntimeException { private static final long serialVersionUID = 8359072372925065055L; public MissingValueException(String message) { super(message); } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_3_2/MissingValueException.java
Java
asf20
244
package com.zgm.tdd.third._3_2; import java.util.Map; public class VariableSegment implements Segment { private String name; public VariableSegment(String name) { this.name = name; } @Override public boolean equals(Object obj) { /*if (this == obj) { return true; } if (obj != nu...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_3_2/VariableSegment.java
Java
asf20
1,366
package com.zgm.tdd.third._3_2; import java.util.Map; public interface Segment { void appendTo(StringBuilder result, Map<String, String> variables); String evaluate(Map<String, String> variable); }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_3_2/Segment.java
Java
asf20
217
package com.zgm.tdd.third._3_2; import java.util.Map; public class PlainText implements Segment { private String text; public PlainText(String text) { this.text = text; } @Override public boolean equals(Object obj) { /*if (obj == null) { return false; } if (obj == this) { r...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_3_2/PlainText.java
Java
asf20
1,039
package com.zgm.tdd.third._1_3; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Template { // private String value; private Map<String, String> variables; private String templateText; public Temp...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_1_3/Template.java
Java
asf20
1,433
package com.zgm.tdd.third._1_3; public class MissingValueException extends RuntimeException { private static final long serialVersionUID = 8359072372925065055L; public MissingValueException(String message) { super(message); } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/third/_1_3/MissingValueException.java
Java
asf20
244
package com.zgm.tdd.fifth._2._1._1; import java.io.IOException; import java.io.PrintWriter; import java.util.Enumeration; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class EchoServlet extends HttpServlet { @Sup...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/fifth/_2/_1/_1/EchoServlet.java
Java
asf20
960
package com.zgm.tdd.second._2_2.first; public class Template { private String value; public Template(String templateText) { } public void set(String variable, String value) { this.value = value; } public String evaluate() { return "Hello, " + this.value; } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_2/first/Template.java
Java
asf20
290
package com.zgm.tdd.second._2_2.first; import org.junit.Assert; import org.junit.Test; public class TestTemplate { @Test public void oneVariable() throws Exception { Template template = new Template("Hello, ${name"); template.set("name", "Reader"); Assert.assertEquals("Hello, Reader", template....
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_2/first/TestTemplate.java
Java
asf20
551
package com.zgm.tdd.second._2_6; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Template { // private String value; private Map<String, String> variables; private String templateText; public Tem...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_6/Template.java
Java
asf20
1,434
package com.zgm.tdd.second._2_6; public class MissingValueException extends RuntimeException { private static final long serialVersionUID = 8359072372925065055L; public MissingValueException(String message) { super(message); } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_6/MissingValueException.java
Java
asf20
245
package com.zgm.tdd.second._2_4; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; public class Template { // private String value; private Map<String, String> variables; private String templateText; public Template(String templateText) { this.variables = new HashMap<Strin...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_4/Template.java
Java
asf20
1,059
package com.zgm.tdd.second._2_4; public class MissingValueException extends RuntimeException { }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_4/MissingValueException.java
Java
asf20
104
package com.zgm.tdd.second._2_5; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Template { // private String value; private Map<String, String> variables; private String templateText; public Tem...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_5/Template.java
Java
asf20
1,434
package com.zgm.tdd.second._2_5; public class MissingValueException extends RuntimeException { private static final long serialVersionUID = 8359072372925065055L; public MissingValueException(String message) { super(message); } }
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_5/MissingValueException.java
Java
asf20
245
package com.zgm.tdd.second._2_3; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; public class Template { // private String value; private Map<String, String> variables; private String templateText; public Template(String templateText) { this.variables = new HashMap<Strin...
zyr-test
trunk/zyr-test/src/com/zgm/tdd/second/_2_3/Template.java
Java
asf20
967
package com.zgm.md5; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * MD5 加密 */ public class MD5{ public static String getMD5Str(String str) { MessageDigest messageDigest = null; try { ...
zyr-test
trunk/zyr-test/src/com/zgm/md5/MD5.java
Java
asf20
1,224
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.deepUnderstandJVM.two; /** * * @author 周光明 Exp * @version $FileName: JavaVMStackOOM.java $Date: 2012-12-24 下午10:24:54 -0400 2012 * @since ...
zyr-test
trunk/zyr-test/src/com/zgm/deepUnderstandJVM/two/JavaVMStackOOM.java
Java
asf20
829
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.deepUnderstandJVM.two; /** * * @author 周光明 Exp * @version $FileName: JavaVMStackSOF.java $Date: 2012-12-24 下午10:14:43 -0400 2012 * @since ...
zyr-test
trunk/zyr-test/src/com/zgm/deepUnderstandJVM/two/JavaVMStackSOF.java
Java
asf20
768
package com.zgm.Lucene; import java.io.IOException; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.Hits; import org....
zyr-test
trunk/zyr-test/src/com/zgm/Lucene/TestQuery.java
Java
asf20
1,259
package com.zgm.Lucene; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.Date; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import or...
zyr-test
trunk/zyr-test/src/com/zgm/Lucene/TextFileIndexer.java
Java
asf20
2,434
package com.zgm.Lucene; import java.io.IOException; import java.io.StringReader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.standard.StandardAnalyzer; public class StandardAnalyzerTest...
zyr-test
trunk/zyr-test/src/com/zgm/Lucene/StandardAnalyzerTest.java
Java
asf20
1,046
package com.zgm.Lucene; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.Hits; import or...
zyr-test
trunk/zyr-test/src/com/zgm/Lucene/FSDirectoryTest.java
Java
asf20
1,864
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.one._3; /** * 三元操作符的类型务必一致 * * @author 周光明 Exp * @version $FileName: TernaryOperatorShouldBeConsistent.java $Date: 2...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/one/_3/TernaryOperatorShouldBeConsistent.java
Java
asf20
889
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.six._86; /** * * @author 周光明 Exp * @version $FileName: EnumTest.java $Date: 2012-5-6 下午9:23:22 -0400 2012 * @since 1.0 ...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/six/_86/EnumTest.java
Java
asf20
975
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.eight._114; /** * * @author 周光明 Exp * @version $FileName: Person.java $Date: 2012-5-10 下午9:34:56 -0400 2012 * @since 1.0...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/eight/_114/Person.java
Java
asf20
701
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.eight._114; import java.io.IOException; /** * * @author 周光明 Exp * @version $FileName: Sub2.java $Date: 2012-5-10 下午10...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/eight/_114/Sub2.java
Java
asf20
633
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.eight._114; import java.io.IOException; /** * * @author 周光明 Exp * @version $FileName: Base.java $Date: 2012-5-10 下午9:...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/eight/_114/Base.java
Java
asf20
538
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.eight._114; import java.io.IOException; /** * * @author 周光明 Exp * @version $FileName: Client.java $Date: 2012-5-10 下午...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/eight/_114/Client.java
Java
asf20
646
/* * Co pyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.eight._116; /** * * @author 周光明 Exp * @version $FileName: ExceptionOnlyServiceException.java $Date: 2012-5-12 * ...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/eight/_116/ExceptionOnlyServiceException.java
Java
asf20
1,456
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.eight._116; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; /** * * @autho...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/eight/_116/IfNotNeedExceptionDonotUseException.java
Java
asf20
1,259
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.eight._115; /** * * @author 周光明 Exp * @version $FileName: GetStackTraceFromThrowable.java $Date: 2012-5-12 下午10:04:57 -040...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/eight/_115/GetStackTraceFromThrowable.java
Java
asf20
933
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.eight._113; /** * * @author 周光明 Exp * @version $FileName: DonotReturnInFinally.java $Date: 2012-5-9 下午9:38:24 -0400 2012 ...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/eight/_113/DonotReturnInFinally.java
Java
asf20
1,570
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.two_27; /** * * @author 周光明 Exp * @version $FileName: Client.java $Date: 2012-5-2 下午10:36:46 -0400 2012 * @since 1.0 *...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/two_27/Client.java
Java
asf20
854
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._127_2; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent....
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_127_2/ReadLockAndWriteLockSeparate.java
Java
asf20
2,008
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._120; /** * * @author 周光明 Exp * @version $FileName: SafeStopThread.java $Date: 2012-5-13 上午11:55:38 -0400 2012 * @s...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_120/SafeStopThread2.java
Java
asf20
892
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._120; /** * * @author 周光明 Exp * @version $FileName: NotUseStopMethodToStopThread.java $Date: 2012-5-13 上午10:32:09 -04...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_120/NotUseStopMethodToStopThread.java
Java
asf20
1,920
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._120; /** * * @author 周光明 Exp * @version $FileName: SafeStopThread.java $Date: 2012-5-13 上午11:55:38 -0400 2012 * @s...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_120/SafeStopThread.java
Java
asf20
687
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._128.use_try_lock; /** * * @author 周光明 Exp * @version $FileName: ResourceA.java $Date: 2012-6-3 上午9:06:03 -0400 2012 ...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_128/use_try_lock/ResourceA.java
Java
asf20
883
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._128.use_try_lock; /** * * @author 周光明 Exp * @version $FileName: ResourceB.java $Date: 2012-6-3 上午9:08:34 -0400 2012 ...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_128/use_try_lock/ResourceB.java
Java
asf20
1,327
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._128.dead_lock; /** * * @author 周光明 Exp * @version $FileName: ResourceA.java $Date: 2012-6-3 上午9:06:03 -0400 2012 *...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_128/dead_lock/ResourceA.java
Java
asf20
880
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._128.dead_lock; /** * * @author 周光明 Exp * @version $FileName: ResourceB.java $Date: 2012-6-3 上午9:08:34 -0400 2012 *...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_128/dead_lock/ResourceB.java
Java
asf20
1,324
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._125; import java.util.concurrent.TimeUnit; /** * * @author 周光明 Exp * @version $FileName: IllegalThreadStateExce...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_125/IllegalThreadStateExceptionTest.java
Java
asf20
953
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._125; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * * @author 周光明 Exp...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_125/PreferenceUseThreadPool.java
Java
asf20
886
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._123; /** * <p> * volatile 只能保证线程能够获得最新值 ,不能保证数据是同步的 * </p> * * @author 周光明 Exp * @version $FileName: Vola...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_123/VolatileCannotEnsureDataSynchronization.java
Java
asf20
1,513
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._124; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent....
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_124/AsynchronizationConputeConsiderUseCallableInterface.java
Java
asf20
1,618
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._119; /** * * @author 周光明 Exp * @version $FileName: StopMethodIsNotDependableBeforeThreadStared.java $Date: 2012-5-13...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_119/StopMethodIsNotDependableBeforeThreadStared.java
Java
asf20
942
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._119; /** * * @author 周光明 Exp * @version $FileName: SpamMachine.java $Date: 2012-5-13 上午10:00:08 -0400 2012 * @sinc...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_119/SpamMachine.java
Java
asf20
492
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._122; /** * * @author 周光明 Exp * @version $FileName: UseExceptionHandlerToPromptSystemReliable.java $Date: 2012-5-13 下...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_122/UseExceptionHandlerToPromptSystemReliable.java
Java
asf20
1,401
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._127; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Ti...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_127/LockAndSynchronizedAreNotSame.java
Java
asf20
1,449
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._127; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * * @author 周光...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_127/LockAndSynchronizedAreNotSame2.java
Java
asf20
1,046
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._127; import java.util.Calendar; /** * * @author 周光明 Exp * @version $FileName: Task.java $Date: 2012-5-15 下午8:52...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_127/Task.java
Java
asf20
747
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._127; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * * @author 周光...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_127/TaskWithSynchronization.java
Java
asf20
610
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._127; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * * @author 周光...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_127/TaskWithLock.java
Java
asf20
824
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._131; import java.util.Random; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBar...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_131/CyclicBarrierTest.java
Java
asf20
1,612
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._121; /** * * @author 周光明 Exp * @version $FileName: OnlyUseThreePriority.java $Date: 2012-5-13 下午4:37:59 -0400 2012 ...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_121/OnlyUseThreePriority.java
Java
asf20
1,114
/* * Copyright 2012 The JA-SIG Collaborative. All rights reserved. * distributed with this file and available online at * http://www.etong.com/ */ package com.zgm.high_quality_code.nine._130; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.Callable;...
zyr-test
trunk/zyr-test/src/com/zgm/high_quality_code/nine/_130/UseCountDownLatchCorrespondChildrenThread.java
Java
asf20
2,032
package com.zgm.chainOfResponsibility.javaWebfilter; public interface Filter { public void doFilter(Request request, Response response, FilterChain chain); }
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/javaWebfilter/Filter.java
Java
asf20
165
package com.zgm.chainOfResponsibility.javaWebfilter; public class Response { String responseStr; public String getResponseStr() { return responseStr; } public void setResponseStr(String responseStr) { this.responseStr = responseStr; } }
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/javaWebfilter/Response.java
Java
asf20
265
package com.zgm.chainOfResponsibility.javaWebfilter; public class Request { String requestStr; public String getRequestStr() { return requestStr; } public void setRequestStr(String requestStr) { this.requestStr = requestStr; } }
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/javaWebfilter/Request.java
Java
asf20
254
package com.zgm.chainOfResponsibility.javaWebfilter; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] strs){ String msg = ":)这是一个敏感的话题,<script>"; Request request = new Request(); Response response = new Response(); request.setRequestStr(msg); ...
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/javaWebfilter/Main.java
Java
asf20
718
package com.zgm.chainOfResponsibility.javaWebfilter; public class HtmlFilter implements Filter { @Override public void doFilter(Request request, Response response, FilterChain chain) { String str = request.getRequestStr().replace("<", "[").replace(">", "]"); request.setRequestStr(str + "request doFil...
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/javaWebfilter/HtmlFilter.java
Java
asf20
467
package com.zgm.chainOfResponsibility.javaWebfilter; public class SensitiveFilter implements Filter { @Override public void doFilter(Request request, Response response, FilterChain chain) { String str = request.getRequestStr().replace("敏感", "不敏感"); request.setRequestStr(str + "request doFilter by Sen...
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/javaWebfilter/SensitiveFilter.java
Java
asf20
477
package com.zgm.chainOfResponsibility.javaWebfilter; import java.util.ArrayList; import java.util.List; public class FilterChain implements Filter { private List<Filter> filters = new ArrayList(); int index = 0; public void doFilter(Request request, Response response, FilterChain chain) { if(i...
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/javaWebfilter/FilterChain.java
Java
asf20
795
package com.zgm.chainOfResponsibility.filter; public interface Filter { public String doFilter(String msg); }
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/filter/Filter.java
Java
asf20
117
package com.zgm.chainOfResponsibility.filter; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] strs){ String msg = ":)这是一个敏感的话题,<script>"; HtmlFilter hf = new HtmlFilter(); SensitiveFilter sensitiveFilter = new SensitiveFilter(); Fi...
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/filter/Main.java
Java
asf20
649
package com.zgm.chainOfResponsibility.filter; public class HtmlFilter implements Filter { @Override public String doFilter(String msg) { msg = msg.replace("<", "[") .replace(">", "]"); return msg; } }
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/filter/HtmlFilter.java
Java
asf20
236
package com.zgm.chainOfResponsibility.filter; public class SensitiveFilter implements Filter { @Override public String doFilter(String msg) { msg = msg.replace("敏感", "不敏感"); return msg; } }
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/filter/SensitiveFilter.java
Java
asf20
229
package com.zgm.chainOfResponsibility.filter; import java.util.List; public class MsbProcessor { private List<Filter> filters; public String doFilter(String msg){ for(Filter filter : filters){ msg = filter.doFilter(msg); } return msg; } public List<Filter> getFilters() { return filt...
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/filter/MsbProcessor.java
Java
asf20
416
package com.zgm.chainOfResponsibility.filter; public class FaceFilter implements Filter { @Override public String doFilter(String msg) { msg = msg.replace(":)", "^V^"); return msg; } }
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/filter/FaceFilter.java
Java
asf20
214
package com.zgm.chainOfResponsibility.filter; import java.util.ArrayList; import java.util.List; public class FilterChain implements Filter { private List<Filter> filters = new ArrayList(); public String doFilter(String msg){ for(Filter filter : filters){ msg = filter.doFilter(msg); } ...
zyr-test
trunk/zyr-test/src/com/zgm/chainOfResponsibility/filter/FilterChain.java
Java
asf20
584
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/WordListActivity.java
Java
gpl3
14,201
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/WordSearchActivity.java
Java
gpl3
26,396
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/WordSearchPreferences.java
Java
gpl3
5,133
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/TutorialActivity.java
Java
gpl3
3,664
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/IOService.java
Java
gpl3
6,295
package com.dahl.brendan.wordsearch.view.controller; import java.util.HashSet; import java.util.Set; import android.content.Context; import android.graphics.Paint; import android.os.Handler; import android.os.Handler.Callback; import android.os.Message; import android.view.View; import android.view.ViewGroup; import ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/controller/WordBoxControllerLand.java
Java
gpl3
3,227
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/controller/IWordBoxController.java
Java
gpl3
1,825
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/controller/WordSearchActivityController.java
Java
gpl3
11,627
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/controller/WordBoxController.java
Java
gpl3
4,152
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/controller/TextViewGridController.java
Java
gpl3
18,794
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/view/WordDictionaryProvider.java
Java
gpl3
10,751
package com.dahl.brendan.wordsearch; import java.io.File; import android.os.Environment; public class Constants { public static final int DONATE_GAME_PLAY_COUNT = 10; public static final String GA_CODE = "UA-146333-5"; public static final String API_URL_BASE = "http://wordsearchapp.brendandahl.com/app/"; public...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/Constants.java
Java
gpl3
3,689
package com.dahl.brendan.wordsearch.util; /* * Copyright (C) 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/util/AndroidHttpClient.java
Java
gpl3
7,632
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/util/ConversionUtil.java
Java
gpl3
1,776
// This file is part of Open WordSearch. // // Open WordSearch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ...
zywhlc-wordsearch-project
src/com/dahl/brendan/wordsearch/model/dictionary/DictionaryCustomProvider.java
Java
gpl3
1,697