Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=130400006

Number

Number

In general, number is used as the representation of a quantity. And the word "number" is usually refers to the member of a given set of numeral system. The most widely used numeral system is the decimal numeral system which has ten as its base. The notational symbols that represents a number is called numerals. The numerals of a decimal numeral system are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The notational symbol "0" can also be considered as an empty place holder.

Decimal Number and Number Line

 IMAGE...

The decimal numeral system is an ordered number set. Every number can be graphically represented by a point on a number line. After defining a position on the straight line as the zero point and a unit length of the straight line as one unit length, then points can be added starting from the zero point on the line through marking the unit length on the line repeatedly. Each point is associated with the number of counting the unit length with positive numbers are to the right of zero and negative numbers are to the left of zero. Numbers are orderly located on the line geometrically with the number on the right is always greater than the number on the left. Number to the right of zero is the counting numbers e.g. 1,2,3... and is called natural numbers. Sometimes zero is included  to the set of natural numbers N, but the set of number including zero is called Whole number. And the set of numbers marked on the number line of one unit length apart starting from zero, e.g. -3,-2,-1,0,1,2,3, is called integer Z.

 IMAGE...

An integer is also called a whole number, i.e. no fraction,  which can be positive, negative, or zero. Numbers can then be grouped into

  • integers: ...,-3,-2,-1,0,1,2,3,...

  • positive integers: 1,2,3,...

  • nonnegative integers: 0,1,2,3,...

  • nonpositve integers: 0,-1,-2,-3,...

  • negative integers: -1,-2,-3,...

Rational Number

 

 IMAGE...

Since the unit length between two successive numbers is not equal to zero, more numbers can be inserted between points of integers. The most effective method of inserting point to the line segment is by method of equal division. For example, 9 more points or numbers can be obtained by dividing the number between 0 and 1 into ten equal divisions, the numbers from left to right are 0.1=1/10, 0.2=2/10,...,0.9=9/10. More numbers on the number line can also be obtained similarly, e.g. 1/3, 2/3. The numbers on both ends can be expressed as a fraction p/q,  e.g. 0=0/10, 1=10/10. These numbers are called rational numbers Q, which can be expressed as a fraction p/q where p and q are integers, and p and q have no common divisor other than one. Therefore integers are a subset of rational numbers

 IMAGE...

Irrational Number

 IMAGE...

Although, much more points can be plotted on the number line using the method of equal division, the rational number points cannot fill up the number line. There are points on the number line that cannot be expressed as a fraction p/q. For example, √2. The position of the point √2 on the number line can be located using the pythagorean theorem by constructing a right angle triangle with two sides equal to one unit length with the hypotenuse equals to √2. The point at √2 is not a rational point and can be proved by contradiction. If √2 is a rational , then √2 can be expressed as a fraction p/q. Imply

 IMAGE...

Both p and q are even, 2 is a common factor of p and q. Through the repetition of steps, 2 is always the common factor of the numbers generated. Since p and q always have an even common factor, this contradicts the definition of rational and the assumption that √2 is a rational is false. The point cannot be expressed as a fraction p/q is called irrational point. There are many other examples of irrational points, for example, √3, √5,... Numbers associated with these irrational points that cannot be expressed as a fraction p/q numbers are called irrational number Ir. Therefore √2 is an irrational number from algebraic operation.  There are another type of irrational numbers, for example, π, e,... These non-algebraic irrational numbers are called transcendental numbers because they are not the root of any integer polynomial. The set of rational numbers Q and the set of irrational numbers I together form the set of real numbers R.

 IMAGE...

Prime, Composite & natural

The number line concept of the number system provides the big picture of the real number system. Besides the classification of numbers into sets of natural numbers, integers, or real numbers. One important type of number classification is the set of prime numbers, composite numbers, and the naturals. Prime numbers are natural numbers, e.g. 2, 3, 5, 7,..., which can only be divided by 1 and itself. For other natural numbers, neither 1 nor prime number, they are called composite numbers. In general, a composite number can be expressed as a product of two factors, i.e. n=xy. 1 is not a prime because 1 can only be divided by 1 and 1 has one divisor, 1 only. Besides, prime numbers are always positive numbers. And 1 and 0 are neither prime nor composite. 1 and 0 are naturals to represent yes and no, true and false only.alse only.

