自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

SalmonellaVaccine的专栏

不走弯路,也就错过了风景。无论如何,感谢经历。

  • 博客(30)
  • 收藏
  • 关注

转载 Enums in JavaScript

http://stackoverflow.com/a/31636748/2177408Create an immutable object literal:const Modes = { DRAGGING: 'drag', SCALING: 'scale', CLICKED: 'click' };

2015-08-23 14:35:22 341

转载 Polymer 1.0 升级指南

http://www.codeceo.com/article/polymer-1-0-update.html在最近结束的 Google IO 2015,Google 发布了期待已久的 Polymer 1.0,并宣布可用于生产环境,使用 Polymer 库的人们还在使用开发预览版,本文将做为一个指南,指导将现在应用迁移到 Polymer最新版本。关于 v1.0 一些重要的注意事项:

2015-08-23 02:35:50 467

转载 How to change Polymer(1.0) paper-toolbar background colour?

http://stackoverflow.com/questions/30556196/how-to-change-polymer1-0-paper-toolbar-background-colourQ:Yesterday I decided to try Polymer 1.0 and I'm already facing difficulties when trying to

2015-08-19 12:23:21 538

转载 What do /deep/ and ::shadow mean in a CSS selector?

http://stackoverflow.com/a/25609679HTML5 Web Components offer full encapsulation of CSS styles.This means that:styles defined within a component cannot leak out and effect the rest of

2015-08-19 12:04:30 1561

转载 Android调用Camera API 拍照

http://www.cnblogs.com/alexthecoder/p/4363516.html注意,Camera API在API>=21已经被废弃了,建议使用android.hardware.camera2API来进行操作。调用Camera API拍照的流程如下:To take pictures with this class, use the follo

2015-08-12 13:53:03 651

转载 Android实战技巧之三十三:android.hardware.camera2使用指南

http://blog.csdn.net/lincyang/article/details/45951225API 21中将原来的camera API弃用转而推荐使用新增的camera2 API,这是一个大的动作,因为新API换了架构,让开发者用起来更难了。 先来看看camera2包架构示意图:  这里引用了管道的概念将安卓设备和摄像头之间联通起来,系统向摄像头发送

2015-08-12 13:51:08 789

转载 Android入门第一篇

http://blog.csdn.net/hellogv/article/details/4515763本文来自http://blog.csdn.net/hellogv/          最近Android挺火的,可惜刚毕业,温饱才刚刚解决,还没能力买台Android手机,所以目前的开发只能用模拟器来做。。。就目前 Android SDK 1.5 + Eclipse

2015-08-12 13:49:54 343

转载 Android开发中onClick事件的几种实现,分析,对比

http://blog.csdn.net/pku_android/article/details/7310877作者:黄少卿一、实现环境操作系统平台:Windows XP开发IDE:MyEclipse 8.M使用SDK版本:Android SDK 2.3.3(API 10)手机模拟器环境: Battery Support && SD Card

2015-08-12 13:47:46 432

转载 android-学习笔记之按钮事件

android-学习笔记之按钮事件本文转载自: http://zhangkun716717-126-com.iteye.com/blog/761080 前备知识:1.需要了解怎么得到界面元素。那么如何得到界面元素呢?在界面配置文件:例如 main.xml 中,比方一个id为idButtonTest1的Button定义如下: Xml代码

2015-08-12 13:46:57 340

转载 Android中Button事件的几种写法

http://blog.csdn.net/miaozishao/article/details/42610923安卓中,Button经常用到,网上有很多了,但是自己写一遍,就是感觉不一样这里就分享4种常用的button事件的写法:1、匿名内部类xml 文件java代码:2、在类MainActivity上

2015-08-12 13:46:00 422

转载 A Tutorial on android.hardware.camera2.*

http://jylee-world.blogspot.com/2014/12/a-tutorial-of-androidhardwarecamera2.htmlIntroductionSince android.hardware.camera is deprecated after API V21, we use android.hardware.camera2.*. T

2015-08-12 13:44:10 970

转载 从一行代码里面学点JavaScript

http://www.html-js.com/article/2315从一行代码里面学点JavaScript现如今,JavaScript无处不在,因此关于JavaScript的新知识也是层出不穷。JavaScript的特点在于,要学习它的语法入门简简单,但是要精通使用它的方式却是一件不容易的事。来看看下面的这段代码,它来自于谷歌“名猿”Addy Osmani在几天前贴出

2015-08-12 13:38:31 453

转载 利用promise写出更加优美的nodejs程序

http://my.oschina.net/sundq/blog/227410摘要 nodejs所有的操作都是异步和callback模式,这样做的坏处是很容易造成或掉函数调用大坑,本文介绍如何使用promise写出更简洁明了的程序。nodejs promise callback hell目录[-]什么是promise将一般的异步调用的函数

2015-08-12 13:36:22 627

转载 在 Node.js 中用 Q 实现 Promise – Callback 之外的另一种选择

http://www.ghostchina.com/promises-in-node-js-with-q-an-alternative-to-callbacks/作者:王赛 • 2014年3月2日怎么写异步代码?相对原始的 callback 而言,promise 无疑是更好的选择。可掌握promise 的概念及其用法可能不太容易, 而且很有可能你已经放弃它了。但经过一大波码农的努力,p

2015-08-12 13:35:13 784

转载 理解JavaScript中的依赖注入

