- 浏览: 197220 次
- 性别:
- 来自: 长沙
文章分类
最新评论
-
在世界的中心呼喚愛:
思路很好
连连看全局消除算法 -
tianaozhu:
请问,我修改了词库和源文件怎么就不好用了, 我源文件是: My ...
自己动手开发翻译软件(Java版) -
Arlrn:
博主你好,最近在学习排序算法,看了你的博客,你的直接插入排序, ...
各种排序算法的实现及其比较 -
sharong:
有一个明显错误,很显然冒泡排序的时间复杂度是O(n^2)
各种排序算法的实现及其比较 -
julydave:
希尔排序不太对吧。。
各种排序算法的实现及其比较
用XML来作为tree的数据源
所有文件都上传了
// // Extend the XmlTreeLoader to set some custom TreeNode attributes specific to our application: // Ext.app.BookLoader = Ext.extend(Ext.ux.tree.XmlTreeLoader, { //XmlTreeLoader是ux/XmlTreeLoader.js里面定义的类,可以直接拿去用 /* * processAttributes:Template method intended to be overridden by subclasses that need to provide * custom attribute processing prior to the creation of each TreeNode. This method * will be passed a config object containing existing TreeNode attribute name/value * pairs which can be modified as needed directly (no need to return the object). */ processAttributes : function(attr){ if(attr.first){ // is it an author node? //author node指的是根结点的了结点,本例中,第二层结点都是作者author,第三层都是作者写的书,具体看下面附上的xml文档内容 // Set the node text that will show in the tree since our raw data does not include a text attribute: attr.text = attr.first + ' ' + attr.last; //first和last都是author的属性 // Author icon, using the gender flag to choose a specific icon: attr.iconCls = 'author-' + attr.gender; // Override these values for our folder nodes because we are loading all data at once. If we were // loading each node asynchronously (the default) we would not want to do this: attr.loaded = true; //一次性加载所有相关数据 attr.expanded = true; } else if(attr.title){ // is it a book node? // Set the node text that will show in the tree since our raw data does not include a text attribute: attr.text = attr.title + ' (' + attr.published + ')'; // Book icon: attr.iconCls = 'book'; // Tell the tree this is a leaf node. This could also be passed as an attribute in the original XML, // but this example demonstrates that you can control this even when you cannot dictate the format of // the incoming source XML: attr.leaf = true; //这是叶结点 } } }); Ext.onReady(function(){ var detailsText = '<i>Select a book to see more information...</i>'; var tpl = new Ext.Template( '<h2 class="title">{title}</h2>', '<p><b>Published</b>: {published}</p>', '<p><b>Synopsis</b>: {innerText}</p>', '<p><a href="{url}" target="_blank">Purchase from Amazon</a></p>' ); tpl.compile(); new Ext.Panel({ title: 'Reading List', renderTo: 'tree', layout: 'border', width: 500, height: 500, items: [{ xtype: 'treepanel', id: 'tree-panel', region: 'center', margins: '2 2 0 2', //这个属性不错,可以加以利用 autoScroll: true, rootVisible: false, root: new Ext.tree.AsyncTreeNode(), //异步加载 // Our custom TreeLoader: loader: new Ext.app.BookLoader({ dataUrl:'xml-tree-data.xml' }), listeners: { 'render': function(tp){ //在 render 事件中给 treePanel 加上 selectionchange 事件 tp.getSelectionModel().on('selectionchange', function(tree, node){ var el = Ext.getCmp('details-panel').body; //details-panel其实是一个div,在下面定义, 这边打算“重写”这个div里面的内容 if(node && node.leaf){ //如果被选中了,而且选中的是叶子结点 tpl.overwrite(el, node.attributes); }else{ el.update(detailsText); } }) } } },{ region: 'south', title: 'Book Details', id: 'details-panel', autoScroll: true, collapsible: true, split: true, margins: '0 2 2 2', cmargins: '2 2 2 2', //设定页边空白 height: 220, html: detailsText }] }); });
其中涉及到margins 和 cmargins,区别如下:
cmargins : Object //页边空白
An object containing margins to apply to the region's collapsed element in the format {left: (left margin), top: (top margin), right: (right margin), bottom: (bottom margin)}
margins : Object //组件间的相对距离
An object containing margins to apply to the region in the format {left: (left margin), top: (top margin), right: (right margin), bottom: (bottom margin)}
附:xml-tree-data.xml
<?xml version="1.0" encoding="ISO-8859-1"?> <authors> <author first="Fyodor" last="Dostoevsky" gender="m"> <book title="Crime and Punishment" published="1866" url="http://www.amazon.com/Crime-Punishment-Fyodor-Dostoevsky/dp/0679734503/"> Raskolnikov, a destitute and desperate former student, commits a random murder without remorse or regret, imagining himself to be a great man far above moral law. But as he embarks on a dangerous cat-and-mouse game with a suspicious police investigator, his own conscience begins to torment him. </book> <book title="The Brothers Karamazov" published="1879" url="http://www.amazon.com/Brothers-Karamazov-Fyodor-Dostoevsky/dp/0374528373/"> Driven by intense, uncontrollable emotions of rage and revenge, the Karamozov brothers become involved in the brutal murder of their despicable father. It is a love-hate struggle with profound psychological and spiritual implications. </book> </author> <author first="Stephen" last="King" gender="m"> <book title="The Shining" published="1977" url="http://www.amazon.com/Shining-Stephen-King/dp/0743424425/"> An alcoholic man, his wife, and his psychic son go to a large haunted hotel for the winter, where the child is threatened by supernatural and family dangers. </book> <book title="Cujo" published="1981" url="http://www.amazon.com/Cujo-Signet-Stephen-King/dp/0451161351/"> A big, friendly dog chases a rabbit into a hidden underground cave and stirs a sleeping evil crueler than death itself. The little Maine town of Castle Rock is about to be invaded by the most hideous menace ever to savage the flesh and devour the mind. </book> <book title="IT" published="1986" url="http://www.amazon.com/Signet-Books-Stephen-King/dp/0451169514/"> They were seven teenagers when they first stumbled upon the horror. Now they were grown-up men and women who had gone out into the big world to gain success and happiness. But none of them could withstand the force that drew them back to Derry, Maine to face the nightmare without an end, and the evil without a name. </book> </author> <author first="J.K." last="Rowling" gender="f"> <book title="Harry Potter and the Sorcerer's Stone" published="1997" url="http://www.amazon.com/Harry-Potter-Sorcerers-Stone-Book/dp/043936213X/"> All Harry Potter knows is a miserable life with the Dursleys, his horrible aunt and uncle, and their abominable son, Dudley. But all that is about to change when a mysterious letter arrives by owl messenger: a letter with an invitation to a wonderful place he never dreamed existed. </book> <book title="Harry Potter and the Chamber of Secrets" published="1998" url="http://www.amazon.com/Harry-Potter-Chamber-Secrets-Book/dp/0439064864/"> Someone - or something - starts turning Hogwarts students to stone. Could it be Draco Malfoy, a more poisonous rival than ever? Could it possibly be Hagrid, whose mysterious past is finally told? Or could it be the one everyone at Hogwarts most suspects... Harry Potter himself! </book> <book title="Harry Potter and the Prisoner of Azkaban" published="1999" url="http://www.amazon.com/Harry-Potter-Prisoner-Azkaban-Book/dp/043965548X/"> For Twelve long years, the dread fortress of Azkaban held an infamous prisoner named Sirius Black. Now he has escaped, and the Azkaban guards heard Black muttering in his sleep, "He's at Hogwarts..." Harry Potter isn't safe, not even within the walls of his magical school. Because on top of it all, there may well be a traitor in their midst. </book> </author> </authors>
发表评论
-
Ext js面向对象的特性
2011-05-11 11:06 10251、支持命名空间(Java里用的是包的概念) Ex ... -
Ext 2.x中,关于combobox的取值问题
2011-02-15 19:47 1780Ext中,关于combobox的取 ... -
Ext常用的知识点(三)--combobox和xml的绑定
2011-02-09 11:47 1077直接看代码,所有需要注意的地方都标在代码后面了 Ext ... -
Ext常用的知识点(二)--panel和window
2011-02-09 01:16 15521、Panel 很容易就可以做写出一个panel v ... -
Ext常用的知识点(一)--弹出消息
2011-02-08 21:38 1403首先,要写Extjs,建议大家用一个工具spket。 ... -
Extjs复习笔记(二十)-- tree和grid结合
2010-11-07 12:20 1616让tree和grid结合起来 相关内容之前大都讲过,这里就不 ... -
Extjs复习笔记(十八)-- TreePanel
2010-11-07 11:09 1331Grid这一块暂时就讲到这。这一节开始就是tree的相关内容了 ... -
Extjs复习笔记(十七)-- 给grid里面的内容分组
2010-11-07 03:11 2013给grid里面的内容分组。 Ext.onReady(fun ... -
Extjs复习笔记(十六)-- 可编辑的grid
2010-11-07 02:43 1864可编辑的grid。 可以响应数据加载完时的事件。。。 可以 ... -
Extjs复习笔记(十五)-- JsonReader
2010-11-07 01:54 2725使用JsonReader来创建grid中的store (exa ... -
Extjs复习笔记(十四)-- XmlReader
2010-11-05 13:48 2389读取XML文件来构造grid 先了解一个函数:Ext.dat ... -
Extjs复习笔记(十三)-- GridPanel
2010-11-05 03:11 1704这一节开始,复习grid,博大精深呀! 拿官网的例子来 ... -
Extjs复习笔记(十二)--form验证
2010-11-04 23:37 1455验证。。。 1、不允许 ... -
Extjs复习笔记(十一)--换肤
2010-11-04 21:48 1309换肤功能 首先写一个 ... -
Extjs复习笔记(十)-- 网页主框架
2010-11-04 14:58 1054主界面的雏形: <!DOCTYPE html ... -
Extjs复习笔记(九)-- 加载等待
2010-11-04 13:29 2135登陆时的加载状态: <style type=&qu ... -
Extjs复习笔记(八)--登陆框
2010-11-03 02:33 1787之前有一篇博客展示了一个图书管理系统,接下来的几篇博客将会解析 ... -
Ext图书管理系统
2010-10-31 10:17 1908其实这一篇日志写很久了,由于近期项目演示的需要,我把它转到这边 ... -
Extjs复习笔记(七)-- ComboBox的添加、修改
2010-10-31 02:09 2603ComboBox的测试,有几个方法没写完整,有待之后解决。。。 ... -
Extjs复习笔记(六)--完整的浮动窗口
2010-10-30 03:30 3355前面搞了这么久的基础,下面该来做这个界面了: 这是一个浮动窗 ...
相关推荐
"HFSS软件包下的圆锥(圆形)喇叭天线模型制作与参数调整:自主创造,实验验证,全流程教程指导",HFSS圆锥(圆形)喇叭天线 天线模型,自己做的,附带结果,可改参数,HFSS软件包 (有教程,具体到每一步,可以自己做出来) ,HFSS; 圆锥(圆形)喇叭天线; 模型自制; 参数可改; HFSS软件包; 教程详尽。,HFSS圆锥喇叭天线模型:可自定义参数与结果
免费JAVA毕业设计 2024成品源码+论文+数据库+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx
"基于S7-200 PLC与组态王技术构建的智能化新能源汽车电池检测系统上位机软件平台",基于S7-200plc与组态王组态的新能源汽车电池检测系统上位机 ,S7-200plc;组态王组态;新能源汽车电池检测系统;上位机,"基于PLC与组态王的汽车电池检测上位机系统"
免费JAVA毕业设计 2024成品源码+论文+数据库+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx
nodejs010-nodejs-docs-0.10.5-8.el6.centos.alt.x86_64.rpm
免费JAVA毕业设计 2024成品源码+论文+录屏+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx
“基于Cadence Orcad的全面元器件数据库管理系统——全配版与基础版对比分析”,搭建使用Cadence Orcad CIS元器件数据库(默认为Access数据库,如需MySQL数据库需提前沟通),含orcad符号库,Allegro PCB库 —————————————————— 该元器件数据库种类丰富,大分类就有28种(全配版,含有很多如海思,全志,瑞芯微,TI,Xilinx等主流复杂IC的库信息),20种(基础版)。 ———————————————————— 全配版包含1000多种元器件属性信息汇总,都是已验证使用过的,可直接用于自己的电路设计。 全配版还附有大部分与元器件PCB封装已匹配好的的3D模型。 强烈建议原理图库及封装库基于数据库的方式来管理,好处主要有以下几点: 1. 易于管理,可通过数据库文件批量添加、更改或删除器件参数; 2. 减少原理图库的种类, 同类器件只需要新建一次原理图库, 例如不同阻值、精度的电阻; 3. 器件具有唯一性, 每个器件的参数都是唯一的; 4. 方便使用, 如使用 Link Database Part 功能,可以快速完成器件批量替,
1、文件内容:ptlib-devel-2.10.10-6.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/ptlib-devel-2.10.10-6.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
西门子S7-1200+5轴伺服驱动系统的走工艺对象技术解析——采用脉冲输出驱动方式的控制方法及在全博途V15.1程序中的应用研究。,S7-1200+5轴伺服 走工艺对象 脉冲输出驱动方式 适用于西门子s7-1200+第三方伺服驱动器 全套博途v15.1程序 ,S7-1200;5轴伺服;走工艺对象;脉冲输出驱动方式;第三方伺服驱动器;博途v15.1程序,西门子S7-1200 5轴伺服系统控制程序
免费JAVA毕业设计 2024成品源码+论文+数据库+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx
《四层三列堆垛式立体库控制系统:带解释的梯形图接线原理图及IO分配与组态画面详解》,4x3堆垛式立体库4层3列四层三列书架式立体库控制系统 带解释的梯形图接线图原理图图纸,io分配,组态画面 ,立体库; 堆垛式; 控制系统; 梯形图; 接线图; 原理图; IO分配; 组态画面,"立体库控制系统原理图:四层三列堆垛式书架的IO分配与组态画面"
1、文件内容:pyOpenSSL-0.13.1-4.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/pyOpenSSL-0.13.1-4.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
免费JAVA毕业设计 2024成品源码+论文+数据库+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx
基于三菱PLC与MCGS技术的防盗门报警系统:梯形图接线图原理及IO分配、组态画面详解,基于三菱PLC和MCGS的防盗门报警器 带解释的梯形图接线图原理图图纸,io分配,组态画面 ,三菱PLC; MCGS; 防盗门报警器; 梯形图接线图; IO分配; 组态画面,基于三菱PLC与MCGS的报警器系统:梯形图接线与组态画面详解
"COMSOL金膜表面等离子共振(SPR)分析:不同入射角下的共振角度观察",comsol金膜表面等离子共振SPR,不同入射角查看共振角度 ,关键词:comsol金膜表面;等离子共振(SPR);不同入射角;共振角度;分离度;角度调节;材料表面光;生物传感;互动现象;实时分析,"COMSOL研究金膜表面等离子共振: 角度变化影响共振角度"
1. 机器学习与深度学习 机器学习是人工智能的核心领域,旨在通过数据训练模型,使计算机能够从经验中学习和改进。监督学习、无监督学习和强化学习是其主要分支,广泛应用于图像识别、语音处理和预测分析等场景。深度学习作为机器学习的重要子领域,通过神经网络模拟人脑的工作机制,尤其在图像分类、自然语言处理和自动驾驶等领域取得了突破性进展。深度学习模型如卷积神经网络(CNN)和循环神经网络(RNN)已成为许多AI应用的基础。 2. 自然语言处理与计算机视觉 自然语言处理(NLP)使计算机能够理解、生成和处理人类语言,关键技术包括机器翻译、语音识别、情感分析和问答系统。例如,智能助手(如Siri、Alexa)和聊天机器人(如ChatGPT)都依赖于NLP技术。计算机视觉则让计算机能够“看懂”图像和视频,广泛应用于人脸识别、自动驾驶、医疗影像分析等领域。目标检测、图像分割和视频分析等技术正在推动安防、零售和制造业的智能化转型。 3. 强化学习与AI伦理 强化学习通过试错和奖励机制,训练智能体在复杂环境中做出最优决策,广泛应用于游戏AI(如AlphaGo)、机器人控制和资源调度等领域。与此同时,随着AI技术的快速发展,AI伦理和社会影响也成为重要研究方向。如何确保AI的公平性、透明性和隐私保护,以及应对AI对就业和社会结构的潜在影响,已成为学术界和产业界共同关注的焦点。AI的可持续发展离不开技术与伦理的平衡。
不同放牧策略对草原土壤性质的影响研究——基于机器学习.pdf
本资源提供一种基于Proteus仿真的纯硬件NE555呼吸灯设计方案,结合NE555定时器、三极管(如2N2222或8050)、电阻、电容等元件,完整实现LED的呼吸灯效果。内容包括: Proteus仿真模型搭建:电路原理图设计、虚拟示波器波形分析; 硬件实现步骤:元件选型、焊接调试、实测波形对比; 参数调优方法:通过仿真快速调整RC参数控制呼吸频率与渐变平滑度。 目标: 掌握Proteus中NE555电路仿真技巧; 理解硬件电路与仿真模型的匹配性; 学习从虚拟仿真到实物落地的全流程设计; 培养故障排查与参数优化能力。 核心功能: 仿真验证:在Proteus中模拟NE555的PWM输出及LED亮度渐变效果; 硬件实现:通过三极管驱动电路将仿真结果转化为实物呼吸灯; 双向调试:支持仿真与硬件实测数据对比,快速定位设计问题。 关键模块: NE555无稳态多谐振荡器(控制占空比渐变); Proteus虚拟示波器(观测PWM波形变化); 三极管电流放大电路(驱动高亮度LED)。 设计亮点 虚实结合:通过Proteus仿真降低硬件试错成本,提升学习效率。
,全c源程序太阳能并网逆变器全C源程序单相3kw5kw,板图原理图清单,可以直接打板验证,超好的生产光伏逆变器的技术方案,量产方案
免费JAVA毕业设计 2024成品源码+论文+数据库+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx