摘要: /** * 输入一个正整数 n,输出所有和为 n 的连续正整数序列。 */ function calcN(n) { for (var i = 1; i < Math.sqrt(2 * n); i++) { if ((n - i * (i - 1) / 2) % i == 0) { var a0 = 阅读全文
posted @ 2020-09-29 00:24 省心菜 阅读(612) 评论(0) 推荐(0) 编辑
摘要: /** * 快速排序并得出下标 * * @param array * @param start * @param end * @param indexArr * @return */private int[] quickSort(int[] array, int start, int end, in 阅读全文
posted @ 2020-01-09 17:05 省心菜 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-06-29 11:42 省心菜 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 一道经典的面试题,如何把一个有序数组随机打乱。代码如下: 运行结果如下: 阅读全文
posted @ 2017-04-27 00:05 省心菜 阅读(444) 评论(0) 推荐(0) 编辑
摘要: PageSize = 30 PageNumber = 201 方法一:(最常用的分页代码, top / not in) 备注: 注意前后的order by 一致 方法二:(not exists, not in 的另一种写法而已) 备注:EXISTS用于检查子查询是否至少会返回一行数据,该子查询实际上 阅读全文
posted @ 2016-11-24 14:04 省心菜 阅读(11933) 评论(0) 推荐(0) 编辑
摘要: 后台代码如下: public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/json"; HttpRequest request = context.Request; if (request.InputStream != null ... 阅读全文
posted @ 2016-11-23 17:38 省心菜 阅读(3303) 评论(3) 推荐(0) 编辑
摘要: ///A 为矩阵,这里写成一维数组,如 【1】,【1,2,3,4】 function GetLU(a) { var n = a.length;//矩阵的总数据数目 var s = Math.sqrt(n);//矩阵的阶数 var L = new Array(n); var U = new Array(n); if (GetDet(a) != 0) { var allOrderNo... 阅读全文
posted @ 2016-10-05 18:12 省心菜 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 本系列主要是翻译《Force.com Platform Fundamentals An Introduction to Custom Application Development in the 阅读全文
posted @ 2016-04-28 23:30 省心菜 阅读(3180) 评论(0) 推荐(0) 编辑
摘要: 本系列主要是翻译《Force.com Platform Fundamentals An Introduction to Custom Application Development in the Cloud》 阅读全文
posted @ 2016-04-28 21:17 省心菜 阅读(685) 评论(0) 推荐(0) 编辑