Complex Number

Besides the one dimensional number line concept to reprsent a number system, there is also another common two dimensional plane concept to represent a complex number on a complex plane with the horizontal axis representing the real part and the vertical axis representing the imaginary part. A complex number can also be a root of an integer polynomial.

By introducing the concept of complex number, an algebraic number can be any complex number including real numbers which is a root of a non-zero polynomial equation in one variable. While those real and complex numbers thar are not algebraic are classified as transcendental numbers.

Decimal Notation & Binary Notation

A decimal numeral system uses ten numerals, 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 to denote a natural number n. But for a binary numeral system, only numeral 0 and 1 are used to denote any natural number n.

Link:http://output.to/sideway/default.asp?qno=130400004

IsReady / RootFolder, Drive Object, ASP Server Component

Drive Object

One key function of FileSystemObject Component is the manipulation of drives of the file system.

DriveObject.IsReady

DriveObject.IsReady property is a property to check whether the specified Drive referred to the specified Drive object instance is ready or not.

Syntax:

DriveObjectName.IsReady

 Or in VBScript. Imply

drivereadyflag =DriveObjectName.IsReady

 Or in JScript. Imply

drivereadyflag =DriveObjectName.IsReady

Parameters:

drivereadyflag

The parameter "drivereadyflag" is the name assigned to the boolean value returned by the IsReady property referred to the specified Drive object.

DriveObjectName

The parameter "DriveObjectName" is used to specify the name of the instance of the Drive Object related to.

Returns:

Boolean value

The return value of the IsReady property is a Boolean value to indicate whether the specified drive is ready or not referred to the specified Drive object. For removable-media dreives and CD-ROM drives, IsReady property returns True only when the appropriate media is inserted and ready for access.

Remarks:

DriveObjectName refers to a Drive Object.

Examples:

  • Example of using the IsReady property to check whether the specified drive is ready or not.

    ASP VBScript command:

    <script runat="server" language="VBScript">
    Dim fso, DriveObjectName, drivereadyflag
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set DriveObjectName = fso.GetDrive("d")
    drivereadyflag = DriveObjectName.IsReady
    Response.Write drivereadyflag & "<br />"
    </script>

    HTML web page ouput:

    True

  • Example of using the IsReady property to check whether the specified drive is ready or not.

    ASP JScript command:

    <script runat="server" language="JScript">
    var fso, DriveObjectName, drivereadyflag;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    DriveObjectName = fso.GetDrive("d")
    drivereadyflag = DriveObjectName.IsReady 
    Response.Write (drivereadyflag+ "<br />");
    </script>

    HTML web page ouput:

    true

DriveObject.RootFolder

DriveObject.RootFolder property is a read only property to return an instance of Folder object for the representation of the root folder of specified drive referred to the specified Drive object instance only.

Syntax:

DriveObjectName.RootFolder

 Or in VBScript. Imply

driverootname =DriveObjectName.RootFolder

Set driverootname =DriveObjectName.RootFolder

 Or in JScript. Imply

driverootname =DriveObjectName.RootFolder

Parameters:

driverootname

The parameter "driverootname" is the name assigned to the value returned by the RootFolder property referred to the specified Drive object.

DriveObjectName

The parameter "DriveObjectName" is used to specify the name of the instance of the Drive Object related to.

Returns:

 string

The return value of the RootFolder property is the RootFolder name or the RootFolder object representation of the specified Drive.

Remarks:

DriveObjectName refers to a Drive Object.

Through the representation of the returned Folder object, all the files and folders contained on the drive can be accessed.

