自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

原创 js 工具函数集

// 深度克隆对象function deepClone(o, t) { t = t || {}; for (var k in o) { if (o.hasOwnProperty(k)) { // 排除原型链的非自定义属性 if (o[k] !== null && typeof(o[k]) == 'object') { // if (Object.prototype.toString.call(o[k]) == '[object Array]') { // t[k

2020-07-14 11:45:13 122

原创 手动btsoft_ubuntu

手动btsoft_ubuntu

2022-08-27 17:28:33 849 1

原创 java 99乘法表

public class Main { public static void main(String[] args) { t99(" "); } public static void t99(String t) { String t1 = ""; String t2 = ""; for (int i = 1; i <= 99; i++) { for (int j = 1; j <=

2021-04-14 02:03:17 202

原创 java 修饰符

public alldefault 包内protected 包内 -> 本类 + 子类private 包内 -> 本类

2021-03-26 11:17:57 100

原创 git 基本操作

名词本地库:repository / HEAD / history / 版本库 / 库暂存区:stage / index / 缓存区工作区:working Dir远程库:remote操作文件操作生成git仓库git initgit clone https://github.com/xxx/xxx.git工作区 →\rightarrow→ 暂存区git add .git add filename.txt暂存区 →\rightarrow→ 库git commi

2021-02-15 00:11:17 172

原创 java 数据类型,转换

class first{ public static void main(String[] args){ byte Integer1 = 127; // 2^7 - 1 System.out.println(Integer1); short Integer2 = 32767; // 2^15 - 1 System.out.println(Integer2); int Integer3 = 2147483647; // 2^31 - 1 System.out.println

2021-02-07 06:29:24 140

原创 CentOS 设置静态ip

ifconfigvim /etc/sysconfig/network-scripts/ifcfg-ens33vim /etc/sysconfig/network-scripts/ifcfg-enp0s3TYPE="Ethernet"PROXY_METHOD="none"BROWSER_ONLY="no"BOOTPROTO="dhcp" // staticDEFROUTE="yes"IPV4_FAILURE_FATAL="no"IPV6INIT="yes"IPV6_AUTOCONF=.

2021-01-12 21:54:07 149 1

原创 php 面向对象_练习

插入usb行为interface usb{ function cha(); function check();}class port{ protected $state = 0; protected $thing = ""; public function __construct($thing) { $this->thing = $thing; } public function cha() { $this->state = 1; } public functio

2020-12-16 06:09:54 271

原创 php namespace

PHP 命名空间(namespace)php官方文档:使用命名空间:基础// \f.fun// \names\f.fun// \names\n1\f.fun// \names\n2\f.fun// \names\n3\f.funnamespace { function f() { echo "g"; } f(); // 1.非限定名称 names\f(); // 2.限定名称 names\n1\f(); \names\n2\f(); // 3.完全限定名称 names\

2020-12-14 20:12:22 84

原创 js es5严格模式_练习

在逻辑的顶端声明"use strict",启动es5.0模式arguments.callee无法在es5.0模式下使用。// "use strict"; // 执行a函数时直接报错。function a() { console.log(arguments.callee);}function b() { "use strict"; a(); // 3.0正常 console.log(arguments.callee); // 5.0报错}function c() { c

2020-11-02 23:06:27 135 1

原创 apicloud + appstore 证书制作过程

iOS证书Apicloud文档:https://doc.apicloud.com/Dev-Guide/iOS-License-Application-Guidance证书:https://www.apicloud.com/certificateapple生成证书:https://developer.apple.com/account/resources/certificates/list提交审核:https://appstoreconnect.apple.com/apps制作App

2020-07-14 15:15:06 516

原创 js 数组_练习

var a = [];var b = new Array();var a1 = [1,2,3]; // [1,2,3]var a2 = [1,2,,3]; // [1,2,undefined,3]var a3 = [,]; // [undefined]var a4 = [3,]; // [3]var a5 = [,3]; // [undefined,3]var b1 = new Array(1,2,3); // [1,2,3]var b2 = new Array(3);

2020-07-10 18:01:48 154

原创 js 深度克隆_练习

// 浅度克隆function clone(o, t) { t = t || {}; for (var k in o) { t[k] = o[k]; } return t;}// 深度克隆function deepClone(o, t) { t = t || {}; for (var k in o) { if (o.hasOwnProperty(k)) { // 排除原型链的非自定义属性 if (typeof(o[k]) == 'object') { if (Obj

2020-07-10 12:43:01 137

原创 js caller_练习

function a() { if (b.caller == b) { return 'fun is b'; } else { return 'other fun'; }}function b() { a(); // return 'fun is b'}function c() { a(); // return 'other fun'}b();c();

2020-07-10 01:38:01 95

原创 js this_练习

function a() {console.log(this);}var b = a();var c = new a();// b = {parent: Window, opener: null, …} // = window// c = a { // = a.prototype// __proto__ : {// constructor : a,// __proto__ : {...}// }// }

2020-07-09 23:46:27 121

原创 js 区分array和object

var arr = [];var obj = {};// type1arr.constructor == Object // "false"obj.constructor == Object // "true"// type2arr instanceof Array // "true"obj instanceof Array // "false"// type3Object.prototype.toString.call(arr); // "[object Array]"Objec

2020-07-08 18:47:38 408

原创 js this指向_练习

var a = { b : function () {}, // return undefined c : function () {return this}, // return a。(指向a) d : this // 指向 window}

2020-07-08 18:09:38 152

原创 js 命名空间_练习

// var org = {// dep1 : {// zh : {// div : '<div></div>',// changeP : function () {}// },// lianh : {// div : '<div></div>',// changeP : function () {}// }// },// dep2 : {// li : {// div : '&

2020-07-08 17:16:44 117

原创 js 集成模式_圣杯

Origin.prototype.oriProto = 'oriP';function Origin() { this.oriData = 'oriD';}var origin = new Origin();console.log(origin);function inherit(Ori, Tar) { F.prototype = Ori.prototype; function F() {} Tar.prototype = new F(); // 只继承Ori.prototype,不执行

2020-07-08 15:36:47 186

原创 js call_apply_练习

bierende.prototype.earn = function () { this.money ++;};bierende.prototype.color = 'yellow';function bierende(last) { this.last = last; this.money = 20000;}// wode.prototype = bierende.prototype;for (let k in bierende.prototype) { wode.p

2020-07-08 14:20:05 169

原创 js 原型链_练习

function Grand() { this.money = 20000;}Grand.prototype.last = 'zh';var grand = new Grand();function Father() { this.height = '2m';}Father.prototype = grand;var father = new Father();function Me() { this.jineng = 'IT';}Me.prototype = father;

2020-07-07 00:00:09 227

原创 js 构造函数_原型_练习

// a.prototype = { // 函数被定义时产生的// constructor : a,// __proto__ : {...}// }a.prototype.last = 'zh'; // 相当于添加属性// a.prototype = { // 结果// last : 'zh',// constructor : a,// __proto__ : {...}// }// a.prototype = { //相当于重新赋给属性// last : 'zh.

2020-07-06 23:01:53 243

原创 js 模拟构造函数隐式步骤

正常的function Car(color) { // var this = {}; this.name = 'BMW'; this.color = color; // return this}var car1 = new Car('red');// 当函数执行前加 new 关键字,则在函数隐式执行两个步骤。// 此隐式 this 不可写成显示,不然报错:// test.html:13 Uncaught SyntaxError: Unexpected token 'this'.

2020-06-17 21:55:30 161

原创 js 函数中参数的传递 (arguments类数组)

参数的传递function sum(a, b) { // arguments = [2, 5]; // var a = arguments[0], // b = auguments[1]; return a + b;}sum(2, 5);形参与实参不一致时function test1(a, b) { // arguments = [2, 5, 6]; // var a = arguments[0], // b = auguments[1];}test1(.

2020-06-14 15:05:29 1138

原创 js 闭包

要求:执行闭包函数10次,打印0~9闭包错误:结果得到十个10。原因是比如arr[3] = function () {console.log(i)} 中的函数体没被执行,变量 i 还没变现成具体的数。等到myArrj执行的时候 i 才会访问[[scope]]链,而此时每个数组访问的是:test函数里的循环完成后已经变成了10的 i。function test() { var arr =...

2019-12-31 00:55:29 109

原创 js递归求阶乘 mul(n)

题:函数 mul(n),传n求阶乘。//n为自然数测:n = 0,1, 2 和 5注:此页js代码可复制到html文件里,在浏览器执行。=====================================================不用递归,用循环:<script type="text/javascript">function mul(n) { var num ...

2019-12-19 01:25:23 1636

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除