Thursday, 23 November 2006

I'm a dink!

According to Wikipedia, dink, can mean a lot of things, ranging from small boats to small penises. A dink is also a creature in the SpaceBalls parody of Star Wars. But is seems that the main use of this word right now is for "Double Income No Kids". That's me! Well, I have a cat, but he doesn't generate any income. You can also find this particular demographic group called DINKY, which is a more dynamic acronym that takes into the consideration the future possibility of offspring(Y=yet). The Americans seem to prefer Dink, while the UK and their former colonies Dinky.

Apparently being a dink means that one is part of a high-earning couple who choose not to have children and are therefore able to afford a more expensive consumer lifestyle. A dink is considered a lot of times as being also a yuppie, or Young Urban Professional, with pejorative connotations of selfishness, materialism, and superficiality.

So, apparently, I should :

  • generate an income (checked)

  • have a mate (checked)

  • the mate should also generate income (checked)

  • both generated incomes should be high (yeah, right)

  • selfish (checked)

  • materialist (not really)

  • superficial (yes!)



So, I have demonstrated creating by oneself a Cosmopolitan test by using Wikipedia. Are you a dink? How dinky are you? Take the test! :D

Wednesday, 22 November 2006

Building a GridView, DataGrid or Table with THEAD, TBODY or TFOOT sections

There are 726 articles on Google when you search "gridview thead". Most of them, and certainly all the first ones, talk about not being able to render thead, tbody and tfoot elements for NET 2.0 table based controls. But it's not so!

Each table row has a property called TableSection. If you set it to TableRowSection.TableHeader, TableBody or TableFooter, the specific tags will be created. Let me show a quick example of creating a THEAD element in a gridview:
gridView.HeaderRow.TableSection=TableRowSection.TableHeader;

And that's it. This kind of behaviour works for the Table WebControl and everything that derives from it or uses it to render itself.
However, the rendering of these elements inside the Table control is done simply with writer.RenderBeginTag(HtmlTextWriterTag.Thead), which gives no one the ability to change from .NET code the attributes of those sections. You can't have it all! You can use CSS, though. ex:
.tableClass thead {
position:relative;
}

The Marsians are attacking!

In 2001, July, a strange phenomenon in the form of red rain occured in southern India. While the official explanation of this is that desert dust has been brought by winds and brought down by rain, Dr. Godfrey Louis, a proffesor of physics for the Cochin University of Science and Technology thinks otherwise: it's all about alien microbes that arrived here by riding a comet.

The story might seem a bit far fetched, but even BBC News wrote about it. And this guy released a science paper about it after what appears to be five years of study. Take a minute to read it, it's only 18 pages long. What seems odd to me is that, even if he maintains that the red rain particles are biological in nature, he doesn't mention anything about reproduction, nor of any attempt to revive them.

Anyway, it seemed interesting enough to blog about it. There is a more down to Earth and detailed article about it in Wikipedia. You can also find here is the transcript of a news report together with animations that talks about Cardiff University scientists confirming the presence of some sort of DNA in the seemlessly devoid of nucleus cells.

Monday, 20 November 2006

Multiple IE versions on the same computer

Usually, when I decide to blog on something, I do the testing and researching and installing first, then blog about it. But now I intend to use this cool site:
http://tredosoft.com/Multiple_IE
which boasts with installing all IE versions since 3.0 (oh, beloved 3.0) on the same computer without any problems. Since I am not a trusty guy, I blog about it before, then, if no one ever hears from me again, it means that no browser on any computer worked anymore after this :)

Well, without further due, let me proceed :-SS
Extra info: http://www.positioniseverything.net/articles/multiIE.html

Step 1: Installing IE7.
Of course I had to validate my copy of Windows to download it, then I had to download all updates (even if I went to Windows Update right before installing IE7), then wait until it searched my computer for malicious software, then installing everything. You can't imagine a smoother installer. It just tells you to wait and does everything in the background, showing you meaningless text labels, a cool progress bar and, of course, asking you to close everything before and restart Windows after the installation.
But it worked, and I am not writing this from Firefox :)

Step 2: Installing multiple-ie-setup.exe
Wow! It took around 1 minute to install everything. Of course, not everything is going as smoothly as planned. First of all, I can't see Blogger (and suposedly not any other cookie using site) in IE6.0. Then, it redirects me to a nocookies.html files that doesn't exist :-/ But that's a Blogger issue. The Options menu in IE6.0 is actually the IE7.0 menu and the settings for cookies cannot be overriden. Actually, you can, but the settings won't save.
After looking at the TrendoSoft site, I've noticed that this bug is considered solved, even if some of the people seem to continue to have problems. So I've tested more throughly. Session variables seems to be saved, but Blogger continues to take me to the nocookies page. Also, AjaxPro, the ajax library I am using, doesn't seem to work with IE 6.0.

All in all it seems a pretty functional program. However, the type of sites that I am building have certain characteristics that seem not to work with it. I will try to log on TrendoSoft and get the problem fixed, but I guess Yousif did the best he could so far and resolving every issue I have will be hard if not impossible.

Tuesday, 7 November 2006

TransactionScope in .NET

Amirthalingam Prasanna's article about the transactional model in NET 2.0.

As far as I understand, the old declarative ADO.NET Begin/RollBack/CommitTransaction model has become obsolete and a new TransactionScope model is used in NET 2.0. You have to add the System.Transactions.dll file to your references.

Basically, the C# code is like this:

using (TransactionScope scope=new TransactionScope
(scopeOption,transactionOptions,interopOption)) {
// do database ops

// if everything is alright
scope.Complete();
}


scopeOption is an enum of type TransactionScopeOption, with the options Required (requires a transaction and uses if there is already on open), RequiresNew (always opens a new transaction), Suppress (don't use a transaction, even if one is open)

transactionOptions is of type TransactionOptions which has two interesting properties: IsolationLevel and Timeout.

interopOption is an enum of type EnterpriseServicesInteropOption and specifies how distributed transactions interact with COM+ transactions.

But what about the old NET1.1 framework? Doesn't it have something like that? Here comes Alexander Shirshov with help:
TransactionScope in .NET 1.1

.NET Framework 3.0 has been released!

Release announcement

NET 3.0 is NOT working on dotNET 3.0 or C# 3.0. It's just the old Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation and Windows Cardspace into one package.

It is optimised and designed mostly for Windows Vista though and be sure you uninstall any CTP versions before installing this one.

The online documentation for the Windows SDK for Vista RC1 and the .NET Framework 3.0 is also now available.Here are the direct links to the documentation for the .NET Framework 3.0 technologies:

Thursday, 2 November 2006