- 浏览: 2690587 次
- 性别:
- 来自: 北京
-
文章分类
最新评论
-
80后的童年2:
深入浅出MongoDB应用实战开发网盘地址:https://p ...
MongoDB入门教程 -
shliujing:
楼主在不是精通java和php的前提下,请不要妄下结论。
PHP、CakePHP哪凉快哪呆着去 -
安静听歌:
希望可以一给一点点注释
MySQL存储过程之代码块、条件控制、迭代 -
qq287767957:
PHP是全宇宙最强的语言!
PHP、CakePHP哪凉快哪呆着去 -
rryymmoK:
深入浅出MongoDB应用实战开发百度网盘下载:链接:http ...
MongoDB入门教程
ActiveRecord自带了三种数据结构关系:acts_as_tree、acts_as_list、acts_as_nested_set
1,tree.rb
从上面的代码我们学习到如下几点:
1) acts_as_tree实际上定义了belongs_to :parent和has_many :children,也就是说我们可以通过@model.parent和@model.children得到父子对象
2) acts_as_tree的配置参数有:foreign_key、:order => nil和:counter_cache
3) 其中定义了roots和root这两个Class Methods
4) 其中还定义了ancestors、root、sliblings、self_and_siblings这些Instance Methods
2,list.rb
从上面的代码我们学习到,acts_as_list的配置参数有:column和:scope
1) :column默认名为position
2) :scope后的参数为symbol时,如果没有_id则加上_id后缀
这样生成的scope_condition为"todo_list_id = #{todo_list_id}"
3) :scope后的参数为string时可以进行细粒度的限制
4) 实例方法很多,简单看看即可,不一一介绍了
3,nested_set.rb
我们可以得到如下几点:
1) acts_as_nested_set和acts_as_tree很类似,但是多一个特性是可以一条语句查询出所有的children
以及高效率的计算children_count
2) acts_as_nested_set的参数为:parent_column、:left_column、:right_column和:scope
3) 这种数据结构常用在threaded post system等场景
看了上述代码,相信大家可以自己动手写acts_as_xx数据结构了
BTW:对ActiveRecord源码的研究告一段落,还有query_cache/observer/xml_serialization/timestamp/calculations/migration等留待大家自己研究
接下来看看ActionController吧
1,tree.rb
module ActiveRecord module Acts module Tree def self.included(base) base.extend(ClassMethods) end module ClassMethods def acts_as_tree(options = {}) configuration = { :foreign_key => "parent_id", :order => nil, :counter_cache => nil } configuration.update(options) if options.is_a?(Hash) belongs_to :parent, :class_name => name, :foreign_key => configuration[:foreign_key], :counter_cache => configuration[:counter_cache] has_many :children, :class_name => name, :foreign_key => configuration[:foreign_key], :order => configuration[:order], :dependent => :destroy class_eval <<-EOV include ActiveRecord::Acts::Tree::InstanceMethods def self.roots find(:all, :conditions => "#{configuration[:foreign_key]} IS NULL", :order => #{configuration[:order].nil? ? "nil" : %Q{"#{configuration[:order]}"}}) end def self.root find(:first, :conditions => "#{configuration[:foreign_key]} IS NULL", :order => #{configuration[:order].nil? ? "nil" : %Q{"#{configuration[:order]}"}}) end EOV end end module InstanceMethods def ancestors node, nodes = self, [] nodes << node = node.parent while node.parent nodes end def root node = self node = node.parent while node.parent node end def siblings self_and_siblings - [self] end def self_and_siblings parent ? parent.children : self.class.roots end end end end end
从上面的代码我们学习到如下几点:
1) acts_as_tree实际上定义了belongs_to :parent和has_many :children,也就是说我们可以通过@model.parent和@model.children得到父子对象
2) acts_as_tree的配置参数有:foreign_key、:order => nil和:counter_cache
3) 其中定义了roots和root这两个Class Methods
4) 其中还定义了ancestors、root、sliblings、self_and_siblings这些Instance Methods
2,list.rb
module ActiveRecord module Acts module List def self.included(base) base.extend(ClassMethods) end module ClassMethods def acts_as_list(options = {}) configuration = { :column => "position", :scope => "1 = 1" } configuration.update(options) if options.is_a?(Hash) configuration[:scope] = "#{configuration[:scope]}_id".intern if configuration[:scope].is_a?(Symbol) && configuration[:scope].to_s !~ /_id$/ if configuration[:scope].is_a?(Symbol) scope_condition_method = %( def scope_condition if #{configuration[:scope].to_s}.nil? "#{configuration[:scope].to_s} IS NULL" else "#{configuration[:scope].to_s} = \#{#{configuration[:scope].to_s}}" end end ) else scope_condition_method = "def scope_condition() \"#{configuration[:scope]}\" end" end class_eval <<-EOV include ActiveRecord::Acts::List::InstanceMethods def acts_as_list_class ::#{self.name} end def position_column '#{configuration[:column]}' end #{scope_condition_method} after_destroy :remove_from_list before_create :add_to_list_bottom EOV end end module InstanceMethods def insert_at(position = 1) insert_at_position(position) end def move_lower return unless lower_item acts_as_list_class.transaction do lower_item.decrement_position increment_position end end def move_higher return unless higher_item acts_as_list_class.transaction do higher_item.increment_position decrement_position end end def move_to_bottom return unless in_list? acts_as_list_class.transaction do decrement_positions_on_lower_items assume_bottom_position end end def move_to_top return unless in_list? acts_as_list_class.transaction do increment_positions_on_higher_items assume_top_position end end def remove_from_list decrement_positions_on_lower_items if in_list? end def increment_position return unless in_list? update_attribute position_column, self.send(position_column).to_i + 1 end def decrement_position return unless in_list? update_attribute position_column, self.send(position_column).to_i - 1 end def first? return false unless in_list? self.send(position_column) == 1 end def last? return false unless in_list? self.send(position_column) == bottom_position_in_list end def higher_item return nil unless in_list? acts_as_list_class.find(:first, :conditions => "#{scope_condition} AND #{position_column} = #{(send(position_column).to_i - 1).to_s}" ) end def lower_item return nil unless in_list? acts_as_list_class.find(:first, :conditions => "#{scope_condition} AND #{position_column} = #{(send(position_column).to_i + 1).to_s}" ) end def in_list? !send(position_column).nil? end private def add_to_list_top increment_positions_on_all_items end def add_to_list_bottom self[position_column] = bottom_position_in_list.to_i + 1 end def scope_condition() "1" end def bottom_position_in_list(except = nil) item = bottom_item(except) item ? item.send(position_column) : 0 end def bottom_item(except = nil) conditions = scope_condition conditions = "#{conditions} AND #{self.class.primary_key} != #{except.id}" if except acts_as_list_class.find(:first, :conditions => conditions, :order => "#{position_column} DESC") end def assume_bottom_position update_attribute(position_column, bottom_position_in_list(self).to_i + 1) end def assume_top_position update_attribute(position_column, 1) end def decrement_positions_on_higher_items(position) acts_as_list_class.update_all( "#{position_column} = (#{position_column} - 1)", "#{scope_condition} AND #{position_column} <= #{position}" ) end def decrement_positions_on_lower_items return unless in_list? acts_as_list_class.update_all( "#{position_column} = (#{position_column} - 1)", "#{scope_condition} AND #{position_column} > #{send(position_column).to_i}" ) end def increment_positions_on_higher_items return unless in_list? acts_as_list_class.update_all( "#{position_column} = (#{position_column} + 1)", "#{scope_condition} AND #{position_column} < #{send(position_column).to_i}" ) end def increment_positions_on_lower_items(position) acts_as_list_class.update_all( "#{position_column} = (#{position_column} + 1)", "#{scope_condition} AND #{position_column} >= #{position}" ) end def increment_positions_on_all_items acts_as_list_class.update_all( "#{position_column} = (#{position_column} + 1)", "#{scope_condition}" ) end def insert_at_position(position) remove_from_list increment_positions_on_lower_items(position) self.update_attribute(position_column, position) end end end end end
从上面的代码我们学习到,acts_as_list的配置参数有:column和:scope
1) :column默认名为position
2) :scope后的参数为symbol时,如果没有_id则加上_id后缀
class TodoList < ActiveRecord::Base has_many :todo_items, :order => "position" end class TodoItem < ActiveRecord::Base belongs_to :todo_list acts_as_list :scope => :todo_list end
这样生成的scope_condition为"todo_list_id = #{todo_list_id}"
3) :scope后的参数为string时可以进行细粒度的限制
class TodoList < ActiveRecord::Base has_many :todo_items, :order => "position" end class TodoItem < ActiveRecord::Base belongs_to :todo_list acts_as_list :scope => 'todo_list_id = #{todo_list_id} AND completed = 0' end
4) 实例方法很多,简单看看即可,不一一介绍了
3,nested_set.rb
module ActiveRecord module Acts module NestedSet def self.included(base) base.extend(ClassMethods) end module ClassMethods def acts_as_nested_set(options = {}) configuration = { :parent_column => "parent_id", :left_column => "lft", :right_column => "rgt", :scope => "1 = 1" } configuration.update(options) if options.is_a?(Hash) configuration[:scope] = "#{configuration[:scope]}_id".intern if configuration[:scope].is_a?(Symbol) && configuration[:scope].to_s !~ /_id$/ if configuration[:scope].is_a?(Symbol) scope_condition_method = %( def scope_condition if #{configuration[:scope].to_s}.nil? "#{configuration[:scope].to_s} IS NULL" else "#{configuration[:scope].to_s} = \#{#{configuration[:scope].to_s}}" end end ) else scope_condition_method = "def scope_condition() \"#{configuration[:scope]}\" end" end class_eval <<-EOV include ActiveRecord::Acts::NestedSet::InstanceMethods #{scope_condition_method} def left_col_name() "#{configuration[:left_column]}" end def right_col_name() "#{configuration[:right_column]}" end def parent_column() "#{configuration[:parent_column]}" end EOV end end module InstanceMethods def root? parent_id = self[parent_column] (parent_id == 0 || parent_id.nil?) && (self[left_col_name] == 1) && (self[right_col_name] > self[left_col_name]) end def child? parent_id = self[parent_column] !(parent_id == 0 || parent_id.nil?) && (self[left_col_name] > 1) && (self[right_col_name] > self[left_col_name]) end def unknown? !root? && !child? end def add_child( child ) self.reload child.reload if child.root? raise "Adding sub-tree isn\'t currently supported" else if ( (self[left_col_name] == nil) || (self[right_col_name] == nil) ) self[left_col_name] = 1 self[right_col_name] = 4 return nil unless self.save child[parent_column] = self.id child[left_col_name] = 2 child[right_col_name]= 3 return child.save else child[parent_column] = self.id right_bound = self[right_col_name] child[left_col_name] = right_bound child[right_col_name] = right_bound + 1 self[right_col_name] += 2 self.class.base_class.transaction { self.class.base_class.update_all( "#{left_col_name} = (#{left_col_name} + 2)", "#{scope_condition} AND #{left_col_name} >= #{right_bound}" ) self.class.base_class.update_all( "#{right_col_name} = (#{right_col_name} + 2)", "#{scope_condition} AND #{right_col_name} >= #{right_bound}" ) self.save child.save } end end end def children_count return (self[right_col_name] - self[left_col_name] - 1)/2 end def full_set self.class.base_class.find(:all, :conditions => "#{scope_condition} AND (#{left_col_name} BETWEEN #{self[left_col_name]} and #{self[right_col_name]})" ) end def all_children self.class.base_class.find(:all, :conditions => "#{scope_condition} AND (#{left_col_name} > #{self[left_col_name]}) and (#{right_col_name} < #{self[right_col_name]})" ) end def direct_children self.class.base_class.find(:all, :conditions => "#{scope_condition} and #{parent_column} = #{self.id}") end def before_destroy return if self[right_col_name].nil? || self[left_col_name].nil? dif = self[right_col_name] - self[left_col_name] + 1 self.class.base_class.transaction { self.class.base_class.delete_all( "#{scope_condition} and #{left_col_name} > #{self[left_col_name]} and #{right_col_name} < #{self[right_col_name]}" ) self.class.base_class.update_all( "#{left_col_name} = (#{left_col_name} - #{dif})", "#{scope_condition} AND #{left_col_name} >= #{self[right_col_name]}" ) self.class.base_class.update_all( "#{right_col_name} = (#{right_col_name} - #{dif} )", "#{scope_condition} AND #{right_col_name} >= #{self[right_col_name]}" ) } end end end end end
我们可以得到如下几点:
1) acts_as_nested_set和acts_as_tree很类似,但是多一个特性是可以一条语句查询出所有的children
def all_children self.class.base_class.find(:all, :conditions => "#{scope_condition} AND (#{left_col_name} > #{self[left_col_name]}) and (#{right_col_name} < #{self[right_col_name]})" ) end
以及高效率的计算children_count
def children_count return (self[right_col_name] - self[left_col_name] - 1)/2 end
2) acts_as_nested_set的参数为:parent_column、:left_column、:right_column和:scope
3) 这种数据结构常用在threaded post system等场景
看了上述代码,相信大家可以自己动手写acts_as_xx数据结构了
BTW:对ActiveRecord源码的研究告一段落,还有query_cache/observer/xml_serialization/timestamp/calculations/migration等留待大家自己研究
接下来看看ActionController吧
评论
4 楼
blackanger
2007-06-24
rails2.0什么时候发布呢?有说日期吗?
3 楼
hideto
2007-06-24
migration的核心方法:
DHH在RailsConf2007上介绍Rails 2.0的Speech中的形容的是“Sexy Migrations”:
或者更cool的
再也不用
def migrate(direction) return unless respond_to?(direction) case direction when :up then announce "migrating" when :down then announce "reverting" end result = nil time = Benchmark.measure { result = send("real_#{direction}") } case direction when :up then announce "migrated (%.4fs)" % time.real; write when :down then announce "reverted (%.4fs)" % time.real; write end result end
DHH在RailsConf2007上介绍Rails 2.0的Speech中的形容的是“Sexy Migrations”:
create_table :people do |t| t.account_id :type => :integer end
或者更cool的
create_table :people do |t| t.integer :account_id end
再也不用
create_table :people do |t| t.column :account_id, :integer end
2 楼
netfishx
2007-06-23
migration还是很有意思的
1 楼
hideto
2007-06-22
javaeye的表情替代符号真是让人伤心
发表评论
-
用了TextMate才知道什么叫神级Editor
2011-03-09 04:51 58020一直用Eclipse作为开发Ruby和Java项目的IDE,但 ... -
Ruby使用OAuth登录新浪微博和豆瓣
2011-01-09 12:49 4495首先需要安装oauth这个gem包 gem install ... -
使用Passenger+nginx部署Rails
2010-12-28 15:12 50551. Install Passender gem instal ... -
markItUp+rdiscount搭建Rails下可视化Markdown编辑器
2010-12-21 17:48 5491markItUp是基于jQuery的可视化编辑器,支持Html ... -
Rails3 and MongoDB Quick Guide
2010-12-10 14:13 2773Install MongoDB Download: http: ... -
基于ruby-protobuf的rpc示例
2009-08-11 11:51 41671, 安装ruby-protobuf gem instal ... -
Ruby导出xls和csv的utf-8问题的解决
2009-02-04 15:05 6878数据库数据为utf-8格式,包括中文和拉丁文等等 导出文件xl ... -
URL/HTML/JavaScript的encode/escape
2009-01-04 13:03 9373最近经常被URL、HTML、JavaScript的encode ... -
各种排序的Ruby实现
2008-11-27 14:51 4020Θ(n^2) 1, Bubble sort def bu ... -
12月5日北京RoR活动!
2008-11-26 18:38 3029又是一年过去了,Rails在国内的发展势态良好,很多使用RoR ... -
Rails程序开发的最大问题是代码规范
2008-08-28 11:56 5656使用Rails开发大型复杂B2B应用一年了,这个项目目前开发人 ... -
Web开发大全:ROR版——推荐序
2008-07-09 00:39 2438来自http://www.beyondrails.com/bl ... -
深入ActionMailer,使用Sendmail发邮件
2008-07-03 11:41 3408来自: http://www.beyondrails.com/ ... -
Rails里如何结合ExceptionNotification配置gmail账户发邮件
2008-06-19 19:56 31241,安装ExceptionNotification rub ... -
使用coderay和railscasts样式进行代码高亮
2008-06-17 00:16 2414CodeRay是一个语法高亮的Ruby库,效率很不错。 Cod ... -
Capistrano试用
2008-06-16 19:05 19741,客户端机器安装Capistrano gem insta ... -
lighttpd真垃圾啊
2008-06-04 18:38 2562使用lighttpd+fcgi跑Rails程序,文件上传会si ... -
将gem变成plugin
2008-06-04 11:27 1826有什么样的需求就有什么样的对策 当vhost上的帐号没有ge ... -
在Rails里使用ReCaptcha添加验证码
2008-06-03 15:51 42891,去http://recaptcha.net/sign up ... -
Rails里给文件上传添加progress_bar
2008-05-27 17:00 2113文件上传很慢时,UI没有什么用户提示,这样让人很费解,所以我们 ...
相关推荐
TinyYolo2实时视频流物体检测ONNX模型 运行 ONNX 模型,并结合 OpenCV 进行图像处理。具体流程包括: 1. 加载并初始化 ONNX 模型。 2. 从摄像头捕获实时视频流。 3. 对每一帧图像进行模型推理,生成物体检测结果。 4. 在界面上绘制检测结果的边界框和标签。
chromedriver-linux64-134.0.6998.23(Beta).zip
Web开发:ABP框架4-DDD四层架构的详解
chromedriver-linux64-135.0.7029.0(Canary).zip
实现人脸识别的考勤门禁系统可以分为以下步骤: 1. 采集人脸图像数据集:首先需要采集员工的人脸图像数据集,包括正面、侧面等多个角度的图像。可以使用MATLAB中的图像采集工具或者第三方库进行采集。 2. 预处理人脸图像数据:对采集到的人脸图像数据进行预处理,包括人脸检测、人脸对齐、人脸裁剪等操作。MATLAB提供了相关的图像处理工具箱,可以用于实现这些处理步骤。 3. 特征提取与特征匹配:使用人脸识别算法提取人脸图像的特征,比如使用人脸识别中常用的特征提取算法如Eigenfaces、Fisherfaces或者基于深度学习的算法。然后将员工的人脸数据与数据库中的人脸数据进行匹配,判断是否为注册员工。 4. 考勤记录与门禁控制:如果人脸匹配成功,系统可以记录员工的考勤时间,并且控制门禁系统进行开启。MATLAB可以与外部设备进行通信,实现门禁控制以及考勤记录功能。
yugy
企业IT治理体系规划.pptx
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行,功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用
基于多目标粒子群算法的冷热电联供综合能源系统优化调度与运行策略分析,基于多目标粒子群算法的冷热电联供综合能源系统优化调度与运行策略分析,MATLAB代码:基于多目标粒子群算法冷热电联供综合能源系统运行优化 关键词:综合能源 冷热电三联供 粒子群算法 多目标优化 参考文档:《基于多目标算法的冷热电联供型综合能源系统运行优化》 仿真平台:MATLAB 平台采用粒子群实现求解 优势:代码注释详实,适合参考学习,非目前烂大街的版本,程序非常精品,请仔细辨识 主要内容:代码构建了含冷、热、电负荷的冷热电联供型综合能源系统优化调度模型,考虑了燃气轮机、电制冷机、锅炉以及风光机组等资源,并且考虑与上级电网的购电交易,综合考虑了用户购电购热冷量的成本、CCHP收益以及成本等各种因素,从而实现CCHP系统的经济运行,求解采用的是MOPSO算法(多目标粒子群算法),求解效果极佳,具体可以看图 ,核心关键词: 综合能源系统; 冷热电三联供; 粒子群算法; 多目标优化; MOPSO算法; 优化调度模型; 燃气轮机; 电制冷机; 锅炉; 风光机组; 上级电网购售电交易。,基于多目标粒子群算法的CCHP综合
DSP28379D串口升级方案:单核双核升级与Boot优化,C#上位机开发串口通信方案,DSP28379D串口升级方案:单核双核升级与Boot优化,C#上位机开发实现串口通信,DSP28379D串口升级方案 单核双核升级,boot升级,串口方案。 上位机用c#开发。 ,DSP28379D; 串口升级方案; 单核双核升级; boot升级; 上位机C#开发,DSP28379D串口双核升级方案:Boot串口升级技术使用C#上位机开发
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行,功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用
基于PLC的双层自动门控制:光电传感触发,有序开关与延时功能实现,附程序、画面及参考文档。,基于PLC的双层自动门控制系统:精准控制,保障无尘环境;门间联动,智能安防新体验。,基于plc的双层自动门控制系统,全部采用博途仿真完成,提供程序,画面,参考文档,详情见图。 实现功能(详见上方演示视频): ① 某房间要求尽可能地保持无尘,在通道上设置了两道电动门,门1和门2,可通过光电传感器自动完成门的打开和关闭。 门1和门2 不能同时打开。 ② 第 1 道门(根据出入方向不同,可能是门 1 或门 2),是由在通道外的开门者通过按开门按钮打开的,而第 2 道门(根据出入方向不同,可能是门 1 或门 2 )则是在打开的第 1 道门关闭后自动地打开的(也可以由通道内的人按开门按钮来打开第2 道门)。 这两道门都是在门开后,经过 3s 的延时而自动关闭的。 ③ 在门关闭期间,如果对应的光电传感器的信号被遮断,则门立即自动打开。 如果在门外或者在门内的开门者按对应的开门按钮时,立即打开。 ④ 出于安全方面的考虑,如果在通道内的某个人经过光电传感器时,对应的门已经打开,则通道外的开门者可以不按开门按钮。
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行,功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用
DeepSeek+DeepResearch——让科研像聊天一样简单 (1)DeepSeek如何做数据分析? (2)DeepSeek如何分析文件内容? (3)DeepSeek如何进行数据挖掘? (4)DeepSeek如何进行科学研究? (5)DeepSeek如何写综述? (6)DeepSeek如何进行数据可视化? (7)DeepSeek如何写作润色? (8)DeepSeek如何中英文互译? (9)DeepSeek如何做降重? (10)DeepSeek论文参考文献指令 (11)DeepSeek基础知识。
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行,功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用
1、文件内容:jdepend-demo-2.9.1-10.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/jdepend-demo-2.9.1-10.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、更多资源/技术支持:公众号禅静编程坊
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行;功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用
内容概要:本文档详细介绍了如何利用 MATLAB 实现鲸鱼优化算法 (WOA) 和长短期记忆网络 (LSTM) 相结合的技术——WOA-LSTM,在数据分类和预测领域的应用。文章首先概述了LSTM在网络训练中超参数依赖的问题以及WOA作为一种新颖的全局优化算法的优势。接着阐述了该项目的研究背景、目的及其重要意义,并深入讨论了项目面临的六大主要挑战,从模型优化到超参数空间管理。文档特别强调WOA-LSTM融合所带来的性能提升、降低计算复杂度的能力及其实现自动化的超参数优化流程。除此之外,文中展示了模型的应用广泛性,覆盖了从金融市场的股票预测到智能制造业的各种实际场景,并提供了具体的模型架构细节和代码实例,以帮助理解模型的工作原理和技术要点。 适合人群:具有一定编程技能的研究人员、工程师和科学家们,尤其是对深度学习技术和机器学习感兴趣的专业人士。 使用场景及目标:该文档的目标是向用户传授使用MATLAB实现WOA-LSTM进行复杂数据分类和预测的方法论,旨在指导读者理解和掌握如何利用WOA进行超参数寻优,从而改善LSTM网络性能。 其他说明:通过阅读这份文档,使用者不仅能够获得有关WOA-LSTM技术的具体实现方式的知识,而且还可以获取关于项目规划和实际部署过程中的宝贵经验。
tomcat安装及配置教程.md
**MATLAB下微电网两阶段鲁棒优化经济调度策略:基于CCG算法与min-max-min结构求解**,MATLAB微电网两阶段鲁棒优化经济调度程序:构建min-max-min结构模型,实现恶劣场景下的低成本调度,灵活调整调度保守性,利用列约束生成算法求解,MATLAB代码:微电网两阶段鲁棒优化经济调度程序 关键词:微网优化调度 两阶段鲁棒 CCG算法 经济调度 参考文档:《微电网两阶段鲁棒优化经济调度方法》 仿真平台:MATLAB YALMIP+CPLEX 优势:代码注释详实,出图效果非常好(具体看图),非目前烂大街版本,请仔细辨识 主要内容:构建了微网两阶段鲁棒调度模型,建立了min-max-min 结构的两阶段鲁棒优化模型,可得到最恶劣场景下运行成本最低的调度方案。 模型中考虑了储能、需求侧负荷及可控分布式电源等的运行约束和协调控制,并引入了不确定性调节参数,可灵活调整调度方案的保守性。 基于列约束生成算法和强对偶理论,可将原问题分解为具有混合整数线性特征的主问题和子问题进行交替求解,从而得到原问题的最优解。 最终通过仿真分析验证了所建模型和求解算法的有效性,具体内容可自行查