比较愚钝,一点点数论花了好长时间才弄明白,小小总结下。 ①最大公约数 (辗转相除法) Function gcd(a,b:longint):longint; begin if b=0 then gcd:=a else gcd:=gcd(b,a mod b); end; ②最小公倍数 lcm(a,b)*
分类:
其他好文 时间:
2016-03-02 21:49:05
阅读次数:
156
看了别人的博客随手记录下 先看一下以下的代码 1 var a=1,b=2,c=3; 2 3 (function(){ 4 var a=b=1; 5 })(); 6 7 console.log(a); 8 console.log(b); 这是大家众所周知的闭包了,没错,闭包的一个很重要的用途就是变量不
分类:
编程语言 时间:
2016-03-02 21:34:07
阅读次数:
203
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 -
分类:
其他好文 时间:
2016-03-02 21:32:11
阅读次数:
165
用到的时候找到的分享下,也是收藏下,本地收藏多了感觉找起来很麻烦 方法1: function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Wind
分类:
移动开发 时间:
2016-03-02 19:49:14
阅读次数:
170
1. code: (function($){ $.hello = function(str){alert("hello "+str);} })(jQuery); 2: note: 如果页面作者使用了Prototype,且已调用了$.noConflict(),则$被占用, 通过将jQuery传递给$形
分类:
Web程序 时间:
2016-03-02 18:10:46
阅读次数:
188
1. 创建一个函数fun_sal,该函数根据部门号获得该部门下所有员工的平均工资Create or replace function fun_sal(deptnos number)return varchar2IsAvgs number(10);Begin Select avg(sal) into
分类:
数据库 时间:
2016-03-02 18:08:36
阅读次数:
293
// 字串含中文 by Aone function IsIncludeChinese(Str: String): Boolean; var i: Integer; UCS4Str: UCS4String; begin Result := False; UCS4Str := UnicodeString
分类:
其他好文 时间:
2016-03-02 17:55:41
阅读次数:
120
1.javascript 选项散列对象 function Test(p1,p2,p3,p4,p5){ //do something } call: 参数可选 Test({ p1:value1, p2:value2, p5:value5 }); 2. self-definition function
分类:
Web程序 时间:
2016-03-02 17:53:16
阅读次数:
168
无迹卡尔曼滤波(unscented kalman filter)中需要用到无迹变换。维基百科中对unscented transform的描述如下: The unscented transform (UT) is a mathematical function used to estimate the
分类:
其他好文 时间:
2016-03-02 15:16:00
阅读次数:
216
Drools 函数学习 函数是定义在规则文件当中一代码块,作用是将在规则文件当中若干个规则都会用到的业务操作封装起来,实现业务代码的复用,减少规则编写的工作量。函数的编写位置可以是规则文件当中 package 声明后的任何地方具体语法如下: function void/Object function
分类:
其他好文 时间:
2016-03-02 15:08:05
阅读次数:
134