ziheng

Results 25 comments of ziheng

@Yesterday17 B站也是,明明做出了好东西,就藏着不让人用...Orz

@Yesterday17 `marked.js`实际以写在代码块后面**代码块标识**作为`language`的判断依据(如图所示)。 > 图:`Markdown`代码块标识 **这实际上给予了我们扩展`Markdown`功能无限的想象力。** 某昨酱,你可以参考`markdown-plus`这个项目(个人也挺喜欢的一款`Markdown`应用),其便是利用了这一特性对`Markdown`功能作了极大扩展(如图)。 > 图:`LaTeX`数学公式扩展 > 图:`Gantt`时序流程图扩展 这是项目地址: > `markdown-plus`:https://github.com/tylingsoft/markdown-plus > `markdown-plus`在线版:http://mdp.tylingsoft.com/ 至于,如何将这些高级扩展功能应用到B站专栏里,只要我们能实现**转换为图片**,就可以。

@Yesterday17 我这边挺无能为力的...默认开发使用环境没有图形界面,不装图像库。本身也是个命令行程序...渲染不出图片。 `electron`打包了`Node.js`与`Chrome`,整套前端环境都具备了,应该可以做的。

没有必要,miloyip老师的教程针对各种错误情况定制了返回错误码,非常详尽。 你这样实现,需要加入额外的检测代码(`lept_type` 是否为 `LEPT_ERROR`等等),并且**错误信息不详**。 解析报错的思路应该是:一旦解析错误,说明JSON字符串不合法,中断解析,返回错误码。不需要为节点专门设置一个错误类型。 喵自己为了图省事,没有定制那么多错误码,大部分的解析错误都直接返回`LEPT_PARSE_INVALID_VALUE`...

@Yesterday17 嗯,这个可以有,我写了个命令行(CLI)工具,可以根据输入的B站`username & password`,得到用户`cookies`。方便使用。 ![pic](https://user-images.githubusercontent.com/19472493/48669197-21a6a500-eb3a-11e8-856d-89aa096de33e.png)

@syuanyuan708 It's no need to distinguish error types. Driver handles error internally and user does not care about it. When error occurred in a transaction, call `Rollback()` and return. ```go...

Well, `time.Duration` is treated as `int64`. When programmer types `db.Query("SELECT now() + ?", 1*time.Hour)`, the converted SQL statement becomes `SELECT now() + 3600000000000`(int64 nanosecond count). It's programmer's responsibility to know...

Well, SQL expression `datetime + integer` maybe is a kind of **undefined behavior** in my thought. Different SQL engine implemented in different ways. - MySQL concatenate and convert all decimal...

@gkdr Take a look at `appendDateTime` unit test case. Maybe your issue is same as the case. https://github.com/go-sql-driver/mysql/blob/75d09acc46ea1a7074058d31da50293052248047/utils_test.go#L348-L357