- 博客(27)
- 收藏
- 关注
原创 发布自己的包到npm中
1、初始化一个npmnpm init2、定义好package中的包名,npm搜索的时候会用到{ "name": "package-test", "version": "1.0.0", "description": "description"}3、登录用户按照提示输入用户名,密码和邮箱npm login4、发布npm publish
2019-02-26 19:59:48 390 1
原创 mysql decimal
mysql decimal本篇讨论mysql decimal数据类型特征分别从以下3个方面进行介绍:1、最大位数2、存储格式3、存储要求参考值:decimal(M, D)1、最大位数(1)M是最多的位数,范围从1到65;(2)D是小数点右边的位数,范围从0到30,且不得大于M。如:decimal(6,2)表示存储的最大位数为6位(小数点左边+右边),小数点右...
2018-11-23 00:56:06 5598
原创 centos7开启关闭3306端口
背景:闲来想着用navicat访问下centos上的数据库,发现连接不上。。。尴尬。。如图:一直在连接。。然后报了一个unknown error。。解决:1、查看一下防火墙状态[root@VM_0_15_centos ~]# systemctl status iptables.service● iptables.service - IPv4 firewall with...
2018-11-17 14:48:46 2118
原创 FirewallD is not running
执行firewall-cmd --add-port=3306/tcp --permanent时报的错[root@VM_0_15_centos ~]# firewall-cmd --state //查看运行状态not running[root@VM_0_15_centos ~]# systemctl start firewalld //启动服务[root@VM_0_15_c...
2018-11-16 22:46:12 174
原创 centos执行systemctl start firewalld报错Failed to start firewalld.service: Unit is masked.
[root@VM_0_15_centos ~]# systemctl start firewalldFailed to start firewalld.service: Unit is masked.装防火墙的时候,遇到了这个错误。查了一下,firewalld服务被锁定了,取消锁定即可。[root@VM_0_15_centos ~]# systemctl unmask firew...
2018-11-16 22:42:07 591
原创 centos下mysql忘记密码重置方法
1、首先确认服务器处于安全的状态,可以将mysql对外的端口关闭。2、设置mysql登录无需密码:(1)、进入my.cnf[root@VM_0_15_centos ~]# vi /etc/my.cnf (2)、在 [mysqld]中 添加skip-grant-tables, 如下操作,保存(wq)并退出# For advice on how to change settin...
2018-11-16 22:13:16 447
原创 数据库设计三大范式
数据库设计三大范式何为范式?1、设计关系型数据库的时候,需要遵从不同的规范要求,设计出合理的关系型数据库。这些规范被称作范式。2、范式越高,数据库冗余度就越低。理解三大范式:<div align="center">第一范式:1、数据库表的每一列都是不可分割的原子数据项,不可分例子:(1)、当address为记录省市的时候需进行拆分,拆出provice,c...
2018-11-16 21:29:54 184
原创 centos mysql5.6 升级5.7
系统环境:centos7.2,linux3.10[root@VM_0_15_centos ~]# uname -aLinux VM_0_15_centos 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux[root@VM_0_15_centos ~]#...
2018-11-15 19:59:39 1002
原创 268. Missing Number
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.Example 1:Input: [3,0,1]Output: 2Example 2:Input: [9,6,4,2,3,5,7,0,1]O...
2018-11-13 23:01:33 100
原创 根据不同种类进行归类
最近在项目中用nodejs写了一个合同模板的功能,实现了可配置化,让不同公司适用不同的合同模板。想到之前做了一个月度统计报表,对相同月份的数据进行统计,举个例子如下有一个数组,每条数据记录了各自同学的名字,所属公司,所拥有的现金,所在的月份const staffs = [ { staff: '小黄', company: '深圳公司', cash: 300, month: '3...
2018-11-08 20:28:17 730
原创 说一说前后端分离开发那些事
1、后端同学开发之前先和前端同学约定好接口,包括协议,字段,格式,便于前后端可以同时进行开发。2、后端同学合作开发需要先建好数据表,包括表与表之间的关系,具体字段,具体字段类型。3、后端同学各自独立开发,其实就是各自在操作数据。...
2018-11-08 19:36:35 175
原创 ie11中使用es7的includes
公司前端项目用的是Angular6,最近在项目中用到了es7中数组的新特性includes,在谷歌浏览器正常运行,在IE浏览器运行的时候报错,识别不了includes。一开始的想法就是用indexOf代替一下,转念一想,是否可以做一个兼容,于是自己写了个polyfills,兼容如下:同时支持String和Array:// 兼容es7 includes string Array(func...
2018-11-07 19:56:49 3024 1
原创 226.Invert Binary Tree
Invert a binary tree.Example:Input: 4 / \ 2 7 / \ / \1 3 6 9Output: 4 / \ 7 2 / \ / \9 6 3 1解题思路:用递归,一层一层交换/** * @param {TreeNode} root...
2018-11-06 19:13:45 107
原创 189.Rotate Array
Given an array, rotate the array to the right by k steps, where k is non-negative.Example 1:Input: [1,2,3,4,5,6,7] and k = 3Output: [5,6,7,1,2,3,4]Explanation:rotate 1 steps to the right: [7,1...
2018-11-05 20:17:46 99
原创 181.Customers Who Never Order
Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers who never order anything.Table: Customers.+----+-------+| Id | Name ...
2018-11-05 20:13:29 113
原创 181.Employees Earning More Than Their Managers
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.+----+-------+--------+-----------+| Id | Name | Salary | ...
2018-11-05 20:11:09 118
原创 176.Second Highest Salary
Write a SQL query to get the second highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 || 3 | 300 |+----+--------+For exam...
2018-11-05 20:09:50 127
原创 175.Combine Two Tables
Table: Person+-------------+---------+| Column Name | Type |+-------------+---------+| PersonId | int || FirstName | varchar || LastName | varchar |+-------------+---------+Pe...
2018-11-05 20:08:52 141
原创 172.factorial-trailing-zeroes
Given an integer n, return the number of trailing zeroes in n!.Example 1:Input: 3Output: 0Explanation: 3! = 6, no trailing zero.Example 2:Input: 5Output: 1Explanation: 5! = 120, one trai...
2018-11-05 19:36:19 239
原创 mysql select into和insert into select
1、SELECT INTO FROM语句 语句形式为:SELECT vale1, value2 into Table2 from Table1 2、INSERT INTO SELECT语句 语句形式为:Insert into Table2(field1,field2,...) select value1,value2,... from Table1...
2018-11-03 11:28:01 166
原创 javascript正则表达式带变量
正则表达式里带变量const v = '中国';const res = new RegExp('^' + v + '$', 'gim');res.test('中国人');
2018-10-22 23:47:41 1420
原创 leetcode 4.两个排序数组的中位数
给定两个大小为 m 和 n 的有序数组 nums1 和 nums2 。请找出这两个有序数组的中位数。要求算法的时间复杂度为 O(log (m+n)) 。示例 1:nums1 = [1, 3]nums2 = [2]中位数是 2.0示例 2:nums1 = [1, 2]nums2 = [3, 4]中位数是 (2 + 3)/2 = 2.5给定两个大小为 m 和 n 的有序数组 nums1 ...
2018-07-05 23:06:22 107
原创 3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.Example 1:Input: "abcabcbb"Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2:...
2018-07-04 23:59:21 102
原创 2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i...
2018-07-03 23:49:14 117
原创 1. Two Sum
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-07-02 22:29:56 133
原创 一些金融词汇
银行承兑汇票:首先银行承兑是到期银行无条件兑付的金融工具。商业承兑汇票:商业承兑汇票就是某企业承诺到期兑付的商业汇票。转销:该收的钱收不回来了,然后把这笔账给划掉,但不是凭空的划掉,要转到其他的账户,比如说坏账准备啦等。坏帐:应该是无法收回的应收款,应于要年度核销。不良应收帐款:指可能收不回、应收帐款存在争议,有可能收回全部或部分,暂时不能核销。不良应收款超过两年,要转入坏帐了,进行坏帐帐务处理,...
2018-07-01 22:07:56 1310
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人