<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[ballyyang的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/ballyyang</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; ballyyang]]></copyright><item><title><![CDATA[发布自己的包到npm中]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/87945925</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/87945925</guid><author>ballyyang</author><pubDate>Tue, 26 Feb 2019 19:59:48 +0800</pubDate><description><![CDATA[1、初始化一个npm


npm init

2、定义好package中的包名，npm搜索的时候会用到


{
  &quot;name&quot;: &quot;package-test&quot;,
  &quot;version&quot;: &quot;1.0.0&quot;,
  &quot;description&quot;: &quot;description&quot;
}

3、登录用户

按照提示输入用户名，密码和邮箱


npm login

4、发布


npm publish

 ]]></description><category></category></item><item><title><![CDATA[mysql decimal]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/84351528</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/84351528</guid><author>ballyyang</author><pubDate>Fri, 23 Nov 2018 00:56:06 +0800</pubDate><description><![CDATA[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位（小数点左边+右边），小数点右...]]></description><category></category></item><item><title><![CDATA[centos7开启关闭3306端口]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/84173963</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/84173963</guid><author>ballyyang</author><pubDate>Sat, 17 Nov 2018 14:48:46 +0800</pubDate><description><![CDATA[背景：闲来想着用navicat访问下centos上的数据库，发现连接不上。。。尴尬。。

如图：一直在连接。。然后报了一个unknown error。。





解决：

1、查看一下防火墙状态


[root@VM_0_15_centos ~]# systemctl status  iptables.service
● iptables.service - IPv4 firewall with...]]></description><category></category></item><item><title><![CDATA[FirewallD is not running]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/84146896</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/84146896</guid><author>ballyyang</author><pubDate>Fri, 16 Nov 2018 22:46:12 +0800</pubDate><description><![CDATA[执行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...]]></description><category></category></item><item><title><![CDATA[centos执行systemctl start firewalld报错Failed to start firewalld.service: Unit is masked.]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/84146828</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/84146828</guid><author>ballyyang</author><pubDate>Fri, 16 Nov 2018 22:42:07 +0800</pubDate><description><![CDATA[
[root@VM_0_15_centos ~]# systemctl start firewalld
Failed to start firewalld.service: Unit is masked.

装防火墙的时候，遇到了这个错误。

查了一下，firewalld服务被锁定了，取消锁定即可。


[root@VM_0_15_centos ~]# systemctl unmask firew...]]></description><category></category></item><item><title><![CDATA[centos下mysql忘记密码重置方法]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/84146508</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/84146508</guid><author>ballyyang</author><pubDate>Fri, 16 Nov 2018 22:13:16 +0800</pubDate><description><![CDATA[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...]]></description><category></category></item><item><title><![CDATA[数据库设计三大范式]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/84146139</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/84146139</guid><author>ballyyang</author><pubDate>Fri, 16 Nov 2018 21:29:54 +0800</pubDate><description><![CDATA[数据库设计三大范式

何为范式？

1、设计关系型数据库的时候，需要遵从不同的规范要求，设计出合理的关系型数据库。这些规范被称作范式。

2、范式越高，数据库冗余度就越低。

理解三大范式：

&amp;lt;div align=&quot;center&quot;&amp;gt;第一范式：

1、数据库表的每一列都是不可分割的原子数据项，不可分

例子：

（1）、当address为记录省市的时候需进行拆分，拆出provice，c...]]></description><category></category></item><item><title><![CDATA[centos mysql5.6 升级5.7]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/84109841</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/84109841</guid><author>ballyyang</author><pubDate>Thu, 15 Nov 2018 19:59:39 +0800</pubDate><description><![CDATA[系统环境：centos7.2，linux3.10


[root@VM_0_15_centos ~]# uname -a
Linux 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 ~]#...]]></description><category></category></item><item><title><![CDATA[268. Missing Number]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/84038043</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/84038043</guid><author>ballyyang</author><pubDate>Tue, 13 Nov 2018 23:01:33 +0800</pubDate><description><![CDATA[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: 2


Example 2:


Input: [9,6,4,2,3,5,7,0,1]
O...]]></description><category></category></item><item><title><![CDATA[根据不同种类进行归类]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83867260</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83867260</guid><author>ballyyang</author><pubDate>Thu, 08 Nov 2018 20:28:17 +0800</pubDate><description><![CDATA[最近在项目中用nodejs写了一个合同模板的功能，实现了可配置化，让不同公司适用不同的合同模板。

想到之前做了一个月度统计报表，对相同月份的数据进行统计，举个例子如下

有一个数组，每条数据记录了各自同学的名字，所属公司，所拥有的现金，所在的月份


const staffs = [
    { staff: '小黄', company: '深圳公司', cash: 300, month: '3...]]></description><category></category></item><item><title><![CDATA[说一说前后端分离开发那些事]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83866802</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83866802</guid><author>ballyyang</author><pubDate>Thu, 08 Nov 2018 19:36:35 +0800</pubDate><description><![CDATA[1、后端同学开发之前先和前端同学约定好接口，包括协议，字段，格式，便于前后端可以同时进行开发。

2、后端同学合作开发需要先建好数据表，包括表与表之间的关系，具体字段，具体字段类型。

3、后端同学各自独立开发，其实就是各自在操作数据。...]]></description><category></category></item><item><title><![CDATA[ie11中使用es7的includes]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83830681</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83830681</guid><author>ballyyang</author><pubDate>Wed, 07 Nov 2018 19:56:49 +0800</pubDate><description><![CDATA[公司前端项目用的是Angular6，最近在项目中用到了es7中数组的新特性includes，在谷歌浏览器正常运行，在IE浏览器运行的时候报错，识别不了includes。一开始的想法就是用indexOf代替一下，转念一想，是否可以做一个兼容，于是自己写了个polyfills，兼容如下：

同时支持String和Array：


// 兼容es7 includes string Array
(func...]]></description><category></category></item><item><title><![CDATA[226.Invert Binary Tree]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83792604</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83792604</guid><author>ballyyang</author><pubDate>Tue, 06 Nov 2018 19:13:45 +0800</pubDate><description><![CDATA[Invert a binary tree.

Example:

Input:


     4
   /   \
  2     7
 / \   / \
1   3 6   9

Output:


     4
   /   \
  7     2
 / \   / \
9   6 3   1

解题思路：用递归，一层一层交换


/**
 * @param {TreeNode} root
...]]></description><category></category></item><item><title><![CDATA[189.Rotate Array]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83755923</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83755923</guid><author>ballyyang</author><pubDate>Mon, 05 Nov 2018 20:17:46 +0800</pubDate><description><![CDATA[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 = 3
Output: [5,6,7,1,2,3,4]
Explanation:
rotate 1 steps to the right: [7,1...]]></description><category></category></item><item><title><![CDATA[181.Customers Who Never Order]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83755871</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83755871</guid><author>ballyyang</author><pubDate>Mon, 05 Nov 2018 20:13:29 +0800</pubDate><description><![CDATA[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 ...]]></description><category></category></item><item><title><![CDATA[181.Employees Earning More Than Their Managers]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83755834</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83755834</guid><author>ballyyang</author><pubDate>Mon, 05 Nov 2018 20:11:09 +0800</pubDate><description><![CDATA[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 | ...]]></description><category></category></item><item><title><![CDATA[176.Second Highest Salary]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83755808</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83755808</guid><author>ballyyang</author><pubDate>Mon, 05 Nov 2018 20:09:50 +0800</pubDate><description><![CDATA[Write a SQL query to get the second highest salary from the Employee table.


+----+--------+
| Id | Salary |
+----+--------+
| 1  | 100    |
| 2  | 200    |
| 3  | 300    |
+----+--------+


For exam...]]></description><category></category></item><item><title><![CDATA[175.Combine Two Tables]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83755781</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83755781</guid><author>ballyyang</author><pubDate>Mon, 05 Nov 2018 20:08:52 +0800</pubDate><description><![CDATA[Table: Person


+-------------+---------+
| Column Name | Type    |
+-------------+---------+
| PersonId    | int     |
| FirstName   | varchar |
| LastName    | varchar |
+-------------+---------+
Pe...]]></description><category></category></item><item><title><![CDATA[172.factorial-trailing-zeroes]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83755246</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83755246</guid><author>ballyyang</author><pubDate>Mon, 05 Nov 2018 19:36:19 +0800</pubDate><description><![CDATA[Given an integer n, return the number of trailing zeroes in n!.

Example 1:


Input: 3
Output: 0
Explanation: 3! = 6, no trailing zero.

Example 2:


Input: 5
Output: 1
Explanation: 5! = 120, one trai...]]></description><category></category></item><item><title><![CDATA[mysql select into和insert into select]]></title><link>https://blog.youkuaiyun.com/ballyyang/article/details/83685424</link><guid>https://blog.youkuaiyun.com/ballyyang/article/details/83685424</guid><author>ballyyang</author><pubDate>Sat, 03 Nov 2018 11:28:01 +0800</pubDate><description><![CDATA[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

...]]></description><category></category></item></channel></rss>