2014年10月8日 星期三

Java- 簡單的運算

//載入Scanner
import java.util.Scanner;

public class i20
{

/**
* @param args
*/

public static void main(String[] args)
{
float i, j;
float k;
Scanner scanner = new Scanner(System.in);
System.out.print("請輸入 i 的整數值:");
i = scanner.nextInt();
System.out.print("請輸入 j 的整數值:");
j = scanner.nextInt();
scanner.close();
System.out.println("變數i="+i);
System.out.println("變數j="+j);
k=i+j;
System.out.println("變數i+j="+k);
k=i-j;
System.out.println("變數i-j="+k);
k=i*j;
System.out.println("變數i*j="+k);
k=i/j;
System.out.println("變數i/j="+k);
}

}

程式開發-變更eclipse工作視窗色彩


Color Theme
http://eclipse-color-theme.github.com/update
(下載安裝之後,會要求重新啟動 Eclipse,重啟之後,接著建議先套用一個樣式,
例如 Preference/General/Appearance/Color Theme/Sunburst )

MoonRise UI
https://raw.github.com/guari/eclipse-ui-theme/master/com.github.eclipseuitheme.themes.updatesite
(下載安裝之後,會要求重新啟動 Eclipse,重啟之後,接著從
Preference/General/Appearance/右方的Theme/選擇 MoonRise(standalone)

程式開發-建置android與Java程式的開發環境


  1. 下載JDK
    http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html
  2. 下載eclipse
    https://www.eclipse.org/downloads/
  3. 下載eclipse(用於android開發)
    http://developer.android.com/sdk/index.html
  4. 全部都解壓縮到個人資料夾(為避免影響其它班的使用者)
  5. 檢查系統環境變數(為避免影響其它班的使用者)
    需移除"C:\Program Files\Java\jdk*****\bin"
  6. 新增環境變數使用者部份,變數值為"C:\Program Files\Java\jdk*****\bin"
  7. 建立第一個程式,檔名為FirstJava.java




public class FirstJava {
public statie void main (String [] argv) {
System.out.println ("This is my first Java App.");
}
}

  1. 編輯程式在cmd 下執行javac FirstJava.java
  2. 執行程式在cmd 下執行java FirstJava


2014年10月6日 星期一

同網域有多台dc

同網域有多台dc
如何解決Infrastructure (基礎結構)與gc衝突的問題

答:
①若只有一台dc是gc,請將此dc的infrastructure角色移到其它dc

②讓所有的DC階擔任GC則infrastructure角色不必轉移

2014年9月29日 星期一

安裝AD Schema

http://technet.microsoft.com/en-us/library/cc732110.aspx


Install the Active Directory Schema Snap-In

19 out of 23 rated this helpful Rate this topic
Updated: October 22, 2010
Applies To: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012
You can use this procedure to first register the dynamic-link library (DLL) that is required for the Active Directory Schema snap-in. You can then add the snap-in to Microsoft Management Console (MMC).
Membership in Domain Admins , or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at http://go.microsoft.com/fwlink/?LinkId=83477.

To install the Active Directory Schema snap-in

  1. To open an elevated command prompt, click Start , type command prompt , and then right-click Command Prompt when it appears in the Start menu. Next, click Run as administrator , and then click OK .
    To open an elevated command prompt in Windows Server 2012, click Start , type cmd , right click cmd and then click Run as administrator .
  2. Type the following command, and then press ENTER:
    regsvr32 schmmgmt.dll
    
    TipTip
    Although the regsvr32 command shows that it is a 32-bit based command, it does run properly in the 64-bit versions of the supported operating systems (see Applies To near the start of this topic).
    If you do not run the command from an elevated command prompt or if you do not have the appropriate permissions, the following error message appears
    The module ‘schmmgmt.dll’ was loaded but the call to DllRegisterServer failed with error code 0x80040201.
    If you see this error message, check the group memberships of the user account that you are using to ensure that the user account is a member of the Schema Admins group. Also, ensure also that you run the command from an elevated command prompt.
  3. Click Start , click Run , type mmc , and then click OK .
  4. On the File menu, click Add/Remove Snap-in .
  5. Under Available snap-ins , click Active Directory Schema , click Add , and then click OK .
  6. To save this console, on the File menu, click Save .
  7. In the Save As dialog box, do one of the following:
    • To place the snap-in in the Administrative Tools folder, in File name , type a name for the snap-in, and then click Save .
    • To save the snap-in to a location other than the Administrative Tools folder, in Save in , navigate to a location for the snap-in. In File name , type a name for the snap-in, and then click Save .

2014年9月26日 星期五

To use Ldp to search the domain for deleted objects (tombstones)

To use Ldp to search the domain for deleted objects (tombstones)


  1. On the power shell , and then type ldp .
  2. Connect and bind to a domain controller in the domain whose tombstones you want to retrieve.
    • To connect, on the Connection menu, click Connect , and then type a server name and a port number.(連其它伺服器)
    • To bind, on the Connection menu, click Bind , and then type an account name, password, and domain if you want to connect to a domain other than the domain to which you are currently logged on.(本機)
  3. On the Browse menu, click Search .
  4. In the Search dialog box, for Base DN , type the distinguished name of the domain whose tombstones you want to retrieve.
  5. In the Filter box, use the filter (isDeleted=*) .
  6. Under Scope , click Subtree .
  7. Click Options .
  8. In the Search Options dialog box, under Search Call Type , click Extended .
  9. Click Controls . Then in the Object Identifier box, type the following: 1.2.840.113556.1.4.417
  10. Under Control Type , click Server .
  11. To add the control to the Active Controls list, click Check in . Then click OK .
  12. In the Search Options dialog box, click OK .
  13. In the Search dialog box, click Run .

0926-第二台DC建置