You are not logged in [login] | [register]
RSS MAD is both an RSS feed archive and online feed reader.
You can browse our categories, search for a feed, or if you already have a URL, use our online feed reader.
Simply start browsing the site, and if you find some feeds you like, register to view them on your own personalized page!
you are here: home » blogs (technical) » general
Searching 185462 articles in 8938 feeds.
Do you like RSS MAD? Why not spread the news and tell a friend about it - it's as easy as filling out this form!
added: Wed, 21st September 2005 | 561 views | 0x in favourites
feed url: http://www.keithrull.com/SyndicationService.asmx/GetRss
C#, VB.NET, ASP.NET, Java, PHP, SQL Server, MySql, Oracle and the world!
One of the common problems that you would encounter when you are building applications that utilize views is that sometimes there are cases wherein a view gets out of date. This happens when you add a new column to a table a view is refrencing.
To fix this some people would delete the view and recreate it but there is better solution called sp_refreshview. sp_refreshview updates the metadata for the specified non-schema-bound view. Persistent metadata for a view can become outdated because of changes to the underlying objects upon which the view depends[description from msdn].
Here's a remark from MSDN regarding sp_refreshview:
"If a view is not created with schemabinding, sp_refreshview should be run when changes are made to the objects underlying the view that affect the definition of the view. Otherwise, the view might produce unexpected results when it is queried."
The syntax is pretty straight-forward
EXECUTE sp_refreshview '<view name>'
Once executed the views definition would be updated.
What if I want to execute sp_refreshview on all the views in my database? The answer is to create a cursor that would execute sp_refreshview on each of your view. Below is a script that does exacrly what you need:
--Refresh
the underlying metadata of all views
DECLARE @viewName ASVARCHAR(255) DECLARE listOfViews CURSORFORSELECT [name] FROMsysobjectsWHERE xtype
= 'V'OPEN listOfViews
FETCH NEXT FROM listOfViews into @viewName
WHILE (@@FETCH_STATUS <>
-1) BEGIN FETCH NEXT FROM listOfViews INTO @viewName
EXECsp_refreshview @viewName
ENDCLOSE listOfViews DEALLOCATE listOfViews
HTH
I've been doing a lot of code deployments lately and I've come across several occasions wherein my stored procedures wouldn't run as fast as expected compared to it's previously known execution time. The problem lies on the statistics not getting updated after change has been made against an index or other object that may affect efficiency. Since stored procedures are compiled, recompiling them would update these statistics.
Here's a remark about sp_recompile taken from the MSDN website
"The queries used by stored procedures and triggers are optimized only when they are compiled. As indexes or other changes that affect statistics are made to the database, compiled stored procedures and triggers may lose efficiency. By recompiling stored procedures and triggers that act on a table, you can reoptimize the queries."
The syntax is pretty straight-forward:
EXEC sp_recompile '<name of your sp>'
Once executed the stored procedure would then be marked for recompilation and would then be recompiled on the next execution. Niffty huh?!
But what if I want to recompile all my stored procedures? Well, fear not! You can use a cursor that would iterate on all the stored procedure in your current database and execute an sp_recompile against all of them. Below is the script to accomplish this task:
--Recompile
all stored procedures on the current database
DECLARE @StoredProcedureName ASVARCHAR(255) DECLARE listOfStoredProcedure CURSORFORSELECT [Name] FROMsysobjectsWHERE XTtype
= 'P'OPEN listOfStoredProcedure
FETCH NEXT FROM listOfStoredProcedure into @StoredProcedureName
WHILE (@@FETCH_STATUS <>
-1) BEGIN FETCH NEXT FROM listOfStoredProcedure INTO @StoredProcedureName
EXEC sp_recompile
@StoredProcedureName ENDCLOSE listOfStoredProcedure DEALLOCATE listOfStoredProcedure
GO
HTH
*Note: sp_recompile can also recompile triggers
Ever thought of how to capitalize the first letter of every word in a string? Here's how:
[C#]
using System; using System.Globalization; namespace KeithRull.CapitalizingLetters
{ internalclass Program
{ staticvoid Main(string[]
args) { string textToTransform ="keith,
you need to post more blogs!"; Console.WriteLine("Original
text: "+ textToTransform); //capitalizing
the first letter of our text using the current culture Console.WriteLine("Capitalize
using the current culture: "+ CultureInfo.CurrentCulture.TextInfo.ToTitleCase(textToTransform)); //capitalizing
the first letter of our text using a defined culture CultureInfo newCultureInfo =new CultureInfo("zh-Hans", false);
TextInfo textInfo = newCultureInfo.TextInfo;
Console.WriteLine("Capitalize
using a specified culture: "+ textInfo.ToTitleCase(textToTransform));
Console.Read(); } } }
[VB.NET]
Imports System Imports System.Globalization Namespace KeithRull.CapitalizingLetters FriendClass Program SharedSub Main(ByVal args() AsString) Dim textToTransform AsString="keith,
you need to post more blogs!" Console.WriteLine("Original
text: "+ textToTransform) 'capitalizing
the first letter of our text using the current culture Console.WriteLine("Capitalize
using the current culture: "Dim CultureInfo.CurrentCulture.TextInfo.ToTitleCase(textToTransform)) As+'capitalizing
the first letter of our text using a defined cultureDim NewCultureInfo As CultureInfo =New CultureInfo("zh-Hans",False) Dim textInfo As TextInfo = NewCultureInfo.TextInfo
Console.WriteLine("Capitalize
using a specified culture: "+ textInfo.ToTitleCase(textToTransform))
Console.Read() EndSubEndClassEndNamespace
HTH
Wooohooo!! Get 'em here!
Combined Visual Studio 2008 Service Pack 1 and .NET Framework 3.5 Service Pack 1
The update for Visual Studio 2008 SP1 and .NET Framework 3.5 Service Pack 1 in a single install.
.NET Framework 3.5 Service Pack 1
The update for just the .NET 3.5 Service Pack 1, it does not include updates for Visual Studio 2008.
Sorry for not being able to post anything interesting the past few months. Anyway, I saw this old thread at DevPinoy.org the other day and I realized that nobody has posted a complete sample solution that would solve and show how to accomplish dynamic input rows in a GridView. I was thinking of replying to it a few months back but i guess work caught up at me and I wasn't able to do so. I found some free time last week and decided to build an app to demonstrate how to solve this question.
Ok, lets start by analyzing the question:
Hi guys,
I have a problem here. How can i create a dynamic row in gridview the row will defend from the user input. For example the user enter a 4 then the gridview will generate 4 rows. Please site me an example.
Thanks,
D_Conqueror
From what I understood the user wants to be able to create dynamically rows of data in the GridView depending on the number he enters on a Textbox. We can accomplish this by creating a datasource with the same number of rows as the user specified and binding it to our GridView.
To demonstrate how to solve this problem i decided to create this sample.
To start off with our tiny project we need to create a page that would ask the user for the number of rows he wan'ts to display on the GridView. The page will contain a TextBox for input and a LinkButton that we will use for submitting the value to a seperate page. Below is the HTML code for our first page (Default.aspx):
<html
xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Dynamic GridView Input Rows</title> </head> <body>
<form id="form1" runat="server">
<div style="width:330px;">
Number of rows to create: <asp:TextBox ID="numberOfRowsTextBox" runat="server"></asp:TextBox>
<div style="text-align:right;">
<asp:LinkButton ID="submitLinkButton" runat="server" onclick="submitLinkButton_Click">Submit</asp:LinkButton>
</div> </div> </form> </body> </html>
and below is the code listing for Default.aspx
using System; public partial class _Default
: System.Web.UI.Page { protectedvoid submitLinkButton_Click(object sender,
EventArgs e) { Response.Redirect(String.Format( "DynamicGridViewPage.aspx?rows={0}" ,
numberOfRowsTextBox.Text)); } }
As you can see, all we are doing is passing the value of our TextBox as a query string parameter to our second page. The true juice of our solution is on the next page. But before we go into detail to that we need to setup first what type of values needs to be shown on the page. For this example i've decided to display a simple Person class that has for fields. An ID, a Firstname, a Lastname, and a boolean field called IsChristian. Below is the code for our Person class:
using System; ///
<summary>///
Summary description for Person///
</summary>publicclass Person
: IPerson { privateint _ID; privatestring _firstname; privatestring _lastname; privatebool _isChristian; publicint ID
{ get { return _ID;
} set { _ID = value;
} } publicstring Firstname
{ get { return _firstname;
} set { _firstname = value;
} } publicstring Lastname
{ get { return _lastname;
} set { _lastname = value;
} } publicbool IsChristian
{ get { return _isChristian;
} set { _isChristian = value;
} } public Person() {} publicoverridestring ToString()
{ string returnValue =@"ID:
"+this.ID.ToString() +"<br
/>"+"Firstname:
"+this.Firstname +"<br
/>"+"Lastname:
"+this.Lastname +"<br
/>"+"Is
Christian: "+this.IsChristian.ToString(); return returnValue;
} }
I also created a class Persons that is a generic list of type Person. In that class I created a contructor that accepts a integer value that we will use to create the dummy list of person. The code for our Persons class is listed below:
using System; using System.Collections.Generic; ///
<summary>///
Summary description for Persons///
</summary>publicclass Persons:
List<Person> { public Persons()
{} public Persons(int rowCount)
{ this.Clear(); for (int i = 1;
i <= rowCount; i++) { Person p =new Person();
p.ID = i; this.Add(p);
} } }
Now on our second page, DynamicGridViewPage.aspx, I decided to place 4 controls. A GridView that would contain our input boxes, a label to display messages, a button to submit the fields and another GridView to show the submit values. I've added these few quirks on the page to demonstrate how you can retrieve entered values in a GridView. Below is the HTML listing for the DynamicGridViewPage.aspx.
<html
xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title> </head> <body> <form id="form1" runat="server">
<div> <asp:GridView ID="dynamicGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="ID">
<Columns> <asp:TemplateField> <ItemTemplate> <asp:Label ID="idLabel" runat="server" Text='<%#
Bind("ID")
%>'> </asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField
HeaderText="Firstname">
<ItemTemplate> <asp:TextBox ID="firstnameTextBox" runat="server">
</asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField
HeaderText="Lastname">
<ItemTemplate> <asp:TextBox ID="lastnameTextBox" runat="server">
</asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField
HeaderText="Christian">
<ItemTemplate> <asp:CheckBox ID="isChristianCheckBox" runat="server" Enabled="true" />
</ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
<asp:LinkButton ID="submitLinkButton" runat="server" onclick="submitLinkButton_Click">Submit</asp:LinkButton>
<br /> <br /> <asp:Label ID="messageLabel" runat="server"></asp:Label>
<asp:GridView ID="submitedRecordsGridView" runat="server">
<EmptyDataTemplate> <b>No record submitted!</b> </EmptyDataTemplate>
</asp:GridView> </div> </form> </body> </html>
One of the things that you would quickly realize on our page is that the only thing I'm binding to our GridView is the ID property. The reason is because we don't really need to bind all the fields to our GridView because we are just creating rows. Next, lets look at the code behind for our page.
using System; using System.Web.UI.WebControls; using System.Text; public partial class DynamicGridViewPage
: System.Web.UI.Page { publicint RowCount
{ get { int returnValue = 0; if (Request.QueryString["rows"]
!=null)
{ try { int.TryParse(Request.QueryString["rows"].ToString()
, out returnValue);
} catch{
messageLabel.Text =@"Invalid
row count! Go back to the <a href=""Default.aspx"">home page</a> to enter
a value!"; } } return returnValue;
} } protectedvoid Page_Load(object sender,
EventArgs e) { if (!IsPostBack)
{ Persons listOfPersons =new Persons(RowCount);
dynamicGridView.DataSource = listOfPersons;
dynamicGridView.DataBind(); } } protectedvoid submitLinkButton_Click(object sender,
EventArgs e) { Persons listOfPerson =new Persons();
StringBuilder messageBuilder =new StringBuilder(); foreach (GridViewRow
gr in dynamicGridView.Rows)
{ if (gr.RowType
== DataControlRowType.DataRow) { Person p =new Person(); if (gr.FindControl("idLabel")
!=null)
{ p.ID =int.Parse((gr.FindControl("idLabel") as Label).Text);
} if (gr.FindControl("firstnameTextBox")
!=null)
{ p.Firstname = (gr.FindControl("firstnameTextBox") as TextBox).Text;
} if (gr.FindControl("lastnameTextBox")
!=null)
{ p.Lastname = (gr.FindControl("lastnameTextBox") as TextBox).Text;
} if (gr.FindControl("isChristianCheckBox")
!=null)
{ p.IsChristian = (gr.FindControl("isChristianCheckBox") as CheckBox).Checked;
} if (!p.Firstname.Equals(String.Empty)
&& !p.Lastname.Equals(String.Empty)) { listOfPerson.Add(p); } else {
messageBuilder.Append(String.Format( @"Record
on line number {0} was not submitted because it doesn''t have a Firstname or Lastname!<br
/>" , p.ID)); } } } if (messageBuilder.Length
> 0) { messageLabel.Text = messageBuilder.ToString();
} else {
messageLabel.Text = String.Empty;
} submitedRecordsGridView.DataSource = listOfPerson;
submitedRecordsGridView.DataBind(); } }
What happens on the code-behind is pretty simple. When the page loads it checks to see if it is not a PostBack, if it's not then it tries to retrieve the rows to create using the RowCount property. Once retrieved, that value is then passed to the contructor of the Persons class to create a dummy list of items that would then be assigned to the DataSource property of our GridView.
I've added code to the submit button to simulate submissions to show how you can retrieve the values entered on our GridView.
And that's it. Thats how you create a dynamic rows in a GridView and access the values. I hope i was to shed light on this issue. Thanks!
Want the source code? Download it here: KeithRull.DynamicGridViewRows.v2.zip (6.37 KB)
Here's an update to my blog entry 3 years ago regarding the same topic:
---Calculates
the first day of the previous month
SELECT
DATEADD(mm, DATEDIFF(m,
0, GETDATE())
- 1, 0) AS [First dayof the
previous month] ---Calculates
the first day of current monthSELECTDATEADD(mm, DATEDIFF(m,
0, GETDATE()),
0) AS [First dayof the currentmonth] ---Calculates
the first day of next monthSELECTDATEADD(mm, DATEDIFF(m,
0, GETDATE())
+ 1, 0) AS [First dayof the
next month] ---Calculates
the last day of the previous monthSELECTDATEADD(d,
-1, DATEADD(mm, DATEDIFF(m,
0, GETDATE()),
0)) AS [Last dayof the
previous month] ---Calculates
the last day of the current monthSELECTDATEADD(d,
-1, DATEADD(mm, DATEDIFF(m,
0, GETDATE())
+ 1, 0)) AS [Last dayof the currentmonth] --Calculates
the last day of the next monthSELECTDATEADD(d,
-1, DATEADD(mm, DATEDIFF(m,
0, GETDATE())
+ 2, 0)) AS [Last dayof the
next month] --Calculates
the first day of the yearSELECTDATEADD(yy, DATEDIFF(yy,0,GetDate()),
0) AS [First dayof the year] --Calculates
the first day of the quaterSELECTDATEADD(qq, DATEDIFF(qq,0,GetDate()),
0) AS [First dayof the
quarter] --Calculates
the first monday of the monthSELECTDATEADD(wk, DATEDIFF(wk,0,dateadd(dd,
6 - DATEPART(Day,GetDate()),GetDate())),
0) AS [First
monday of the month] --Calculates
the last day of the prior monthSELECTDATEADD(mm, DATEDIFF(mm,0,GetDate()),
0) AS [Last dayof the
previous month] --Calculates
the last day of the prior yearSELECTDATEADD(yy, DATEDIFF(yy,0,GetDate()),
0) AS [Last dayof the
previous year] --Calculates
the last day of the current yearSELECTDATEADD(mm, DATEDIFF(m,0,GetDate()
) + 1, 0) AS [Last dayof the currentyear] --Calculates
the monday of the current weekSELECTDATEADD(wk, DATEDIFF(wk,0,GetDate()),
0) AS [Monday of the current week] --Calculates
the yesterdays dateSELECTDATEADD(dd, DATEDIFF(dd,0,getdate()),
-1) AS [Yesterdays
date] --Calculates
the todays dateSELECTGetDate() AS [Todays
date] --Calculates
the tommorows dateSELECTDATEADD(dd, DATEDIFF(dd,0,getdate()),
1) AS [Tommorows
date] ---Calculates
the 15th day of previous monthSELECTDATEADD(d,
14, DATEADD(mm, DATEDIFF(m,
0, GETDATE())
- 1 , 0)) AS [15th dayof previous month] ---Calculates
the 15th day of current monthSELECTDATEADD(d,
14, DATEADD(mm, DATEDIFF(m,
0, GETDATE()),
0)) AS [15th dayofcurrentmonth] ---Calculates
the 15th day of next monthSELECTDATEADD(d,
14, DATEADD(mm, DATEDIFF(m,
0, GETDATE())
+ 1, 0)) AS [15th dayof next month] --Gets
the name of the current monthSELECTDATENAME(month, GetDate()) AS [Name of the currentmonth] --Gets
the weekday name of the current dateSELECTDATENAME(dw, GetDate()) AS [Weekday
name of the current date] --Gets
the weekday name of the current date next yearSELECTDATENAME(dw, DATEADD(yy,
1, GetDate())) AS [Weekday
name of the current date
next year] --Gets
the weekday name of the current date last yearSELECTDATENAME(dw, DATEADD(yy,
-1, GetDate())) AS [Weekday
name of the current date
last year]
And here's the result for the query above
First
day of the previous month ------------------------------- 2008-06-01 00:00:00.000
(1 row(s) affected) First day of the current month ------------------------------
2008-07-01 00:00:00.000 (1 row(s) affected) First day of the next month ---------------------------
2008-08-01 00:00:00.000 (1 row(s) affected) Last day of the previous month ------------------------------
2008-06-30 00:00:00.000 (1 row(s) affected) Last day of the current month -----------------------------
2008-07-31 00:00:00.000 (1 row(s) affected) Last day of the next month --------------------------
2008-08-31 00:00:00.000 (1 row(s) affected) First day of the year -----------------------
2008-01-01 00:00:00.000 (1 row(s) affected) First day of the quarter ------------------------
2008-07-01 00:00:00.000 (1 row(s) affected) First monday of the month -------------------------
2008-07-07 00:00:00.000 (1 row(s) affected) Last day of the previous month ------------------------------
2008-07-01 00:00:00.000 (1 row(s) affected) Last day of the previous year -----------------------------
2008-01-01 00:00:00.000 (1 row(s) affected) Last day of the current year ----------------------------
2008-08-01 00:00:00.000 (1 row(s) affected) Monday of the current week --------------------------
2008-07-21 00:00:00.000 (1 row(s) affected) Yesterdays date -----------------------
2008-07-23 00:00:00.000 (1 row(s) affected) Todays date ----------------------- 2008-07-24
11:40:57.557 (1 row(s) affected) Tommorows date ----------------------- 2008-07-25
00:00:00.000 (1 row(s) affected) 15th day of previous month --------------------------
2008-06-15 00:00:00.000 (1 row(s) affected) 15th day of current month -------------------------
2008-07-15 00:00:00.000 (1 row(s) affected) 15th day of next month -----------------------
2008-08-15 00:00:00.000 (1 row(s) affected) Name of the current month ------------------------------
July (1 row(s) affected) Weekday name of the current date --------------------------------
Thursday (1 row(s) affected) Weekday name of the current date next year ------------------------------------------
Friday (1 row(s) affected) Weekday name of the current date last year ------------------------------------------
Tuesday (1 row(s) affected)
I'm hoping that I could update this regularly. Did I miss anything? Post it on the comments and lets start an archive of useful sql date scripts.
In part 3 of our series "Ten Questions - Filipino Developer Edition", I was able to talk to Melvin Dave Vivas, founder of PinoyJUG, developer, technopreneur and part-time fashion photojounalist(Heheh! I bet he wants me to include this on his intro :P).
Read more about this interview here.
My friend Marlon Ribunal who is a developer and an avid SQL Server blogger needs your help... Her mother who is in the Philippines got diagnose with Leukemia yesterday and he needs financial help to get her mother decent medical treatment. Below is his message posted on his blog:
God Bless You!
I am in need of financial help for my mother who has been diagnosed with Leukemia. She is in the Philippines right now. She is only 55 years old.
I am sending this email to people who, in one way or another, might be willing to help. Our primary need is Financial, but a sincere Prayer for the recovery of my mother is likewise important.
If you know groups of people or organizations who are doing Charitable works toward families in need of financial help, please send me information on how to contact them.
Few years ago (2002), I came here in America through my wife's petition. But all through out these years we've been struggling financially. My wife got laid off from her work because their company can no longer support their business and decided to close down. Our family's financial resources are not enough to put our mother under decent medication.
If you know anyone who can help us financially, please contact me immediately. My information is below.
Sincerely,
Marlon RibunalUS Info:Marlon Ribunal
(562) 989-5406 [ Home ]
(562) 786-2889 [Celphone ]Philippines Info:Mario Ribunal, Jr.09215102848
Please help Marlon. Thanks and God Bless!
A friend of mine sent this link to me today and it made me really laugh really hard... Man, talk about someone posting a review on something that they don't really understand.
Actual review link can be found here: http://www.amazon.com/review/product/B000PSWZSC/ref=cm_cr_pr_link_2?%5Fencoding=UTF8&pageNumber=2&sortBy=bySubmissionDateDescending
Comments about his post can be found here: http://www.amazon.com/review/R1PPJ35WY17216/ref=cm_cr_pr_cmt?%5Fencoding=UTF8&ASIN=B000PSWZSC&nodeID=#wasThisHelpful
Hehehe!
This week we continue our quest to get to know well-known Filipino developers and this time I was able to catch Jojo Paderes, one of the founding board members of PinoyJUG, coder-extraordinaire at Viewlocity and father to two lovely twins.
Read more about this interview here http://devpinoy.org/blogs/keithrull/archive/2008/06/24/ten-questions-with-jojo-paderes.aspx
Because of the inspiration from what Chris Williams started I have decided to start Ten Questions - Filipino Developers Edition. Basically, the idea is to interview well-known Filipino developers and ask them 10 questions that would shed light on their persona and their geekiness!
On this first go around we interview Migz Paraz, a fixture in the Philippine IT industry since the 90s. He is well-known for his involvement with the Filipino Java community and for his thoughts posted on his blog at paraz.com among others.
Read more about this interview here.
http://devpinoy.org/blogs/keithrull/archive/2008/06/20/ten-questions-with-migz-paraz.aspx
Just in case you are studying WCF.. You might want to check out the .NET StockTrader Sample Application.
The .NET StockTrader Sample Application is an end-to-end sample application illustrating Windows Communication Foundation and .NET Enterprise Technologies. It is a service-oriented application based on Windows Communication Foundation (.NET 3.0) and ASP.NET, and illustrates many of the .NET enterprise development technologies for building highly scalable, rich "enterprise-connected" applications. It is designed as a benchmark kit to illustrate alternative technologies within .NET and their relative performance.
The application offers full interoperability with J2EE and IBM WebSphere's Trade 6.1 sample application. As such, the application offers an excellent opportunity for developers to learn about .NET and building interoperable, service-oriented applications.
Read more here: http://msdn.microsoft.com/en-us/netframework/bb499684.aspx
I've been diving into WCF lately and I have found this sample application as a great blueprint on how to develop applications using WCF & ASP.NET. The sample includes a smart client and an ASP.NET application that you can jump on and play that showcases as huge list of technologies and approaches when developing an SOA app via WCF and .NET
Below is a list of technologies that's demonstrated in this sample application:
Try and see for yourself ;) I bet you will enjoy it too!
Do you want to use LINQ but you are still stuck with .NET 2.0 and .NET 3.0? Are you still waiting for your company to upgrade to VS 2008 to get a hold of LINQ? Then wait no more because the good guys who wrote the book C# 3.0 In A Nutshell have created a .NET library that implements all the standard LINQ operators so that you can enjoy the goodness of LINQ in .NET 2.0 and 3.0.
LINQBridge is a reimplementation of all the standard query operators in Framework 3.5's Enumerable class. It's designed to work with the C# 3.0 compiler, as used by Visual Studio 2008. LINQBridge comprises a "LINQ to Objects" API for running local queries. (It doesn't include an implementation of LINQ to SQL, nor LINQ to XML; a good compromise can be to force Framework 3.5 out to just the server machines, allowing LINQ to SQL to be used where it's needed most).
LINQBridge also includes Framework 3.5's generic Func and Action delegates, as well as ExtensionAttribute, allowing you to use C# 3.0's extension methods in Framework 2.0.
In fact LINQBridge lets you use nearly all of the features in C# 3.0 with Framework 2.0—including extension methods, lambda functions and query comprehensions. The only feature it does not support is compiling lambdas to expression trees (i.e., Expression<TDelegate>).
Awesome huh?! Get this goodie here: http://www.albahari.com/nutshell/linqbridge.html
I saw this post from Mahesh today and it taught me something that I know I'll put in good use in years to come...
Former President of India APJ Abdul Kalam at Wharton India Economic forum , Philadelphia, United States March 22,2008)
Question: Could you give an example, from your own experience, of how leaders should manage failure?
Kalam: Let me tell you about my experience. In 1973 I became the project director of India's satellite launch vehicle program, commonly called the SLV-3. Our goal was to put India's "Rohini" satellite into orbit by 1980. I was given funds and human resources -- but was told clearly that by 1980 we had to launch the satellite into space. Thousands of people worked together in scientific and technical teams towards that goal.
By 1979 -- I think the month was August -- we thought we were ready. As the project director, I went to the control center for the launch. At four minutes before the satellite launch, the computer began to go through the checklist of items that needed to be checked. One minute later, the computer program put the launch on hold; the display showed that some control components were not in order. My experts -- I had four or five of them with me -- told me not to worry; they had done their calculations and there was enough reserve fuel. So I bypassed the computer, switched to manual mode, and launched the rocket. In the first stage, everything worked fine. In the second stage, a problem developed. Instead of the satellite going into orbit, the whole rocket system plunged into the Bay of Bengal. It was a big failure.
That day, the chairman of the Indian Space Research Organization , Prof. Satish Dhawan , had called a press conference. The launch was at 7:00 am, and the press conference -- where journalists from around the world were present -- was at 7:45 am at ISRO 's satellite launch range in Sriharikota [in Andhra Pradesh in southern India]. Prof. Dhawan, the leader of the organization, conducted the press conference himself. He took responsibility for the failure -- he said that the team had worked very hard, but that it needed more technological support. He assured the media that in another year, the team would definitely succeed. Now, I was the project director, and it was my failure, but instead, he took responsibility for the failure as chairman of the organization.
The next year, in July 1980, we tried again to launch the satellite -- and this time we succeeded. The whole nation was jubilant. Again, there was a press conference. Prof. Dhawan called me aside and told me, "You conduct the press conference today."
I learned a very important lesson that day. When failure occurred, the leader of the organization owned that failure. When success came, he gave it to his team. The best management lesson I have learned did not come to me from reading a book; it came from that experience ….
Thanks Mahesh for sharing such a wonderful inspiration to us...
» more
» more
Is RSS MAD missing something? Tell us about new feeds here.