-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1 lines (1 loc) · 42.1 KB
/
index.html
1
<!doctype html><html class="theme-next mist use-motion" lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"><link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css"><link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css"><link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css"><meta name="keywords" content="一喵呜,前端开发,JavaScript,CSS3,HTML5,React,Angular,开发工具,随笔生活"><link rel="alternate" href="/atom.xml" title="一喵呜" type="application/atom+xml"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1"><meta property="og:type" content="website"><meta property="og:title" content="一喵呜"><meta property="og:url" content="https://hyb628.github.io/index.html"><meta property="og:site_name" content="一喵呜"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="一喵呜"><script type="text/javascript" id="hexo.configurations">var NexT=window.NexT||{},CONFIG={root:"/",scheme:"Mist",sidebar:{position:"left",display:"post",offset:12,offset_float:0,b2t:!1,scrollpercent:!0},fancybox:!0,motion:!0,duoshuo:{userId:"0",author:"博主"},algolia:{applicationID:"",apiKey:"",indexName:"",hits:{per_page:10},labels:{input_placeholder:"Search for Posts",hits_empty:"We didn't find any results for the search: ${query}",hits_stats:"${hits} results found in ${time} ms"}}}</script><link rel="canonical" href="https://hyb628.github.io/"><title>一喵呜</title></head><body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans"><script>!function(e,t,a,n,c,o,s){e.GoogleAnalyticsObject=c,e[c]=e[c]||function(){(e[c].q=e[c].q||[]).push(arguments)},e[c].l=1*new Date,o=t.createElement(a),s=t.getElementsByTagName(a)[0],o.async=1,o.src="https://www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s)}(window,document,"script",0,"ga"),ga("create","UA-102154169-1","auto"),ga("send","pageview")</script><script type="text/javascript">var _hmt=_hmt||[];!function(){var e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?ca4af66581fe398f815e80aa1c3d692f";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()</script><div class="container sidebar-position-left page-home"><div class="headband"></div><header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="header-inner"><div class="site-brand-wrapper"><div class="site-meta"><div class="custom-logo-site-title"><a href="/" class="brand" rel="start"><span class="logo-line-before"><i></i></span> <span class="site-title">一喵呜</span><span class="logo-line-after"><i></i></span></a></div><h1 class="site-subtitle" itemprop="description"></h1></div><div class="site-nav-toggle"> <button><span class="btn-bar"></span><span class="btn-bar"></span><span class="btn-bar"></span></button></div></div><nav class="site-nav"><ul id="menu" class="menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i><br> 首页</a></li><li class="menu-item menu-item-archives"><a href="/archives" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i><br> 归档</a></li><li class="menu-item menu-item-categories"><a href="/categories" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i><br> 分类</a></li><li class="menu-item menu-item-tags"><a href="/tags" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i><br> 标签</a></li><li class="menu-item menu-item-about"><a href="/about" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i><br> 关于</a></li><li class="menu-item menu-item-html5_"><a href="http://blog.csdn.net/html5_" rel="section"><i class="menu-item-icon fa fa-fw fa-question-circle"></i><br> My·CSDN博客</a></li><li class="menu-item menu-item-search"><a href="javascript:;" class="popup-trigger"><i class="menu-item-icon fa fa-search fa-fw"></i><br> 搜索</a></li></ul><div class="site-search"><div class="popup search-popup local-search-popup"><div class="local-search-header clearfix"><span class="search-icon"><i class="fa fa-search"></i></span><span class="popup-btn-close"><i class="fa fa-times-circle"></i></span><div class="local-search-input-wrapper"> <input autocapitalize="off" autocomplete="off" autocorrect="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input"></div></div><div id="local-search-result"></div></div></div></nav></div></header><main id="main" class="main"><div class="main-inner"><div class="content-wrap"><div id="content" class="content"><section id="posts" class="posts-expand"><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/07/19/Vue学习: 非父子组件通信/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/07/19/Vue学习: 非父子组件通信/" itemprop="url">Vue学习:非父子组件通信</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-07-19T09:55:08+08:00">2017-07-19</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 官方的说明:有时候两个组件也需要通信 (非父子关系)。在简单的场景下,可以使用一个空的 Vue 实例作为中央事件总线: 123456789var bus = new Vue()// 触发组件 A 中的事件bus.$emit('id-selected', 1)// 在组件 B ...<div class="post-button text-center"> <a class="btn" href="/2017/07/19/Vue学习: 非父子组件通信/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-工具" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/07/15/macOS系统软件/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/07/15/macOS系统软件/" itemprop="url">个人Mac软件工具整理</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-07-15T21:11:05+08:00">2017-07-15</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/工具/" itemprop="url" rel="index"><span itemprop="name">工具</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 收藏自己常用的macOS系统软件,觉得比较好的都慢慢记录下来。Github 开发工具 软件名称 描述 短网址 网易MUMU 安卓模拟器 http://t.cn/RKp1aj2 TeamViewer 远程控制软件 http://t.cn/RMpQdjr itsycal Mac状 ...<div class="post-button text-center"> <a class="btn" href="/2017/07/15/macOS系统软件/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/07/11/百度贴吧前端面试/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/07/11/百度贴吧前端面试/" itemprop="url">百度贴吧前端面试</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-07-11T21:55:08+08:00">2017-07-11</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span> , <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/面试题/" itemprop="url" rel="index"><span itemprop="name">面试题</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 下午到了上地,去了一个大厦,约了面试官下来,就开始面试了。主要整理下面试的一些题目吧。 一面【一 二面都会全程记录你的面试情况 做记录】 css面试: H5的新特性 新标签 水平垂直居中的几种方法 以及 vertical-align的情况 布局(比如左边固定 右边自适应) rem的计算 ...<div class="post-button text-center"> <a class="btn" href="/2017/07/11/百度贴吧前端面试/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/06/28/setTimeout 0 与 Promise的执行时机/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/06/28/setTimeout 0 与 Promise的执行时机/" itemprop="url">面试题:setTimeout 0 与 Promise的执行时机</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-28T09:55:08+08:00">2017-06-28</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span> , <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/面试题/" itemprop="url" rel="index"><span itemprop="name">面试题</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 执行顺序为: 1 2 3 5 4<div class="post-button text-center"> <a class="btn" href="/2017/06/28/setTimeout 0 与 Promise的执行时机/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/06/28/让javascript函数仅执行一次/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/06/28/让javascript函数仅执行一次/" itemprop="url">面试题:让javascript函数仅执行一次</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-28T09:55:08+08:00">2017-06-28</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span> , <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/面试题/" itemprop="url" rel="index"><span itemprop="name">面试题</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 题目是这样的:function a() {}a();a();多次调用的时候 只让它执行一次。 lodash.one 的实现 另一种实现1234567891011121314151617181920function once(fn, context) { var result; ...<div class="post-button text-center"> <a class="btn" href="/2017/06/28/让javascript函数仅执行一次/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/06/28/传入任意1-7的数组转为对应星期问题/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/06/28/传入任意1-7的数组转为对应星期问题/" itemprop="url">面试题:传入任意1-7的数组转为对应星期问题</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-28T09:55:08+08:00">2017-06-28</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span> , <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/面试题/" itemprop="url" rel="index"><span itemprop="name">面试题</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 已知一个1-7的数组 输出对应的星期如:输入 [1, 2, 3, 5, 6] —-> 输出 星期1-星期3 星期5 星期6输入 [1, 2, 5, 6] —-> 输出 星期1-星期2 星期5 星期5输入 [1, 2, 4, 5, 6, 7] —-> 输出 星期1-星 ...<div class="post-button text-center"> <a class="btn" href="/2017/06/28/传入任意1-7的数组转为对应星期问题/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/06/23/supervisor监测文件修改/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/06/23/supervisor监测文件修改/" itemprop="url">supervisor自动监测文件修改</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-23T14:26:24+08:00">2017-06-23</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 在node.js中,有时候项目中修改一个配置文件,需要重新npm start , supervisor插件很好的解决了这一难题。 supervisor安装1npm i -g supervisor supervisor参数监控的文件夹或文件,默认为’.’ 1-w | --watch <watch ...<div class="post-button text-center"> <a class="btn" href="/2017/06/23/supervisor监测文件修改/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/06/01/为啥说setState是异步的/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/06/01/为啥说setState是异步的/" itemprop="url">setState不及时更新的问题</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-01T16:46:53+08:00">2017-06-01</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 老早前在做项目的时候,遇到表单设置select下拉,选择完选项 在其他function函数里面需要拿这个选择的数据,通过 this.state.XXX 去获取,总是拿到一个旧的数据,不会及时的更新,在render里面去拿就能拿到新的数据,当时也没好好去深入,现在做个笔记希望能够思路清晰点。 Rea ...<div class="post-button text-center"> <a class="btn" href="/2017/06/01/为啥说setState是异步的/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2017/06/01/JS反转二叉树/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2017/06/01/JS反转二叉树/" itemprop="url">JS 反转二叉树</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-06-01T16:46:53+08:00">2017-06-01</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 面试的时候,问了一个反转二叉树的实现,做个笔记。 123456789101112131415Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 ...<div class="post-button text-center"> <a class="btn" href="/2017/06/01/JS反转二叉树/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2016/09/14/ES6的Array.from、Set数组去重/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2016/09/14/ES6的Array.from、Set数组去重/" itemprop="url">ES6的Array.from、Set数组去重</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-09-14T14:26:24+08:00">2016-09-14</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> Set数据结构ES6中新增了Set数据结构,类似于数组,但是 它的成员都是唯一的 ,其构造函数可以接受一个数组作为参数,如: 1234let array = [1, 1, 1, 1, 2, 3, 4, 4, 5, 3];let set = new Set(array);console.log(set ...<div class="post-button text-center"> <a class="btn" href="/2016/09/14/ES6的Array.from、Set数组去重/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2016/09/03/负数的二进制/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2016/09/03/负数的二进制/" itemprop="url">求负数的二进制</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-09-03T14:26:24+08:00">2016-09-03</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/计算机基础/" itemprop="url" rel="index"><span itemprop="name">计算机基础</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> [转] 负数用二进制表达。比如,假设有一 int 类型的数,值为5,那么,我们知道它在计算机中表示为:100000000 00000000 00000000 00000101 5转换成二制是101,不过int类型的数占用4字节(32位),所以前面填了一堆0。现在想知道,-5在计算机中如何表示? 在 ...<div class="post-button text-center"> <a class="btn" href="/2016/09/03/负数的二进制/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2016/09/03/阶段性技术啰嗦2/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2016/09/03/阶段性技术啰嗦2/" itemprop="url">阶段性技术啰嗦(二)</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-09-03T14:26:24+08:00">2016-09-03</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 记得上次阶段性啰嗦是在5月份,转眼间,就到九月了,时间过的好快,又过得好漫长,两点一线的生活,充实的生活,也懒到了一定的境界,甚是乏累。今天公司网络升级改造,所以早早就回来,就想起写点啥,虽然经验少,肚子里没墨水也想挣扎一番。Let me see ! 说下最近都在忙啥吧:七月份开始一直到现 ...<div class="post-button text-center"> <a class="btn" href="/2016/09/03/阶段性技术啰嗦2/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-随笔" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2016/08/06/20160806随笔/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2016/08/06/20160806随笔/" itemprop="url">随笔 2016-08-6</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-08-06T16:36:17+08:00">2016-08-06</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/生活/" itemprop="url" rel="index"><span itemprop="name">生活</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 深夜,又是一个周末,难得这个周末啥都断想,啥都不管,就这么放空。<div class="post-button text-center"> <a class="btn" href="/2016/08/06/20160806随笔/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-SASS" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2016/06/18/SASS用法小记/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2016/06/18/SASS用法小记/" itemprop="url">SASS用法小记</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-06-18T16:46:53+08:00">2016-06-18</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 之前项目用LESS,现在新项目打算用SASS,所以做个主要常用知识点小记。 在线编译地址@import 引入12 @import "../binjs.scss"; // 引入文件 @import "../huangyb.css"; @mixin 混入 注意: ...<div class="post-button text-center"> <a class="btn" href="/2016/06/18/SASS用法小记/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article class="post post-type-JavaScript" itemscope itemtype="http://schema.org/Article"><link itemprop="mainEntityOfPage" href="https://hyb628.github.io/2016/06/13/ES6数组的扩展/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="一喵呜"><meta itemprop="description" content=""><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="一喵呜"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"> <a class="post-title-link" href="/2016/06/13/ES6数组的扩展/" itemprop="url">ES6数组的扩展</a></h2><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i></span> <span class="post-meta-item-text">发表于</span> <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-06-13T16:46:53+08:00">2016-06-13</time></span> <span class="post-category"><span class="post-meta-divider">|</span><span class="post-meta-item-icon"><i class="fa fa-folder-o"></i></span> <span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span></span></div></header><div class="post-body" itemprop="articleBody"> 今天培训了,只能自己看这些东西啦。一天时间又过去了。现在文章,或者我的印象笔记都是采用Markdown 来写了, 是不是看起来比较整洁了。有点想改用Hexo, 看着很不错,markdown 也写得比较有意思 貌似。 一直想弄 ,但是又怕麻烦。 Array.from123456789101112131 ...<div class="post-button text-center"> <a class="btn" href="/2016/06/13/ES6数组的扩展/#more" rel="contents">阅读全文 »</a></div></div><div></div><div></div><div></div><footer class="post-footer"><div class="post-eof"></div></footer></article></section><nav class="pagination"> <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="extend next" rel="next" href="/page/2/"><i class="fa fa-angle-right"></i></a></nav></div></div><div class="sidebar-toggle"><div class="sidebar-toggle-line-wrap"><span class="sidebar-toggle-line sidebar-toggle-line-first"></span><span class="sidebar-toggle-line sidebar-toggle-line-middle"></span><span class="sidebar-toggle-line sidebar-toggle-line-last"></span></div></div><aside id="sidebar" class="sidebar"><div class="sidebar-inner"><section class="site-overview sidebar-panel sidebar-panel-active"><div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person"> <img class="site-author-image" itemprop="image" src="/images/avatar.png" alt="一喵呜"><p class="site-author-name" itemprop="name">一喵呜</p><p class="site-description motion-element" itemprop="description"></p></div><nav class="site-state motion-element"><div class="site-state-item site-state-posts"> <a href="/archives"><span class="site-state-item-count">25</span> <span class="site-state-item-name">日志</span></a></div><div class="site-state-item site-state-categories"> <a href="/categories/index.html"><span class="site-state-item-count">5</span> <span class="site-state-item-name">分类</span></a></div><div class="site-state-item site-state-tags"> <a href="/tags/index.html"><span class="site-state-item-count">25</span> <span class="site-state-item-name">标签</span></a></div></nav><div class="feed-link motion-element"><a href="/atom.xml" rel="alternate"><i class="fa fa-rss"></i> RSS</a></div><div class="links-of-author motion-element"><span class="links-of-author-item"><a href="https://github.com/hyb628" target="_blank" title="GitHub"><i class="fa fa-fw fa-github"></i> GitHub</a></span><span class="links-of-author-item"><a href="https://twitter.com/hyb628" target="_blank" title="Twitter"><i class="fa fa-fw fa-twitter"></i> Twitter</a></span><span class="links-of-author-item"><a href="https://www.facebook.com/binjs" target="_blank" title="Facebook"><i class="fa fa-fw fa-facebook"></i> Facebook</a></span></div></section></div></aside></div></main><footer id="footer" class="footer"><div class="footer-inner"><div class="copyright"> © <span itemprop="copyrightYear">2017</span><span class="with-love"><i class="fa fa-heart"></i></span> <span class="author" itemprop="copyrightHolder">一喵呜</span></div></div></footer><div class="back-to-top"><i class="fa fa-arrow-up"></i> <span id="scrollpercent"><span>0</span>%</span></div></div><script type="text/javascript">"[object Function]"!==Object.prototype.toString.call(window.Promise)&&(window.Promise=null)</script><script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script><script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script><script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script><script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script><script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script><script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script><script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script><script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script><script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script><script type="text/javascript">function proceedsearch(){$("body").append('<div class="search-popup-overlay local-search-pop-overlay"></div>').css("overflow","hidden"),$(".search-popup-overlay").click(onPopupClose),$(".popup").toggle(),$("#local-search-input").focus()}var isfetched=!1,search_path="search.xml";0===search_path.length&&(search_path="search.xml");var path="/"+search_path,onPopupClose=function(t){$(".popup").hide(),$("#local-search-input").val(""),$(".search-result-list").remove(),$("#no-result").remove(),$(".local-search-pop-overlay").remove(),$("body").css("overflow","")},searchFunc=function(t,e,n){"use strict";$.ajax({url:t,dataType:"xml",async:!0,success:function(t){isfetched=!0,$(".popup").detach().appendTo(".header-inner");var o=$("entry",t).map(function(){return{title:$("title",this).text(),content:$("content",this).text(),url:$("url",this).text()}}).get(),r=document.getElementById(e),s=document.getElementById(n),a=function(){var t=r.value.trim().toLowerCase(),e=t.split(/[\s\-]+/);e.length>1&&e.push(t);var n=[];if(t.length>0&&o.forEach(function(o){var r=!1,s=0,a=0,i=o.title.trim(),c=i.toLowerCase(),h=o.content.trim().replace(/<[^>]+>/g,""),l=h.toLowerCase(),u=decodeURIComponent(o.url),p=[],f=[];if(""!=i&&(e.forEach(function(t){function e(t,e,n){var o=t.length;if(0===o)return[];var r=0,s=[],a=[];for(n||(e=e.toLowerCase(),t=t.toLowerCase());(s=e.indexOf(t,r))>-1;)a.push({position:s,word:t}),r=s+o;return a}p=p.concat(e(t,c,!1)),f=f.concat(e(t,l,!1))}),(p.length>0||f.length>0)&&(r=!0,s=p.length+f.length)),r){[p,f].forEach(function(t){t.sort(function(t,e){return e.position!==t.position?e.position-t.position:t.word.length-e.word.length})});function g(e,n,o,r){for(var s=r[r.length-1],i=s.position,c=s.word,h=[],l=0;i+c.length<=o&&0!=r.length;){c===t&&l++,h.push({position:i,length:c.length});var u=i+c.length;for(r.pop();0!=r.length&&(s=r[r.length-1],i=s.position,c=s.word,u>i);)r.pop()}return a+=l,{hits:h,start:n,end:o,searchTextCount:l}}var d=[];0!=p.length&&d.push(g(0,0,i.length,p));for(var v=[];0!=f.length;){var C=f[f.length-1],$=C.position,x=C.word,m=$-20,w=$+80;m<0&&(m=0),w<$+x.length&&(w=$+x.length),w>h.length&&(w=h.length),v.push(g(0,m,w,f))}v.sort(function(t,e){return t.searchTextCount!==e.searchTextCount?e.searchTextCount-t.searchTextCount:t.hits.length!==e.hits.length?e.hits.length-t.hits.length:t.start-e.start});var T=parseInt("1");T>=0&&(v=v.slice(0,T));function y(t,e){var n="",o=e.start;return e.hits.forEach(function(e){n+=t.substring(o,e.position);var r=e.position+e.length;n+='<b class="search-keyword">'+t.substring(e.position,r)+"</b>",o=r}),n+=t.substring(o,e.end)}var b="";0!=d.length?b+="<li><a href='"+u+"' class='search-result-title'>"+y(i,d[0])+"</a>":b+="<li><a href='"+u+"' class='search-result-title'>"+i+"</a>",v.forEach(function(t){b+="<a href='"+u+'\'><p class="search-result">'+y(h,t)+"...</p></a>"}),b+="</li>",n.push({item:b,searchTextCount:a,hitCount:s,id:n.length})}}),1===e.length&&""===e[0])s.innerHTML='<div id="no-result"><i class="fa fa-search fa-5x" /></div>';else if(0===n.length)s.innerHTML='<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>';else{n.sort(function(t,e){return t.searchTextCount!==e.searchTextCount?e.searchTextCount-t.searchTextCount:t.hitCount!==e.hitCount?e.hitCount-t.hitCount:e.id-t.id});var a='<ul class="search-result-list">';n.forEach(function(t){a+=t.item}),a+="</ul>",s.innerHTML=a}};r.addEventListener("input",a),proceedsearch()}})};$(".popup-trigger").click(function(t){t.stopPropagation(),!1===isfetched?searchFunc(path,"local-search-input","local-search-result"):proceedsearch()}),$(".popup-btn-close").click(onPopupClose),$(".popup").click(function(t){t.stopPropagation()}),$(document).on("keyup",function(t){27===t.which&&$(".search-popup").is(":visible")&&onPopupClose()})</script></body></html>