Sql Server 2005管理和数据库
2009-02-23 13:33
246 查看
// // This function implements a breakpoint. It repeatedly prompts the user // for an expression, evaluates it with the supplied self-inspecting closure, // and displays the result. It is the closure that provides access to the // scope to be inspected, so each function must supply its own closure. // // Inspired by Steve Yen's breakpoint() function at // http://trimpath.com/project/wiki/TrimBreakpoint // function inspect(inspector, title) { var expression, result; // You can use a breakpoint to turn off subsequent breakpoints by // creating a property named "ignore" on this function. if ("ignore" in arguments.callee) return; while(true) { // Figure out how to prompt the user var message = ""; // If we were given a title, display that first if (title) message = title + "\n"; // If we've already evaluated an expression, display it and its value if (expression) message += "\n" + expression + " ==> " + result + "\n"; else expression = ""; // We always display at least a basic prompt: message += "Enter an expression to evaluate:"; // Get the user's input, displaying our prompt and using the // last expression as the default value this time. expression = prompt(message, expression); // If the user didn't enter anything (or clicked Cancel), // they're done and so we return, ending the breakpoint. if (!expression) return; // Otherwise, use the supplied closure to evaluate the expression // in the scope that is being inspected. // The result will be displayed on the next iteration. result = inspector(expression); } } // =========================================== function factorial(n) { // Create a closure for this function var inspector = function($) { return eval($); } inspect(inspector, "Entering factorial()"); var result = 1; while(n > 1) { result = result * n; n--; inspect(inspector, "factorial() loop"); } inspect(inspector, "Exiting factorial()"); return result; }
相关文章推荐
- 数据库管理10个最重要的特点 sql server 2005
- SQL Server 2005数据库管理10个特点
- SQL Server 2005数据库管理10个特点
- [SQL server 2005]之一配置自动管理数据库和日志大小
- SQL Server 2005——数据库管理10个最重要的特点
- SQL Server 2005――数据库管理10个最重要的特点
- 【转载】SQL Server 2005数据库用户权限管理的设置
- SQL Server 用户管理:用 SQL 语句创建数据库用户(SQL Server 2005)
- SQL Server 2005—数据库管理10个最重要的特点(转载)
- SQL Server 用户管理:用 SQL 语句创建数据库用户(SQL Server 2005)
- SQL Server 2005十大数据库管理特性
- SQL Server 2005数据库用户权限管理的设置
- 在SQL Server 2005中使用和管理数据库邮件 (1)
- SQL Server 2005——数据库管理10个最重要的特点
- SQL Server 2005—数据库管理10个特点
- Visual C# 2008+SQL Server 2005 数据库与网络开发--4.1.3 SQL Server 2005数据库管理工具
- SQL Server 用户管理:用 SQL 语句创建数据库用户(SQL Server 2005)
- 数据库管理10个最重要的特点 sql server 2005
- Sql Server 2005数据库用户管理
- Win7/Vista下安装SQL Server 2005/2008后,进行附加数据库错误的解决