小编Tob*_*Seo的帖子

如何使用 GitHub Issue 中的源代码链接?

我想在问题中引用 GitHub 存储库中文件中的某些行。如何在不手动复制和粘贴的情况下执行此操作?我可以使用源代码链接吗?

为了澄清这一点,这里是我想要引用代码的文件:

mysource.py

1: def func1():
2:    for i in range(10);
3:        print 'hello world'
4: 
5: def func2():
6:     for i in range(10);
7:        print 'hello world'
Run Code Online (Sandbox Code Playgroud)

我想在我的问题中引用文件的第 5 行到第 7 行,如下所示:

5: def func2():
6:     for i in range(10);
7:        print 'hello world'
Run Code Online (Sandbox Code Playgroud)

github

16
推荐指数
4
解决办法
1万
查看次数

我如何排序mongodb最后排序的空值?

我在mongo shell中执行此查询

db.getCollection('list').find({}).sort({next_time: 1})
Run Code Online (Sandbox Code Playgroud)

结果是

next_time
--
null
null
null
2015-02-21 00:00:00
2015-03-25 00:00:00
2015-08-29 00:00:00
Run Code Online (Sandbox Code Playgroud)

我希望得到这样的结果

next_time
--
2015-02-21 01:00:00
2015-03-25 01:00:00
2015-08-29 01:00:00
null
null
null
Run Code Online (Sandbox Code Playgroud)

不同的是'null'是最后在列表中排序的.我怎么能这样做?

mongodb

6
推荐指数
2
解决办法
1845
查看次数

标签 统计

github ×1

mongodb ×1