代码改变世界

[转]JavaScript 删除数组中指定值的元素

2010-03-09 12:10 by AnyKoro, 476 阅读, 0 推荐, 收藏, 编辑
摘要:/* 方法:Array.remove(dx) * 功能:删除数组元素. * 参数:dx删除元素的下标. * 返回:在原数组上修改数组 *///经常用的是通过遍历,重构数组.Array.prototype.remove=function(dx){ if(isNaN(dx)||dx>this.length){return false;} for(var i=0,n=0;i<this.length;i++) { if(this[i]!=this[dx]) { this[n++]=this[i] } } this.length-=1}//在数组中获取指定值的元素索引Array.protot 阅读全文

[转]asp.net mvc 获取IP方法的扩展

2010-03-08 00:29 by AnyKoro, 630 阅读, 0 推荐, 收藏, 编辑
摘要:asp.net mvc 获取IP方法的扩展1.扩展方法必须在非泛型静态类中定义2.扩展方法必须是静态的3.不能在静态类中声明实例成员public static class PubMethod { public static string GetIP(this Controller ctrl) { string ip; if (ctrl.HttpContext.Request.ServerVaria... 阅读全文

Implementing a favourite icon (favicon) in ASP.NET

2010-03-07 20:05 by AnyKoro, 356 阅读, 0 推荐, 收藏, 编辑
摘要:Implementing a favourite icon (favicon) in ASP.NETWhen the thought of adding a favicon, or rather, a favourite icon to your website appears on your todo list, you instantly think it’s a quick, e... 阅读全文

【转】真正的iframe高度自适应(兼容IE,FF,Opera)

2010-03-07 02:14 by AnyKoro, 274 阅读, 0 推荐, 收藏, 编辑
摘要:由于项目上的需要,要用一个iframe高度自适应的功能在google上搜了很久找到了下面这个js[代码]然后……进入了测试过程(调用很简单,先略过)1.IE ---通过 但是高度还是有稍微的差距,很小,滚动条还在2.FF --- 通过 与IE一样,有小差距3.Opera --- 看那个JS的条件就知道,通不过的但主流浏览器至少要通过这三项撒!!!于是,还是Google搜... 阅读全文

[转]验证MS关于DateTime的JSON表示

2010-03-07 00:04 by AnyKoro, 585 阅读, 0 推荐, 收藏, 编辑
摘要:JSON有一个非常大的遗憾,就是对于DateTime类型没有进行相关的标准表示,于是MS为了解决此类问题,在Asp.net Ajax的实现中用\Date(tickets)\来表示日期时间,为了和表示日期时间的和类似于表示日期时间的数据取个开来,在传递的JSON字符串中 就是这样表示的,如:var jsonString='{"name":"James","birthday":"\\\/Date(10... 阅读全文

在 Flex中使用Json (转载收藏)

2010-03-05 19:56 by AnyKoro, 591 阅读, 0 推荐, 收藏, 编辑
摘要:要用到JSON,看了一篇(http://bbs.actionscript3.cn/thread-1657-1-1.html )的扫盲贴,在Flex中使用Json十分方便。json是介于纯文本方式与xml方式之间的一种格式,json能做到的事情,xml完成可以做到。为什么要用json呢,我看大部分还是像我一样,不得不用。json是ajax数据传输的首选,现有的项目使用的已经是json,如果增加fle... 阅读全文

[转]flex中使用corelib ActionScript 3 Library sdk包解析json数据

2010-03-05 19:55 by AnyKoro, 872 阅读, 0 推荐, 收藏, 编辑
摘要:flex中使用corelib ActionScript 3 Library sdk包解析json数据在flex 3中使用 要使用json作为数据交换格式。需引入corelib ActionScript 3 Library 开发包1. 下载地址:http://www.adobe.com/cfusion/exchange/index.cfm?view=sn111&extid=10784692.... 阅读全文

Integrating Adobe Flex and .NET with ASP.NET MVC

2010-03-01 10:04 by AnyKoro, 973 阅读, 0 推荐, 收藏, 编辑
摘要:There are a lot of tools out there to help you utilize .NET as a back-end for Flex applications. All of these solutions come with a heavy customization and implementation cost. I’ve used WebORB ... 阅读全文

【转】 LINQ TO SQL中的selectMany

2010-02-28 11:34 by AnyKoro, 460 阅读, 0 推荐, 收藏, 编辑
摘要:首先看SelectMany的定义: Queryable中的SelectMany 方法:将序列的每个元素投影到一个 IEnumerable<(Of <(T>)>) 并将结果序列组合为一个 IQueryable<(Of <(T>)>) 类型的序列。(引用MSDN) 在用LINQ TO SQL 来写查询语句时,有一个selectMany的语句,它标示着一对多的关系,这篇文章我想说下在LINQ TO SQL中几种可以等同selectMany的用法。 系统转换成selectMany的条件: 1:语句中不包含join ,into; 2:需要2个以上的from 阅读全文

Entity framework and many to many queries unusable?

2010-02-28 00:20 by AnyKoro, 423 阅读, 0 推荐, 收藏, 编辑
摘要:2 3I'm trying EF out and I do a lot of filtering based on many to many relationships. For instance I have persons, locations and a personlocation table to link the two. I also have a role and personro... 阅读全文
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页