把URL传递参数转变成自定义实体方法

摘要: 先定义下要获取的实体: public class InputClass { public long Id { get; set; } public int Status { get; set; } public DateTime UdpateTime... 阅读全文
posted @ 2015-05-28 22:40 Karson007 阅读(949) 评论(0) 推荐(0) 编辑

【转载】C#后台声明式验证,远离if验证

摘要: ViewModel public class ViewModel { [Required(ErrorMessage="标题不能为空")] public string Title { get; set; } public string Name { ge... 阅读全文
posted @ 2015-05-26 22:12 Karson007 阅读(160) 评论(0) 推荐(0) 编辑

判断访问浏览器版本

摘要: var browser = { versions: function () { var u = navigator.userAgent, app = navigator.appVersion; return { ... 阅读全文
posted @ 2015-05-22 09:22 Karson007 阅读(122) 评论(0) 推荐(0) 编辑

用属性动画模仿展开菜单

摘要: 页面布局文件 代码:private int[] res={R.id.imageView_a,R.id.imageView_b,R.id.imageView_c, R.id.imageView_d,R.id.imageV... 阅读全文
posted @ 2015-01-16 17:33 Karson007 阅读(405) 评论(0) 推荐(0) 编辑

N个数随机相加得出固定值的排列组合

摘要: static double[] iArr = new double[10] { 1,2,3,4,5,6,7,8,9,10 }; static Stack stack = new Stack(); static double tempNum = 0; ... 阅读全文
posted @ 2015-01-15 16:39 Karson007 阅读(878) 评论(0) 推荐(0) 编辑

输入数字转换格式

摘要: <html><SCRIPT LANGUAGE="JavaScript"><!--function formatNum(obj){ obj.value=obj.value.replace(",",""); if(isNaN(obj.value)) { alert('请填写数字!'); } else { if(obj.value.split(".").length>1)//带小数点的 { var n1=obj.value.split(".")[0] 阅读全文
posted @ 2013-05-04 23:15 Karson007 阅读(148) 评论(0) 推荐(0) 编辑

一个很炫的图片切换脚本

摘要: <style type="text/css">.ss{border:1px solid #000000;height:100px;width:100px;position:absolute;left:100px;top:240px;z-index:1;border:1px solid #FFFFFF;}</style><body style="background-color:#000000;color:#FFFFFF; font-size:12px;"><div>循环播放<input id=' 阅读全文
posted @ 2013-05-04 23:11 Karson007 阅读(222) 评论(0) 推荐(0) 编辑

JS脚本复制粘贴

摘要: <SCRIPT language=javascript type=text/javascript>function setCopy(_sTxt){try{clipboardData.setData('Text',_sTxt)}catch(e){}}function dialog(){var titile = '';var width = 300;var height = 180;var src = "";var path = "";var sFunc = '<input id="dial 阅读全文
posted @ 2013-05-04 23:09 Karson007 阅读(196) 评论(0) 推荐(0) 编辑

之前对 Alexa 的研究整理

摘要: 一、 Alexa简介1、 定义:Alexa创建于1996年4月,他们的目的是让 Internet冲浪者在分享虚拟世界资源的同时,更多的参与Internet资源地组织。2002年5月Alexa放弃了自己的搜索引擎与Google 合作。他们每天在网上搜集超过1,000GB的信息,然后进行整合发布。现在他们搜集的URL数量已经超过了Google。此排名的依据是用户链接数(Users Reach)和页面浏览数(Page Views)三个月累积的几何平均值。1999年,Alexa被美国电子商务旗舰企业“亚马逊”收购,成为后者的全资子公司。2、 分类:a) 综合排名 也可以叫做绝对排名。即特定的一个网站在 阅读全文
posted @ 2013-05-04 22:49 Karson007 阅读(297) 评论(0) 推荐(0) 编辑

一道算法题

摘要: 给出几种产品组合,求出产品最大优惠值protected void Button1_Click(object sender, EventArgs e) { string str_input = TextBox1.Text; List<Product> list_Rule = new List<Product>(); //规则 list_Rule.Add(new Product("A", 1)); list_Rule.Add(new Product("B", 1)); list_Rule.Add(new Pr... 阅读全文
posted @ 2013-05-04 21:18 Karson007 阅读(114) 评论(0) 推荐(0) 编辑