29. September 2005 03:27
/
Andrej Tozon
/
/
Comments (0)
I was reading about the Million Dollar Homepage the other day and wondering, how simple ideas sometimes go way beyond your expectations, even if at first they appear they would never work. There is no spoon...
However, the author expected imitations, and it looks like we already have a Slovenian "tribute" page. Explore the similarities ;)
9ef2350a-8cac-4000-aa4b-1178744af27e|0|.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
New month, new release... I kept installing all to-date VS2005 Beta/CTPs on a fresh VPC, which costed me some extra time to set up the whole working environment. So, with the latest RC I decided to reuse the August CTP VPC, which I successfully cleaned using the latest version of VS2005 Beta uninstall tool. The process was quick and painless. As for the RC... VS appears to run a bit faster, but I haven't had time to check it out quite yet, since some control incompatibility issues keep me working on the July CTP :(
VS2005 RC was one of the many new tools/technologies presented on this year's PDC, including Atlas, Linq, C# 3.0, VB 9.0, Office 12, VSTA 2005, SQL2005 (VS2005 RC is compatible with SQL2005 Sept. CTP!), and my long time wish, which is now coming true. Busy week.
f8a04a0a-bda2-4ce6-b522-e985daf81068|1|1.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
After a day or two of maintenance, the revamped MSDN subscriptions site appears to be up and running. One of the new downloads available is of course a full set of Visual Studio 2005 August CTP builds, including VSTO and VSS. And to complement that, WSE 3.0 Beta was also released a few days ago.
Also new: Enterprise Library for .NET 2.0 August CTP (built for VS2005 Beta 2). Read more here.
f26486b2-ce7b-4687-8de1-e1fd7c27531a|0|.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
I installed not one, but two IM clients today. The first was MSN Messenger upgrade (7.5). Nothing radical here. Then I tried freshly baked Google Talk... Installation went smoothly and while installing, it detected existing installation of Gmail Notifier, unistalled it and replaced with new Google Talk client, also able to check my gmail. A fair trade... :)
Like the name suggests, Google Talk looks as it's primarily meant for voice conversation, although chatting works well too. Not much fancy stuff, basic iconography, but smileys are recognized and there are some neat text tricks like *emphasizing* text. The one thing that bugs me is the need to build another contact list. I'm using MSN Messenger, Skype, and now Google Talk, each with separate contact list. Also, currently Google Talk requires gmail account to use it, but that's going to change. All in all, a nice start.
On a side note: congratulations to Peter, for winning the C9 contest with this Outlook 2003 plugin! Way to go, man!
63773a75-c5b7-4b25-b6d8-d3c5fb5eb00c|0|.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
Sometimes you need to provide versioning functionality for your custom
data, databases, etc. For handling version information inside your
application you can use data types like string or int, or go with
the Version class, which you commonly use when managing application
and assembly versions.
When implementing custom versioning, which strongly depended on version comparison, I first had
some doubts about using Version class for that. But this
was mainly because of its serialized representation as a string
("1.0.0.9"), since strings containing numeric values still compare (and
sort, for that matter) like strings. For example:
string s9 = "1.0.0.9";
string s10 = "1.0.0.10";
string s11 = "1.0.0.11";
Console.WriteLine(string.Compare(s11, s10) > 0);
Console.WriteLine(string.Compare(s10, s9) > 0);
The first WriteLine statement would write "True", since strings
"1.0.0.10" and "1.0.0.11" are equal in length and the latter is
obviously greater than the first one. But when comparing the second
pair, the result would be "False", like "1.0.0.10" is less than
"1.0.0.9". That's because string comparison is made on a character base, not numeric. And character '9' in 7th position of s9
string evaluates as greater than '1' in the same position of the second
one. The last zero in s10 just doesn't make any difference.
So I tried Version:
Version v9 = new Version("1.0.0.9");
Version v10 = new Version("1.0.0.10");
Version v11 = new Version("1.0.0.11");
Console.WriteLine(v11 > v10);
Console.WriteLine(v10 > v9);
Version class comparison works as expected and both statements would write out the value of True.
The point here would be - don't judge objects for their serialized look.
efd6539e-a83c-463c-ab1b-0f45ed486c1b|0|.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
A rediscovered oldie: when dealing with some old, legacy code, you could find yourself wrestling with very oddly formatted data. One of the more common types the .NET framework can easily help you with, are the date/time values. For example, to convert string value of "890712" to a proper date, simply use
DateTime date = DateTime.ParseExact("890712", "yyMMdd", null)
which would result in 12.7.1989 or 7/12/1989.
313ead46-ae16-4d8a-a8c8-e6c9555beb9c|1|1.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
Implementing database login functionality in your application usually requires you to build your database connection string in code. There are many ways to do that, and new classes in .NET Framework 2.0 (or better - ADO.NET) adds another one.
ADO.NET introduces a new class to build your database connection strings: DBConnectionStringBuilder, which serves as a base class for other, strongly typed builders, like SqlConnectionStringBuilder, OleDBConnectionStringBuilder, and others - even OracleConnectionStringBuilder. While DBConnectionStringBuilder operates in in key/value mode - you can set any connection string property using string values:
.Add("Data Source", "ServerName") -
strongly typed builders help you build your connection string for your database using specific properties. For example, you could build the SqlServer connection string using the code like this:
string
username = "Username";
string password = "Password";
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
builder.DataSource = "SqlServerName";
builder.InitialCatalog = "Database";
builder.UserID = username;
builder.Password = password;
builder.IntegratedSecurity = (user.Length + password.Length == 0);
builder.ApplicationName = Application.ProductName;
string connectionString = builder.ConnectionString;
It also works backwards - setting the ConnectionString property also initializes all other properties which you can later inspect for additional information. Using the following code, for example:
string connectionString = "Data Source=SqlServerName;Initial Catalog=Database;User Id=Username;Password=Password";
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(connectionString);
bool allowAsync = builder.AsynchronousProcessing;
bool supportMARS = builder.MultipleActiveResultSets;
we find out that MARS is enabled by default, and asynchronous execution is turned off.
ConnectionString builders present a useful addition to the ADO.NET classes. Time to update some old code again…
113b66ab-2019-4fca-8f2c-67b4a6362846|0|.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
This is the first post in a new environment. You can access my old blog through this address. I'll redirect my RSS feed to the new blog in a day or two..
2f777a59-5f0d-4896-bf39-13926560a02a|1|1.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
If you happened to miss any of these...
- From Longhorn to Vista, from codename to code name. Beta 1 available for MSDN subscribers. More about codename changes
- Internet Explorer 7, tabbed browsing, shrink-to-fit Web page printing, RSS support, Beta 1 available for MSDN subscribers (standalone for XP SP2 or built in Windows Vista).
- MSN Messenger 7.5, voice clips, dynamic backgrounds, Im hoping for some useful stuff too. In private Beta for closed testers group.
- MSN Screensaver (Beta) , yet another thing to make your computer busy while you're away... Free download.
- VSTS 2005, July CTP, the last drop makes the VS 2005 July CTP family complete. Available for MSDN subscribers.
- SQL Server 2005 Upgrade Advisor, CTP June Refresh, free download.
ASP.NET 2.0 Webcasts, new 15-part series begins on August 4th. - ASP.NET 1.x to 2.0 migration page, including some cool upgrading papers.
- Escape from Yesterworld. Hehe.
a2132d98-c3e6-4952-b1e5-9d458d027ba1|1|1.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :
When you create a new TableAdapter for your DataSet using Configuration Wizard, VS kindly generates new code file for you and adds the specified connection string to application settings. The problem is that connection string also gets included in the auto generated code file and consequently embedded into compiled assembly, which may result in "unexpected behavior" in production environment, like application trying to connect to the wrong server and stuff... Not to mention potential security risks...
To turn this behavior off and store your connection string to configuration file only, select
(Connection string) setting in your project's
Settings page and switch its
GenerateDefaultValueInCode property to false.
3714a829-9868-44e7-806b-d70f2211e3a6|1|1.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :