function getStylePropValInNum (el, prop) {
if (!prop || typeof prop !== 'string' || !el || el.nodeType !== 1) return 0;
var reg = /(\d*)px/, matchResult, result;
matchResult = el.style[prop].match(reg);
if (matchResult && matchResult.length === 2) {
result = +matchResult[1];
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Definition for a binary tree node | |
# class TreeNode: | |
# def __init__(self, x): | |
# self.val = x | |
# self.left = None | |
# self.right = None | |
class Solution: | |
# @param root, a tree node | |
# @return a boolean |
请从「科技」相关领域中选取一个话题,策划一期知乎圆桌(集合约 20 - 30 个问题,20 - 40 篇优质回答的专题内容),目标是: 1.丰富站内相关话题内容,产生优质内容; 2. 传播相关领域优质内容,促进站内相关用户活跃,促进站外对知乎在该领域专业性的认可。
背景说明
- 知乎圆桌有区别于知乎话题,是一个具有时效性的产品,以解决时事热点产生的短期话题为主。
- 当下科技类热点几乎被人工智能和大数据所占据。相比于人工智能,数据相关的话题较少,可以细分到用户感兴趣的点来代入做一期圆桌话题。
目标用户群
- 针对希望利用碎片化时间提升自己的用户,其中,大学生和刚入职场没几年的用户为主力军。这部分人更关注如何提升工作能力和生活质量。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TreeNode { | |
constructor(key, isLeaf = false) { | |
this.key = key; | |
this.isLeaf = isLeaf; | |
this.children = new Map(); | |
} | |
append(node) { | |
let curNode = this.children.get(node.key); | |
if (!this.exist(node.key)) { | |
this.children.set(node.key, node); |