November 2003 - Posts

AI Constraint Programming in .NET

The Hong Kong .NET User Group organized a Campus Tour Series recently and the first stop in City University of Hong Kong (CityU) was completed successfully 2 days ago.

The sessions are presented in a Lecture Threater in that university (Well, the booking procedures and people involved are complicate?! So if you're a UG leader and want to cooperate with educational unit, I'd suggest you plan and prepare it earlier) and we're glad to invite 2 guest speakers:

  • J2EE and .NET - Similarities and Differences - Mr. Michael Leung (.NET Developer Evangelist of Microsoft HK Limited)
  • AI Constraint Programming with .NET - Dr. Andy Chun (Associate Professor of CityU)

The first session is presented by Michael, who actually firstly presented the same session in the Windows 2003 Server Launch Day a few months ago. So this is my second time to see this show, and nothing new to me.

While I was impressed by the second session, Dr. Andy is a famous person in the academic field and won a lot of awards/honors in the past, including the American Association for Artificial Intelligence (AAAI.org) award. He's specialize in "Artificial Intelligent" (AI) and Constraint Programming (CP), which is something new for the audience, including me!

Dr. Andy explain the concept behind CP, case studies, and technical details of his self-developed .NET CP Engine - NSolver (The library of this object, tutorial, example is free download). He explained Constraint Propagation, Searching, Domain Reduction, BackTracking (He show pseducode inheriting from an ArrayList and store different values of an object with TimeStamp, such that the engine can rollback an object to a particular value and go on searching via another path in the Constraint Network. Interesting :)

I'd also like to know how many guru here working in AI with .NET in your day time job, anyway I think you'll have interest in take a look at his personal web site.

In addition, all of the presentation and more information can be found on our UG Portal, and we'll upload the video of these sessions onto the portal later as well. After the presentation, Andy and I talk about adding Log4Net, Enterprise Instrumentation Framework and NUnit into the next version of his NSolver engine, the overall discussion and event are very nice!

Posted by Colt | 21 comment(s)

Big Picture of Data Access Support in "Whidbey"

An article named “Data Access Support in Visual Studio.NET (Whidbey)” published on DotNetJunkies recently, which is written by Mark Fussell (the Microsoft's Lead Program Manager on XML technologies).

I heard a pretty good feedback about the content and writing style of Mark, before reading the book review by Teemu.

Anyway, I like this sentence: “First, let's provide a 10,000 feet overview of the data access support in "Whidbey"“ - So, please sit up and bear in mind that this article is a high level overview of Data Access in Whidbey. :-)

Posted by Colt | with no comments
Filed under:

Pop Up Control + Private Messaging in ASP.NET Forums App

Paschal blog about a Pop Up control for ASP.NET recently, which is so nice and a great feature - drag and drop - will be added in the next version too. :)

Screen Shot:

Popup control in Internet Explorer and Mozilla

Actually, I wrote a private message module “plug” in the ASP.NET Forum application for the Hong Kong .NET user group in July, where my development team create a very similar pop up window when new message arrive.

Screen Shot:

 

This feature actually inspired by the MSN messenger - a small window pop up to alert current logged in user when new email arrive. By borrowing this concept, we used a small iframe and keep refreshing in a certain period of time and check whether any new private message for the user, and then a small layer will be popped up at the lower right hand corner of the screen to notify the user, provided that (s)he had logged into the ASP.NET Forums.

The information and source can be found at here:

Functions of HKNetUG Private Messaging system
This is an email-like Private Messaging, which is user-friendly and functional.

Rich-text Box
An HTML Editor created around MSHTML in Internet Explorer. Fully functional just look like a Web-Based Ms Word, to customize you message. You can change to HTML Mode to input the HTML coding alternatively also.

 

Inbox / Outbox
Our Private Message is similar with E-mail, you can check all incoming history and outgoing record, and you can reply the message in your inbox or forward the message in inbox or outbox.
 

Message Alert
a small notification layer will 'move' up from your lower right hand corner of your screen (like the MSN Messenger) to notify you.
 

 

Message Notify
An attractive icon on every page of this Forum showing either:
"No New Private Message" or "You've New Private Message"
You can click on this icon and go to a Private Message web page.
 

 

Search
If you want to send a private message to your friend, e.g. "David Chan" and his nickname is "david_chan" but you have forgot his nickname, you may using our search function, you only need to enter "david" in Name Text-Box and search, you can find the person who you need.

Posted by Colt | 10 comment(s)

Query Analyzer provide ... IntelliSense?

SqlBuddy

SqlBuddy is an handy open source database tool for MS SQL Server very similar to Query Analyzer. The SQL text editor even has syntax highlighting and Intellisense. It's written in C#, too. [Josh]

 

This tool looks promising, especially it provide the ability of “IntelliSense“! Although most people installed Query Analyzer in your machine now, but I'm sure this open source DB tool somehow beneficial to Web Matrix developers, as Web Matrix don't provide editing of database view and IntelliSense.

Posted by Colt | with no comments
Filed under: ,

C# Class Generator (beta)

Talked with Salman last week... He told me that he've created a C# Class Generatorbeta. I just tried it and it's pretty funny. :)

Well, that's really a common situation that we have to create a class, declare private member(s), constructor(s), expose public properties (get...set....get....set.... )...  repeatedly everyday. However, we have to type everything in creating a new class, no matter we're using VS.NET or Web Matrix.

Salman sick of this manual process and create this tool finally.

It work just fine, but this tool will insert (unwanted) characters such as “str“, “i“ “bool“ to the private members though, here is a sample:

