ANETA GRZESZYKOWSKA & JAN SMAGA: PLAN
ถ้าสนใจในตัวศิลปินก็เข้าไปดูที่นี่
aneta grzeszykowska & jan smaga
Javaเร็วส์, Javascript, Erlang, Python, Ruby, Clojure, Groovy, เลี้ยงลูก, วาดภาพ
Configuration config = new PropertiesConfiguration("usergui.properties");
ConfigurationFactory factory = new ConfigurationFactory("config.xml");
Configuration config = factory.getConfiguration();<configuration>
<system/>
<properties fileName="application.properties"/>
<xml fileName="conf/test.xml"/>
<jndi prefix="java:comp/env"/>
</configuration>
include = colors.properties
PropertiesConfiguration config = new PropertiesConfiguration("usergui.properties");
config.setReloadingStrategy(new FileChangedReloadingStrategy());app.name=pok
app.version=1.0
app.title=${app.name}-${app.version}
PropertiesConfiguration config = new PropertiesConfiguration("usergui.properties");
config.setAutoSave(true);colors.pie = #FF0000, #00FF00, #0000FF
String[] colors = config.getStringArray("colors.pie");colors.pie = #FF0000;
colors.pie = #00FF00;
colors.pie = #0000FF;
function calculator()
{
var a, b, operator;
cocoon.sendPageAndWait("getA.html");
a = cocoon.request.get("a");
cocoon.sendPageAndWait("getB.html");
b = cocoon.request.get("b");
cocoon.sendPageAndWait("getOperator.html");
operator = cocoon.request.get("op");
try {
if (operator == "plus")
cocoon.sendPage("result.html", {result: a + b});
else if (operator == "minus")
cocoon.sendPage("result.html", {result: a - b});
else if (operator == "multiply")
cocoon.sendPage("result.html", {result: a * b});
else if (operator == "divide")
cocoon.sendPage("result.html", {result: a / b});
else
cocoon.sendPage("invalidOperator.html", {operator: operator});
}
catch (exception) {
cocoon.sendPage("error.html", {message: "Operation failed: " + exception.toString()});
}
}
public class Person {
String name;
int age;
boolean isSmoker;
...
public int hashCode() {
// you pick a hard-coded, randomly chosen, non-zero, odd number
// ideally different for each class
return new HashCodeBuilder(17, 37).
append(name).
append(age).
append(smoker).
toHashCode();
}
} public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
} public boolean equals(Object o) {
if ( !(o instanceof MyClass) ) {
return false;
}
MyClass rhs = (MyClass) o;
return new EqualsBuilder()
.appendSuper(super.equals(o))
.append(field1, rhs.field1)
.append(field2, rhs.field2)
.append(field3, rhs.field3)
.isEquals();
}
ถ้าใช้ reflection public boolean equals(Object o) {
return EqualsBuilder.reflectionEquals(this, o);
} public boolean equals(Object other) {
if ( !(other instanceof Client) ) return false;
Client castOther = (Client) other;
return new EqualsBuilder()
.append(this.getId(), castOther.getId())
.isEquals();
}
// Note: id is object id (surrogate identifier) of this object
public int hashCode() {
return new HashCodeBuilder()
.append(getId())
.toHashCode();
} <dependency>
<groupId>classifier4j</groupId>
<artifactId>Classifier4J</artifactId>
<version>0.6</version>
</dependency>
public class BreakTokenizer implements ITokenizer {
public String[] tokenize(String input) {
ArrayList list = new ArrayList();
BreakIterator bt = BreakIterator.getWordInstance();
bt.setText(input);
int start = bt. first ();
for (int end = bt. next (); end != BreakIterator. DONE; start = end, end = bt. next ()) {
String tmp = input.substring(start, end);
list.add(tmp);
}
return (String[]) list.toArray(new String[0]);
}
} public static void main(String[] args) throws ClassifierException {
TermVectorStorage store = new HashMapTermVectorStorage();
VectorClassifier cs = new VectorClassifier(store);
BreakTokenizer tk = new BreakTokenizer();
cs.setTokenizer(tk);
cs.teachMatch("สวัสดีครับนี่คือภาษาไทย");
System.out.println(cs.classify("สวัสดี ภาษาไทย"));
IWordsDataSource ds = new SimpleWordsDataSource();
BayesianClassifier bcs = new BayesianClassifier(ds, tk);
bcs.teachMatch("สวัสดีครับนี่คือภาษาไทย");
System.out.println(bcs.classify("สวัสดี ภาษาไทย"));
}
0.7071067811865476
0.99
<project default="compile">
<target name="init" if="eclipse.running">
<property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter" />
</target>
<target name="compile" depends="init">
<echo>debug build.compiler = ${build.compiler}</echo>
<javac srcdir="." destdir="./target" />
</target>
</project>
export II_SYSTEM=/opt/CA/IngresII
export PATH=$PATH:$II_SYSTEM/ingres/bin:$II_SYSTEM/ingres/utility
export LD_LIBRARY_PATH=$II_SYSTEM/ingres/lib
iisudbms
iisudas