Stay Hungry,Stay Foolish!

04 2018 档案

摘要:参考 : https://www.jianshu.com/p/6c8d2730d088https://docs.scrapy.org/en/latest/topics/item-pipeline.html#writing-your-own-item-pipelineimport scrapyimport requestsimport osclass MeinvSpider(scrapy.Spide... 阅读全文
posted @ 2018-04-07 21:00 lightsong 阅读(188) 评论(0) 推荐(0) 编辑
摘要:Scrapyhttps://docs.scrapy.org/en/latest/intro/overview.htmlScrapy is an application framework for crawling web sites and extracting structured data which can be used for a wide range of useful applica... 阅读全文
posted @ 2018-04-07 10:36 lightsong 阅读(205) 评论(0) 推荐(0) 编辑
摘要:load https://www.sourcefield.nl/post/jenkins-pipeline-tutorial/ load from git Loading a script from another Git repository This requires the Pipeline 阅读全文
posted @ 2018-04-05 23:44 lightsong 阅读(813) 评论(0) 推荐(0) 编辑
摘要:build step https://jenkins.io/doc/pipeline/steps/pipeline-build-step/#build-build-a-job 一个任务的执行触发,另外一个任务的执行,以代码的形式。 build: Build a job Triggers a new 阅读全文
posted @ 2018-04-05 23:40 lightsong 阅读(369) 评论(0) 推荐(0) 编辑
摘要:桥接模式 https://www.w3cschool.cn/shejimoshi/bridge-pattern.html 桥接(Bridge)是用于把抽象化与实现化解耦,使得二者可以独立变化。这种类型的设计模式属于结构型模式,它通过提供抽象化和实现化之间的桥接结构,来实现二者的解耦。 意图:将抽象部 阅读全文
posted @ 2018-04-05 23:34 lightsong 阅读(2074) 评论(0) 推荐(0) 编辑
摘要:Iterator Pattern http://groovy-lang.org/design-patterns.html#_flyweight_pattern 迭代器模式,允许顺序访问 聚集对象中的中元素, 而不用关心起内部是如何实现的。 groovy有自己的语言内置的闭包操作, 例如 each T 阅读全文
posted @ 2018-04-05 22:59 lightsong 阅读(284) 评论(0) 推荐(0) 编辑
摘要:Flyweight Pattern 享元模式, 将对象的相同属性, 以节省内存为目的,存储为一份公共对象, 所有对象共用此分对象。 The Flyweight Pattern is a pattern for greatly reducing memory requirements by not r 阅读全文
posted @ 2018-04-05 21:59 lightsong 阅读(202) 评论(0) 推荐(0) 编辑
摘要:http://groovy-lang.org/design-patterns.html#_chain_of_responsibility_pattern 装饰器模式, 起到美化原始对象的作用。 一个被装饰的对象, 可以被用在原始对象出现的任何地方。 装饰器对象,并不修改任何原始对象的源码。 The 阅读全文
posted @ 2018-04-05 21:49 lightsong 阅读(489) 评论(0) 推荐(0) 编辑
摘要:Composite Pattern http://groovy-lang.org/design-patterns.html#_chain_of_responsibility_pattern 组合模式,允许你将多个对象作为一组对象对待。这些对象具有层次结构,并具有相同的 方法, 有叶子节点和组合节点。 阅读全文
posted @ 2018-04-05 21:41 lightsong 阅读(189) 评论(0) 推荐(0) 编辑
摘要:Chain of Responsibility Pattern http://groovy-lang.org/design-patterns.html#_chain_of_responsibility_pattern 责任链模式, 将一类实现相同接口的对象,组织到一个列表中, 列表的执行中第一个对象 阅读全文
posted @ 2018-04-05 21:18 lightsong 阅读(215) 评论(0) 推荐(0) 编辑
摘要:Adapter Pattern http://groovy-lang.org/design-patterns.html#_adapter_pattern 适配器模式,对象存在一个接口, 此接口在此对象中不能被另外一类对象使用, 提供对象的适配接口,将此接口做包装,适配为另外一类接口。 这类模式也叫包 阅读全文
posted @ 2018-04-05 21:11 lightsong 阅读(165) 评论(0) 推荐(0) 编辑
摘要:Bouncer Pattern http://groovy-lang.org/design-patterns.html#_bouncer_pattern 保镖模式主要负责对函数的输入参数的合法性检查, 如果遇到非法输出,则停止函数后续执行。 groovy提供了 assert 机制, 语言级别内置功能 阅读全文
posted @ 2018-04-05 21:03 lightsong 阅读(236) 评论(0) 推荐(0) 编辑
摘要:Null Object Pattern http://groovy-lang.org/design-patterns.html#_loan_my_resource_pattern 对于一些场景获得的对象为 null, 然后我们的使用的场景, 对null对象调用正常对象的方法, 导致报错。 因为nul 阅读全文
posted @ 2018-04-05 20:57 lightsong 阅读(308) 评论(0) 推荐(0) 编辑
摘要:借贷模式 http://groovy-lang.org/design-patterns.html#_loan_my_resource_pattern The Loan my Resource pattern ensures that a resource is deterministically d 阅读全文
posted @ 2018-04-05 20:53 lightsong 阅读(150) 评论(0) 推荐(0) 编辑

千山鸟飞绝,万径人踪灭
点击右上角即可分享
微信分享提示