已經到達您系統管理員所設定的最大報表處理工作限制後來找到解決方式,只要修改登錄檔中「PrintJobLimit」的上限值,再重新啟動 IIS 即可!
參考連結
已經到達您系統管理員所設定的最大報表處理工作限制後來找到解決方式,只要修改登錄檔中「PrintJobLimit」的上限值,再重新啟動 IIS 即可!
public class ClassDemo {
public static void main(String args[]) {
String name = "godleon";
Class stringClass = name.getClass();
System.out.println("類別名稱:" + stringClass.getName());
System.out.println("是否為介面:" + stringClass.isInterface());
System.out.println("是否為基本型態:" + stringClass.isPrimitive());
System.out.println("是否為陣列物件:" + stringClass.isArray());
System.out.println("父類別名稱:" + stringClass.getSuperclass().getName());
}
}
LoadClassTest.javapublic class TestClass {
static {
System.out.println("類別被載入");
}
}
public class LoadClassTest {
public static void main(String args[]) {
TestClass test = null; //class不會載入,因此不會顯示「類別被載入」
System.out.println("宣告 TestClass 參考名稱");
test = new TestClass(); //class被載入,顯示「類別被載入」
System.out.println("生成 TestClass 實例");
}
}
Class 類別中的 forName 與 newInstance 方法public class ClassDemo2 {
public static void main(String args[]) {
System.out.println(boolean.class); //boolean
System.out.println(void.class); //void
int[] intAry = new int[10];
System.out.println(intAry.getClass().toString()); //class [I
double[] dblAry = new double[10];
System.out.println(dblAry.getClass().toString()); //class [D
}
}
而當使用 newInstance() 取得 instance 後,就可以使用 getClassLoader()、getConstructor()、getFields()、getMethods()、getModifiers()、getPackage() ..... 等方法,取得 Class 所產生的 instance 的相關資訊,而類別檢視器就是利用這樣子的方式所做出來的!import java.util.*;
public class ClassForNameDemo {
public static void main(String[] args) {
try {
//forName的使用
Class c = Class.forName(args[0]);
System.out.println("getName : " + c.getName());
System.out.println("isInterface : " + c.isInterface());
System.out.println("isPrimitive : " + c.isPrimitive());
System.out.println("isArray : " + c.isArray());
System.out.println("SuperClass : " + c.getCanonicalName());
//newInstance的使用
List lst = (List) c.newInstance();
for(int i = 0 ; i < 10 ; i++)
lst.add("element" + i);
for(Object o : lst.toArray())
System.out.println(o);
}
catch(Exception e) {
e.printStackTrace();
}
}
}
public class Student {
private String name;
private int score;
public Student() {
name = "N/A";
}
public Student(String name, int score) {
this.name = name;
this.score = score;
}
public void setName(String name) {
this.name = name;
}
public void setScore(int score) {
this.score = score;
}
public String getName() {
return name;
}
public int getScore() {
return score;
}
public void showData() {
System.out.println("Name : " + this.name);
System.out.println("Score : " + this.score);
}
}
newInstanceDemo.java
由上面的程式碼可以知道,若是有執行時期動態載入 class,並呼叫其 method 的需求,透過使用 reflection,可以很簡單達成目的。import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class newInstanceDemo {
public static void main(String[] args) {
Class c = null;
try {
c = Class.forName(args[0]);
/* (Begin)=============== 生成物件 ===============(Begin) */
//指定Constructor所使用的參數型態
Class[] oParam = new Class[2];
oParam[0] = String.class;
oParam[1] = Integer.TYPE;
//產生Constructor
Constructor constructor = c.getConstructor(oParam);
//指定參數的內容
Object[] paramObjs = new Object[2];
paramObjs[0] = "godleon";
paramObjs[1] = new Integer(90);
//透過Constructor產生物件
Object obj = constructor.newInstance(paramObjs);
System.out.println(obj);
/* (End)=============== 生成物件 ===============(End) */
/* (Begin)=============== 呼叫方法 ===============(Begin) */
//指定Method所使用的參數類型
Class[] mParam1 = {String.class}; //只有一個參數
//產生Method(指定method名稱與參數)
Method setName = c.getMethod("setName", mParam1);
//指定參數內容
Object[] mParamObjs1 = {"godleon"};
//呼叫方法
setName.invoke(obj, mParamObjs1); //呼叫setName方法
//指定Method所使用的參數類型
Class[] mParam2 = {Integer.TYPE};
//產生Method(指定method名稱與參數)
Method setScore = c.getMethod("setScore", mParam2);
//指定參數內容
Object[] mParamObjs2 = {new Integer(90)};
//呼叫方法
setScore.invoke(obj, mParamObjs2); //呼叫setScore方法
//產生Method(指定method名稱與參數)
Method showData = c.getMethod("showData", null);
//呼叫方法
showData.invoke(obj, null); //呼叫showData方法
/* (End)=============== 呼叫方法 ===============(End) */
}
catch(Exception e) {
e.printStackTrace();
}
}
}
//得到1970年的 timestamp
DateTime timeStamp = new DateTime(1970, 1, 1);
//注意這裡有時區問題,用now就要減掉8個小時
DateTime realNow = (new DateTime(2007, 9, 20, 12, 0, 0)).AddHours(-8);
//jsTimeStick即等於用JavaScript Date物件的getTime()方法跑出來的值
long jsTimeStick = (realNow.Ticks - timeStamp.Ticks) / 10000;
WshNetwork.MapNetworkDrive接著是卸載網路磁碟機的語法:
maps a remote drive onto a local drive letter
Syntax:
WshNetwork.MapNetworkDrive (strLocalName, strRemoteName [,bUpdateProfile] [,strUser] [,strPassword])
strLocalName
Receives the drive letter to which to map the remtoe share point in strRemoteName.
strRemoteName
Receives the name ofd the remote share point that will be mapped to the drive letter in strLocalName.
bUpdateProfile
If this optional parameter is True, the mapping will be saved in the current user's profile.
strUser
When combined with strPassword, this parameter can be used to conenct to a remote drive using someone else's credentials.
strPassword
When combined with strUser, this parameter can be used to conenct to a remote drive using someone else's credentials.
WshNetwork.RemoveNetworkDrive
removes a previously mapped network drive
Syntax:
WshNetwork.RemoveNetworkDrive (strName, [,bForce] [,bUpdateProfile])
strName
Receives the name of a previously mapped share point to be removed.
bForce
If this optional parameter is set to True, then this method will remove the connection even if the resource is currently being used.
bUpdateProfile
If this optional parameter is set to True, the mapping will be removed from the current user's profile.
Dim objNetwork
Set objNetwork = WScript.CreateObject("WScript.Network")
strLocalDrive = "H:"
strRemoteShare = "\\myserver\users"
objNetwork.MapNetworkDrive strLocalDrive, strRemoteShare, False '沒有第四、五個參數,表示不需帳號密碼
objNetwork.RemoveNetworkDrive strLocalDrive '卸載網路磁碟機
set fs = CreateObject("Scripting.FileSystemObject")
'將 c:\win98 中所有的內容複製到 z:\backup (不包含 c:\win98 資料夾)
fs.copyFolder "c:\win98","z:\win99"
'將 c:\win98 中所有的內容複製到 z:\backup (包含 c:\win98 資料夾)
fs.copyFolder "c:\win98","z:\win99\"
如此一來,table 的 schema、key、relation 都會很詳實的呈現出來,若是有 Date 相關欄位,還會有相對應的資訊顯示出來。--指定 Database
USE studentPartTime
go
--查詢 Table 資訊
sp_help 'tbpwWork'