February 2005 - Posts - Angela's Blog
in

dotnet.org.za

South African .NET Developer Portal

Angela's Blog

Enter my mind at your own risk

February 2005 - Posts

  • List of Character Entities for HTML

    Want to know how to put a copyright sign on your web page?

    Here's a list of some of the more useful but lesser known HTML character entities.

    Character HTML Entity Description
    ¢ ¢ Cent sign
    £ £ Pound sterling sign
    € Euro sign
    © © Copyright sign
    ‘ Left single quote
    ’ Right single quote
    “ Left double quote
    ” Right double quote
    « « Left angle quote
    » » Right angle quote
    — Em dash
    – En dash
    ® ® Registered trademark
    ™ Trademark sign
    ° ° Degree sign
    ± ± Plus or minus
    ¼ ¼ One quarter
    ½ ½ One half
    ¾ ¾ Three quarters
    × × Multiplication sign
    ÷ ÷ Division sign
    a α Greek letter alpha
    ß β Greek letter beta
    8 ∞ Infinity symbol

    A complete list of character entities is provided in the HTML 4.01 recommendation.

    Posted Feb 14 2005, 10:56 AM by angela with 3 comment(s)
    Filed under:
  • Chapter 1: Lesson 4 Using Methods

    Chapter 1: Lesson 4: Using Methods

     

    Methods do the work of classes and structures.

    Methods represent actions your class can take.

     

    There are generally 2 varieties of Methods (in VB)

    • those that return a value (functions)
    • those that do not return a value (subs)

     

    C# makes no distinction between the two.

     

    A method is executed when it is called.

     

    The Main method is a special case. It is called upon initiation of program execution. Destructors, another special case, are called by the runtime just prior to destruction of an object. Constructors, a third special case, are executed by an object during its initialization.

     

    Method Variables are destroyed as soon as the Method has finished executing. (They have Method Scope)

     

    Variables within smaller divisions of methods have even more limited scope. E.g.) a Loop within a method

     

    Visual Basic allows you to create method variables that are not destroyed after a method finishes execution. - Static method variables

    They persist in memory and retain their values through multiple executions of a method.

    These are declared using the static keyword.

     

    Methods can have Parameters.

    Parameters are values required by the method.

     

    Parameters of a method can be passed in 2 ways: By Value or By Reference.

    In .NET By Value is the default.

    By value means that whenever a parameter is supplied, a copy of the data contained in the variable is made and passed to the method. Any changes made in the value passed to the method are not reflected in the original variable.

     

    When parameters are passed by reference,

    A reference to the memory location where the variable resides is supplied instead of an actual value. Thus, every time the method performs a manipulation on that variable, the changes are reflected in the actual object.

     

    In Visual Basic .NET, you are able to specify optional parameters for your methods.

    Optional parameters must be last in a method declaration and you must supply default values for them.

     

    A constructor is the first method that is run when an instance of a type is created.

    In VB it is always Sub New. You use a constructor to initialize class and structure data before use.

    Constructors can never return a value and can be overridden to provide custom initialization functionality. Eg)  Visual Basic .NET

     

    Public Class aClass
       Public Sub New()
          ' Class initialization code goes here
       End Sub
    End Class
     

    A destructor is the last method run by a class. A destructor (known as a Finalizer in Visual Basic) contains code to “clean up” when a class is destroyed.

     

    Public Class aClass
       Protected Overrides Sub Finalize()
          ' Clean up code goes here
       End Sub
    End Class
     

    NOTE
    In Visual Basic, the Finalizer is always Sub Finalize ()

    must use the Overrides keyword. (see example above)

     

    Because garbage collection does not occur in any specific order, it is impossible to determine when a class’s destructor will be called.

  • Chapter 1 : Lesson 3 Using Classes and Structures

    Chapter 1: Lesson 3:

     

    Classes and structures represent the two principal user-defined types. Both can have members.

     

    Classes are templates for objects. A class is a general (abstract) template for an object, and an object is an instance of a class, but more specified.

     

    Classes describe the properties and behaviors of the objects they represent through members. Members are methods, fields, properties, and events that belong to a particular class.

    - Fields and properties represent the data about an object

    - A method represents something the object can do

    - An event represents something interesting that happens to the object

     

    Nested Types are Types within types.

     

    You declare and instantiate a user-defined type the same way that you declare and instantiate a .NET Framework type.

    For both value types (structures) and reference types (classes), you need to declare the variable as a variable of that type and then create an instance of it with the New (new) keyword.

     

    The Main difference between Class and Structure is that the instance data for classes is allocated on the heap, and the instance data for structures is allocated on the stack

    Access to the stack is designed to be light and fast, but storage of large amounts of data on the stack can impede overall application performance.

    So, structures are best used for smaller, lightweight objects that contain relatively little instance data or for objects that do not persist for long and Classes are best used for larger objects that contain more instance data and are expected to exist in memory for extended periods.

     

  • My First Nerd Dinner

    Wow, tonight was fun. Thanks to Hilton //dotnet.org.za/Hiltong for organising it. It was really nice to see some new and “unknown” faces. Hilton's Flatmate “Eng”, and  Jonno it was nice to meet you  .http://dotnet.org.za/jonno .

    Hilton Congratulatioins on being made lead for www.saarchitect.net alonside with Roaan Vos.!!!

    www.sadeveloper.net

    Sa Dev Rocks!!!

     

    There were 8 of us in the starlight diner tonight.

     And it was Alright!!.

    The Eight of us we dined on chips,

    With Geek ~ dom on our lips,

    Laptops on the table, cell phones taking pics

    It was full of  avi's and kicks.

     

    On another note, Ruari, I am sad that this is most probably your last Nerd Dinner with us!!. But good luck with your trip to Prague and your new job opportunity at Microsoft in Johannesburg.

     

  • Bored with doing Desktop Support?

    So is Jahn!!

    So, he is auctioning himself for a six month contract to do anything. Can u believe it?  Bidding has started for him, in the Human auction. 

     Have u got minimal R5500 to spare? It works out an average of R183 a day. Need a gardener, come painter, come anything?

    http://www.2oceansvibe.com

    For all you wealthy Spinsters out there, make a bid, You could get a male slave?

     You can even get free exposure on the web if u hire him.

    I think this will be the first of many still to come.

     

  • Volkswagen Explosion email

     

    I received an email showing how an explosion takes place in a Polo, and how the Polo can take the punch.

    According to the Volkswagen - the ad is a hoax!!! See the article below

     

    http://www.cnn.com/2005/TECH/internet/01/31/volkswagen.ad.reut/index.html

Powered by Community Server (Commercial Edition), by Telligent Systems