摘要: 使用UiDevice获取设备信息:获取设备名称let name = UIDevice.currentDevice().name获取设备系统名称let systemName = UIDevice.currentDevice().systemName获取系统版本let systemVersion = U... 阅读全文
posted @ 2015-06-01 15:55 小-牛 阅读(1235) 评论(0) 推荐(0) 编辑
摘要: static externif elseswitch casewhile-----do while forgotocontinue breakint double short long float char enum union struct typedefsizeofconstsiged uns... 阅读全文
posted @ 2015-06-01 14:25 小-牛 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 红色表示可选参数。@Html.Label("name", "value", new { @class = "class", @style = "color:Red;" })value@Html.TextBox("name", "value", new { @class = "txt", @style... 阅读全文
posted @ 2015-05-28 11:14 小-牛 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 一、校验数字的表达式 1 数字:^[0-9]*$ 2 n位的数字:^\d{n}$ 3 至少n位的数字:^\d{n,}$ 4 m-n位的数字:^\d{m,n}$ 5 零和非零开头的数字:^(0|[1-9][0-9]*)$ 6 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9]... 阅读全文
posted @ 2015-05-27 16:06 小-牛 阅读(129) 评论(0) 推荐(0) 编辑
摘要: ViewBag.Title:标题layout:@ViewBag.Titleview:@{ViewBag.Title="标题"}@RenderBody():视图的内容直接渲染到这里。layout:@RenderBody()view:内容浏览并查看view的源代码:内容@RenderSection:la... 阅读全文
posted @ 2015-05-27 13:49 小-牛 阅读(145) 评论(0) 推荐(0) 编辑
摘要: mvc使用Area分区开发后,存在不同Area之间的跳转,需要为每个区间添加Area规则,如下:using System.Web.Mvc;namespace web.Areas.FrameSet{ public class FrameSetAreaRegistration : AreaRegi... 阅读全文
posted @ 2015-05-27 11:33 小-牛 阅读(9986) 评论(0) 推荐(1) 编辑
摘要: MVC的URL是通过路由映射的,因为我们可以通过修改RouteConfig来改变应用的起始页面。 public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) ... 阅读全文
posted @ 2015-05-27 10:59 小-牛 阅读(487) 评论(0) 推荐(0) 编辑
摘要: 1、制作验证码:using System;using System.Collections.Generic;using System.Drawing;using System.Drawing.Drawing2D;using System.Drawing.Imaging;using System.IO... 阅读全文
posted @ 2015-05-26 15:30 小-牛 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 1、新建一个类,设置角色:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Web;using Sys... 阅读全文
posted @ 2015-05-26 15:13 小-牛 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 用存储过程或事务。取得最大标识的时候同时更新。注意主键不是自增量方式这种方法并发的时候是不会有重复主键的,取得最大标识要有一个存储过程来获取。 阅读全文
posted @ 2015-05-25 16:40 小-牛 阅读(800) 评论(0) 推荐(0) 编辑