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.Arrays; | |
/** | |
* Created by luog on 22/07/2014. | |
*/ | |
public class SortIntArray { | |
private static int[] ia; | |
private static void initArray(String[] args) { | |
if (args.length > 0) { |
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
T:\java>java YieldExample | |
I am Consumer : Consumed Item 0 | |
I am Producer : Produced Item 0 | |
I am Consumer : Consumed Item 1 | |
I am Producer : Produced Item 1 | |
I am Consumer : Consumed Item 2 | |
I am Producer : Produced Item 2 | |
I am Producer : Produced Item 3 | |
I am Consumer : Consumed Item 3 | |
I am Consumer : Consumed Item 4 |
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
<!DOCTYPE html> | |
<!-- | |
To change this license header, choose License Headers in Project Properties. | |
To change this template file, choose Tools | Templates | |
and open the template in the editor. | |
--> | |
<html> | |
<head> | |
<title>title</title> | |
<meta charset="UTF-8"> |
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 com.pixolut.mrb.mas.tool.*; | |
import com.pixolut.mrb.mas.models.*; | |
import com.pixolut.mrb.mas.controllers.*; | |
import java.util.*; | |
import org.rythmengine.template.TemplateBase; | |
import java.io.*; | |
public class errors_prod_error_html__R_T_C__ extends org.rythmengine.template.TagBase { | |
@Override public java.lang.String __getName() { |
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.*; | |
import java.util.regex.*; | |
import java.lang.reflect.*; | |
import java.text.*; | |
import java.net.*; | |
import java.io.*; | |
import javax.script.*; | |
import java.math.*; | |
import org.magicwerk.brownies.collections.*; | |
import javolution.util.*; |
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
package com.greenlaw110.sample; | |
import com.greenlaw110.util.C; | |
import com.greenlaw110.util.IO; | |
import com.greenlaw110.util._; | |
import java.util.List; | |
public class MappingSample { | |
public static void main(String[] 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
import java.util.*; | |
import org.rythmengine.template.TemplateBase; | |
import java.io.*; | |
public class gh148_main_html__R_T_C__ extends org.rythmengine.template.TagBase { | |
@Override public java.lang.String __getName() { | |
return "gh148_main_html__R_T_C__"; | |
} |
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
private Map<String, com.greenpineyu.fel.Expression> fels = new HashMap<String, Expression>(); | |
private FelEngine fel = new FelEngineImpl(); | |
private Expression getFel(String expr, Map<String, Object> context) { | |
StringBuilder sb = new StringBuilder(expr); | |
for (Object s : context.keySet()) { | |
Object o = context.get(s); | |
sb.append("|").append(s).append(":"); | |
if (null == o) sb.append("null"); | |
else sb.append(o.getClass()); |
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
public class JavaBean { | |
private String id; | |
private int count; | |
private boolean enabled; | |
private Map<String, Object> attrs; | |
public JavaBean(String id, int count, boolean enabled) { | |
this.id = id; | |
this.count = count; | |
this.enabled = enabled; | |
attrs = new HashMap<String, Object>(); |
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
public class LoggingSecurityManager extends SecurityManager { | |
private AccessControlContext ctx; | |
private Properties properties = new Properties; | |
private Set missingProperties = new HashSet(); | |
public LoggingSecurityManager() { | |
properties.add( | |
new FilePermission(System.get("java.io.tmpdir") + "/-", "read,write,delete")); | |
// maybe... |