Examples:

  • Example of using the RootFolder property to return the RootFolder object of the specified drive.

    ASP VBScript command:

    <script runat="server" language="VBScript">
    Dim fso, DriveObjectName, driverootname
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set DriveObjectName = fso.GetDrive("d")
    driverootname= DriveObjectName.RootFolder
    Response.Write driverootname & "<br />"
    Set driverootname= DriveObjectName.RootFolder
    Response.Write driverootname.Drive & "<br />"
    Response.Write driverootname.Path & "<br />"
    </script>

    HTML web page ouput:

    D:\
    D:
    D:\

  • Example of using the RootFolder property to return the RootFolder object of the specified drive.

    ASP JScript command:

    <script runat="server" language="JScript">
    var fso, DriveObjectName, driverootname;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    DriveObjectName = fso.GetDrive("d")
    driverootname = DriveObjectName.RootFolder
    Response.Write (driverootname+ "<br />");
    Response.Write (driverootname.Drive+ "<br />");
    Response.Write (driverootname.Path+ "<br />");
    </script>

    HTML web page ouput::

    D:\
    D:
    D:\

Link:http://output.to/sideway/default.asp?qno=130400003

SerialNumber / ShareName / VolumeName / Path, Drive Object, ASP Server Component

Drive Object

One key function of FileSystemObject Component is the manipulation of drives of the file system.

DriveObject.SerialNumber

DriveObject.SerialNumber property is a property to get and return the unique decimal serial number identity of a disk volume referred to the specified Drive object instance.

Syntax:

DriveObjectName.SerialNumber

 Or in VBScript. Imply

driveserialnum =DriveObjectName.SerialNumber

 Or in JScript. Imply

driveserialnum =DriveObjectName.SerialNumber

Parameters:

driveserialnum

The parameter "driveserialnum" is the name assigned to the value returned by the SerialNumber property referred to the specified Drive object.

DriveObjectName

The parameter "DriveObjectName" is used to specify the name of the instance of the Drive Object related to.

Returns:

value

The return value of the SerialNumber property is the unique decimal serial number of a disk volume referred to the specified Drive object instance. The SerialNumber property can be used to identify the correct disk is inserted in a drive with removable media.

Remarks:

DriveObjectName refers to a Drive Object.

Examples:

  • Example of using the DriveLetter property to to get and return the drive letter of the specified drive.

    ASP VBScript command:

    <script runat="server" language="VBScript">
    Dim fso, DriveObjectName, driveserialnumber
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set DriveObjectName = fso.GetDrive("d")
    driveserialnumber = DriveObjectName.SerialNumber
    Response.Write driveserialnumber & "<br />"
    </script>

    HTML web page ouput:

    -1001100116

  • Example of using the DriveLetter property to to get and return the drive letter of the specified drive.

    ASP JScript command:

    <script runat="server" language="JScript">
    var fso, DriveObjectName, driveserialnumber;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    DriveObjectName = fso.GetDrive("d")
    driveserialnumber = DriveObjectName.SerialNumber 
    Response.Write (driveserialnumber+ "<br />");
    </script>;

    HTML web page ouput:

    -1001100116

DriveObject.ShareName

DriveObject.ShareName property is a property to get and return network share name of the specified drive referred the specified Drive object instance.

Syntax:

DriveObjectName.ShareName

 Or in VBScript. Imply

drivesharename =DriveObjectName.ShareName

 Or in JScript. Imply

drivesharename =DriveObjectName.ShareName

Parameters:

drivesharename

The parameter "drivesharename" is the name assigned to the value returned by the ShareName property referred to the specified Drive object.

DriveObjectName

The parameter "DriveObjectName" is used to specify the name of the instance of the Drive Object related to.

Returns:

 value

The return value of the ShareName property is the network share name of the specified Drive. If the specified Drive of referred DriveObjectName Drive object is not a network drive, the ShareName property returns a zero-lenght string ("").

Remarks:

DriveObjectName refers to a Drive Object.

Examples:

  • Example of using the ShareName property to get and return the  network share name of the specified drive.

    ASP VBScript command:

    <script runat="server" language="VBScript">
    Dim fso, DriveObjectName, drivesharename
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set DriveObjectName = fso.GetDrive("d")
    drivesharename = DriveObjectName.ShareName
    Response.Write DriveObjectName.DriveType & "<br />"
    Response.Write drivesharename & "<br />"
    </script>

    HTML web page ouput:

    2

  • Example of using the ShareName property to get and return the  network share name of the specified drive.

    ASP JScript command:

    <script runat="server" language="JScript">
    var fso, DriveObjectName, drivesharename;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    DriveObjectName = fso.GetDrive("d")
    drivesharename = DriveObjectName.ShareName
    Response.Write (DriveObjectName.DriveType+ "<br />");  
    Response.Write (drivesharename+ "<br />");
    </script>;

    HTML web page ouput:

    2

