首先是activity想fragment怎样动态的传输数据: 一:activity与fragment之间进行数据传递是,在Activity中将要传递的数据封装在一Bundle中,使用setArgument(Bundel bundel)方法传递数据,在要传递到的Fragment中 使用this.get ...
分类:
移动开发 时间:
2020-02-09 20:28:07
阅读次数:
85
1、arguments.callee function test() { console.log(arguments.callee); } 打印函数自己 运用: 立即执行函数里使用递归 var num = (function() { if(n == 1) { return 1; } return n ...
分类:
编程语言 时间:
2020-02-08 20:55:17
阅读次数:
78
function course(name,age){ console.log(age); //undefined 此时age并无实参,所以为undefined console.log(arguments[1]); //undefined arguments指示的age,因为下标是以0开始的 argu ...
分类:
Web程序 时间:
2020-02-07 14:34:54
阅读次数:
88
1、在JavaScript中,arguments对象是比较特别的一个对象,实际上是当前函数的一个内置属性。arguments非常类似Array,但实际上又不是一个Array实例。可以通过如下代码得以证实(当然,实际上,在函数funcArg中,调用arguments是不必要写成funcArg.argu ...
分类:
编程语言 时间:
2020-02-06 01:34:16
阅读次数:
87
数组的遍历 1.传统for循环 2.forEach方法,不支持break和continue const arr = [1, 2, 3, 4, 5] arr.forEach(function (item) { console.log(item) }) 3.every方法,可以做到 break 那样的效 ...
分类:
编程语言 时间:
2020-02-04 13:37:55
阅读次数:
73
原英文帮助文档: class int([x])class int(x, base=10) Return an integer object constructed from a number or string x, or return 0 if no arguments are given. If ...
分类:
编程语言 时间:
2020-02-01 23:04:44
阅读次数:
99
本文我们来学习下js函数的一些用法。 上图的要点为: 1.函数具有属性,如foo.length和foo.name。 2.arguments是类数组,arguments.length为实参的数目。 3.严格模式下,arguments为副本。 4.若未传参数,赋值给arguments[x]会无效。 5. ...
分类:
编程语言 时间:
2020-02-01 21:12:22
阅读次数:
90
``` name) //wrong can not use this as a parameter function __construct($name) //functions starting with __ change and set the value of any attributes ...
分类:
Web程序 时间:
2020-01-29 21:33:36
阅读次数:
87
"no-alert": 0,//禁止使用alert confirm prompt "no-array-constructor": 2,//禁止使用数组构造器 "no-bitwise": 0,//禁止使用按位运算符 "no-caller": 1,//禁止使用arguments.caller或argum ...
分类:
其他好文 时间:
2020-01-29 12:47:34
阅读次数:
102
通常我们在定义枚举类时,可能使用数字或者英文,但在界面显示的时候又希望显示中文,我总结了以下两种方法 (1)显示自定义的枚举名称: public enum WorkFlowProcessState { [Display(Name = "未启动")] None = 0, [Display(Name = ...
分类:
Web程序 时间:
2020-01-29 00:48:06
阅读次数:
257