Wife is a component of Husband class and thus they are stored in one table in DB.1.AnnotationHusband: put @Embedded before component Wife.Only need on...
分类:
Web程序 时间:
2015-10-24 07:51:26
阅读次数:
168
When creating a service, need to inject the sercive into the bootstrap():import {bootstrap, Component, View} from "angular2/angular2";import {TodoInpu...
分类:
其他好文 时间:
2015-10-23 16:12:35
阅读次数:
192
一遇到这种错误下意识地找了半天路径,结果发现没问题后来才发现原因是eclipse复制项目后引用的还是原来的项目名称以前用惯了MyEclipse,eclipse改的不彻底两种方法:第一种(推荐):找到项目的.settings文件夹下的org.eclipse.wst.common.component打开...
分类:
其他好文 时间:
2015-10-22 18:57:47
阅读次数:
216
想让spring能够管理你的类,首先在你的spring配置文件里需要有包的扫描,<context:component-scanbase-package="com.XXX.*"/>@Service服务层组件,用于标注业务层组件,表示定义一个bean,自动根据bean的类名实例化一个首写字母为小写的bean,例如Chinese实例化为chinese..
分类:
编程语言 时间:
2015-10-22 14:23:19
阅读次数:
156
New stuff learnt - Union-Find. Simpler and more elegant than I thought.class Solution { unordered_map father; int find(int val) { if(!...
分类:
其他好文 时间:
2015-10-21 14:08:51
阅读次数:
191
一. var?FancyCheckbox?=?React.createClass({
??render:?function()?{
????var?fancyClass?=?this.props.checked???‘FancyChecked‘?:?‘FancyUnchecked‘;
????return?(
??????<div?...
分类:
其他好文 时间:
2015-10-21 12:46:54
阅读次数:
785
Mixin用于定于复用方法,并在其他Component中使用 var?SetIntervalMixin?=?{
??componentWillMount:?function()?{????//生命周期开始回调
????this.intervals?=?[];
??},
??setInterval:?f...
分类:
其他好文 时间:
2015-10-20 16:39:34
阅读次数:
179
使用注解步骤:1)先引入context名称空间xmlns:context="http://www.springframework.org/schema/context"2)开启注解扫描3)使用注解通过注解的方式,把对象加入ioc容器。创建对象以及处理对象依赖关系,相关的注解:@Component指定...
分类:
编程语言 时间:
2015-10-18 15:23:44
阅读次数:
194
setSize()/setBounds() 和setPreferredSize() 的区别:The short answer is: it's complicated.The slightly longer answer is: use setSize() if your component's p...
TextBoxExtend from $.fn.validatebox.defaults. Override defaults with $.fn.textbox.defaults.The TextBox component is a enhanced input field that allows...
分类:
其他好文 时间:
2015-10-15 14:16:53
阅读次数:
222