当前位置: 编程技术>综合
本页文章导读:
▪[Eclipse] Getting started with Eclipse plug-ins: creating extension points An extension point is a hook that allows two plug-ins to communicate through the exchange of data or code. All extension points are defined in XML; these are then stored
in the Extension Registry and accessed on demand from client plug-ins. One nice f.........
▪EasyUI Tree+Asp.net实现权限树或目录树导航 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="Manage_Main" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1.........
▪自己总结的 五种IO模型之间的关系与区别
自己总结的 五种IO模型之间的关系与区别
今天在网上看了几篇博文,加上以前所学,再加之自己的理解,画成了下面这幅图,
不对之处,请批.........
[1][Eclipse] Getting started with Eclipse plug-ins: creating extension points
来源: 互联网 发布时间: 2013-11-10
An extension point is a hook that allows two plug-ins to communicate through the exchange of data or code. All extension points are defined in XML; these are then stored in the Extension Registry and accessed on demand from client plug-ins. One nice feature of Eclipse's Extension Registry is that it is possible to dynamically link plug-ins together at runtime but prior to the bundle having been started. The Extension Registry is also cached, so that the second time you start up Eclipse, it starts faster than it did previously.
To define an extension point, we need two pieces of information:
- The id and name of the extension point
- A pointer to an XML Schema that defines what valid XML content is allowed
作者:wonderfan 发表于2013-1-12 19:28:23 原文链接
阅读:27 评论:0 查看评论
[2]EasyUI Tree+Asp.net实现权限树或目录树导航
来源: 互联网 发布时间: 2013-11-10
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="Manage_Main" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>网站后台通用管理系统,<%=adminname%>,您好!</title> <link href=/blog_article/"Css/default.css" rel="stylesheet" type="text/css" /> <!--easyui--> <link rel="stylesheet" type="text/css" href=/blog_article/"easyui/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href=/blog_article/"easyui/themes/default/tree.css" /> <link rel="stylesheet" type="text/css" href=/blog_article/"easyui/themes/icon.css" /> <script type="text/javascript" src=/blog_article/"easyui/jquery-1.8.0.min.js"></script>/index.html <script type="text/javascript" src=/blog_article/"easyui/jquery.easyui.min.js"></script>/index.html <script type="text/javascript" src='/blog_article/EasyUI/JQLoader.js'> </script> <script type="text/javascript" src='/blog_article/EasyUI/outlook.js'> </script> <script type="text/javascript"> $(function () { $('#lefttree').tree({ animate: true, checkbox: false, url: 'GetTreeDataFromDB.ashx?father=0', onClick: function (node) { if (node.attributes != "") { addTab(node.text, node.attributes, node.id); } }, onLoadSuccess: function (node, data) { $('#lefttree').show(); } }); $('#loginOut').click(function () { $.messager.confirm('系统提示', '您确定要退出本次登录吗?', function (r) { if (r) { location.href = 'LoginExit.ashx'; } }); }) }); </script> </head> <body class="easyui-layout" style="overflow-y: hidden" scroll="no"> <form id="form1" runat="server"> <noscript> <div 抱歉,请开启脚本支持!' /> </div> </noscript> <div region="north" split="true" border="false" style="overflow: hidden; height: 60px; background: url(/blog_article/images/layout-browser-hd-bg.gif) #7f99be repeat-x center 50%; line-height: 20px;color: #fff; font-family: Verdana, 微软雅黑,黑体"> <div style="float:right;padding-top:5px;padding-right:20px;text-align:right;"> <span class="head"> </span> <div style=" margin-top:6px;" class="head"> <span class="icon icon-quit"> </span><a href=/blog_article/"/index.html id="loginOut">安全退出</a> </div> </div> <span style="padding-left:10px; font-size: 16px; "><img src=/blog_article/"images/blocks.gif width="20" height="20" align="absmiddle" />网站后台通用管理系统 V1.0</span> </div> <div region="south" split="true" style="height: 30px; background: #D2E0F2; "> <div class="footer"> 网站后台通用管理系统 <%=adminname%>,您好! 版权所有@2012</div> </div> <div region="west" hide="true" split="true" title="导航菜单" style="width:180px;" id="west"> <div id="nav" class="easyui-accordion" fit="true" border="false"> <!-- 导航内容 --> <div id="lefttree" style="margin:5px;"></div> </div> </div> <div id="mainPanle" region="center" style="background: #eee; overflow-y:hidden"> <div id="tabs" class="easyui-tabs" fit="true" border="false" > <div title="欢迎使用" style="padding:20px;overflow:hidden; " > <span style="font-size:18px;">欢迎进入系统</span> </div> </div> </div> <div id="mm" class="easyui-menu" style="width:150px;"> <div id="mm-tabupdate">刷新</div> <div class="menu-sep"></div> <div id="mm-tabclose">关闭</div> <div id="mm-tabcloseall">全部关闭</div> <div id="mm-tabcloseother">除此之外全部关闭</div> <div class="menu-sep"></div> <div id="mm-tabcloseright">当前页右侧全部关闭</div> <div id="mm-tabcloseleft">当前页左侧全部关闭</div> <div class="menu-sep"></div> <div id="mm-exit">退出</div> </div> </form> </body> </html>
<%@ WebHandler Language="C#" Class="GetTreeDataFromDB" %> using System; using System.Web; using System.Configuration; using System.Data; using System.Text; using System.Collections.Generic; //add using System.Web.Script.Serialization; public class GetTreeDataFromDB : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; //获取数据库中的分类数据 string fatherid = context.Request.QueryString["father"]; DataTable dt = createDT(); string json = GetTreeJsonByTable(dt, "module_id", "module_name","module_url", "module_fatherid", "0"); context.Response.Write(json); context.Response.End(); } #region 根据DataTable生成EasyUI Tree Json树结构 StringBuilder result = new StringBuilder(); StringBuilder sb = new StringBuilder(); /// <summary> /// 根据DataTable生成EasyUI Tree Json树结构 /// </summary> /// <param name="tabel">数据源</param> /// <param name="idCol">ID列</param> /// <param name="txtCol">Text列</param> /// <param name="url">节点Url</param> /// <param name="rela">关系字段</param> /// <param name="pId">父ID</param> private string GetTreeJsonByTable(DataTable tabel, string idCol, string txtCol, string url, string rela, object pId) { result.Append(sb.ToString()); sb.Clear(); if (tabel.Rows.Count > 0) { sb.Append("["); string filer = string.Format("{0}='{1}'", rela, pId); DataRow[] rows = tabel.Select(filer); if (rows.Length > 0) { foreach (DataRow row in rows) { sb.Append("{\"id\":\"" + row[idCol] + "\",\"text\":\"" + row[txtCol] + "\",\"attributes\":\"" + row[url] + "\",\"state\":\"open\""); if (tabel.Select(string.Format("{0}='{1}'", rela, row[idCol])).Length > 0) { sb.Append(",\"children\":"); GetTreeJsonByTable(tabel, idCol, txtCol,url, rela, row[idCol]); result.Append(sb.ToString()); sb.Clear(); } result.Append(sb.ToString()); sb.Clear(); sb.Append("},"); } sb = sb.Remove(sb.Length - 1, 1); } sb.Append("]"); result.Append(sb.ToString()); sb.Clear(); } return result.ToString(); } #endregion #region 创建数据 protected static DataTable createDT() { DataTable dt = new DataTable(); dt.Columns.Add("module_id"); dt.Columns.Add("module_name"); dt.Columns.Add("module_fatherid"); dt.Columns.Add("module_url"); dt.Columns.Add("module_order"); dt.Rows.Add("C1", "全国", "0", "1.aspx", "1"); dt.Rows.Add("M01", "广东", "C1", "2.aspx", "1"); dt.Rows.Add("M0101", "深圳", "M01", "3.aspx", "100"); dt.Rows.Add("M010101", "南山区", "M0101", "4.aspx", "1000"); dt.Rows.Add("M010102", "罗湖区", "M0101", "", "1001")
[3]自己总结的 五种IO模型之间的关系与区别
来源: 互联网 发布时间: 2013-11-10
自己总结的 五种IO模型之间的关系与区别
今天在网上看了几篇博文,加上以前所学,再加之自己的理解,画成了下面这幅图,
不对之处,请批评指正,也欢迎共同讨论。
作者:liseri 发表于2013-1-12 19:19:33 原文链接
阅读:35 评论:0 查看评论
最新技术文章: