December 6, 2004 (Mon)

The Evolution of a Programmer

http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html

程序員的進化。有名程序「Hello World!」究竟該怎麼寫才算好呢,我們來看看吧。

Posted by KichikuMan at 22:43 | 引用
Comments

Microsoft 果然係簡單複雜化的箇中能手...一個 Hello World 變做 COM 可以係咁恐怖...
(o個個 Program 咁多個 Program 當中唯一一個睇唔明的...)

Posted by: 宗仔 at Dec 8, 07:38

//接棒~ .NET Service

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;

namespace HelloWorldService
{
public class Service1 : System.ServiceProcess.ServiceBase
{
private System.Diagnostics.EventLog eventLog1;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;

public Service1()
{
// This call is required by the Windows.Forms Component Designer.
InitializeComponent();

// TODO: Add any initialization after the InitComponent call
if(!System.Diagnostics.EventLog.SourceExists("DoDyLogSourse"))
{
System.Diagnostics.EventLog.CreateEventSource("DoDyLogSourse","DoDyLog");
}

eventLog1.Source = "DoDyLogSourse";
eventLog1.Log ="DoDyLog";

}

// The main entry point for the process
static void Main()
{
System.ServiceProcess.ServiceBase[] ServicesToRun;

// More than one user Service may run within the same process. To add
// another service to this process, change the following line to
// create a second service object. For example,
//
// ServicesToRun = New System.ServiceProcess.ServiceBase[] {new Service1(), new MySecondUserService()};
//
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new HelloWorldService.Service1()};

System.ServiceProcess.ServiceBase.Run(ServicesToRun);
}

///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.eventLog1 = new System.Diagnostics.EventLog();
((System.ComponentModel.ISupportInitialize)(this.eventLog1)).BeginInit();
//
// eventLog1
//
this.eventLog1.Log = "DoDyLog";
this.eventLog1.Source = "DoDyLogSource";
//
// Service1
//
this.ServiceName = "HelloWorldService";
((System.ComponentModel.ISupportInitialize)(this.eventLog1)).EndInit();

}

///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

///
/// Set things in motion so your service can do its work.
///
protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
eventLog1.WriteEntry("Hello world! Service started");
}

///
/// Stop this service.
///
protected override void OnStop()
{
// TODO: Add code here to perform any tear-down necessary to stop your service.
eventLog1.WriteEntry("Hello world! Service stopped");
}
protected override void OnContinue()
{
eventLog1.WriteEntry("Hello world! Service continuing");
}
}
}

Posted by: kei at Dec 8, 15:42

I'm a great lover of art but galleries and museums are most certainly not the new churches. Can you imagine the Tate Modern setting up soup kitchens for the homeless?
http://www.coachshopsonline.com

Posted by: Coach Outlet Store Online at Apr 1, 08:44

Fans of the brand also enjoy expressing themselves through tattooed clothing instead of having to tattoo their bodies. For women the brand offers a tough but feminine look, while men appreciate its edgy rock star appeal.
http://www.coachsonlinesoutlet.com

Posted by: Coach Outlet Online at Apr 10, 10:39


What is love?
Is a wonderful addition: a miss with a miss, 15 will be able to become the moon.
Are an extraordinary hearing: Even across the mountains, but also exciting to hear each other's heartbeat.

Posted by: burgundy nike blazer 6 at Apr 21, 09:52

I like this article.

Posted by: New Era Snapback Hats at May 22, 14:00

This post has been somewhat of a revelation to me!At same time,you can visit my website:

Posted by: Nike NFL Jerseys at Sep 14, 09:54

I genuinely appreciated understanding it, you may be an extraordinary author.I will make sure to bookmark your blog and will in the end return later.

Posted by: college assignment help at Nov 4, 14:39

individuals without writing degrees can absolutely think of them in the event that they read broadly and well."

Posted by: custom paper writing service at Nov 24, 20:32

There is no post and comments too many ... how amazing ...!!! But this page maybe for programmers who want to do something to created.

Posted by: Coursework Writing Services at May 5, 13:23

I am certain this post has offered me some assistance with saving numerous hours of perusing other related presents just on find what I was searching for. Much obliged!

Posted by: Do My SAS Homework Online at Jun 15, 11:52

Your web journal is superb and i genuinely welcome you and seeking after some more accommodating posts.

Posted by: Case Studies Solutions at Jun 15, 13:23

Chinese is talked by the Han greater part and numerous other ethnic gatherings in China. Almost 1.2 billion individuals (around 16% of the total populace) talk some type of Chinese as their first dialect.

Posted by: Michael Jackson Red Jacket at Jun 15, 16:59
Post a comment









Remember personal info?