http://www.html-js.com/article/2598理解JavaScript中的依赖注入计算机编程的世界其实就是一个将简单的部分不断抽象,并将这些抽象组织起来的过程。JavaScript也不例外,在我们使用JavaScript编写应用时,我们是不是都会使用到别人编写的代码,例如一些著名的开源库或者框架。随着我们项目的增长,我们需要依赖的模块变得越来越多,这

2015-08-12 13:33:47 651

转载 NodeJs教程

By 特首http://markpop.github.io/2014/10/29/NodeJs%E6%95%99%E7%A8%8B/介绍随着Node.js的发展,Javascript应用在这几年突飞猛进的流行。如果你去modulecounts.com上看看,你会发现Node packages已经超过了Ruby。另外Node packages的发展速度已经超过了Ruby、Pyth

2015-08-12 13:32:30 531

转载 Node.js async in practice: When to use what?

http://www.sebastianseilund.com/nodejs-async-in-practiceSebastian SeilundWhen I started out using node.js and async I didn't find any good/thorough resources on how to really use the asy

2015-08-12 13:29:02 502

转载 在Node.js中使用promise摆脱回调金字塔

http://nya.io/Node-js/promise-in-nodejs-get-rid-of-callback-hell/在开始谈论正题之前,我们先来看看下面一段代码:123456789step1(function (value1) { step2(value1, function(value2) {

2015-08-12 13:27:29 1246

转载 Node.js 常见面试题

http://www.liuzhixiang.com/2015/07/01/Node.js-Interview-Questions-and-Answers/By 刘志祥前言打开这篇文章时,你要么想要聘请Node.js开发者,要么想要应聘Node.js开发者。下面将给出你一些要问的问题和一些你应该知道的问题答案。在你看问题之前,现要明确三点:首先,这些问题

2015-08-12 13:25:41 3958

转载 window.onload from before

http://www.peterbe.com/plog/window.onload-from-beforeIn an DHTML solution I've been working on I need to tap into window.onload and append my own function in there. The code looked something

2015-08-05 06:05:12 532

转载 Javascript Promises Are Awesome

http://ghost.deceptacle.com/2014/03/26/javascript-promises-are-awesome/26 Mar 2014I have completely fallen in love with Javascript promises. There's plenty of other blog posts going into more

2015-08-02 02:17:13 445

转载 JavaScript Madness: Dynamic Script Loading

http://unixpapa.com/js/dyna.htmlJan WolterMar 19, 2007IntroductionI've developed some pretty seriously Javascript intensive sites, where the sheer quantity of Javascript on the page is

2015-08-01 01:51:44 589

转载 Four ways to deal with private members in JavaScript

Author:Tim Buschtönshttp://eclipsesource.com/blogs/2013/07/05/private-members-in-javascript/I’ve been programming JavaScript for a few years now, and the one thing that definitel

2015-08-01 01:51:29 419

转载 stopPropagation, preventDefault 和 return false 的区别

http://www.neoease.com/stoppropagation-and-preventdefault-and-return-false/因为有父, 子节点同在, 因为有监听事件和浏览器默认动作之分. 使用 JavaScript 时为了达到预期效果经常需要阻止事件和动作执行. 一般我们会用到三种方法, 分别是 stopPropagation(), preventDefa

2015-08-01 01:49:27 447

转载 Bubbling and capturing

http://javascript.info/tutorial/bubbling-and-capturingIlya KantorBubblingthis and event.targetStopping the bubblingCapturingSummaryDOM elements can be nested inside each other. And

2015-08-01 01:48:59 590

转载 JavaScript 和事件

http://yujiangshui.com/javascript-event/JavaScript 和事件与浏览器进行交互的时候浏览器就会触发各种事件。比如当我们打开某一个网页的时候,浏览器加载完成了这个网页,就会触发一个 load 事件;当我们点击页面中的某一个“地方”,浏览器就会在那个“地方”触发一个 click 事件。这样,我们就可以编写 JavaS

2015-08-01 01:46:55 699

转载 JavaScript 事件顺序:冒泡和捕获

http://mangguo.org/javascript-events-order-bubbling-and-capture/补充说明:这篇文章通俗易懂地讲解了冒泡和捕获原理,原文来自 ppk 大侠的 quirksmode 站点。感谢网友 hh54188 的翻译。事件的发生顺序这个问题的起源非常简单,假设你在一个元素中又嵌套了另一个元素----------

2015-08-01 01:45:50 543

转载 Checking for Undefined, Null, and Empty Variables in JavaScript

http://davidbcalhoun.com/2011/checking-for-undefined-null-and-empty-variables-in-javascript/In general it’s a good practice to check for the existence of something before blindly using it by fai

2015-08-01 01:21:34 523

转载 Setting Up Continuous Integration & Continuous Deployment With Jenkins

http://code.tutsplus.com/tutorials/setting-up-continuous-integration-continuous-deployment-with-jenkins--cms-21511Sponsored ContentThis sponsored post features a product relevant to our read

2015-08-01 01:20:29 1079

转载 创建自己的“JavaScript库”

http://www.seejs.com/archives/275一、编写JavaScript库要注意的问题为了让自己的JS库构建的更加优雅、合理,我们编写JS库时要注意两方面的内容:1、不要使用版本检测,而要使用能力检测由于浏览器的类型和版本太多,以及不断的新的浏览器出现,我们不可能投入大量的时间和成本去实践检测各种版本的浏览器。”浏览器检测”也叫”版本检测”

2015-08-01 01:19:36 521

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除