自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 echarts里symbol不显示svg图 & 判断是否为ie浏览器

ie能直接显示svg图,但放在echarts里的svg不显示找到一些类似问题,但没找到具体原因https://github.com/apache/incubator-echarts/issues/10884因此选择直接判断浏览器类型,若是ie就返回png图片之前,js判断的方式都是利用浏览器的useragent字段。通过判断useragent字段里面是否包含有MSIE字段来判断是否...

2020-02-16 11:04:42 2002

原创 记录写时间组件的过程

1.当前时间各种格式用了momentjs官网http://momentjs.cn/2.定时器created(){ this.updateMin(); this.updateDay(); this.timeInterval=setInterval(this.updateMin,1000); this.dayInterval=setInterval(t...

2020-02-16 10:19:26 125

原创 vue中 echarts 自定义主题,切换主题,属性配置

1、获取主题js文件(在echarts官网上下载官方提供的主题,或者自定义主题)https://echarts.baidu.com/theme-builder/2、将下载得到的themejs文件引用到页面中node_model中的主题文件是默认配置,每次更新都会回到初始值import 'echarts/theme/shine'自定义存放管理时,报错主题文件js报错ECh...

2019-05-30 11:05:05 9330 3

转载 img 与 background-image

https://cloud.tencent.com/developer/article/1337286 项目 image backgroud-image 所属 dom元素、内容类、 css样式、修饰类、 图层位置 前景 ...

2019-05-30 10:37:56 236

原创 捕获 点击除某区域以外的事件

首先可以给document对象绑定click事件。然后由于事件冒泡机制,你单击文档的任意地方(包括绿色区域)都会触发click事件。先在事件里写上隐藏绿色区域的代码$(document).on('click',function(e){ //点击触发的事件});然后,再给某区域(例如aaa)绑定click事件,这时候阻止事件冒泡,这样一来,点击该区域的话,是不会...

2019-05-30 10:29:11 3860

原创 vue 中 elementUI 组件上使用@click失效

@click.native="handleClick"就能成功解决这个问题vue官网:现在在组件上使用v-on只会监听自定义事件 (组件用$emit触发的事件)。如果要监听根元素的原生事件,可以使用.native修饰符,比如:<my-component v-on:click.native="doSomething"></my-component>...

2019-05-30 09:55:05 2194

原创 U盘、SD卡挂载/分区/转EXT4等

虚拟机识别Ubuntu菜单-》虚拟机-》可移动设备-》查看是否识别fdisk -l 查看是否挂载df -lext2转ext4#先卸载,后日志,再强检。完事以后挂载。ext2就变ext3!umount /dev/hda1tune2fs -j /dev/hda1fsck -f /dev/hda1mount /dev/hda1然后再转换成ext4,去网上查了查命令:#先卸载,变结构,再强检。完事...

2018-07-12 10:40:40 1208

原创 Same Tree/easy/day15(递归)

题目:Given two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes have the same value.Example 1...

2018-05-02 19:55:52 94

原创 Merge Sorted Array/easy/day14

题目:Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:The number of elements initialized in nums1 and nums2 are m and n respectively.You may assume that n...

2018-04-27 21:30:07 79

原创 Sqrt(x) + Valid Perfect Square/easy/day15

题目一:Implement int sqrt(int x).Compute and return the square root of x, where x is guaranteed to be a non-negative integer.Since the return type is an integer, the decimal digits are truncated and only...

2018-04-26 20:57:21 88

原创 leetcode/ Add Binary/easy/day14

题目Given two binary strings, return their sum (also a binary string).The input strings are both non-empty and contains only characters 1 or 0.Example 1:Input: a = "11", b = "1"Output: "100"Example 2:I...

2018-04-25 20:47:56 114

原创 leetcode/Plus One/easy/day13

题目:Given a non-empty array of digits representing a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of the list, and each elemen...

2018-04-23 21:51:24 89

原创 leetcode/Length of Last Word/easy/day12

题目:Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is define...

2018-04-23 21:47:42 120

原创 KMP算法(挖坑)

原理:假设第一次比较到 i 位不相等,那么字符串 f 移动 k 位应满足,前 i -1 位字符串的前缀A和后缀B相等;所以往后移的位数为  已匹配的长度 - 最长公共长度(当前长度的最长相等前后缀);最大前后缀公共长度被存在next数组中最长前缀:是说以第一个字符开始,但是不包含最后一个字符算法计算next数组:字符串下标为i,为第i+1个字符,对应next[i+1],如果字符串第i位与next[...

2018-04-20 13:12:25 91

原创 Count and Say/easy/day11

题目:The count-and-say sequence is the sequence of integers with the first five terms as following:1. 12. 113. 214. 12115. 1112211 is read off as "one 1" or 11.11 is read off as...

2018-04-19 15:23:17 71

原创 Search Insert Position/easy/day10

题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.E...

2018-04-19 14:14:08 79

原创 leetcode/Implement strStr()/easy/day9

题目Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2Example 2:Inpu...

2018-04-18 17:51:01 115

原创 leetcode/Remove Element/easy/day8

题目:Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input arr...

2018-04-18 11:25:44 90

原创 leetcode/Remove Duplicates from Sorted Array/easy/day7

题目:Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modify...

2018-04-16 21:17:20 97

原创 leetcode/ Merge Two Sorted Lists/easy/day6

题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1-&gt;2-&gt;4, 1-&gt;3-&gt;4Output: 1-&g...

2018-04-15 10:23:29 105

原创 leetcode/two sum/day1

题目Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same ...

2018-04-15 10:17:25 90

原创 leetcode/Reverse Integer/easy/day2

题目Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dealing with an en...

2018-04-15 10:16:32 86

原创 leetcode/Palindrome Number/easy/day3

题目Determine whether an integer is a palindrome. Do this without extra space.个人解法利用上一题反转数字,若反转后和原数字相等,则为回文数字class Solution:    def isPalindrome(self, x):        """        :type x: int        :rtype: b...

2018-04-15 10:15:48 76

原创 leetcode/Longest Common Prefix/easy/day4

题目:Write a function to find the longest common prefix string amongst an array of strings.我的暴力解法:    def longestCommonPrefix(self, strs):        if not strs:            return ""        length = len(st...

2018-04-15 10:14:59 85

原创 Valid Parentheses/easy/day5

题目:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type of br...

2018-04-15 10:12:05 91

空空如也

空空如也

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

TA关注的人

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