E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
recipes
服务
recipes
的继承——Extending Service
Recipes
Cloudifyrecipes就像面向对象的类,因此它们是可以继承以扩展的。WhyExtend?在很多情况下,您可能想要创建一个新的服务,是基于一个已经存在的服务,只覆盖的部分与你自己的修改。例如,您可能想使用有一些修改的Tomcat配方(在Cloudify部署文件的中,而不需要复制现有的配方和它的所有相关内容。Cloudify提供了这种机制,允许您扩展recipe。扩展recipe允许新的rec
hjswust
·
2013-04-19 14:00
Cloudify
recipe
服务
Recipes
一项服务由服务描述文件和其支持的文件组成。服务描述文件(ServiceDescriptorFile)描述了以下信息:General:描述服务的name,servicetype,numberofserviceinstances,andtheserviceiconfilenameCompute:指定供应machines时的template名称。这个名字与clouddriver中定义的template名
hjswust
·
2013-04-17 22:00
Cloudify
recipe
Chef学习之七:recipe学习
参考:http://docs.opscode.com/essentials_cookbook_
recipes
_run_lists.htmlRecipe的概念简单说下,就是Resource的集合,你可以把
puncha
·
2013-04-03 15:00
python转载[Rsync Algorithm]
转自:http://code.activestate.com/
recipes
/577518-rsync-algorithm/?
itech_001
·
2013-03-24 19:00
CakePHP 2.x CookBook 中文版 第七章 模型 之 删除数据
例如,删除一个与许多Recipe记录相关的User记录(User‘hasMany’或者‘hasAndBelongsToMany’
Recipes
):如果$cas
lht007
·
2013-03-22 09:00
dojo自定义widget
http://dojotoolkit.org/documentation/tutorials/1.8/
recipes
/custom_widget/目录结构:最终效果:关键代码:index.htm
cyper
·
2013-03-11 23:00
lpm_ioctl 移植
http://cgit.openembedded.org/openembedded/plain/
recipes
/ti/ti-local-power-manager/lpm-BKL-fix.patch
linuxarmsummary
·
2013-02-21 13:00
CakePHP 2.x CookBook 中文版 第七章 模型 之 删除数据
例如,删除一个与许多Recipe记录相关的User记录(User‘hasMany’或者‘hasAndBelongsToMany’
Recipes
):如果$ca
matchless
·
2013-02-05 11:36
中文版
cakephp
Cookbook
xcode 调试断点
参考[1] http://developer.apple.com/library/ios/#
recipes
/xcode_help-breakpoint_navigator/articles/about_breakpoint_navigator.html
freshForIphone
·
2013-01-27 18:00
zookeeper分布式锁避免羊群效应(Herd Effect)
具体的代码实现可以在这里看到:https://svn.apache.org/repos/asf/zookeeper/trunk/src/
recipes
/lock/在之前的《ZooKeepe数据模型》一文中提到过
xubo_zhang
·
2013-01-15 16:00
codechef December Challenge 2012 Granama
Recipes
大水题
GranamaRecipesProblemcode:GRANAMASubmitMySubmissionsAllSubmissionsChefhaslearnedanewtechniqueforcomparingtworecipes.Arecipecontainsalistofingredientsinincreasingorderofthetimestheywillbeprocessed.Anin
hnust_xiehonghao
·
2012-12-04 13:00
zookeeper分布式锁避免羊群效应(Herd Effect)
具体的代码实现可以在这里看到:https://svn.apache.org/repos/asf/zookeeper/trunk/src/
recipes
/lock/在之前的《ZooKeepe数据模型》一文中提到过
阿里中间件
·
2012-10-25 08:00
zookeeper
分布式锁
effect
避免羊群效应
Herd
【ZooKeeper Notes 16】避免羊群效应(Herd Effect)
具体的代码实现可以在这里看到:https://svn.apache.org/repos/asf/zookeeper/trunk/src/
recipes
/loc
nileader
·
2012-08-13 08:35
zookeeper
分布式锁
羊群效应
killable threads
## {{{ http://code.activestate.com/
recipes
/496960/ (r1) import threading import ctypes def
san_yun
·
2012-08-05 10:00
thread
A generic programming thread pool
## {{{ http://code.activestate.com/
recipes
/203871/ (r3) import threading from time import sleep
san_yun
·
2012-07-23 15:00
programming
python Short URL Generator
python提供的短链接服务 http://code.activestate.com/
recipes
/576918/ ## {{{ http://code.activestate.com
san_yun
·
2012-07-23 15:00
generator
启蒙blog
http://blog.youxu.info/2012/02/02/software-tools-1/(徐宥,google软件工程师)http://sourcecookbook.com/en/
recipes
twins
·
2012-05-28 22:00
《Spring
Recipes
》第四章笔记4:Defining Script Sources ...
《SpringRecipes》第四章笔记4:DefiningScriptSourcesInline问题脚本内容很少,不需要单独写入脚本文件中。解决方案使用元素定义脚本。使用JRuby 使用Groovy 使用BeanShell 注意:由于脚本中可能会出现XML关键字,所以需要使用将脚本内容
LiJIaming
·
2012-05-25 22:00
spring
《Spring
Recipes
》第四章笔记3:Refreshing Beans from Sc...
《SpringRecipes》第四章笔记3:RefreshingBeansfromScripts问题脚本经常刷新,需要Spring容器自动探测变化和刷新。解决方案使用元素的refresh-check-delay属性,Spring容器可以探测脚本的变化,并进行刷新。例: ... 注意:1、refresh-check-delay的默认值是负数,所以不会自动探测。 2、refresh-che
LiJIaming
·
2012-05-25 22:00
spring
《Spring
Recipes
》第四章笔记2:Injecting Spring Beans i...
《SpringRecipes》第四章笔记2:InjectingSpringBeansintoScripts问题需要将Spring中的bean注入到脚本中。解决方案使用Setter注入的方式将bean注入到脚本中。例:假设接口InterestCalculator中使用了RateCalculator接口的实现,InterestCalculator使用脚本实现。1、定义接口RateCalculator,
LiJIaming
·
2012-05-25 22:00
spring
《Spring
Recipes
》第四章笔记1:Scripting in Spring
《SpringRecipes》第四章笔记1:ScriptinginSpring问题想在Spring中使用JRuby、Groovy、BeanShell等脚本语言。解决方案Spring运行用户使用Spring支持的脚本语言实现bean,和配置使用Java实现的bean没有区别。例:1、假设需要实现一个计算利润的应用,定义了一个接口InterestCalculator:publicinterfaceIn
LiJIaming
·
2012-05-24 23:00
spring
《Spring
Recipes
》第三章笔记7:Introducing States
《SpringRecipes》第三章笔记7:IntroducingStatestoYourBeans问题有时候,需要向一组对象中添加状态,如果调用次数,最后更新时间等。如果所有的对象拥有相同的父类,可以通过在父类中添加状态属性进行解决。但是如果想在具有不同父类的对象中实现相同的效果,就比较困难。解决方案可以为对象introduce一个新的接口,并指定一个实现此接口的、具有操作状态功能的实现类。然后
LiJIaming
·
2012-05-24 22:00
spring
《Spring
Recipes
》第三章笔记6:Introducing Behaviors to...
《SpringRecipes》第三章笔记6:IntroducingBehaviorstoYourBeans问题有时候,可能会构建一组具有共同属性的Classes。在面向对象中,可以通过继承父类或者实现接口来实现。在AOP中,也可以通过类似的方式实现。在Java中,只能单继承,而通过AOP可以实现类似于多重继承的效果。解决方案使用通过@DeclareParents注解定义Introduction这种
LiJIaming
·
2012-05-22 22:00
spring
《Spring
Recipes
》第三章笔记5:Pointcut Expressions
《SpringRecipes》第三章笔记5:PointcutExpressionsMethodSignaturePatterns最常用的匹配模式,根据方法的签名进行匹配。格式:返回类型模式,方法名模式,方法参数模式还是必须的,其余的模式都可以省略不写。execution(modifiers-pattern?return-type-patterndeclaring-type-pattern?name
LiJIaming
·
2012-05-21 22:00
spring
《Spring
Recipes
》第三章笔记4:Reusing Pointcut Definit...
《SpringRecipes》第三章笔记4:ReusingPointcutDefinitions问题使用注解在不同的通知中声明的切面表达式(pointcutexpression)可能相同。解决方案Spring支持单独定义一个切面表达式(pointcutexpression),然后再不同的通知中重用(reuse)。步骤:1、首先建立一个切面,在@Pointcut注解中定义表达式,方法内容为空。@As
LiJIaming
·
2012-05-21 21:00
spring
《Spring
Recipes
》第三章笔记3:Specifying Aspect Preced...
《SpringRecipes》第三章笔记3:SpecifyingAspectPrecedence问题当在不同的切面中对同一个切入点上声明相同的通知时,就会发生通知优先级的问题。解决方案Spring容器提供了使用Ordered接口和@Order注解,两种指定通知优先级的方式。使用Ordered接口切面必须实现Ordered接口,实现getOrder方法,此方法返回的值越小,表面此切面中的通知的优先级
LiJIaming
·
2012-05-20 21:00
spring
《Spring
Recipes
》第三章笔记2:Declaring Aspects
《SpringRecipes》第三章笔记2:DeclaringAspectsSpring容器支持的AspectJ注解:@Aspect,@Before,@After,@AfterReturning,@AfterThrowing,@Around。注意:切面必须让Spring容器管理(使用注解或者在配置文件中声明切面)才能生效。1、@Aspect:声明一个切面。2、@Before:定义在切入点之前执行
LiJIaming
·
2012-05-20 17:00
spring
《Spring
Recipes
》第三章笔记1:Enabling AspectJ Annotation
《SpringRecipes》第三章笔记:EnablingAspectJAnnotation问题如何开启Spring容器对AspectJ注解的支持。解决方案在配置文件中引入aopschema,添加配置。 ...... 如果需要开启CGLIB,则还需要将元素的proxy-targetclass属性设为true。Spring容器一旦发现配置文件中有配置,则自动为符合AspectJ切面的bean创建
LiJIaming
·
2012-05-20 16:00
spring
《Spring
Recipes
》第二章笔记:event-based communication
《SpringRecipes》第二章笔记:event-basedcommunication问题在bean之间添加事件驱动的通信。解决方案1、事件类需要继承ApplicationEvent。实现构造函数,在事件类中添加用于传递信息的属性。2、事件发布者需要实现ApplicationEventPublisherAware接口,实现setApplicationEventPublisher方法,让容器注入
LiJIaming
·
2012-05-19 10:00
spring
《Spring
Recipes
》第二章笔记:Resolving Text Messages
《SpringRecipes》第二章笔记:ResolvingTextMessages问题应用的在国际化时,需要使用多个不同locale的资源文件。解决方案Application接口提供了过根据Key从不同Locale的resource bundle中获取文本信息的功能。(1)首先保证resource bundle为正确的格式:basename[_language][_country].proper
LiJIaming
·
2012-05-19 01:00
spring
《Spring
Recipes
》第二章笔记:Loading External Resources
《SpringRecipes》第二章笔记:LoadingExternalResources 问题程序需要从不同的位置(文件系统,classpath,URL)读取不同类型的资源(如文本文件,XML文件,properties文件或者图片)。程序员需要使用不同的API来实现以上操作。解决方案Spring的ResourceLoader接口提供了getResource()方法统一处理资源的加载。使用带有不同
LiJIaming
·
2012-05-18 23:00
spring
qt-mobility-opensource-src-1.2.0-arm cross compile error solved
root /
recipes
/ qt-mobility / files /force_embedded_withoutx.patch @e5b46660历史记录 | 查看 |追溯| 下载 (1.3kB
hqyhqyhq
·
2012-05-18 16:00
qt
include
Symbian
《Spring
Recipes
》第二章笔记:Customizing Bean Initiali...
《SpringRecipes》第二章笔记:CustomizingBeanInitializationandDestruction问题用户想要指定Spring容器在创建完一个bean后,立刻调用一个PostConstruct方法;或者在销毁一个bean之前,必须调用一个PreDestroy方法。解决方案(1)实现InitializingBean或者DisposableBean接口,并实现的after
LiJIaming
·
2012-05-17 22:00
spring
《Spring
Recipes
》第二章笔记:Declaring Beans from Obje...
《SpringRecipes》第二章笔记:DeclaringBeansfromObjectProperties问题在配置文件中将一个对象的属性声明为bean。解决方案使用Spring自带的PropertyPathFactoryBean工厂bean或者使用从Spring2.5开始的标签。使用PropertyPathFactoryBeanbean:publicclassProductRanking{
LiJIaming
·
2012-05-17 21:00
spring
《Spring
Recipes
》第二章笔记:Declaring Beans from Stat...
《SpringRecipes》第二章笔记:DeclaringBeansfromStaticFields问题在配置文件中将类的静态属性声明为bean。解决方案在bean元素中使用Spring自带的FieldRetrievingFactoryBean实例化bean或者使用从Spring2.5开始引入的标签。使用FieldRetrievingFactoryBeanbean:publicabstractc
LiJIaming
·
2012-05-16 22:00
spring
《Spring
Recipes
》第二章笔记:Creating Beans by Invokin...
《SpringRecipes》第二章笔记:CreatingBeansbyInvokinganInstanceFactoryMethod问题用户希望使用工厂类来实例化bean。解决方案Spring的bean元素中提供了factory-bean属性来配置工厂类,factory-method属性来配置工厂方法。例:facroty-bean:定义返回bean实例的工厂方法。publicclassProdu
LiJIaming
·
2012-05-16 21:00
spring
《Spring
Recipes
》第二章笔记:Setting Bean Scopes
《SpringRecipes》第二章笔记:SettingBeanScopes问题Spring容器默认创建的bean都是单例。解决方案Spring容器的元素的scope属性指定了bean的scope。Table 4.3. BeanscopesScopeDescriptionsingleton(Default)Scopesasinglebeandefinitiontoasingleobjectinst
LiJIaming
·
2012-05-16 21:00
spring
《Spring
Recipes
》第二章笔记:Creating Beans by Invokin...
SpringRecipes》第二章笔记:CreatingBeansbyInvokingaStaticFactoryMethod问题在容器中配置实用静态工厂方法实例化的bean。解决方案Spring的bean元素中提供了factory-method属性来配置静态工厂方法。例:bean:publicclassProductCreator{ publicstaticProductcreateProduc
LiJIaming
·
2012-05-16 21:00
spring
《Spring
Recipes
》第一章笔记:Scanning Components from ...
问题当需要注入的bean太多时,手工进行配置太费时费力,Spring容器提供了指定扫描功能。解决方案使用Spring的componentscanning功能。可以通过@Component,@Repository,@Service,和@Controller注解,使Spring容器指定扫描bean配置,进行注入。@Repository publicclassSequenceDaoImplimpleme
LiJIaming
·
2012-05-15 21:00
《Spring
Recipes
》第一章笔记:@Autowired and @Resource
@Autowiredand@Resource问题:在bean标签上使用autowire属性,会将bean的所有属性都设置为autowire。无法做到指定特定的属性为autowire。解决方案从Spring2.5开始,可以在方法、构造函数、属性上添加@Autowired或者@Resource注解进行注入。配置AutowiredAnnotationBeanPostProcessor想要使用@Autow
LiJIaming
·
2012-05-14 19:00
spring
zookeeper下的分布式锁
在zookeeper源码包的recipe目录下有一个互斥锁lock的实现范例,笔者对其简要包装,以便看起来更为明了: package org.apache.zookeeper.
recipes
.lock
chenkangxian
·
2012-05-12 21:00
zookeeper
分布式协同
分布式锁
《Spring
Recipes
》第一章笔记:Auto-Wiring Beans with XM...
Auto-WiringBeanswithXMLConfiguration问题:如果refer太多了,配置太麻烦。如果容器可以自动配置,可以节省大量时间和工作。XML解决方案:使用标签的autowire属性。常用的autowire类型:byType/byName/Constructor。byType:对于每个beanproperty,,使用配置文件中类型相同的bean进行注入。byName:对于每个
LiJIaming
·
2012-05-10 23:00
spring
《Spring
Recipes
》第一章笔记:Defining Collections Usin...
问题:使用基本的集合标签,无法指定集合的类型,如LinkedList,TreeSet,TreeMap。并且,不能使用refer功能,在不同的bean配置中共享集合。解决方案:Spring提供ListFactoryBean,SetFactoryBean,MapFactoryBean和 UtilitySchema来解决此类问题。1.使用FactoryBen定义集合。FactoryBean的target
LiJIaming
·
2012-05-10 22:00
spring
Mysql命令行导入sql数据
mysql> source C:\mysql-5.4.3\cookbook\
recipes
\tables\mail.sql Query OK, 0 rows affected (0.00 sec
evilgod
·
2012-05-09 22:00
mysql
Mysql命令行导入sql数据
阅读更多mysql>sourceC:\mysql-5.4.3\cookbook\
recipes
\tables\mail.sqlQueryOK,0rowsaffected(0.00sec)QueryOK,
evilgod
·
2012-05-09 22:00
《Spring
Recipes
》第一章笔记:Specifying Bean References
问题向一个bean中注入另外一个bean。解决方案:使用标签。注意:1、可以在set注入中使用: 2、可以在构造函数注入中使用: ... 3、DeclaringInnerBeans:如果一个bean只会被使用一次,可以在或者内被定义为内部bean。内部bean是匿名的,不能被引用,即使设置了id或者name属性,容器也会忽略此属性。
LiJIaming
·
2012-05-09 21:00
spring
bean
references
《Spring
Recipes
》第一章笔记:Creating Beans Using Spri...
问题: IfyouhavecomplexinitializationcodethatisbetterexpressedinJavaasopposedtoa(potentially)verboseamountofXML,youcancreateyourownFactoryBean,writethecomplexinitializationinsidethatclass,andthenplugyou
LiJIaming
·
2012-05-08 23:00
spring
《Spring
Recipes
》第一章笔记:Specifying the Data Type ...
问题默认情况下,Spring容器认为配置文件中设置的集合中的所有元素都是String类型。解决方案:可以使用的type属性指定单个元素的数据类型类型,也可以再集合标签上使用value-type属性指定整个集合的数据类型。例:使用type属性 ... 5 10 20 使用value-type属性 ... 5 10 20 注意:1、如果在bean中使用了泛型,Spring容器会根据泛型
LiJIaming
·
2012-05-08 22:00
spring
python 尾递归
而http://code.activestate.com/
recipes
/474088/有人实现了一个不需要这些语句的python尾递归,巨强无
largetalk
·
2012-05-07 17:49
python
python
recursion
decorator
exception
function
语言
python 尾递归
而 http://code.activestate.com/
recipes
/474088/有人实现了一个不需要这些语句的python尾递归,
largetalk
·
2012-05-07 17:00
exception
python
Decorator
function
语言
recursion
上一页
9
10
11
12
13
14
15
16
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他