摘要: 可悲了,写了这么多年,第一次看到这个代码。SELECT [owt].[session_id], [owt].[exec_context_id], [owt].[wait_duration_ms], [owt].[wait_type], [owt].[blocking_s... 阅读全文
posted @ 2015-01-08 13:51 rockyyue 阅读(210) 评论(0) 推荐(0) 编辑
摘要: .Net 中计算2个点之间的距离的方法,或者叫计算2个坐标,2个经纬度之间的距离。代码如下: 1 /// 2 /// Calculates the distance between two geographics locations 3 /// 4 public stat... 阅读全文
posted @ 2014-12-10 17:24 rockyyue 阅读(1011) 评论(0) 推荐(0) 编辑
摘要: 根据base64 或者MemoryStream 生成的Image 图片对象,获取其类型(MIME,或者叫后缀的东西)代码如下: public string GetMimeType(Image image) { var ImageCodec = ImageCod... 阅读全文
posted @ 2014-11-25 15:30 rockyyue 阅读(2262) 评论(0) 推荐(0) 编辑
摘要: 其实很简单,设计的时候,把字段的类型用nXXX的就可以了。原因是SQLServer 的默认编码是UTF-16的, 而Emoji的编码是UFT-8的。 而nXXX是使用UTF-8的编码方式。呵呵呵…… 阅读全文
posted @ 2014-11-19 15:42 rockyyue 阅读(504) 评论(0) 推荐(0) 编辑
摘要: Ajax JSON 跨域, 请求 服务(WebApi,WCF或者其他) 阅读全文
posted @ 2014-11-10 15:23 rockyyue 阅读(1687) 评论(0) 推荐(2) 编辑
摘要: for testing only 阅读全文
posted @ 2014-10-29 14:37 rockyyue 阅读(99) 评论(0) 推荐(0) 编辑