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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>com.realtech.mes</groupId> | |
<artifactId>rt-mes-parent</artifactId> | |
<version>1.2-SNAPSHOT</version> | |
</parent> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.realtech.mes</groupId> | |
<artifactId>rt-mes-parent</artifactId> | |
<version>1.2-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<name>rt-mes parent module</name> |
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 PipeTest { | |
public static void main(String[] args) throws java.io.IOException, java.lang.InterruptedException { | |
java.lang.Runtime rt = java.lang.Runtime.getRuntime(); | |
// Start three processes: ps ax | grep rbe | grep JavaVM | |
java.lang.Process p1 = rt.exec("ps ax"); | |
java.lang.Process p2 = rt.exec("grep rbe"); | |
java.lang.Process p3 = rt.exec("grep JavaVM"); | |
// Start piping | |
java.io.InputStream in = Piper.pipe(p1, p2, p3); |
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
#!/bin/sh | |
# Step 1 – Create your script. | |
# Step 2 – Save the script in the /etc/init.d/ folder | |
# Step 3 – Make the script executable | |
# sudo chmod +x svnserve | |
# Step 4 – Add the script to the boot sequence | |
# sudo update-rc.d svnserve defaults | |
svnserve -d -r /usr/local/svn/repository_name |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" > | |
<log4j:configuration> | |
<appender name="file" | |
class="org.apache.log4j.RollingFileAppender"> | |
<param name="maxFileSize" value="100KB" /> | |
<param name="maxBackupIndex" value="5" /> | |
<param name="File" value="test.log" /> | |
<param name="threshold" value="info" /> | |
<layout class="org.apache.log4j.PatternLayout"> |
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
### file appender | |
log4j.appender.file=org.apache.log4j.RollingFileAppender | |
log4j.appender.file.maxFileSize=100KB | |
log4j.appender.file.maxBackupIndex=5 | |
log4j.appender.file.File=test.log | |
#NOTE: | |
log4j.appender.file.threshold=info | |
log4j.appender.file.layout=org.apache.log4j.PatternLayout | |
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n | |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=GBK" /> | |
<title>documentElement</title> | |
<style type="text/css"> | |
body{margin:0;padding:0;font:12px/150% arial;} | |
</style> | |
<script type="text/javascript"> | |
function a(){ |
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 static String getLocalMAC() { | |
InetAddress address; | |
String sMAC = null; | |
try { | |
address = InetAddress.getLocalHost(); | |
NetworkInterface ni = NetworkInterface.getByInetAddress(address); | |
byte[] mac = ni.getHardwareAddress(); | |
Formatter formatter = new Formatter(); | |
for (int i = 0; i < mac.length; i++) { | |
sMAC = formatter.format(Locale.getDefault(), "%02X%s", mac[i], |
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
<security-constraint> | |
<web-resource-collection> | |
<web-resource-name>Forbidden</web-resource-name> | |
<url-pattern>/pages/*</url-pattern> | |
</web-resource-collection> | |
<auth-constraint/> | |
</security-constraint> |
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
//搭配 scale operator | |
Interpolation interp = Interpolation.getInstance(Interpolation.INTERP_BILINEAR); | |
//利用 ParameterBlock 物件儲存必要的 input Source 與 參數 | |
ParameterBlock params = new ParameterBlock(); | |
params.addSource(ri);//为RenderedImage对象或图像文件 | |
params.add(scale); // x scale factor | |
params.add(scale); // y scale factor | |
params.add(0.0F); // x translate | |
params.add(0.0F); // y translate | |
params.add(interp); // interpolation method |