Thank you @arcange for creating STEEMSQL!
STEEM SQL Tutorial Series:
@nationalpark posted a simple SQL to list the deleted comments (which can be posts as well), however, the SQL output information is quite limited. The STEEMSQL table has the following structure:
In my case, it lists the following 5 comments I deleted (comments permlink start with re-
)
As you probably noticed, the tx_id
acts as a foreign key to Transactions
table:
And, this table stores the basic activities in the steem blockchain e.g. like account update, funds transfer, votes etc all of these are represented as ‘transactions’.
The table Transactions
can further be linked to Blocks
via block_num
key.
So, if we link all these three tables, what data can we get about the deleted-stuffs that people don’t want others to see?
1 | select |
The results show:
Can these hashes (transaction IDs, block numbers) be used to recover the deleted comments/posts in the STEEM blockchain e.g. from the witness servers? I don’t know.. as currently I don’t see such possibility simply using STEEMSQL.
Do you have other better ways? please share yours by commenting below. Innovative (better) solutions will be rewarded with 1 SBD.
感谢 @arcange 创造了 STEEMSQL!
STEEM SQL 系列:
@nationalpark 兄在 这篇帖子 里列出了被删除评论或者文章所存的STEEMSQL 语句。老实说,我很久之前也注意过这个表,但是当时还在纳闷说怎么没有列出我比较关心的,被删除内容的原文。这个 TxDeleteComments
意思就是被删除的评论表,结构如下:
我把我的ID代了进去,发现我曾经删除过5个评论,评论的 permlink
以re-
开始。
我们还注意到,tx_id
就是 Transactions
表的外键。
这个Transactions
表应该存着STEEM 区块链上所有发生的动作,包括转帐、帐户更新、投票等。同时Transactions
这个表可以通过 block_num
这个外键联结到 Blocks
块表。
然后我们很容易的把这三个表串起来
1 | select |
得到的信息是不是有点多?就问你怕不怕。
当然,还是没有得到我们所关心的,是不是根据这些HASH值(tx_id, block_id 等)就能到见证人机器上恢复这些数据(理论上)?请大神指点: @abit @oflyhigh 感谢!
@justyy 是CN 区的点赞机器人,对优质内容进行点赞,只要代理给 @justyy 每天收利息(100 SP 每天0.04 SBD)并且能获得一次相应至少2倍的点赞,可以认为是VP 200%+ ,详细请看:
@justyy 是 https://justyy.com 的博主 - 西半球知名的“土豪”博主。在大哥 @tumutanzi 的带领下加入了 STEEMIT。
This page is synchronized from the post: STEEMSQL 系列之 STEEMIT真的可以恢复删除的文章或评论么? STEEMSQL Tutorial - Can we Really Recover Deleted Comments/Posts on STEEMIT?
昨天我们一家四口驱车前往剑桥,参加了华人迎中秋做月饼活动。
每逢佳节倍思亲,英国没有中秋也没有国庆,英国的秋天已经有点寒意了,每年的中秋,公司发点月饼,也没有过节的氛围。
剑桥大学每年都有很多访问学者,他们在英国可能只是短期的一两年,中秋也没能回家团圆,于是大家组织了一个中秋聚会,聚在一起品月饼,赏字画,还有一些亲子活动,很热闹。
现在有制作月饼的活动,孩子们也可以一起参于。月饼能有这么好看的形状多亏了模具。
月饼里面包肉,但长得不太像月饼。
月饼一个一英镑,很便宜(超市里大概是2-3英镑1个),好吃,但可惜每个家庭限购10个。
一桌好吃的,有口福了。
最后有抽奖活动
我竟然中奖了。奖品可以桌上随便挑一样,我就直接上去拿了一大桶洗衣粉,众人都惊呆了:居家好男人……
祝大家中秋快乐,记得吃月饼哦~
@justyy 是CN 区的点赞机器人,对优质内容进行点赞,只要代理给 @justyy 每天收利息(100 SP 每天0.04 SBD)并且能获得一次相应至少2倍的点赞,可以认为是VP 200%+ ,详细请看:
@justyy 是 https://justyy.com 的博主 - 西半球知名的“土豪”博主。在大哥 @tumutanzi 的带领下加入了 STEEMIT。
This page is synchronized from the post: 剑桥华人迎中秋做月饼活动
今天Python STEEM 库一直不好用,于是只能手工发贴
数据来源: steemsql.com (Thank you @arcange !)
生成时间: 2017-10-01 12:12:26 (UTC)
报告时间: 2017-09-27 12:12:26 (UTC) to 2017-09-28 12:12:26 (UTC)
Image Credit: pixabay.com
| | 作者 Author| 文章 Post|
|———-|:————-:|:——|
| 1 | @magicmonk | What I learned from rock climbing in 2 years 攀岩两年的心得 |
| 2 | @kenchung | B&W Photo Contest - Okinawa Churaumi Aquarium 黑白照片比賽 - 沖繩美麗海水族館 |
| 3 | @victory622 | 来Steemit一个月 – 写封感谢信 – 小鱼们一起踏着前人的脚印继续往上走 |
| 4 | @sunnyjolly | 当我向别人推广steemit时 when I promote steemit to others |
| 5 | @karasui | 养蚕缫丝-苏州第一丝厂之行 |
| 6 | @coldhair | 奇葩的挑蛋法 |
| 7 | @incrediblesnow | “新人委员会” 的构思 |
| 8 | @victorier | 香港遊踪 #4 – 道風山參加婚禮 Hong Kong To Walk #4 – Wedding on Tao Fong Shan |
| 9 | @jubi | #4 GameContest : Find the pleasure in the game/#4 游戏竞赛:挖掘游戏的乐趣 |
| 10 | @icedream | 丢失在人海的小跟班 |
符合条件的文章总数: 12
支持黑名单用于过滤经常发水文的ID。
The following is the list of top 30 daily authors in [CN] in the last 7 days sorted by potential payout. See the SQL for more details.
这是根据这篇的SQL - 经少量修改和调整统计出过去7天作者的潜在收益排行。
| 排名 Rank| 作者 Author| 发贴数 Posts| 点赞数 Votes| 潜在收益 Pending Payout| 平均每贴收益 Average Pending Payout Per Post|
|–:|–:|–:|–:|—:|—:|
| 1| @oflyhigh | 8 | 2309 | 1805.53 |225.69 |
| 2| @deanliu | 6 | 1561 | 1514.25 |252.38 |
| 3| @htliao | 7 | 1354 | 1345.10 |192.16 |
| 4| @tumutanzi | 7 | 1349 | 1331.85 |190.26 |
| 5| @rivalhw | 6 | 886 | 1113.65 |185.61 |
| 6| @linuslee0216 | 6 | 920 | 947.63 |157.94 |
| 7| @guyverckw | 10 | 982 | 935.60 |93.56 |
| 8| @blackbunny | 8 | 980 | 911.16 |113.89 |
| 9| @catwomanteresa | 3 | 750 | 818.58 |272.86 |
| 10| @sweetsssj | 1 | 1581 | 767.62 |767.62 |
| 11| @justyy | 19 | 1518 | 723.71 |38.09 |
| 12| @aaronli | 7 | 871 | 708.29 |101.18 |
| 13| @coldhair | 11 | 1048 | 706.67 |64.24 |
| 14| @stacee | 6 | 682 | 706.42 |117.74 |
| 15| @joythewanderer | 5 | 750 | 623.99 |124.80 |
| 16| @wilkinshui | 8 | 809 | 619.38 |77.42 |
| 17| @jubi | 9 | 714 | 609.27 |67.70 |
| 18| @hannahwu | 10 | 616 | 546.59 |54.66 |
| 19| @ace108 | 33 | 2411 | 540.85 |16.39 |
| 20| @dapeng | 15 | 822 | 538.08 |35.87 |
| 21| @travelgirl | 14 | 912 | 500.20 |35.73 |
| 22| @twinkledrop | 5 | 370 | 497.73 |99.55 |
| 23| @tvb | 11 | 799 | 463.70 |42.15 |
| 24| @livinguktaiwan | 4 | 239 | 443.54 |110.89 |
| 25| @nicolemoker | 3 | 463 | 429.89 |143.30 |
| 26| @michaelleeld | 4 | 111 | 426.01 |106.50 |
| 27| @krischy | 3 | 375 | 384.61 |128.20 |
| 28| @pakyeechan | 5 | 516 | 380.14 |76.03 |
| 29| @goodboyphilip | 7 | 486 | 335.48 |47.93 |
| 30| @ygern | 5 | 271 | 333.21 |66.64 |
以上收益包括75%的作者收益(Author Rewards)和25%的点赞收益(Curation Rewards)。
@dailystats 提供过去7天全网潜在收益前30名的排名
check @dailystats for top 30 daily authors in the last 7 days sorted by potential payout
CN 区优质内容点赞机器人每天会为这30名作者点赞!
CN Good-Content-Body will upvote these authors every day!
这个机器人很善良,只想激励CN社区产生更多的优质内容。当然别忘记了,我本人人工也是会对未上榜的优质作者进行点赞的哟~
The quality-content-upvoting-bot motivates for more good contents in [CN], however, I will also upvote other authors if good content are produced.
时间 Time | 作者 Author | 文章 Post | 权重 Weighting % | VP % |
---|---|---|---|---|
2017-09-30 00:01:05 | @ace108 | @ace108 | 44.76 | 63.94 |
2017-09-30 01:08:47 | @guyverckw | @guyverckw | 53.26 | 59.18 |
2017-09-30 06:22:01 | @hannahwu | @hannahwu | 34.05 | 61.91 |
2017-09-30 06:57:11 | @tumutanzi | @tumutanzi | 40.27 | 61.95 |
2017-09-30 07:19:39 | @linuslee0216 | @linuslee0216 | 55.58 | 61.75 |
2017-09-30 07:18:53 | @linuslee0216 | @linuslee0216 | 55.57 | 61.74 |
2017-09-30 07:17:29 | @linuslee0216 | @linuslee0216 | 55.55 | 61.72 |
2017-09-30 07:28:09 | @tvb | @tvb | 42.45 | 60.65 |
2017-09-30 07:26:57 | @wilkinshui | @wilkinshui | 42.81 | 61.16 |
2017-09-30 07:32:42 | @tvb | @tvb | 42.50 | 60.71 |
2017-09-30 08:34:52 | @htliao | @htliao | 40.02 | 61.57 |
2017-09-30 08:36:23 | @deanliu | @deanliu | 54.98 | 61.09 |
2017-09-30 08:36:14 | @htliao | @htliao | 40.04 | 61.59 |
2017-09-30 08:56:05 | @jubi | @jubi | 51.58 | 60.68 |
2017-09-30 09:20:38 | @coldhair | @coldhair | 51.33 | 60.39 |
2017-09-30 09:19:07 | @coldhair | @coldhair | 51.31 | 60.37 |
2017-09-30 09:20:07 | @coldhair | @coldhair | 51.32 | 60.38 |
2017-09-30 09:49:40 | @blackbunny | @blackbunny | 51.67 | 60.79 |
2017-09-30 10:06:37 | @travelgirl | @travelgirl | 33.56 | 61.03 |
2017-09-30 13:22:24 | @aaronli | @aaronli | 55.85 | 62.06 |
2017-09-30 13:20:20 | @aaronli | @aaronli | 55.83 | 62.03 |
2017-09-30 13:39:53 | @oflyhigh | @oflyhigh | 38.90 | 59.84 |
2017-09-30 14:04:59 | @icedream | @icedream | 29.86 | 59.72 |
2017-09-30 15:09:03 | @stacee | @stacee | 40.83 | 58.32 |
2017-09-30 18:05:19 | @rivalhw | @rivalhw | 54.15 | 60.17 |
2017-09-30 22:09:24 | @joythewanderer | @joythewanderer | 23.50 | 55.96 |
2017-09-30 22:10:22 | @joythewanderer | @joythewanderer | 23.50 | 55.96 |
这个报告的年龄为: 37天。 i.e. 发布的第一天, 发布的第二天
为什么要有这个报告?
欢迎 @justyy 如果您有好的建议或者想看哪些榜单却找不到。
@justyy 是CN 区的点赞机器人,对优质内容进行点赞,只要代理给 @justyy 每天收利息(100 SP 每天0.04 SBD)并且能获得一次相应至少2倍的点赞,可以认为是VP 200%+ ,详细请看:
加入计划最低代理10SP,最高每人5000 SP。
查询谁都参于了也可以用这个在线工具: Steemit 查看谁委派代理给你Steem Power?。
|Delegator| Steem Power| Vests| DateTime|
|–:|–:|–:|–:|
|@eduter|500.3|1029983.12|2017-09-20 02:33:54|
|@sunnyjolly|400.23|823973.51|2017-09-20 09:40:21|
|@mrpointp|400.06|823619.84|2017-09-28 14:09:36|
|@herlife|300.19|618006.65|2017-09-19 14:18:12|
|@zsilence|300.12|617872.78|2017-09-23 16:04:45|
|@mrspointm|300.05|617714.93|2017-09-28 14:07:18|
|@victory622|266.18|547985.69|2017-09-18 21:59:57|
|@coldhair|254.87|524713.00|2017-09-19 15:08:36|
|@luneknight|210.03|432399.70|2017-09-28 14:55:39|
|@berlin1997|200.04|411835.88|2017-09-27 08:55:06|
|@zhijun|100.48|206853.00|2017-09-19 03:18:57|
|@icedream|100.06|205996.82|2017-09-20 02:08:24|
|@yellowbird|100.06|205996.48|2017-09-20 02:52:51|
|@jessicameng|100.06|205993.57|2017-09-20 09:14:24|
|@fr3eze|100.03|205931.08|2017-09-26 03:17:24|
|@karasui|100.03|205926.99|2017-09-26 12:31:09|
|@jiangchen|100.01|205895.44|2017-09-29 11:36:09|
|@drunkevil|100.01|205885.32|2017-09-30 10:23:51|
|@catwomanteresa|100.0|205883.35|2017-09-30 14:50:03|
|@mumingduozi|60.2|123928.00|2017-09-19 00:25:12|
|@towardsthesun|50.03|102993.29|2017-09-21 00:33:18|
|@liumei|50.02|102983.93|2017-09-22 17:35:12|
|@tvb|50.0|102943.21|2017-09-30 07:54:27|
|@syh7758520|30.02|61802.26|2017-09-19 02:37:42|
|@raywang|30.01|61779.27|2017-09-26 03:40:09|
|@kangnajiang|20.01|41201.91|2017-09-18 22:15:21|
|@feng1925|20.01|41198.84|2017-09-20 07:52:30|
|@liangfengyouren|20.01|41192.83|2017-09-23 01:40:00|
|@mangoanddaddy|20.01|41189.47|2017-09-24 14:37:42|
|@speeding|20.0|41182.20|2017-09-28 00:34:57|
|@susanli3769|20.0|41176.13|2017-09-30 20:51:39|
|@jiba|15.64|32203.21|2017-09-19 01:04:06|
|@wangwenjing|10.01|20598.79|2017-09-20 21:35:18|
|@lixing|10.0|20596.48|2017-09-23 00:14:33|
欢迎你发表你的见解和看法,特别有意思的评论我可能会奖励你1 SBD哦。
Interesting Comments will be rewarded with 1 SBD.
This page is synchronized from the post: Daily #CN Updates CN社区每日榜单【低保计划参与者】【优质内容点赞记录】【潜在收益排行榜】【优秀被错过的文章】(2017-10-01)
Thank you @arcange for creating STEEMSQL!
STEEM SQL Tutorial Series:
We have seen many usages of returning some random records from MSSQL using STEEMSQL for example, pick some random posts published today in history (last year, the year before last …), we can write a SQL like this:
1 | SELECT TOP 10 |
Notes:
select *
(NOLOCK)
to avoid database being injected lockGetUTCDate()
function as all dates & times in STEEMSQL are UTC.depth = 0
to limit to posts only while depth > 0
refers to commentsORDER BY NEWID()
chooses random records, but this is slow as it needs to scan entire table and sort by NEWID()
We can also add:
category = "maintag"
to limit to specific categoriesBetter way to return random records:
We can add the following condition and remove the ORDER BY NEWID()
which is inefficient.AND (ABS(CAST( (BINARY_CHECKSUM(ID, NEWID())) as int)) % 100) < 50
The BINARY_CHECKSUM
function is fast and there is no need to scan entire table and do the sorting afterwards.
Of course, there are other ways to return random records, e.g. generate a set of random IDs in the scripting (like Python, PHP) and then pass these IDs in the SQL.
Do you have other better ways? please share yours by commenting below. Innovative (better) solutions will be rewarded with 1 SBD.
感谢 @arcange 创造了 STEEMSQL!
STEEM SQL 系列:
比如你看到这样的 帖子 “随机挑选几个帖子” 或者 “随机挑选几个回复”,你是不是在想,这怎么弄的?其实不难,我们先来看第一个版本:
1 | SELECT TOP 10 |
说明:
select *
(NOLOCK)
能避免数据库正在更新的时候锁定查询。GetUTCDate()
日期时间函数因为在STEEMSQL上所有时间都是UTC。depth = 0
来限制文章,相反使用depth > 0
来查询所有的评论ORDER BY NEWID()
能根据随机ID来排序,所以很慢,因为需要查找所有的记录然后再排序。我们还可以限制类别,比如 "cn" 类目随机挑选……
category = "cn"
效率较高
在WHERE限制语句中加上以下判断:AND (ABS(CAST( (BINARY_CHECKSUM(ID, NEWID())) as int)) % 100) < 50
BINARY_CHECKSUM
函数用于返回一些字段的较验值,速度快,并且不需要查找所有记录也不需要排序就可以了。
当然,还可以在 PYTHON或PHP中先生成一个随机ID的列表,然后把这些列表值传入SQL语句中……
你还有什么好的办法?分享出来,如果是个很好的(创新)办法,那么我们奖励你 1 SBD。
@justyy 是CN 区的点赞机器人,对优质内容进行点赞,只要代理给 @justyy 每天收利息(100 SP 每天0.04 SBD)并且能获得一次相应至少2倍的点赞,可以认为是VP 200%+ ,详细请看:
@justyy 是 https://justyy.com 的博主 - 西半球知名的“土豪”博主。
This page is synchronized from the post: STEEM SQL 系列之 随机返回是怎么实现的?SteemSQL Tutorial: How to Get Random Posts on SteemIt?
搬到 FEN DRAYTON 村已经两年多了, 虽然环境很不错,但是很无聊,就像 @tumutanzi 说的,村里连只母猪都没有。打算趁孩子还小搬到一个大一点的村庄。
于是今年就开始琢磨要换房子,请了四五个中介过来评估房子价值,几乎都说墙最好重新刷一下,要不然不太好卖。墙原来是白色偏点淡黄,两熊孩子管也管不住,整个房子除了天花板是干净的,几乎每面墙都不能幸免。感受一下这画风。
可以自己刷,省下人工费,但是费时费力。术业有钻攻,经朋友推荐了一波兰人, 谈好人工费1500英镑,整栋房子的所有墙。
这波兰人还是挺靠谱的,虽然英语不怎么样,但是和他谈价格就相对爽快,直接说 1500英镑包括 everything。当然货得比三家,通过一剑桥装修微信群让一中国人来评估,虽然要价1250英镑,但后来觉得还是波兰人更可靠一些。
当然还可以通过 mybuilder 网站发广告,然后就是让刷漆工来出价钱让你来选。
一般来说,让人帮你刷漆得提前准备好油漆。油漆可以在B & Q上买,英国的油漆包装上都会写明了有毒程度(VOC)。一般来说选 最低 (Minimal) 或者 低(Low) 的就可以了。快的1-2小时就干了,干了就没有挥发有毒物质,不过还是得注意通风。
B&Q的几大牌子像 Valspar, Dulux 都还是会多多少少挥发一些有毒物质。由于刷油漆的过程中我们还是会住在房子里,所以后来购买了 昂贵的完全无毒的油漆。一共买了9桶(3.8 L)完全无毒的油漆,一共花了540英镑。而大概24 L 的 低毒常用标准油漆对比价格才20多英镑,不过健康无价。
这波兰人大概花了两周时间,每天8点到下午4点,来家里刷油漆,家里原本东西很多、很乱,不过他都很专业的先整理好环境,铺上保护膜。
墙上各种坑坑洼洼全填平了再刷。
为了方便起见,所有墙一律全刷成白的,实事上也证明白色能让房子敞亮,显得大而干净,人的心情也好了很多。
楼梯扶手也刷成白的。
下周请中介过来再次评估一下房子,希望一切顺利。
@justyy 是CN 区的点赞机器人,对优质内容进行点赞,只要代理给 @justyy 每天收利息(100 SP 每天0.04 SBD)并且能获得一次相应至少2倍的点赞,可以认为是VP 200%+ ,详细请看:
@justyy 是 https://justyy.com 的博主 - 西半球知名的“土豪”博主。
This page is synchronized from the post: 墙重新刷成白色,整个房子敞亮了 - 英国请人来家里刷墙的经历
前不久上线的 cn区低保计划 好像还挺受欢迎,直到今天,根据 Steemit 查看谁委派代理给你Steem Power? 这个在线工具查得:一共32人代理给 @justyy SP,一共4338.54 SP (8932377.49 VESTS),感谢。
每天英国UTC时间凌晨获得利息,代理1000个SP,得到0.4 SBD 的利息,大概年回报率是14%。根据 @tumutanzi 在他的大作 里的数据,点赞回报率(Curator Rewards) 大概平均6-7%。
并且,加入低保后,@justyy 会每天保底1篇 点赞,效果大概是你代理 SP 的2倍到3倍间,相当于你100%能量下100%比重点了2次多。这是不消耗你的能量的
当然,比如你有1000个SP,你完全可以代理100个SP加入这个计划。比如 @coldhair 冷发哥有5600个SP(赶紧抱大腿),然后他就代理了250个SP加入计划(仅供参考)。
这个计划欢迎所有人,来去自由:
加入只需要代理至少10 个SP即可。
1 | https://v2.steemconnect.com/sign/delegateVestingShares?delegator=YOUR_STEEM_ID&delegatee=justyy&vesting_shares=10 SP (20后面有个空格) |
退出只需要重新代理一下,输入0 个SP即可。代理立马失效,但是STEEMIT 系统7天后才会把SP退还到你帐号上。
1 | https://v2.steemconnect.com/sign/delegateVestingShares?delegator=YOUR_STEEM_ID&delegatee=justyy&vesting_shares=0 SP (0后面有个空格) |
修改所代理的SP,只需要重新输入想代理的量即可(不是累加),比如当前100 SP,改变主意了输入20 SP,那么成功后,代理20 SP,剩下的80 SP 七天后会回到你的帐号上.
1 | https://v2.steemconnect.com/sign/delegateVestingShares?delegator=YOUR_STEEM_ID&delegatee=justyy&vesting_shares=100 SP (100后面有个空格,更新代理为100 SP) |
这个CN计划目的之一就是鼓励CN区新人,虽然不赢利,但是至少我现在玩得起 - 可以理解成是我个人花钱买吆喝。200%+点1次赞(代理超过40%则可以获取2次甚至3次的赞)还有每日利息也应该是实实在在的好处。
当然,每日排行榜 2017-9-30 在英国时间正午12点左右会准时发表以下:
来吧,理性思考,勇敢的拿你们手头的的SP来砸我吧。
This page is synchronized from the post: CN区低保计划(鼓励新人)真的适合你么?
Update your browser to view this website correctly. Update my browser now
XXX原文: https://justyy.com/archives/3153 This page is synchronized from the post: 13年前我高考439分 document.querySelectorAll('.not-gallery-item') .forEach(e
XXX原文: https://justyy.com/archives/3297 This page is synchronized from the post: 英国工资的税码介绍(史上最全) document.querySelectorAll('.not-gallery-item') .forEa
XXX原文: https://justyy.com/archives/835 This page is synchronized from the post: 主见 document.querySelectorAll('.not-gallery-item') .forEach(el => { if
XXX原文: https://justyy.com/archives/3491 This page is synchronized from the post: 给老婆弄了辆小奔开开 document.querySelectorAll('.not-gallery-item') .forEach(e
Just testing This page is synchronized from the post: To be deleted document.querySelectorAll('.not-gallery-item') .forEach(el => { if (!el.dataset.sr