我试图检查成帧器滚动事件中的deltaY,并且仅在deltaY == 0时才执行函数。 看来framer(用coffeescript编写)没有办法检查这个。是否有另一种说法(在伪代码): if the change of the Y scrolling has been zero for 30 frames, execute function
成帧器滚动事件并且此方法: scrollComp.
我有一个函数来检查数据库中令牌的存在。问题是需要一定的时间才能返回该值,我需要暂停该函数,以便该函数可以实现该令牌已存在并再次运行该查询。 const registerToken = dispatch => {
var tokenExisted = null
do {
let token = generateRandomToken();
fi
有人可以简化这段代码背后的逻辑: 我试图推行它像这样 for others in prefs:
if others!=person:
scores=[similarity(prefs,person, others),others]
但只挑选别人的最后一个元素。 Btw prefs是一个2D字典,分数应该是元组列表。