11 2017 档案

摘要:In this lesson you will create a utility function that allows you to quickly compose behavior of multiple functions to create new behavior. By the end 阅读全文
posted @ 2017-11-30 17:50 Zhentiw 阅读(274) 评论(0) 推荐(0) 编辑
摘要:The Object.entries() function is an addition to the ECMAscript scpec in Es2017. This allows us to iterate through the properties of an object and read 阅读全文
posted @ 2017-11-29 22:12 Zhentiw 阅读(165) 评论(0) 推荐(0) 编辑
摘要:The Python Standard Library has a lot of modules! To help you get familiar with what's available, here are a selection of our favourite Python Standar 阅读全文
posted @ 2017-11-28 15:50 Zhentiw 阅读(788) 评论(0) 推荐(0) 编辑
摘要:Python allows you to open a file, do operations on it, and automatically close it afterwards using with. In the example above we open a file, perform 阅读全文
posted @ 2017-11-28 15:35 Zhentiw 阅读(232) 评论(0) 推荐(0) 编辑
摘要:Default arguments are a helpful feature, but there is one situation where they can be surprisingly unhelpful. Using a mutable type (like a list or dic 阅读全文
posted @ 2017-11-27 21:53 Zhentiw 阅读(184) 评论(0) 推荐(0) 编辑
摘要:Python provides another useful built-in type: tuples. Tuples are used to store related pieces of information. Consider this example involving latitude 阅读全文
posted @ 2017-11-27 21:48 Zhentiw 阅读(465) 评论(0) 推荐(0) 编辑
摘要:What a Proxy does is handle communication for an Object. To create a proxy object, we use the Proxy constructor - new Proxy();. The proxy constructor 阅读全文
posted @ 2017-11-26 16:08 Zhentiw 阅读(235) 评论(0) 推荐(0) 编辑
摘要:The iterator protocol is used to define a standard way that an object produces a sequence of values. What that really means is you now have a process 阅读全文
posted @ 2017-11-21 15:20 Zhentiw 阅读(204) 评论(0) 推荐(0) 编辑
摘要:Write a function, remove_duplicates that takes a list as its argument and returns a new list containing the unique elements of the original list. The 阅读全文
posted @ 2017-11-21 14:52 Zhentiw 阅读(347) 评论(0) 推荐(0) 编辑
摘要:Let's introduce a new string method, join: Also note thatjoin will trigger an error if we try to join anything other than strings. For example: 阅读全文
posted @ 2017-11-21 14:45 Zhentiw 阅读(496) 评论(0) 推荐(0) 编辑
摘要:In addition to accessing individual elements from a list we can use Python's slicing notation to access a subsequence of a list. Consider this list of 阅读全文
posted @ 2017-11-21 14:02 Zhentiw 阅读(345) 评论(0) 推荐(0) 编辑
摘要:A symbol is a unique and immutable data type that is often used to identify object properties. To create a symbol, you write Symbol() with an optional 阅读全文
posted @ 2017-11-17 14:38 Zhentiw 阅读(201) 评论(0) 推荐(0) 编辑
摘要:One particularly useful string method is format. The format method is used to construct strings by inserting values into template strings. Consider th 阅读全文
posted @ 2017-11-13 20:13 Zhentiw 阅读(260) 评论(0) 推荐(0) 编辑
摘要:For example we have an object: We shallow copy it: Verify that shallowCopy is not todo: Change text prop of shallowCopy to somethingelse: But if we wa 阅读全文
posted @ 2017-11-13 17:59 Zhentiw 阅读(263) 评论(0) 推荐(0) 编辑
摘要:TypeScript’s discriminated union types (aka tagged union types) allow you to model a finite set of alternative object shapes in the type system. The c 阅读全文
posted @ 2017-11-13 17:48 Zhentiw 阅读(373) 评论(0) 推荐(0) 编辑
摘要:ES6 class with extends and super: How this is written in ES5: We use 'Tree.call(this)' to pass context, 'this' is refer to Maple because of Clourse. T 阅读全文
posted @ 2017-11-11 03:38 Zhentiw 阅读(239) 评论(0) 推荐(0) 编辑
摘要:TypeScript 2.0 introduced the readonly modifier which can be added to a property or index signature declaration. It helps prevent against unintended p 阅读全文
posted @ 2017-11-09 21:06 Zhentiw 阅读(274) 评论(0) 推荐(0) 编辑
摘要:# Python's list comprehensions are awesome. vals = [expression for value in collection if condition] # This is equivalent to: vals = [] for value in collection: if condition:... 阅读全文
posted @ 2017-11-09 19:04 Zhentiw 阅读(175) 评论(0) 推荐(0) 编辑
摘要:This lesson introduces the --strictNullChecks compiler option and explains how non-nullable types differ from nullable types. It also illustrates how 阅读全文
posted @ 2017-11-08 17:45 Zhentiw 阅读(330) 评论(0) 推荐(0) 编辑
摘要:The takeway is to know when we should cache the content? When we should clean the caches? 1. When should cache the content? This should be done in the 阅读全文
posted @ 2017-11-08 04:20 Zhentiw 阅读(211) 评论(0) 推荐(0) 编辑
摘要:In this lesson we will use Animated.spring and TouchableWithoutFeedback to animate the scale of a button in our React Native application. We will use 阅读全文
posted @ 2017-11-06 20:38 Zhentiw 阅读(581) 评论(0) 推荐(0) 编辑
摘要:In Single Page Apps we're used to fetch the data on event callbacks. That disables the capacity to use the URL to share it to someone else and get to 阅读全文
posted @ 2017-11-06 18:01 Zhentiw 阅读(312) 评论(0) 推荐(0) 编辑
摘要:For example, what you want to do is navgiate from current item to next or previous item. In your component, you can dispatch action like this: So here 阅读全文
posted @ 2017-11-03 04:22 Zhentiw 阅读(542) 评论(0) 推荐(0) 编辑
摘要:AuthService: Guard: 阅读全文
posted @ 2017-11-02 04:01 Zhentiw 阅读(747) 评论(0) 推荐(0) 编辑
摘要:import {Injectable} from '@angular/core'; import {Skill} from '../models/skills'; import {AuthService} from '../../auth/services/auth.service'; import 'rxjs/add/operator/do'; import 'rxjs/add/operat... 阅读全文
posted @ 2017-11-02 03:04 Zhentiw 阅读(292) 评论(0) 推荐(0) 编辑
摘要:Also check: directive for form validation User input validation is a core part of creating proper HTML forms. Form validators not only help you to get 阅读全文
posted @ 2017-11-01 19:49 Zhentiw 阅读(249) 评论(0) 推荐(0) 编辑

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