EF 有 中的模型类的配置有 DataAnnotations、FluentAPI 两种; 1.DataAnnotations:实体类属性上标注Attribute;必填字段标注[Required] 、字段长度[MaxLength(5)]用 、可空字段用 int? ;如果字段在数据库有默认值,则要在属性 ...
分类:
其他好文 时间:
2017-03-18 22:44:11
阅读次数:
133
Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. Example 1: Example 2: Note: The length of the giv ...
分类:
编程语言 时间:
2017-03-10 12:57:49
阅读次数:
179
Attribute是属性的意思,文章仅对部分兼容IE和FF的Attribute相关的介绍。 Attribute是属性的意思,文章仅对部分兼容IE和FF的Attribute相关的介绍。 attributes:获取一个属性作为对象 getAttribute:获取某一个属性的值setAttribute:建 ...
分类:
Web程序 时间:
2017-02-16 16:01:41
阅读次数:
370
命名规则:名称空间,类,基类中的成员 用 Pascal 形式 例如:MaxLength私有成员用 camel 例如 private int subscriberId成员字段常用一条下划线 例如: private int _subscriberId传递给方法的所有参数名称camel public vo ...
分类:
其他好文 时间:
2017-02-14 12:08:41
阅读次数:
124
始终绑定submit事件 不单独的对【提交】按钮绑定click事件,对整个表单绑定submit提交事件,这样可以让整个表单内的文本框获得Enter提交的VIP待遇,并且在移动端中可以让文本框聚焦时键盘的右下角是【前往】。 input元素的type maxlength 如果已知元素理想的输入长度,不妨 ...
分类:
移动开发 时间:
2017-02-10 15:43:36
阅读次数:
231
写页面的过程中用到了textarea的文本域,就突然想起他也可以加上剩余字数统计的这个功能。 第一个思路: 根据键盘按键按下去触发一个方法计数: <textarea cols="50" rows="10" maxlength="100" title="只能输入100个字" ng-model="tex ...
分类:
Web程序 时间:
2017-02-08 14:44:45
阅读次数:
200
public static String mul(String str1, String str2) { int minLength = -1; int maxLength = -1; if (str1.length() > str2.length()) { minLength = str2.len... ...
分类:
其他好文 时间:
2017-01-21 00:32:01
阅读次数:
162
首先要说明原理: 1.input:text框让他层级最高,这边要设置透明度,这样保证遮盖的盒子操作的box-shadow能看的到,让文字的color设为背景色一致,这里设置为白色,在这样就看不到默认的字了 2.然后是给一个盒子来存放输入的框,就是6个虚拟的密码框,来显示你输入的个数 3.每个密码框里 ...
分类:
Web程序 时间:
2017-01-19 19:19:38
阅读次数:
327
<form id="complai_form" method="post" action="{:U('Index/Complai')}"> <div class="com_area"> <div style="width:80%;height:50px;margin:0 auto;"> <div c ...
分类:
Web程序 时间:
2017-01-19 02:09:28
阅读次数:
271
文本框:textInput(); 密码框:passwordInput(); 单选框:radio(),radioList(); 复选框:checkbox(),checkboxList(); 下拉框:dropDownList(); 隐藏域:hiddenInput(); 文本域:textarea(['ro ...
分类:
其他好文 时间:
2017-01-14 14:39:48
阅读次数:
169