上一页 1 ··· 197 198 199 200 201 202 203 204 205 ··· 498 下一页
摘要: Thinking about Promise.all, once there is a Promise in the list fails, the whole promise fails. There would be good to have an 'Alernative' operator, 阅读全文
posted @ 2020-06-02 15:13 Zhentiw 阅读(187) 评论(0) 推荐(0)
摘要: Environment variables are a standard way to configure variables in your app based on the current environment (development, test, production). This les 阅读全文
posted @ 2020-06-02 01:05 Zhentiw 阅读(191) 评论(0) 推荐(0)
摘要: def my_decorator(func): def wrapper(): print("Something is happening before the function is called.") func() print("Something is happening after the f 阅读全文
posted @ 2020-05-30 19:25 Zhentiw 阅读(123) 评论(0) 推荐(0)
摘要: The same as Javascript: // Javascript function sayHello(name) { return `Hello ${name}` } //python def say_hello(name): return f"Hello {name}" 阅读全文
posted @ 2020-05-30 19:23 Zhentiw 阅读(123) 评论(0) 推荐(0)
摘要: class Clothing: def __init__(self, color, size, style, price): self.color = color self.size = size self.style = style self.price = price def change_pr 阅读全文
posted @ 2020-05-30 00:53 Zhentiw 阅读(172) 评论(0) 推荐(0)
摘要: Mirage JS lets you mock out production APIs directly alongside your frontend React code. You can tweak the data or force a network request to hang, so 阅读全文
posted @ 2020-05-28 14:55 Zhentiw 阅读(252) 评论(0) 推荐(0)
摘要: Let's say we have following semigroups: // Total: Sum up all the number const Total = (x) => ({ x, concat(o) { return Total(o.x + x); }, fold() { retu 阅读全文
posted @ 2020-05-28 14:42 Zhentiw 阅读(161) 评论(0) 推荐(0)
摘要: It can be difficult to work on multiple projects that use different versions of Node. nvm (Node Version Manger) make this easier by allowing you to do 阅读全文
posted @ 2020-05-28 01:57 Zhentiw 阅读(170) 评论(0) 推荐(0)
摘要: Thinking how to add tow Guessin object together? It is similar idea to Functional programming, Data type. import math import matplotlib.pyplot as plt 阅读全文
posted @ 2020-05-28 01:48 Zhentiw 阅读(303) 评论(0) 推荐(0)
摘要: import math import matplotlib.pyplot as plt class Gaussian(): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. 阅读全文
posted @ 2020-05-28 01:40 Zhentiw 阅读(386) 评论(0) 推荐(0)
上一页 1 ··· 197 198 199 200 201 202 203 204 205 ··· 498 下一页