02 2018 档案

摘要:In this lesson we are going to use CSS variables to keep our application's colors consistent. This includes defining the variables inside our the pseu 阅读全文
posted @ 2018-02-27 22:07 Zhentiw 阅读(185) 评论(0) 推荐(0) 编辑
摘要:The main reason you want to do I"nlining images with SVG and data URIs" is to reduce http request. If you doing "Inlining images with SVG and data URI 阅读全文
posted @ 2018-02-26 20:12 Zhentiw 阅读(415) 评论(0) 推荐(0) 编辑
摘要:// Asynchronous iteration --> Symbol.asyncIterator async function main() { const syncIterable = [ Promise.resolve('a'), Promise.resolve('b'), ]; for await (const x of sync... 阅读全文
posted @ 2018-02-25 01:47 Zhentiw 阅读(326) 评论(0) 推荐(0) 编辑
摘要:In this lesson, you will learn how to implement pytest fixtures. Many unit tests have the same resource requirements. For example, an instantiated obj 阅读全文
posted @ 2018-02-22 22:04 Zhentiw 阅读(349) 评论(0) 推荐(0) 编辑
摘要:Body with background image and gradient Body with elaborate background using only CSS Using CSS background images for conditional image display Using 阅读全文
posted @ 2018-02-22 21:10 Zhentiw 阅读(197) 评论(0) 推荐(0) 编辑
摘要:'cover': The smaller axies of image (x axies) should match smaller axies (x axies) of container. So some part of image might be cut off. 'container': 阅读全文
posted @ 2018-02-22 21:01 Zhentiw 阅读(136) 评论(0) 推荐(0) 编辑
摘要:In this lesson, I use Enzyme and Jest's Snapshot functionality to write an integration test for a component called CounterConsumer that consumes the R 阅读全文
posted @ 2018-02-22 01:21 Zhentiw 阅读(168) 评论(0) 推荐(0) 编辑
摘要:In this lesson, I use Enzyme and Jest to unit test a Counter Render Prop component. Writing integration tests are perfect for components that consume 阅读全文
posted @ 2018-02-22 01:15 Zhentiw 阅读(532) 评论(0) 推荐(0) 编辑
摘要:Take few examples: Full size image: The problem for that is it overflow when the screen size is smaller than the image size. (BAD) width: 100%: The pr 阅读全文
posted @ 2018-02-21 22:09 Zhentiw 阅读(234) 评论(0) 推荐(0) 编辑
摘要:React's abstraction over the DOM means that it's not always obvious how to do DOM-related things, like working with the HTML Canvas API. When working 阅读全文
posted @ 2018-02-21 03:52 Zhentiw 阅读(132) 评论(0) 推荐(0) 编辑
摘要:When the screen size is small, we can use "no more table" solution. So instead of render table is row layout, we render it in column layout. Given the 阅读全文
posted @ 2018-02-20 22:05 Zhentiw 阅读(368) 评论(0) 推荐(0) 编辑
摘要:In this lesson we are going to use Google's Puppeteer to gather metrics about a page's load time. We'll use a high level date subtraction method as we 阅读全文
posted @ 2018-02-20 16:49 Zhentiw 阅读(450) 评论(0) 推荐(0) 编辑
摘要:The React documentation has been warning us for a long time now that context shouldn't be used and that the API is unstable. Well, with the release of 阅读全文
posted @ 2018-02-20 02:33 Zhentiw 阅读(312) 评论(0) 推荐(0) 编辑
摘要:Every Angular CLI generated project comes already with Karmapreinstalled as well a couple of executable Jasmine specs. The default test reporter is "p 阅读全文
posted @ 2018-02-16 19:46 Zhentiw 阅读(128) 评论(0) 推荐(0) 编辑
摘要:1. First you have enable "Developer mode" on your mobile device. (Different device might be different) "Settings" -> Click "Build Number" 7 times. 2. 阅读全文
posted @ 2018-02-15 17:14 Zhentiw 阅读(155) 评论(0) 推荐(0) 编辑
摘要:Using the New Device Emulation Interface The Device Emulation interface changed a bit with the newer version of Chrome Dev Tools. Here are the instruc 阅读全文
posted @ 2018-02-15 16:54 Zhentiw 阅读(149) 评论(0) 推荐(0) 编辑
摘要:In a proper unit test we want to isolate external dependencies as much as possible to guarantee a reliable test outcome. Http calls represent such ext 阅读全文
posted @ 2018-02-14 21:20 Zhentiw 阅读(553) 评论(0) 推荐(0) 编辑
摘要:In some cases your application might need to upload large amounts of data, such as files. Obviously for a good UX we should provide the user some feed 阅读全文
posted @ 2018-02-14 21:13 Zhentiw 阅读(230) 评论(0) 推荐(0) 编辑
摘要:By default the new Angular Http client (introduced in v4.3.1) uses JSON as the data format for communicating with the backend API. However, there migh 阅读全文
posted @ 2018-02-14 21:06 Zhentiw 阅读(355) 评论(0) 推荐(0) 编辑
摘要:By default the response body doesn’t contain all the data that might be needed in your app. Your server might return some special header which you hav 阅读全文
posted @ 2018-02-14 21:03 Zhentiw 阅读(509) 评论(0) 推荐(0) 编辑
摘要:Besides sending (or requesting) the actual data to the server API, there’s also often the need to send further metadata that helps the server to corre 阅读全文
posted @ 2018-02-14 20:55 Zhentiw 阅读(232) 评论(0) 推荐(0) 编辑
摘要:When communicating with some backend API, data travels over the network using the HTTP protocol. As such, failures may occur, be it on our own device 阅读全文
posted @ 2018-02-14 20:46 Zhentiw 阅读(339) 评论(0) 推荐(0) 编辑
摘要:Obviously in a real world application we do not only fetch data from the backend, but we also send data to be stored permanently on the server side. T 阅读全文
posted @ 2018-02-14 20:41 Zhentiw 阅读(360) 评论(0) 推荐(0) 编辑
摘要:In this lesson, you’ll install Gatsby and the plugins that give the default starter the ability to transform Markdown into HTML. Install: Create a pro 阅读全文
posted @ 2018-02-13 19:11 Zhentiw 阅读(178) 评论(0) 推荐(0) 编辑
摘要:Generic Fucntion: For example we have a set of data and an function: When we check the 'clones' type, you can see it is 'any[]'. To add more type info 阅读全文
posted @ 2018-02-12 02:34 Zhentiw 阅读(250) 评论(0) 推荐(0) 编辑
摘要:Motion is an important aspect of a complete immersive experience, therefor we are going to look into the animation API Animated. Animated allows us to 阅读全文
posted @ 2018-02-09 04:27 Zhentiw 阅读(164) 评论(0) 推荐(0) 编辑
摘要:React VR isn't limited to simple 3D primitives. By using the <Model/> Component we can place a complex 3D models into our scene. 阅读全文
posted @ 2018-02-08 03:50 Zhentiw 阅读(188) 评论(0) 推荐(0) 编辑
摘要:In order to illuminate a scene containing 3D objects a lighting setup is required. In this lesson we'll walk through the available lighting components 阅读全文
posted @ 2018-02-08 03:01 Zhentiw 阅读(201) 评论(0) 推荐(0) 编辑
摘要:React VR ships with a handful of 3D primitives. We'll importprimitives like <Sphere/>, <Box/>, <Cylinder/>, and <Plane/> and explore how they can posi 阅读全文
posted @ 2018-02-08 02:51 Zhentiw 阅读(192) 评论(0) 推荐(0) 编辑
摘要:Hyperapp is an ultra lightweight (1kb), minimal, functional, JavaScript library for building UIs. It comes with a VDOM engine and state management wit 阅读全文
posted @ 2018-02-07 19:03 Zhentiw 阅读(234) 评论(0) 推荐(0) 编辑
摘要:Hyperapp is an ultra lightweight (1kb), minimal, functional, JavaScript library for building UIs. It comes with a VDOM engine and state management wit 阅读全文
posted @ 2018-02-07 16:56 Zhentiw 阅读(130) 评论(0) 推荐(0) 编辑
摘要:We will learn how to set up a React VR project, run the development mode with hot reloading, and take a small dive into the generated code and make a 阅读全文
posted @ 2018-02-07 02:40 Zhentiw 阅读(214) 评论(0) 推荐(0) 编辑
摘要:We can execute generators from generators, and delegate the iteration control with the yield* keyword. Yo dawg, I heard you like generators, so I put 阅读全文
posted @ 2018-02-06 21:01 Zhentiw 阅读(163) 评论(0) 推荐(0) 编辑
摘要:Flowchart.js is a great tool for creating quick, simple flowcharts in a way that keeps you out of a WYSIWYG, and keeps your productive. No more drawin 阅读全文
posted @ 2018-02-05 22:20 Zhentiw 阅读(611) 评论(0) 推荐(0) 编辑
摘要:In the constructor, we want to set the prop to readonly, you need to do like this: 阅读全文
posted @ 2018-02-05 19:37 Zhentiw 阅读(473) 评论(0) 推荐(0) 编辑
摘要:In this lesson you will create a new project with a virtual environment and write your first unit test with pytest. In doing so, you will learn: insta 阅读全文
posted @ 2018-02-05 19:12 Zhentiw 阅读(342) 评论(0) 推荐(0) 编辑
摘要:React.PureComponent is similar to React.Component. The difference between them is that React.Component doesn’t implement shouldComponentUpdate(), but  阅读全文
posted @ 2018-02-05 03:04 Zhentiw 阅读(184) 评论(0) 推荐(0) 编辑
摘要:@Directive({ // tslint:disable-next-line:directive-selector selector: '[scrollable]' }) 阅读全文
posted @ 2018-02-03 04:48 Zhentiw 阅读(660) 评论(0) 推荐(0) 编辑
摘要:If you're coming from AngularJS (v1.x) you probably remember the ng-true-value and ng-false-value directive which allowed to map custom boolean values 阅读全文
posted @ 2018-02-03 04:44 Zhentiw 阅读(1089) 评论(0) 推荐(0) 编辑
摘要:When you have a checkbox, not necessary that just 'ture' & 'false', you might have 'yes', 'no', '1', '0': There is how to use ng-true-value and ng-fal 阅读全文
posted @ 2018-02-03 04:38 Zhentiw 阅读(1051) 评论(0) 推荐(0) 编辑
摘要:To fix Promise is not recolized in TypeScript, we can choose to use a lib: we can also use built-in libs: Inside "es6" have Promise already, so that w 阅读全文
posted @ 2018-02-03 04:32 Zhentiw 阅读(145) 评论(0) 推荐(0) 编辑
摘要:To using decorate, we can modifiy tsconfig.json: So for example we want to build a '@LogMethod' decorator, which arroding to the system logging level 阅读全文
posted @ 2018-02-02 04:08 Zhentiw 阅读(160) 评论(0) 推荐(0) 编辑
摘要:Since MST offers a runtime type system, it can create and compose types on the fly, making it possible to reuse logic in new and powerful ways. In thi 阅读全文
posted @ 2018-02-01 02:14 Zhentiw 阅读(440) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示