Stay Hungry,Stay Foolish!

摘要: Prolog https://en.wikipedia.org/wiki/Prolog Prolog is a general-purpose logic programming language associated with artificial intelligence and computa 阅读全文
posted @ 2017-09-17 22:08 lightsong 阅读(627) 评论(0) 推荐(0)
摘要: angularjs路由 https://angular.io/guide/router 通过URL解释, 来定位客户端生成的浏览器端视图。 你可绑定路由到页面的链接上, 当用户点击链接, 可以浏览到相应的应用视图。 The browser is a familiar model of applica 阅读全文
posted @ 2017-08-21 22:47 lightsong 阅读(836) 评论(0) 推荐(0)
摘要: lodash https://lodash.com/docs#now https://lodash.com/ A modern JavaScript utility library delivering modularity, performance & extras. Why Lodash? Lo 阅读全文
posted @ 2017-07-09 22:12 lightsong 阅读(821) 评论(0) 推荐(0)
摘要: git图解:代码区域总结 https://zhuanlan.zhihu.com/p/20175919 git跟传统的代码管理器(如:svn)不同, 主要区别在于git多了个本地仓库以及缓存区,所以即使无法联网也一样能提交代码。术语解释: 工作区间: 即我们创建的工程文件, 在编辑器可直观显示; 缓存 阅读全文
posted @ 2017-07-09 14:19 lightsong 阅读(302) 评论(0) 推荐(0)
摘要: infinite scroll 类似一些网站, 例如京东搜索商品, 浏览到最后一页,自动加载新的商品。 一则可以加快首页响应速度, 二则减轻带宽和服务器荷载。 这么多商品信息一次性返回给客户端也是不可行的。 An infinite scrolling plugin for jQuery https: 阅读全文
posted @ 2017-06-12 23:50 lightsong 阅读(586) 评论(0) 推荐(0)
摘要: 中文 https://zhidao.baidu.com/question/353530989.html 举个简单的例子,当你有一个日IP过千的网站,而你的网站首页几百年没有更改了,这个时候你想启用新的网页,而你有害怕新的页面用户不一定就非常喜欢,那么这个时候你就需要进行A/B测试了。测试的方法是将老 阅读全文
posted @ 2017-06-06 23:30 lightsong 阅读(231) 评论(0) 推荐(0)
摘要: Jenkins https://jenkins.io/index.html The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying a 阅读全文
posted @ 2017-05-19 22:03 lightsong 阅读(646) 评论(0) 推荐(0)
摘要: Docker https://www.docker.com/ 消除应用的依赖矩阵。 消除硬件依赖 和 软件依赖。 Escape the app dependency matrix Eliminate the “it works on my machine” problem once and for 阅读全文
posted @ 2017-05-03 00:31 lightsong 阅读(573) 评论(0) 推荐(0)
摘要: 加载方式 形象图像化方法,见 http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html 1、 script标签, 无 async defer, 则script文件下载和执行的过程, 会阻塞后面html标签的解析,进 阅读全文
posted @ 2017-05-01 22:23 lightsong 阅读(486) 评论(0) 推荐(0)
摘要: Pre-shared key https://en.wikipedia.org/wiki/Pre-shared_key In cryptography, a pre-shared key (PSK) is a shared secret which was previously shared bet 阅读全文
posted @ 2017-04-19 23:35 lightsong 阅读(1354) 评论(0) 推荐(0)
摘要: 持续集成 https://en.wikipedia.org/wiki/Continuous_integration 为什么要持续? 持续集成, 可以避免集成地狱(由于工作的源码 和 库中的源码的差异导致), 提倡提前集成,并且经常集成。 在集成到主分支之前, 在CI服务器上做一次完整的构建 和 运行 阅读全文
posted @ 2017-04-03 08:50 lightsong 阅读(1158) 评论(0) 推荐(0)
摘要: Fetch作用? https://developer.mozilla.org/zh-CN/docs/Web/API/Fetch_API/Using_Fetch Fetch API 提供了一个 JavaScript接口,用于访问和操纵HTTP管道的部分,例如请求和响应。它还提供了一个全局 fetch( 阅读全文
posted @ 2017-03-12 23:08 lightsong 阅读(931) 评论(0) 推荐(0)
摘要: Content Security Policy https://content-security-policy.com/ The new Content-Security-Policy HTTP response header helps you reduce XSS risks on modern 阅读全文
posted @ 2017-02-26 17:31 lightsong 阅读(2169) 评论(0) 推荐(0)
摘要: vivalidi https://vivaldi.com/ A million ways to customize everything The world is a colorful place because we are all different and unique. We at Viva 阅读全文
posted @ 2017-02-19 23:17 lightsong 阅读(1760) 评论(0) 推荐(0)
摘要: 异步操作知识 在js世界中, 异步操作非常流行, nodejs就是特点基于异步非阻塞。 js语言支持的异步语法包括, Promise async await generator yield。 这些语法需要使用者了解非常清楚, 往往很困难。 下面介绍一个异步操作的超级库,可以实现很多异步操作和流程控制 阅读全文
posted @ 2017-02-15 23:09 lightsong 阅读(1153) 评论(0) 推荐(0)
摘要: Polymer是什么? Polymer英文为 n.聚合物;多聚体 网络高分子;聚合体;高分子聚合物 n.聚合物;多聚体 网络高分子;聚合体;高分子聚合物 n.聚合物;多聚体 网络高分子;聚合体;高分子聚合物 应用在Web组件场景, 表达的是, 一个一个小的Web组件,可以通过此框架聚合为一个 整个页 阅读全文
posted @ 2017-02-15 00:07 lightsong 阅读(597) 评论(0) 推荐(0)
摘要: 目的 在windows环境下, 整理代码,代码中含有 .svn 文件夹, 此文件夹在所有受控目录下都存在, 需要统一删除。 但是对windows的shell不熟悉,想用linux rm来删除, 如何实现? 方法 1、找到运行linux shell的工具, cygwin限制为安装目录。 git工具可以 阅读全文
posted @ 2017-02-14 23:00 lightsong 阅读(695) 评论(0) 推荐(0)
摘要: 1、提取字符串中以.ddd结尾的ddd值 result=$(echo "chip86.500" | grep -Eo '\.[0-9]{1,}' | grep -Eo '[0-9]{1,}') echo $result 2、获取脚本文件的入参 para=$1 srcfile="srcfile" ec 阅读全文
posted @ 2017-02-14 22:53 lightsong 阅读(161) 评论(0) 推荐(0)
摘要: 背景 在一个lua文件中书写的代码, 使用的变量, 需要设置其运行环境。 目的: 1、 不破坏全局环境。 2、 限定文件所使用的环境, 作为沙箱功能。 解法 限定运行空间环境的文件: 加载上个文件的代码 (将dmenu的值,传入上个文件, 并限定只能在全局环境中读取): 阅读全文
posted @ 2017-01-26 10:57 lightsong 阅读(1393) 评论(0) 推荐(0)
摘要: 函数链 http://lua-users.org/wiki/FiltersSourcesAndSinks A chain is a function that combines the effect of two (or more) other functions, but whose interf 阅读全文
posted @ 2017-01-26 10:49 lightsong 阅读(387) 评论(0) 推荐(0)
摘要: 背景 不同文件中,lua提供模块写法, 使用local修饰,可以将变量或者函数,声明为模块内有效,例如 模块暴漏变量使用 return 表的方式。 这样能够避免不同文件中, 存在相同函数或者变量名, 污染全局环境问题, 也解决的命名冲突问题。 但是存在一种情况, 在同一个文件内, 存在函数同名情况, 阅读全文
posted @ 2017-01-11 22:01 lightsong 阅读(1878) 评论(0) 推荐(0)
摘要: 背景 见上一篇。 面向对象的链式调用中,掺杂了 一个一部动作, 对于这种工作链, 是非同步执行的链。 LazyMan("Hank").sleep(1).eat("dinner") 同步执行的工作链中, 任何一个动作,即函数调用, 都是同步的, 可理解为普通的函数。 异步的工作链, 前提条件是工作链中 阅读全文
posted @ 2017-01-07 22:13 lightsong 阅读(1336) 评论(0) 推荐(0)
摘要: LazyMan问题与解法 http://mp.weixin.qq.com/s/drNGvLZddQztcUzSh8OsSw 给出了一道题目,并给出了解法: 题目: 实现一个LazyMan,可以按照以下方式调用: LazyMan(“Hank”)输出: Hi! This is Hank! LazyMan 阅读全文
posted @ 2017-01-05 00:53 lightsong 阅读(272) 评论(0) 推荐(0)
摘要: ReactiveX http://reactivex.io/ An API for asynchronous programmingwith observable streams The Observer pattern done right ReactiveX is a combination o 阅读全文
posted @ 2017-01-04 00:31 lightsong 阅读(601) 评论(0) 推荐(0)
摘要: https://en.wikipedia.org/wiki/Aspect-oriented_programming Action Agent-oriented Array-oriented Automata-based Concurrent computing Relativistic progra 阅读全文
posted @ 2017-01-03 00:11 lightsong 阅读(220) 评论(0) 推荐(0)
摘要: AOP https://en.wikipedia.org/wiki/Aspect-oriented_programming Typically, an aspect is scattered or tangled as code, making it harder to understand and 阅读全文
posted @ 2017-01-02 23:57 lightsong 阅读(409) 评论(0) 推荐(0)
摘要: luaunit Luaunit is a unit-testing framework for Lua, in the spirit of many others unit-testing framework. Luaunit let's you write test functions, test 阅读全文
posted @ 2017-01-01 10:07 lightsong 阅读(1947) 评论(0) 推荐(0)
摘要: Diet Food Diet (nutrition), the sum of the food consumed by an organism or group Dieting, the deliberate selection of food to control body weight or n 阅读全文
posted @ 2017-01-01 08:52 lightsong 阅读(1222) 评论(0) 推荐(0)
摘要: 如上实验, 第二行文字点击, 显示第二个id。 具体原因是, 事件被克隆, 但是事件处理函数没有被执行, 事件处理函数在clone对象的事件处理后才执行, 其中this为,触发此函数执行的对象。 见zhangxinxu解释: http://www.zhangxinxu.com/wordpress/2 阅读全文
posted @ 2016-12-28 17:47 lightsong 阅读(4111) 评论(0) 推荐(0)
摘要: 概念 XML 扩展标记语言 (Extensible Markup Language, XML) ,用于标记电子文件使其具有结构性的标记语言,可以用来标记数据、定义数据类型,是一种允许用户对自己的标记语言进行定义的源语言。 XML使用DTD(document type definition)文档类型定 阅读全文
posted @ 2016-12-28 17:23 lightsong 阅读(8881) 评论(0) 推荐(1)
摘要: 背景 在移动互联网浪潮下,移动设备普及,对配置需要考虑移动端设备可访问性。Web作为最贴近用户的配置手段,面向从PC端传统页面,向移动端页面的转型。 概念 PC Web: 面向传统PC电脑的浏览器开发的Web人机交互界面。 移动Web:面向移动设备的浏览器开发的Web人机交互界面。移动设备包括:手机 阅读全文
posted @ 2016-12-25 22:19 lightsong 阅读(425) 评论(0) 推荐(0)
摘要: 背景 工作中往往会有多个excel维护的情况,随着业务的变化, 将一个Excel合并到另外一个Excel,成为必须。 如何移动sheet,对于不会的人,这是一个好问题, 也许你经过多次尝试都没有成功。 下面给出方案。 方案 http://blog.163.com/yj_yuan/blog/stati 阅读全文
posted @ 2016-12-25 18:00 lightsong 阅读(3519) 评论(0) 推荐(0)
摘要: 背景 Web自动化测试越来越被重视, 因为现在Web已经是工程化的状态。 如何通过工具测试, 保证Web开发的质量,提升开发效率,是Web工具的诞生的来由。 Web测试分为以下几个方面: 1、 界面测试 测试界面是否正常,这是前端测试最基础的环节。 2、 功能测试 测试功能操作是否正常,由于涉及交互 阅读全文
posted @ 2016-12-19 23:56 lightsong 阅读(2744) 评论(0) 推荐(0)
摘要: 问题 对于 jquery 接口text()只能取到有标签的 dom对象中 文本内容。 如果索引对象本身就是文本节点,则不好索引到, 没有相关的索引选择器。 例如: 对于<input>aaa 形式的代码, $("input").next().text(), 则不能返回 aaa。 下面有讨论使用jque 阅读全文
posted @ 2016-11-27 21:09 lightsong 阅读(638) 评论(0) 推荐(0)
摘要: 概念 http://www.juweixin.com/t/detail/148383 语法到底是什么?有人说语法是语言里的法律、法规;有人说语法是框架结构;还有人说语法就是对前人语言习惯的一种总结。以上这些说法都对,但是又不全对。 In linguistics, grammar is the set 阅读全文
posted @ 2016-11-27 20:56 lightsong 阅读(9942) 评论(0) 推荐(0)
摘要: Digest access authentication https://en.wikipedia.org/wiki/Digest_access_authentication Digest access authentication is one of the agreed-upon methods 阅读全文
posted @ 2016-11-27 20:34 lightsong 阅读(1665) 评论(0) 推荐(0)
摘要: 用途 https://github.com/gf3/sandbox Can be used to execute untrusted code. Support for timeouts (e.g. prevent infinite loops) Support for memory errors 阅读全文
posted @ 2016-11-24 23:35 lightsong 阅读(947) 评论(0) 推荐(0)
摘要: MVVM https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel Model–view–view-model (MVVM) is a software architectural pattern. MVVM facilit 阅读全文
posted @ 2016-11-22 00:10 lightsong 阅读(1514) 评论(0) 推荐(0)
摘要: Sass https://en.wikipedia.org/wiki/Sass_(stylesheet_language) Sass (Syntactically Awesome Stylesheets) is a style sheet language initially designed by 阅读全文
posted @ 2016-11-19 01:09 lightsong 阅读(467) 评论(0) 推荐(0)
摘要: 背景 对于某一个函数, 其被调用多次, 每次调用的入参都是一致的。 不想每次都填写参数, 如果能够定义一个新的函数, 将参数跟此函数绑定就棒哒哒了。 类似javascript function.bind功能: https://developer.mozilla.org/en-US/docs/Web/ 阅读全文
posted @ 2016-11-19 00:17 lightsong 阅读(1706) 评论(0) 推荐(0)
千山鸟飞绝,万径人踪灭