Welcome to Hardcode Sign in | Join | Help

July 2008 - Posts

If you're still working with C++ STL and need a very efficient hash_map implementation here's the one used at Google.

I almost forgot about it but still submitted two quickly-written answers for the first two problems, hoping I will make it ...

Would be great if implemented in C++ also, because ((Literal)control).Text looks worse than Literal(control).Text.

Interesting article by Irina here (RO only though). Also, their Yahoo Messenger / Google Chat bot simply rulz.

If the data item is an entity (wrapped in an EntityDataSourceWrapper) you can use the method described here.

If not (and you are using a custom select statement), you have two choices:

 - DataBinder.Eval( dataitem, "name")

 - ((DbDataRecord)dataitem).GetValue( 0) ( I also didn't know about this one :) it works with lists and everything returned by entitysql)

Even using this syntax you may run into the following error:

The type of one of the expressions in the join clause is incorrect.  Type inference failed in the call to 'GroupJoin'.

Solution ? Strong-type the join "on" clause:

on new UserBrand { userid = groupuser.userid, brandid = selectedbrand.id } equals new UserBrand { userid = purchase.userid, brandid = purchase.Product.brandid }

As I've been using Dynamic Data and Entity Framework, here are my thoughts after messing with them:

- Dynamic Data simply rocks, you are not required to use their navigation system and you can quickly set up your own. I have modified the standard page templates though for being more user-friendly (like having the parent set automatically in the dropdown when inserting a new item going from parent details) and also have implemented a generic many-to-many editor (two actually, one with two listboxes and move left/right) and one with a checkboxlist, pretty simple although you have to use reflection.

- Entity Framework is not so bad :) once you get past the following: use this when you need where conditions on related data and use Dynamic Data foreign key dynamic control to automatically insert the parent relation (if you use EntityDataSource).

Even cooler than the Office file specs is that MS has released specifications for their proprietary protocols.