自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 为项目添加.gitignore文件

.gitignore文件是用于记录项目中不需进行项目管理的文件,git提交时会忽略.gitignore中的文件。在项目根目录下新建一个文本文件.txt,用记事本打开并另存为.gitignore文件(因为无法直接创建一个.gitignore文件) # 这是一行注释# 如果规则前或中间有“/”斜线分隔符,则这个规则是相对于.gitignore的相对路径,否则这条规则可以匹配.gitignore下的任意层级# 如:匹配 doc/frotz 目录,但不匹配 a/doc/fro...

2020-09-29 13:08:06 1430

原创 获取js对象长度的三种方式

一、var obj = { "name":1, "address":2};var len = Object.keys(obj).length;console.log(len); //长度为2二、var len =0;for(var i in obj){ len++;}三、Object.getOwnPropertyNam...

2020-03-27 21:03:10 1698

原创 JS高程 Chp.7 函数表达式 思维导图

2020-03-23 10:10:51 266

原创 JS高程 Chp.6 面向对象的程序设计 思维导图

2020-03-23 10:03:59 142

原创 JS高程 Chp.4 变量、作用域和内存问题 思维导图

2020-03-23 09:36:35 112

原创 文件读写ActiveXObject

ActiveXObject("Scripting.FileSystemObject")文件操作注意编码方式,尝试写入中文字符可能会导致错误(WriteLine)

2020-01-19 13:59:57 837

原创 IE11 F12 调试工具错误:exception during Domexplorer.initialize: error: an error has occurredJsPlugin.3005

解决办法:安装windows7补丁:KB3008923下载地址:http://www.microsoft.com/en-us/download/details.aspx?id=45134(32位)http://www.microsoft.com/zh-cn/download/details.aspx?id=45154(64位)...

2020-01-19 13:45:43 428

原创 HTML或JS中的中文乱码原因及解决方法

可能因为编辑器使用的编码不对,可以尝试将VScode的Files.Auto Guess Encoding选项打开 也有可能Files.Auto Guess Encodingd打开了,但是它猜错了,需要自己手动设置编码 HTML中要设置 <metacharset="utf-8"> <scriptsrc="js/gjzd.js"...

2020-01-19 13:43:52 1939

原创 CSS样式笔记

CSS样式:z-index works only when elements are positioned(position:absolute, position:relative, or position:fixed) 透明度的设置: rgba(0,0,0,0.5); //参数分别为r,g,b的值和透明度(0-1) border-radius: border-ra...

2020-01-19 13:25:16 189

原创 js笔记

