/* What’s up internet. We know you’re all over this. Here’s how it works. We have to pull this data from a 3rd party provider, ActBlue. It’s slow. Sowe do it manually. Thus we take our current growth rate and run at that rate every day. It’s been about 1 new person per minute. We then reset manually every 24 hours. It’s a little behind the real number but as accurate as we can get. We’ll report the most hyper accurate number every quarter to the FEC. Thanks for always keeping us honest. #yanggang # SecureTheBag */
【 在 hnpc (爱慕拆腻子🇨🇳🇨🇳🇨🇳) 的大作中提到: 】 : 官方回应 : /* : What’s up internet. We know you’re all over this. Here’s how it works. : We have to pull this data from a 3rd party provider, ActBlue. It’s slow. So : we do it manually. Thus we take our current growth rate and run at that : rate every day. It’s been about 1 new person per minute. We then reset : manually every 24 hours. It’s a little behind the real number but as : accurate as we can get. We’ll report the most hyper accurate number every : quarter to the FEC. Thanks for always keeping us honest. #yanggang # : SecureTheBag : ...................
From a programmer's point of view, it is reasonable given a 3rd party website collects the donations. The 3rd party service "ActBlue" cannot handle too many concurrent requests, which could potentially bring down the service. SoAndrewYang2020 site implements an estimate/simulation based on recent donation rate of 1 per minute. The hard coded base number, in version 1.4.0 of "58500", must be the last almost accurate number pull from ActBlue.
Today's revision getDonors.js # 1.4.0
/* What’s up internet. We know you’re all over this. Here’s how it works. We have to pull this data from a 3rd party provider, ActBlue. It’s slow. Sowe do it manually. Thus we take our current growth rate and run at that rate every day. It’s been about 1 new person per minute. We then reset manually every 24 hours. It’s a little behind the real number but as accurate as we can get. We’ll report the most hyper accurate number every quarter to the FEC. Thanks for always keeping us honest. #yanggang # SecureTheBag */
【 以下文字转载自 USANews 讨论区 】
发信人: bigBalls (), 信区: USANews
标 题: 牛逼大了. Yang's Donor Count
发信站: BBS 未名空间站 (Sun Mar 10 00:50:30 2019, 美东)
simple javascript adding 1 donor per minute.
美国新闻发现大秘密了。大家广为传播吧。
老中真是一个有病的种族,不管对错,搞同胞最积极,文革的时候子女搞父母都有,这不算奇怪了。我们这儿的老中不但想挣你的钱,语言上也要占你便宜。女的外F,男的
自贱,个个自私心眼小,舔了白人还被百大爷歧视,活该。
搞不搞自己人不重要,重要的是对错。美新川粉都已经确认过了,大家要相信川粉的智商。
没事,龙虾党会假装没看见的
对错割鸟,你作为老中先跳出来就说明你就一个垃圾人种,黄川粉就可以把爹娘卖了去舔白种三K党。
【 在 hulooo (hulu) 的大作中提到: 】
: 搞不搞自己人不重要,重要的是对错。美新川粉都已经确认过了,大家要相信川粉的智
: 商。
有点意思,还有37000保底
官方回应
/*
What’s up internet. We know you’re all over this. Here’s how it works. We have to pull this data from a 3rd party provider, ActBlue. It’s slow. Sowe do it manually. Thus we take our current growth rate and run at that
rate every day. It’s been about 1 new person per minute. We then reset
manually every 24 hours. It’s a little behind the real number but as
accurate as we can get. We’ll report the most hyper accurate number every
quarter to the FEC. Thanks for always keeping us honest. #yanggang #
SecureTheBag
*/
Yang的码工水平不行啊
【 在 hnpc (爱慕拆腻子🇨🇳🇨🇳🇨🇳) 的大作中提到: 】
: 官方回应
: /*
: What’s up internet. We know you’re all over this. Here’s how it works.
: We have to pull this data from a 3rd party provider, ActBlue. It’s slow. So
: we do it manually. Thus we take our current growth rate and run at that
: rate every day. It’s been about 1 new person per minute. We then reset
: manually every 24 hours. It’s a little behind the real number but as
: accurate as we can get. We’ll report the most hyper accurate number every
: quarter to the FEC. Thanks for always keeping us honest. #yanggang #
: SecureTheBag
: ...................
川粉可以打个横幅去上街反Yang啊
【 以下文字转载自 USANews 讨论区 】
发信人: jhe123 (jhe), 信区: USANews
标 题: 不分左右,华人整起华人是手下绝不容情啊
发信站: BBS 未名空间站 (Sun Mar 10 12:51:50 2019, 美东)
前段时间是多伦多还是温哥华的华人保守党议员竞选,就因为在微信群里一句只有我是华裔请大家选我,被左边的华人给捅了出去,结果不仅失去参选资格好像还被迫退党。今天是右派华裔抓住按住羊小伎俩中的漏洞就恨不得立刻致人于死地。呵呵,按住羊这点上当然不老实,但是他要么达到不了65000的线,那这些把戏毫无作用。要是最终达
到的话那绝对每个人都是真实的,不然过不了审核,现在在网站的统计数据上玩儿点小把戏,不过是营销手段而已。
华人中真是太多傻逼了。
你这就是爱搞同胞的帖子。你怎么知道是同胞搞得
【在 odddaddy(Odd Daddy)的大作中提到:】
:老中真是一个有病的种族,不管对错,搞同胞最积极,文革的时候子女搞父母都有,这不算奇怪了。我们这儿的老中不但想挣你的钱,语言上也要占你便宜。女的外F,男的
:自贱,个个自私心眼小,舔了白人还被百大爷歧视,活该。
From a programmer's point of view, it is reasonable given a 3rd party
website
collects the donations. The 3rd party service "ActBlue" cannot handle too
many concurrent requests, which could potentially bring down the service. SoAndrewYang2020 site implements an estimate/simulation based on recent
donation rate of 1 per minute. The hard coded base number, in version 1.4.0 of "58500", must be the last almost accurate number pull from ActBlue.
Today's revision getDonors.js # 1.4.0
/*
What’s up internet. We know you’re all over this. Here’s how it works. We have to pull this data from a 3rd party provider, ActBlue. It’s slow. Sowe do it manually. Thus we take our current growth rate and run at that
rate every day. It’s been about 1 new person per minute. We then reset
manually every 24 hours. It’s a little behind the real number but as
accurate as we can get. We’ll report the most hyper accurate number every
quarter to the FEC. Thanks for always keeping us honest. #yanggang #
SecureTheBag
*/
$(document).ready(function() {
const DONOR_GOAL = 65000;
const elements = {};
elements.countHeader = document.body.querySelector('.donor-count-number');
elements.barInner = document.body.querySelector('.donor-progress-bar .
inner');
elements.yangAnimated = document.body.querySelector('.yang-animated');
const setTextAndStyles = (donorCount)=>{
const percentage = `${donorCount / DONOR_GOAL * 100}%`;
const donorCountString = `${donorCount}`.replace(/(\d?\d?\d)(\d{3})/, '$1,$2');
elements.countHeader.innerHTML = donorCountString;
elements.countHeader.style.left = percentage;
elements.barInner.style.width = percentage;
elements.yangAnimated.style.left = percentage;
}
;
const animateValues = ({start, end, durationInMs})=>{
start = start || 0;
const ONE_HUNDRED_PERCENT = 100;
const STEP_PERCENT = 1;
const STEP_COUNT = ONE_HUNDRED_PERCENT / STEP_PERCENT;
const range = end - start;
const stepSize = Math.floor(range / STEP_COUNT);
const stepTime = durationInMs / STEP_COUNT;
const stepTimeString = `${stepTime}ms`;
elements.countHeader.style.transitionDuration = stepTimeString;
elements.barInner.style.transitionDuration = stepTimeString;
elements.yangAnimated.style.transitionDuration = stepTimeString;
let currentPercent = 0;
let current = start;
const timer = setInterval(function() {
current += stepSize;
currentPercent += 1;
setTextAndStyles(current);
if (currentPercent >= ONE_HUNDRED_PERCENT) {
setTextAndStyles(end);
clearInterval(timer);
}
}, stepTime);
}
;
// use backend API that wraps ActBlue / NationBuilder numbers
const URL = '/wp-json/yang-api/v1/donorCount?now=' + Date.now();
const xhr = new XMLHttpRequest();
// use latest number in case URL response still gets cached
const LAST_COUNT = 58500;
const MAX_COUNT = 65000;
const LAST_SYNCED_DAY = (new Date('2019-03-10T00:00:00')).getTime();
const getDonors = function() {
const DONE = 4;
const OK = 200;
const msSinceLastSyncedDay = Date.now() - LAST_SYNCED_DAY;
const minutesSinceLastSyncedDay = Math.floor(msSinceLastSyncedDay / (60 * 1000));
if (xhr.readyState === DONE) {
if (xhr.status === OK) {
const donorCount = Number(xhr.responseText);
const tempCount = donorCount > LAST_COUNT ? donorCount :
LAST_COUNT;
const sum = Math.min(tempCount + minutesSinceLastSyncedDay, MAX_COUNT);
const durationInMs = sum / 10;
animateValues({
end: sum,
durationInMs
});
} else {
animateValues({
end: LAST_COUNT,
durationInMs
});
console.log('Error: ' + xhr.status);
}
}
};
xhr.onreadystatechange = getDonors;
xhr.open('GET', URL);
xhr.send(null);
});
这边中文论坛这么跳出来的不是同胞?到处都有是非不分的黄川粉难道是我的错觉?一看见美华第一个参选就有人熬不住跳出来搞不是有些老中的德性?
【 在 edn (买啥啥猪) 的大作中提到: 】
: 你这就是爱搞同胞的帖子。你怎么知道是同胞搞得
: :老中真是一个有病的种族,不管对错,搞同胞最积极,文革的时候子女搞父母都有,
: 这不算奇怪了。我们这儿的老中不但想挣你的钱,语言上也要占你便宜。女的外F,
男的
: :自贱,个个自私心眼小,舔了白人还被百大爷歧视,活该。
说的没错,老中里就有一些有病的SB,不管左还是右,只要老中参选我都会支持,参政是好事,更别提是第一次,多好提高影响力的机会,有几只老鼠又要来拉屎了。
【 在 jhe123 (jhe) 的大作中提到: 】
: 发信人: jhe123 (jhe), 信区: USANews
: 标 题: 不分左右,华人整起华人是手下绝不容情啊
: 发信站: BBS 未名空间站 (Sun Mar 10 12:51:50 2019, 美东)
: 前段时间是多伦多还是温哥华的华人保守党议员竞选,就因为在微信群里一句只有我是
: 华裔请大家选我,被左边的华人给捅了出去,结果不仅失去参选资格好像还被迫退党。
: 今天是右派华裔抓住按住羊小伎俩中的漏洞就恨不得立刻致人于死地。呵呵,按住羊这
: 点上当然不老实,但是他要么达到不了65000的线,那这些把戏毫无作用。要是最终达
: 到的话那绝对每个人都是真实的,不然过不了审核,现在在网站的统计数据上玩儿点小
: 把戏,不过是营销手段而已。
: 华人中真是太多傻逼了。
我们这边听说老杨要来中文论坛上吵开了锅,有些人真见不得自己人好。
你觉得yang是你的自己人,别人不觉得是啊
【 在 matrixtr (密) 的大作中提到: 】
: 我们这边听说老杨要来中文论坛上吵开了锅,有些人真见不得自己人好。
黄疮怕羊搞死主子疮聚聚,以后就是无主的野狗了。
所以说支持骗子的不是骗子就是傻子啊。
【 在 edn (买啥啥猪) 的大作中提到: 】
: 你这就是爱搞同胞的帖子。你怎么知道是同胞搞得
: :老中真是一个有病的种族,不管对错,搞同胞最积极,文革的时候子女搞父母都有,
: 这不算奇怪了。我们这儿的老中不但想挣你的钱,语言上也要占你便宜。女的外F,
男的
: :自贱,个个自私心眼小,舔了白人还被百大爷歧视,活该。
看到台巴子和大陸人一樣有道德很欣慰
【 在 hulooo (hulu) 的大作中提到: 】
: 发信人: bigBalls (), 信区: USANews
: 标 题: 牛逼大了. Yang's Donor Count
: 发信站: BBS 未名空间站 (Sun Mar 10 00:50:30 2019, 美东)
: simple javascript adding 1 donor per minute.
妈的,还以为都是马工呢。结果没几个真马工。
黄疮都是嘴炮,以裤裆下老王为首。我说过了如果他出来选我一样捐钱,可他只顾着打嘴炮。废物。
正确的处理方式是发邮件给杨,让他悄悄快点儿改了。我已经发他了。看不看得见是他的造化。
估计换其他种族都会这么干。但中国人智商低了点。
这是最傻逼的观点。对错对于不同的人是不一样的。我的总是对的才是在美国的真理。像你这种敌我不分的傻逼到华人论坛里干吗?
【 在 hulooo(hulu) 的大作中提到: 】
: 搞不搞自己人不重要,重要的是对错。美新川粉都已经确认过了,大家要相信川粉的智
: 商。
这段代码是啥意思,谁给解释一下。俺是钱老,看不懂
卧槽,美新川粉的智商。。。
【 在 hulooo (hulu) 的大作中提到: 】
: 搞不搞自己人不重要,重要的是对错。美新川粉都已经确认过了,大家要相信川粉的智
: 商。
不是说当年维族学者编辑了一套维语历史教材,里面全都是维族被汉人迫害的内容,用了二十年中央都不知道。直到一位懂维语的汉族学者发现,上报中央,中央都震惊了。维子们心真齐啊。这点汉人们比不了啊。
【 在 jhe123 (jhe) 的大作中提到: 】
: 发信人: jhe123 (jhe), 信区: USANews
: 标 题: 不分左右,华人整起华人是手下绝不容情啊
: 发信站: BBS 未名空间站 (Sun Mar 10 12:51:50 2019, 美东)
: 前段时间是多伦多还是温哥华的华人保守党议员竞选,就因为在微信群里一句只有我是
: 华裔请大家选我,被左边的华人给捅了出去,结果不仅失去参选资格好像还被迫退党。
: 今天是右派华裔抓住按住羊小伎俩中的漏洞就恨不得立刻致人于死地。呵呵,按住羊这
: 点上当然不老实,但是他要么达到不了65000的线,那这些把戏毫无作用。要是最终达
: 到的话那绝对每个人都是真实的,不然过不了审核,现在在网站的统计数据上玩儿点小
: 把戏,不过是营销手段而已。
: 华人中真是太多傻逼了。
哈哈哈哈。。。
马公严重失误,居然没有minify