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
<!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
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
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
MongoTemplate mongo = ...; | |
List<Converter> converters = new ArrayList<Converter>(); | |
converters.add(new Converter<DBObject, Participant>() { | |
public Participant convert(DBObject s) { | |
throw new UnsupportedOperationException("Not supported yet 1."); | |
} | |
}); | |
converters.add(new Converter<Participant, DBObject>() { |
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
# this is not maintained, please refer to https://gist.github.com/2868365 for latest version |
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
For example, you have a part of content to be passed to different tags as callback, and you except the tag will change the content by passing arguments, as shown below: | |
bc. @lookupRole(permission: "superuser").callback(List<Role> roleList) { | |
<ul> | |
@for(Role role: roleList) { | |
<li>role.getName()</li> | |
} | |
</ul> | |
} |
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
# this is not maintained. Please refer to https://gist.github.com/2868365 for latest morphia version |
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
sudo netstat -anp|grep <port-number> |
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
# ---------------- | |
# Privileges | |
# ---------------- | |
superuser: | |
type: p | |
level: 9999 | |
# --------------- | |
# Rights | |
# --------------- |
OlderNewer