DriveObject.VolumeName

DriveObject.VolumeName property is a read or write property to set, or get and return the volume name of the specified drive referred to the specified Drive object instance.

Syntax:

DriveObjectName.VolumeName [= newname]

 Or in VBScript. Imply

drivevolumename =DriveObjectName.VolumeName

DriveObjectName.VolumeName = newvolname

 Or in JScript. Imply

drivevolumename =DriveObjectName.VolumeName

DriveObjectName.VolumeName = newvolname

Parameters:

drivevolumename

The parameter "drivevolumename" is the name assigned to the volume name returned by the VolumeName property referred to the specified Drive object.

DriveObjectName

The parameter "DriveObjectName" is used to specify the name of the instance of the Drive Object related to.

newvolname

The optional parameter "newvolname" is used to specify the new volume name to be assigned by the VolumeName property to the volume name referred to the specified Drive object.

Returns:

string

The return value of the VolumeName property is the existing volume string of the specified Drive.

Remarks:

DriveObjectName refers to a Drive Object.

Examples:

  • Example of using the VolumeName property to get and return the volume name of the specified drive.

    ASP VBScript command:

    <script runat="server" language="VBScript">
    Dim fso, DriveObjectName, drivevolname
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set DriveObjectName = fso.GetDrive("d")
    drivevolname = DriveObjectName.VolumeName
    Response.Write drivevolname & "<br />"
    </script>

    HTML web page ouput:

    Data

  • Example of using the VolumeName property to get and return the volume name of the specified drive.

    ASP JScript command:

    <script runat="server" language="JScript">
    var fso, DriveObjectName, drivevolname;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    DriveObjectName = fso.GetDrive("d")
    drivevolname = DriveObjectName.VolumeName
    Response.Write (drivevolname+ "<br />");
    </script>

    HTML web page ouput:

    Data

DriveObject.Path

DriveObject.Path property is a property to get and return the path of the specified drive referred to the specified Drive object instance.

Syntax:

DriveObjectName.Path

 Or in VBScript. Imply

drivepath =DriveObjectName.Path

 Or in JScript. Imply

drivepath =DriveObjectName.Path

Parameters:

drivepath

The parameter "drivepath" is the name assigned to the volume name returned by the Path property referred to the specified Drive object.

DriveObjectNamectName

The parameter "DriveObjectName" is used to specify the name of the instance of the Drive Object related to.

Returns:

stringstring

The return value of the Path property is the path string of the specified Drive. For drive letters, the root drive is not included. For example, the path for the C drive is C:, not C:\.

Remarks:

DriveObjectName refers to a Drive Object. And File, and Folder objects are another possible alternate objects for the VolumeName property.

Examples:

  • Example of using the Path property to get and return the volume name of the specified drive.

    ASP VBScript command:mmand:

    <script runat="server" language="VBScript">
    Dim fso, DriveObjectName, drivepath
    Set fso = CreateObject("Scripting.FileSystemObject")quot;)
    Set DriveObjectName = fso.GetDrive("d")
    drivepath = DriveObjectName.Path
    Response.Write drivepath & "<br />"
    </script>pt>

    HTML web page ouput:

    D:

  • Example of using the Path property to get and return the volume name of the specified drive.

    ASP JScript command:mmand:

    <script runat="server" language="JScript">
    var fso, DriveObjectName, drivepath;
    fso = new ActiveXObject("Scripting.FileSystemObject");
    DriveObjectName = fso.GetDrive("d")
    drivepath = DriveObjectName.Path
    Response.Write (drivepath+ "<br />");
    </script>pt>

    HTML web page ouput:

    D:

Previous Month  APR  2013  Next Month
SMTWTFS
123456
78910111213
14151617181920
21222324252627
282930

Previous Month  JUN  2014  Next Month
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

Sideway BICK Blog

05/04


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013