上一页 1 ··· 324 325 326 327 328 329 330 331 332 ··· 492 下一页
摘要: In this lesson we create a new Express web server app for handling file uploads and persisting them to the filesystem. We will walk through using the 阅读全文
posted @ 2017-10-12 23:52 Zhentiw 阅读(346) 评论(0) 推荐(0)
摘要: def myfunc(x, y, z): print(x, y, z) tuple_vec = (1, 0, 1) dict_vec = {'x': 1, 'y': 0, 'z': 1} >>> myfunc(*tuple_vec) 1, 0, 1 >>> myfunc(**dict_vec) 1, 0, 1 阅读全文
posted @ 2017-10-12 18:20 Zhentiw 阅读(259) 评论(0) 推荐(0)
摘要: The way to test router componet needs a little bit setup, first we need to create a "router-stubs.ts". This file is a helper file. The component we wa 阅读全文
posted @ 2017-10-12 15:48 Zhentiw 阅读(941) 评论(0) 推荐(0)
摘要: Both what "TestBed.get" & "injector" trying to do is get service for the test component. But there is some diffenece which determined when use which. 阅读全文
posted @ 2017-10-10 19:21 Zhentiw 阅读(1688) 评论(0) 推荐(0)
摘要: When you testing Component rendering, you often needs to call: For example: You can also set auto change detection: Add to providers: Tests wit auto c 阅读全文
posted @ 2017-10-10 16:51 Zhentiw 阅读(273) 评论(0) 推荐(0)
摘要: When using Ngrx, we need to know how to test the component which has Router injected. Component: One thing we can test just for component wihtout temp 阅读全文
posted @ 2017-10-10 15:54 Zhentiw 阅读(572) 评论(0) 推荐(0)
摘要: More detail check LInk. Render Prop vs HOC: HOC version for withMouse: Problems: Indirection. We still have the same problem with indirection that we 阅读全文
posted @ 2017-10-10 00:27 Zhentiw 阅读(296) 评论(0) 推荐(0)
摘要: class Toggle extends Component { static propTypes = { defaultOn: PropTypes.bool, on: PropTypes.bool, onToggle: PropTypes.func, children: PropTypes.oneOfType([ PropTypes.func, ... 阅读全文
posted @ 2017-10-05 19:46 Zhentiw 阅读(300) 评论(0) 推荐(0)
摘要: # Why Python is Great: Namedtuples # Using namedtuple is way shorter than # defining a class manually: >>> from collections import namedtuple >>> Car = namedtup1e('Car', 'color mileage') # Our new "... 阅读全文
posted @ 2017-10-03 20:59 Zhentiw 阅读(239) 评论(0) 推荐(0)
摘要: Tf-idf, or term frequency-inverse document frequency, is a statistic that indicates how important a word is to the entire document. This lesson will e 阅读全文
posted @ 2017-10-03 20:38 Zhentiw 阅读(408) 评论(0) 推荐(0)
上一页 1 ··· 324 325 326 327 328 329 330 331 332 ··· 492 下一页