public class  Quiz

      {

            // private members

            string _strName;

            string _strTitle;

            string _strCompany;

            string _strEmail;

            ...

 

            // empty constructor

            public Quiz ()

            {

            }

 

 

            // full constructor

            public Quiz (string name, string title, string company...)

            {

                  this._strName = name;

                  this._strTitle = title;

                  this._strCompany = company;

                  this._strEmail = email;
                  ...
            ...

 

Update: Salman add a new option to toggle the insertion of Prefix Type recently. :)

Posted by Colt | 2 comment(s)
Filed under:

ASP.NET Whidbey FAQs

The first FAQ of ASP.NET “Whidbey“ is available now:

Most Popular Questions on ASP.NET Whidbey

GridView:
1. How do I display cell text without wrapping?
Use DataControlField's ItemStyle.Wrap property.

2. How do I resize the column widths?
Here is a
link for how to solve this and related questions in DataGrid, but the same methods apply to GridView.

3. How do I localize the column headers?
We have presented some solutions for this that you can find in
the .NET Quick starts

4. How do I add up and down icons to indicate sort direction?
Handle OnRowCreated and use SortExpression and SortDirection to add the correct icon to the header cell.

5. Is there an easy way to click and edit a cell value at run time (without having to click on Edit and Update links)?
See
top ten questions about asp.net data grid control.

6. How do I insert another control (such as a tree view) in a cell?
Use a templatefield with the other control inside the template.

7. Why do you fetch all grid view rows from the server for every single GridView update?
This will be addressed in Beta.


TreeView:
1. How do I request the server to return just the changes in tree nodes?
This will happen automatically if PopulateNodesFromClient is true on the TreeView and PopulateOnDemand is set to true on the TreeNode. It will only download child nodes when a user expands a node.

2. How do I customize tree node icons?
You can customize the expand/collapse image icons using the ExpandImageUrl and CollapseImageUrl properties, and you can change the entire set of expand/collapse and line icons by specifying the LineImagesFolder and using the line image generator provided by the designer. If you want to customize the images per node, you can set the ImageUrl property on the TreeNode.


WebParts:
1. How are ASP.NET and SharePoint related?
SharePoint is built on ASP.NET V1.1 today and will be built on ASP.NET Whidbey in the future.

2. Where is the WebParts information stored?
It is stored in the Page Personalization data. We have a provider model for this, and we will ship SQL and Access providers.

3. How do I store it to an XML file?
By writing a Page Personalization Provider that reads/writes XML.

4. How do I dynamically add a web part during runtime?
If you want to add the part at runtime, and want it to be saved in the personalization data (so it will appear on future requests), you should call WebPartManager.AddWebPart(). If you want to add a web part at runtime for only the current request (like adding a regular control at runtime), you should write a custom template that you use for the WebPartZone.ZoneTemplate.


Login Control:
1. Login control works great with Forms Authentication but can I make it work with Windows authentication and .NET passport Authentication as well?
Login control should only be used with Forms Authentication.


Migration:
1. What should I watch out for while migrating from VS.NET 1.x to Whidbey Alpha?
It is best to create a new Whidbey Alpha project and add existing 1.x project items. Seamless migration will be supported in release timeframe.

[ by Appan (an ASP.NET Team member) - view post ]

Posted by Colt | 1 comment(s)
Filed under:

GotDotNet's Nov Featured Site

 


Featured Site Archives

“If you've got questions about ASP and ASP.NET, there are thousands of other developers waiting to answer them on AspAdvice.com. You'll find Microsoft team members, MVPs, and ASPInsiders answering many questions on over 100 public mailing lists.”

read the entire article...

Posted by Colt | with no comments
Filed under:

ASP.NET Roadshow!

Just saw this exciting announcement from Brian's blog: [ ASP.NET Exposed ] 

A cool, free seminar featuring the creators of ASP.NET -- translation I'm sending Rob Howard or Scott Guthrie all over the country to speak to you about:
Security
Tips/Tricks
ASP.NET "Whidbey"
It should be a lot of fun, lots of cool giveaways, see the big boys in action, and it's free..
Sign up today

(...but US residents only...)

Posted by Colt | 2 comment(s)
Filed under:

Web Matrix shut down automatically but just a splash screen?

One of the “bug” or problem that Web Matrix developers face is that whenever you try to start the Web Matrix IDE, it will shut down automatically without displaying any error message nor notice. That's really weird as it happen occasionally and no error message for us to trace what's going wrong.

I have no clue about the cause or solution as I never face this problem (luckily) but I understand the frustration of the victims. :(

Later, I notice that this problem normally occured in a machine with a regional setting in “Turkish” and a member tried to debug the WebMatrix.exe and managed to see and exception in Microsoft.Matrix.dll. The exception is System.Configuration.ConfigurationException with a message 'Invalid template document type'.

In short, once you face this problem and you can open the WebMatrix.exe.config file and modify the content:

FROM:    <templateDocumentType extension="config" templateCategory="Security"
TO:        <templateDocumentType extension="confIg" templateCategory="Security"

(the letter “I”s are different)

The complete story and discussion on the ASP.NET Forums can be found at here and here.

* I tried to change the regional setting of my machine from English to Chinese (actually I believe this happen in non-English environment) and “tried” to re-pro this error, well... it still didn't happen on me and I still don't know what's going wrong. Well, I open the WebMatrix.exe.config and didn't find any odd setting too. This maybe happen on Turkish Web Matrix developers only...

Posted by Colt | 1 comment(s)
Filed under:
More Posts