Skip to main content

Posts

Showing posts from March, 2007

A solution for two problems in deep first search

The problems are exercises in . Exercises 22.3-7 Give a counterexample to the conjecture that if there is a path from u to v in a directed graph G, and if d[u] < d[v] in a depth-first search of G, then v is a descendant of u in the depth-first forest produced. Exercises 22.3-8 Give a counterexample to the conjecture that if there is a path from u to v in a directed graph G, then any depth-first search must result in d[v] ≤ f[u]. There is a counterexample for both problems in the following graph.

"does not exist in the current context" error in Visual Studio 2005

In ASP.NET development, there may be error "... does not exist in the current context" and the component ... lies obviously where it is. This may be a bug of Visual Studio 2005. When creating an aspx page, the component named "Label1" may be assigned a variable named "ctll00_Content1_Label1" in CLR, when the name "Label1" is changed, the name "ctll00_Content1_Label1" may not follow, and lead a error. The solution of the problem is very simple. Just copy+X your code away, save the file, and then copy+V the code back for Visual Studio 2005 to perform refactoring of the code.