정보2009. 11. 18. 04:22
Posted by Ueber
카테고리 없음2009. 11. 10. 16:09

This browser does not have a Java Plug-in. Get the latest Java Plug-in here.


Posted by 알 수 없는 사용자
카테고리 없음2009. 11. 8. 23:16
막걸리에 유산균은 거의 없다.
http://biotechnology.tistory.com/422#footnote_link_422_1


창의적인 자소서
http://boowoon.egloos.com/2336802

창업의 실체 - 공동창업자에 관해
http://design-play.textcube.com/42
이 글은 프로그래머이자 에세이스트인 폴 그라함(Paul Graham)의 에세이입니다. ...


투싼광고
http://blog.naver.com/mimbong?Redirect=Log&logNo=50072892467&vid=0

윤드 - 정렬알고리즘 - 버블소트
http://teamblog.joinc.co.kr/yundream/145
Posted by Ueber
정보2009. 10. 28. 22:11
http://basil83.egloos.com/5107106

인터넷이 대중화되면서, 또한 진중권의 표현대로 ‘문자문화가 제대로 정착되지 못한 채 구술문화가 인터넷을 지배’하게 되면서, 우리는 마치 인터넷이 반지성주의의 공간인 것처럼 여기게 되었다. 물론 인터넷을 통해 개인적으로 글을 쓰는 것은 기존의 출판 매체를 통하는 것과 많이 다르다. 별도의 편집자가 없기 때문에 저자의 감정적 판단과 기준이 여지 없이 노출되며, 한 번 공개된 텍스트는 국경을 넘어 순식간에 모든 곳에서 접속 가능한 것이 되어버린다. 그러나 그것은 어디까지나 매체가 가지고 있는 속성일 뿐, 그 속에서 어떤 내용의 담론이 오가느냐는 전적으로 이용자들의 손에 달려 있다.


사실 저 문장을 찾으려고 좀 애먹었다;
Posted by Ueber
카테고리 없음2009. 10. 28. 10:22

7.12. Using Command-Line Arguments

On many systems it is possible to pass arguments from the command line (these are known as command-line arguments) to an application by including a parameter of type String[] (i.e., an array of Strings) in the parameter list of main, exactly as we have done in every application in the book. By convention, this parameter is named args. When an application is executed using the java command, Java passes the command-line arguments that appear after the class name in the java command to the application's main method as Strings in the array args. The number of arguments passed in from the command line is obtained by accessing the array's length attribute. For example, the command "java MyClass a b" passes two command-line arguments to application MyClass. Note that command-line arguments are separated by white space, not commas. When this command executes, MyClass's main method receives the two-element array args (i.e., args.length is 2) in which args[ 0 ] contains the String "a" and args[ 1 ] contains the String "b". Common uses of command-line arguments include passing options and file names to applications.


[Page 324]

Figure 7.21 uses three command-line arguments to initialize an array. When the program executes, if args.length is not 3, the program prints an error message and terminates (lines 912). Otherwise, lines 1432 initialize and display the array based on the values of the command-line arguments.

Figure 7.21. Initializing an array using command-line arguments.
(This item is displayed on pages 324 - 325 in the print version)

 1  // Fig. 7.21: InitArray.java
 2  // Using command-line arguments to initialize an array.
 3
 4  public class InitArray
 5  {
 6     public static void main( String args[] )
 7     {
 8        // check number of command-line arguments
 9        if ( args.length != 3 )
10           System.out.println(
11              "Error: Please re-enter the entire command, including\n" +
12              "an array size, initial value and increment." );
13        else
14        {
15           // get array size from first command-line argument
16           int arrayLength = Integer.parseInt( args[ 0 ] );
17           int array[] = new int [ arrayLength ]; // create array
18
19           // get initial value and increment from command-line argument
20           int initialValue = Integer.parseInt( args[ 1 ] );
21           int increment = Integer.parseInt( args[ 2 ] );   
22
23           // calculate value for each array element                 
24           for ( int counter = 0; counter < array.length; counter++ )
25              array[ counter ] = initialValue + increment * counter; 
26
27           System.out.printf( "%s%8s\n", "Index", "Value" );
28
29           // display array index and value
30           for ( int counter = 0; counter < array.length; counter++ )
31              System.out.printf( "%5d%8d\n", counter, array[ counter ] );
32        } // end else
33     } // end main
34  } // end class InitArray

java InitArray
Error: Please re-enter the entire command, including
an array size, initial value and increment.


java InitArray 5 0 4
Index   Value
    0       0
    1       4
    2       8
    3      12
    4      16


java InitArray 10 1 2
Index   Value
    0       1
    1       3
    2       5
    3       7
    4       9
    5      11
    6      13
    7      15
    8      17
    9      19


The command-line arguments become available to main as Strings in args. Line 16 gets args[ 0 ]a String that specifies the array sizeand converts it to an int value that the program uses to create the array in line 17. The static method parseInt of class Integer converts its String argument to an int.


[Page 325]

Lines 2021 convert the args[ 1 ] and args[ 2 ] command-line arguments to int values and store them in initialValue and increment, respectively. Lines 2425 calculate the value for each array element.

The output of the first sample execution indicates that the application received an insufficient number of command-line arguments. The second sample execution uses command-line arguments 5, 0 and 4 to specify the size of the array (5), the value of the first element (0) and the increment of each value in the array (4), respectively. The corresponding output indicates that these values create an array containing the integers 0, 4, 8, 12 and 16. The output from the third sample execution illustrates that the command-line arguments 10, 1 and 2 produce an array whose 10 elements are the nonnegative odd integers from 1 to 19.

Posted by Ueber