<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[SGAFPZ的博客]]></title><description><![CDATA[从零单排]]></description><link>https://blog.youkuaiyun.com/SGAFPZys</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; SGAFPZys]]></copyright><item><title><![CDATA[Reach a Number - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/97641359</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/97641359</guid><author>SGAFPZys</author><pubDate>Mon, 29 Jul 2019 15:41:36 +0800</pubDate><description><![CDATA[Reach a Number - LeetCode

题目:
You are standing at position 0 on an infinite number line. There is a goal at position target.
On each move, you can either go left or right. During the n-th move (start...]]></description><category></category></item><item><title><![CDATA[Word Break II - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/86543036</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/86543036</guid><author>SGAFPZys</author><pubDate>Fri, 18 Jan 2019 17:05:30 +0800</pubDate><description><![CDATA[Word Break II - LeetCode

题目:
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary w...]]></description><category></category></item><item><title><![CDATA[vue上传图片到服务器]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/80865579</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/80865579</guid><author>SGAFPZys</author><pubDate>Sat, 30 Jun 2018 12:18:09 +0800</pubDate><description><![CDATA[vue上传图片到服务器



我们做的商家管理系统需要在添加一道菜的时候把图片上传到服务器， 
流程大概是这样子的：


搭建一个文件服务器（可以与你的网站后台放在同一台物理机上）
网站后台提供上传图片的API
前端接收图片后把图片转成base64字符串，调用API上传图片
后台接收到base64，把base64转成图片，存到文件服务器里面，根据存储的路径生成图片的url
后台把图片的url返回给...]]></description><category></category></item><item><title><![CDATA[vue-cli中使用vuex]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/80863731</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/80863731</guid><author>SGAFPZys</author><pubDate>Sat, 30 Jun 2018 08:35:31 +0800</pubDate><description><![CDATA[vue-cli中使用vuex



一、vuex的作用

官网的解释：每一个 Vuex 应用的核心就是 store（仓库）。“store”基本上就是一个容器，它包含着你的应用中大部分的状态 (state)。

我的理解：vuex就是用来存储数据的，的当你通过api向后台获得数据后，你可以把这些数据存在vuex的store里，之后使用的时候就可以直接在store中获取，当然你也可以把网页运行时产生的...]]></description><category></category></item><item><title><![CDATA[使用nginx部署vue-cli项目]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/80863509</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/80863509</guid><author>SGAFPZys</author><pubDate>Sat, 30 Jun 2018 05:47:15 +0800</pubDate><description><![CDATA[使用nginx部署vue-cli项目



本文介绍两种部署方法，一种是直接在物理机上部署，另一种是通过docker部署



ubuntu16.04使用nginx部署vue-cli

1. 安装nginx 
sudo apt-get install nginx 
这样安装nginx后，配置文件的位置在/etc/nginx/nginx.conf

2.打包vue-cli项目 
npm run bu...]]></description><category></category></item><item><title><![CDATA[homeassistant主动推送信息]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/80849533</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/80849533</guid><author>SGAFPZys</author><pubDate>Thu, 28 Jun 2018 21:49:18 +0800</pubDate><description><![CDATA[homeassistant推送信息





问题背景：

前端刚启动时，会向云端发送获取硬件信息的请求，然后云端再调用homeassistant的rest api请求这些信息，再把信息发回前端。 
但是这样有个问题，前端收到信息后，这些信息不会再发生变化，比如温度计的信息，可能前端获取到的温度是25度，但是过了1个小时，温度变成了27度，那么前端如果不重新启动就不能获取这个信息。 
所以希望ho...]]></description><category></category></item><item><title><![CDATA[让Vue响应Map或Set的变化]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/80754786</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/80754786</guid><author>SGAFPZys</author><pubDate>Thu, 21 Jun 2018 06:17:58 +0800</pubDate><description><![CDATA[在Vuex中使用Map和Set





问题背景

我想在vuex的state中使用map，这样可以使很多操作变得方便

const state = {
    all: new Map()
}

这样的操作是没有问题的，不会报错，state.all可以像正常的Map一样使用。 
但是这里有一个问题，vue的响应式系统不支持Map和Set，也就是说，当Map与Set里面的元素变化时Vue追踪不到...]]></description><category></category></item><item><title><![CDATA[Vuex组件传参时的类型问题]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/80720910</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/80720910</guid><author>SGAFPZys</author><pubDate>Sun, 17 Jun 2018 20:59:02 +0800</pubDate><description><![CDATA[Vuex组件传参时的类型问题



这是个很白痴的问题，但是确实花了我1个多小时才解决

问题背景



&amp;amp;lt;transition name=&amp;quot;slide-left&amp;quot; mode=&amp;quot;out-in&amp;quot;&amp;amp;gt;
   &amp;amp;lt;categoryList v-if=&amp;quot;flag&amp;quot;
                 :search=&amp;quot;search&]]></description><category></category></item><item><title><![CDATA[利用ssh反向隧道实现远程控制homeassistant]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/80460320</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/80460320</guid><author>SGAFPZys</author><pubDate>Sat, 26 May 2018 12:32:00 +0800</pubDate><description><![CDATA[利用ssh反向隧道实现远程控制homeassistant

homeassistant运行在内网，处于NAT之后，内网的ip是无法从外网直接访问的，所以如果想要实现远程控制，就需要进行内网穿透。本文使用ssh反向隧道进行内网穿透，从而实现远程控制。



参考博客

访问内网主机–ssh反向穿透+端口转发 
使用SSH反向隧道进行内网穿透 
SSH反向隧道进行内网穿透 
利用ssh反向代理以及au...]]></description><category></category></item><item><title><![CDATA[ubuntu18.04安装homeassistant]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/80299433</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/80299433</guid><author>SGAFPZys</author><pubDate>Sun, 13 May 2018 15:11:08 +0800</pubDate><description><![CDATA[ubuntu18.04安装homeassistant

完美安装homeassistant需要python3.5

1.安装python3.5



sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.5

即使你本来电脑上安装了其他版本python也没关系，运行上面...]]></description><category></category></item><item><title><![CDATA[html5 vue bootstrap学习报告]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/79950567</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/79950567</guid><author>SGAFPZys</author><pubDate>Sun, 15 Apr 2018 16:40:25 +0800</pubDate><description><![CDATA[html5 vue bootstrap学习报告

由于之前学过html，所以html5很快就看完了，另外vue和bootstrap都看了一部分，了解了一些基本操作。

学习成果是一个简单的登录框 


上面两个输入框使用了html5中&amp;lt;input&amp;gt;标签的一个新属性placeholder. 
效果就是数据框中默认出现的Username和Password，可以提示用户上面的框应该输入用户名...]]></description><category></category></item><item><title><![CDATA[win10 TensorFlow GPU环境搭建]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/79798375</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/79798375</guid><author>SGAFPZys</author><pubDate>Tue, 03 Apr 2018 11:27:18 +0800</pubDate><description><![CDATA[win10+cuda9.1+cudnn7.1.1+tf1.6+py3.6.5+vs2015

这篇文章只是记录搭建的流程以及一些坑的解决方法，并不是详细的教程，也没有截图什么的

我电脑上本身是装了vs2015的，省了一些功夫。



1.安装cuda9.1

去cuda官网上下载cuda9.1。 
local安装包总是下载到一般就停了，暂停一下继续下载之后就变成了403.html 
于是换了ne...]]></description><category></category></item><item><title><![CDATA[Network Delay Time - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/79116688</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/79116688</guid><author>SGAFPZys</author><pubDate>Sat, 20 Jan 2018 20:50:35 +0800</pubDate><description><![CDATA[Network Delay Time - LeetCode
  题目： 
  There are N network nodes, labelled 1 to N. 
  Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the ta]]></description><category></category></item><item><title><![CDATA[Climbing Stairs - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/79116542</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/79116542</guid><author>SGAFPZys</author><pubDate>Sat, 20 Jan 2018 20:28:03 +0800</pubDate><description><![CDATA[Climbing Stairs - LeetCode
  题目： 
  You are climbing a stair case. It takes n steps to reach to the top. 
  Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the t]]></description><category></category></item><item><title><![CDATA[Russian Doll Envelopes - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/79008720</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/79008720</guid><author>SGAFPZys</author><pubDate>Tue, 09 Jan 2018 02:00:47 +0800</pubDate><description><![CDATA[Russian Doll Envelopes - LeetCode
  题目： 
  You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the width and]]></description><category></category></item><item><title><![CDATA[算法第八章NP完全问题作业]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/78936166</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/78936166</guid><author>SGAFPZys</author><pubDate>Sat, 30 Dec 2017 10:01:49 +0800</pubDate><description><![CDATA[8.14
  prove that the following problem is NP-complete: given an undirected graph G = (V,E) and an integer k, return a clique of size k as well as an independent set of size k, provided both exist.
题目中]]></description><category></category></item><item><title><![CDATA[Remove Invalid Parentheses - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/78885641</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/78885641</guid><author>SGAFPZys</author><pubDate>Sun, 24 Dec 2017 16:25:57 +0800</pubDate><description><![CDATA[Remove Invalid Parentheses - LeetCode
  题目： 
   Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. 
   Note: The input string may con]]></description><category></category></item><item><title><![CDATA[Longest Increasing Path in a Matrix - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/78827504</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/78827504</guid><author>SGAFPZys</author><pubDate>Sun, 17 Dec 2017 20:18:35 +0800</pubDate><description><![CDATA[Longest Increasing Path in a Matrix - LeetCode
  题目： 
  Given an integer matrix, find the length of the longest increasing path. 
  From each cell, you can either move to four directions: left, right,]]></description><category></category></item><item><title><![CDATA[Interleaving String - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/78740916</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/78740916</guid><author>SGAFPZys</author><pubDate>Thu, 07 Dec 2017 14:21:43 +0800</pubDate><description><![CDATA[Interleaving String - LeetCode
  题目： 
  Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. 
  For example, 
  Given: 
  s1 = “aabcc”, 
  s2 = “dbbca”,
  
  When s3 = “aadbbcb]]></description><category></category></item><item><title><![CDATA[Dungeon Game - LeetCode]]></title><link>https://blog.youkuaiyun.com/SGAFPZys/article/details/78648615</link><guid>https://blog.youkuaiyun.com/SGAFPZys/article/details/78648615</guid><author>SGAFPZys</author><pubDate>Mon, 27 Nov 2017 20:19:19 +0800</pubDate><description><![CDATA[Dungeon Game - LeetCode
  题目： 
   
  
这又是一道动态规划的题目。 
一开始的想法是用一个二维数组记录在(i,j)位置所能剩下的最大生命值，但是这是不对的。 
后来想到了另一种方法，从右下角开始推，在(i,j)位置记录所需要的最小生命值。然后往起点推。 
在走到最后一格后，只需要剩下一滴血就可以，虽然事实上可能剩下很多血，但是剩一滴血是满足条件的最小血量，这是个必]]></description><category></category></item></channel></rss>