上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页

2018年4月19日

uedit,检测粘贴事件,替换粘贴内容

摘要: vue.editor.addListener("beforepaste",function(type, arg1, arg2){arg1.html="ddddddd"})此时就粘贴板里内容换成了ddddd了。 阅读全文

posted @ 2018-04-19 16:14 杨龙飞 阅读(357) 评论(0) 推荐(0) 编辑

2018年4月3日

箭头函数不会修改this

摘要: setTimeout里的this代表new Person出来的对象 setTimeout里的this代表window 由于箭头函数不改变this,所以setTimeout里面的箭头函数this,不能改变 阅读全文

posted @ 2018-04-03 14:57 杨龙飞 阅读(509) 评论(0) 推荐(0) 编辑

2018年3月28日

leetCode刷题(将字符串转成W形状的字符串再以Z形字符串输出)

摘要: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文

posted @ 2018-03-28 11:43 杨龙飞 阅读(513) 评论(0) 推荐(0) 编辑

2018年3月27日

leetCode刷题(找到最长的回文字符串)

摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文

posted @ 2018-03-27 16:02 杨龙飞 阅读(206) 评论(0) 推荐(0) 编辑

2018年3月23日

leetCode刷题(找到两个数组拼接后的中间数)

摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文

posted @ 2018-03-23 17:14 杨龙飞 阅读(156) 评论(0) 推荐(0) 编辑

leetCode刷题(找到最长的连续不重复的字符串长度)

摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文

posted @ 2018-03-23 16:24 杨龙飞 阅读(324) 评论(0) 推荐(0) 编辑

2018年3月22日

leetCode刷题(使用链表做加法)

摘要: Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Output: 7 -> 0 -> 8 Explanation: 342 + 465 = 807.关键是获取最后一个node节点 /** * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * ... 阅读全文

posted @ 2018-03-22 16:02 杨龙飞 阅读(135) 评论(0) 推荐(0) 编辑

leetCode刷题(找出数组里的两项相加等于定值)

摘要: 最近被算法虐了一下,刷一下leetcode,找找存在感 如题: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assu 阅读全文

posted @ 2018-03-22 13:53 杨龙飞 阅读(153) 评论(0) 推荐(0) 编辑

2018年3月15日

行动反思

摘要: 1、dom事件event的各种属性 event.clientX、event.clientY 鼠标相对于浏览器窗口可视区域的X,Y坐标(窗口坐标),可视区域不包括工具栏和滚动条。IE事件和标准事件都定义了这2个属性 event.pageX、event.pageY 类似于event.clientX、ev 阅读全文

posted @ 2018-03-15 17:40 杨龙飞 阅读(132) 评论(0) 推荐(0) 编辑

2018年3月14日

js,timeout,promise执行顺序

摘要: 总结 macro-task包括:script(整体代码), setTimeout, setInterval, setImmediate, I/O, UI rendering。 micro-task包括:process.nextTick, Promises, Object.observe, Mutat 阅读全文

posted @ 2018-03-14 19:04 杨龙飞 阅读(832) 评论(0) 推荐(1) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页

导航

Fork me on GitHub