遍历对象(键值对)或数组:for-in循环for(var key in object) { console.log(key + ":" + object[key]); //可以取得键key和对应的值object[key] } var arr =["a","b","c","d"]; var obj = { ...

2020-01-19 10:29:00 147

原创 JS高程 Chp.20 JSON 思维导图

2019-10-30 10:45:04 186

原创 JS高程 Chp.12 DOM2、DOM3 思维导图

2019-10-30 10:43:12 156

原创 JS高程 Chp.11 DOM 扩展 思维导图

2019-10-30 10:41:27 125

原创 JS高程 Chp.10 DOM 思维导图

2019-10-30 10:38:28 124

原创 vscode 配置 git

想在vscode里使用git,但是source control 一打开。。。 excuse me?????其实只要简单设置下就好啦vscode ——> settings ——> Use split JSON 勾选,这样才能看到设置的默认值也就是下图左侧,不设置这个的话一打开settings.json简直是懵逼的好吗。。。然后直接搜索git p...

2019-08-31 23:35:49 1400

原创 【PAT】1117 Eddington Number (25 分)

British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number",E-- that is, the maximum integerEsuch that it is forE...

2019-03-31 16:31:56 253

原创 【PAT】1118 Birds in Forest (25 分) - 并查集

Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are supposed to help the scientists to count the maxi...

2019-03-31 15:10:12 131

原创 【PAT】1125 Chain the Ropes (25 分) - 排序

Given some segments of rope, you are supposed to chain them into one rope. Each time you may only fold two segments into loops and chain them into one piece, as shown by the figure. The resulting chai...

2019-03-25 16:23:37 143

原创 【PAT】1130 Infix Expression (25 分) - DFS中序遍历

Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operators.Input Specification:Each input file contai...

2019-03-22 17:06:24 130

原创 【PAT】1129 Recommendation System (25 分)

Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that rates the user's preference by the number of time...

2019-03-21 17:05:56 339

原创 【PAT】1111 Online Map (30 分)-Dijkstra

Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other is the fastest. It is g...

2019-03-11 11:33:32 101

原创 【PAT】1119 Pre- and Post-order Traversals (30 分)

Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal sequences, or preorder and inorder ...

2019-03-06 10:22:39 223

原创 【PAT】1014 Waiting in Line (30 分)

Suppose a bank hasNwindows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space...

2019-01-24 10:19:36 154

原创 【PAT】1010 Radix (25 分)

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive inte...

2019-01-15 11:19:05 298

原创 【数据结构与算法题目集】7-23 还原二叉树 (25 分)

给定一棵二叉树的先序遍历序列和中序遍历序列,要求计算该二叉树的高度。输入格式:输入首先给出正整数N(≤50),为树中结点总数。下面两行先后给出先序和中序遍历序列,均是长度为N的不包含重复英文字母(区别大小写)的字符串。输出格式:输出为一个整数,即该二叉树的高度。输入样例:9ABDFGHIECFDHGIBEAC输出样例:5前序:根、左子树、右子树中序...

2018-11-21 16:01:46 211

原创 【PAT】1018 Public Bike Management (30 分)

There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the ...

2018-11-14 14:28:01 149

原创 【PAT】1067 Sort with Swap(0, i) (25 分)

Given any permutation of the numbers {0, 1, 2,...,N−1}, it is easy to sort them in increasing order. But what ifSwap(0, *)is the ONLY operation that is allowed to use? For example, to sort {4, 0, 2...

2018-09-17 14:30:39 224

转载 jQuery文本域光标操作

1、获取光标位置:$(elem).iGetFieldPos();2、设置光标位置:$(elem).iSelectField(start);3、选中指定位置内的字符:$(elem).iSelectField(start,end);4、选中指定的字符:$(elem).iSelectStr(str);5、在光标之后插入字符串:$(elem).iAdd(str);6、删除光标前面(-n)或者后面(n)的n...

2018-09-06 14:23:21 1348

转载 js中给json对象添加新的属性

1、现有一个json对象为jsonObj,需要给这个对象添加新的属性newParam,同时给newParam赋值为pre。做法如下:var jsonObj={      'param1':22,      'param2' :33};jsonObj. newParam ='pre';新的属性添加以后,json对象变成:var jsonObj={      'para...

2018-09-06 11:11:42 29703

原创 jQuery的checkbox状态获取与状态设置(赋值)

jQuery判断checkbox是否选中:1、if( $('#checkbox-id').is(':checked') ) 2、if ( $('#checkbox-id').attr('checked') ) 3、if( $("#checkbox-id").attr("checked") == "true" )  //错误     if( $("#checkbox-id").att...

2018-09-06 10:06:46 27300 2

转载 jQuery的each函数中的break和continue

通过 jquery 的循环方法进行数组遍历,但是当不符合条件时,怎么跳出当前循环?(即用each方法时,当不满足条件时想break跳出循环体,或想continue继续执行下一个循环遍历),我们经常会习惯JS中的break和continue,但是使用之后没有效果,因为在JQuery中没有这两条命令。each函数不能使用break和continue关键字,替代方法是:$('.container...

2018-09-06 09:49:41 1916

原创 【Data Structures and Algorithms】6-1 Deque(25 分)

A "deque" is a data structure consisting of a list of items, on which the following operations are possible:Push(X,D): Insert item X on the front end of deque D. Pop(D): Remove the front item from ...

2018-09-03 10:58:26 904 1

原创 在线调试工具

1、ideone(打不开)可以在线编译盒调试C/C+一+,JAVA,PHP,Python,Perl,以及其他40多种编程语言。官方网站:www.ideone.com2、codepadcodepad.org是一个提供在线编译/调试工具的网站,你可以将代码复制到这里,然后提走运行,就会生成一个URL连接,将此URL连接通过邮件发送至你的挚友来求助。codepad还提供移动设备版,让你可以随时分享代码。...

2018-08-25 20:45:59 4891

原创 【Data Structures and Algorithms】7-3 Pop Sequence(25 分)

7-3Pop Sequence(25分)Given a stack which can keepMnumbers at most. PushNnumbers in the order of 1, 2, 3, ...,Nand pop randomly. You are supposed to tell if a given sequence of numbers is a po...

2018-08-25 19:33:55 988

原创 搜索小技巧

1、双引号:精确匹配如:“我要搜索这个完整的句子”可用于查句子出处;可用于检查语法是否正确:搜索“in the newspaper”、“on the newspaper” 比较结果数,结果多的一般是对的2、通配符*:用来代替任何字如:宾*大学搜索结果为“宾州大学”、“宾夕法尼亚大学”等;和双引号结合使用可用于查高级词汇替换,如:“in this paper we *”,就可以看到“i...

2018-08-25 18:20:28 384

原创 调试小技巧(测试数据输入输出重定向)

调试平台: vs20101、控制台(调试窗口)输出结果后马上消失方法一:使用 开始执行(不调试) Ctrl+F5方法二:system("pause");2、测试时输入数据较长,需要重复输入方法一:直接在控制台粘贴数据方法二:使用输入输出的重定向freopen("in.txt","r",stdin);freopen("out.txt","w",stdout);...

2018-08-22 10:46:20 1432

原创 【Data Structures and Algorithms】7-9 Huffman Codes(30 分)

7-9Huffman Codes(30分)In 1953, David A. Huffman published his paper "A Method for the Construction of Minimum-Redundancy Codes", and hence printed his name in the history of computer science. As...

2018-08-22 10:41:25 1138

原创 js动态生成按钮的响应

动态添加按钮:function_name: function (data) { var self = this; var info = null; $(".step").hide(); $("#stepAddvisitor").show(); if (data != null &amp;&amp; data != ''...

2018-06-20 11:35:14 2601

转载 jQuery html()、text()和val()的概述及使用

本节内容主要介绍的是如何使用jQuery中的.html(),.text()和.val()三种方法,用于读取,修改元素的html结构,元素的文本内容,以及表单元素的value值的方法。jQuery中为我们提供了多种方法用于对元素的HTML结构和元素的文本内容的操作,比如说,你可以给已存在的元素的内部,周围,前面或者后面增加新元素;或者用一个元素替代另一个元素;你也可以读取或者修改一个元素的内容或结构...

2017-11-02 14:43:19 7234

转载 Camel、Pastal、匈牙利标记法

为了代码清晰易懂,通常变量名采用一些著名的命名规则,主要有Camel标记法,Pastal标记法和匈牙利标记法。      Camel标记法采用首字母小写,接下来的单词都以大写字母开头的方法,如myName。      Pastal标记法采用首字母大写,接下来的单词都以大写字母开头的方法,如MyName。      匈牙利标记法是在Pastal标记法的基础上,变量名前面加上一

2017-09-12 09:52:29 341

空空如也

空空如也

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

TA关注的人

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