小编Ada*_*rsh的帖子

在 C# MongoDB 2.0 中的多个字段上的项目

当字段以字符串数组的形式给出时,您如何在新的 MongoDB C# 驱动程序中对字段进行投影?我可以找到在单个领域进行投影的方法

collection.find(filter).Project(Builders<Category>.Projection.Include(fieldName)

我如何扩展它以获取一系列字段?。

.net c# mongodb mongodb-csharp-2.0 mongodb-.net-driver

3
推荐指数
1
解决办法
7511
查看次数

如何使用Python中的for循环从0迭代到sys.maxint

我试图从0迭代到sys.maxint但得到'MemoryError'.我该怎么做?

这是简单的代码片段.

for i in range(sys.maxint):
  a = 1
Run Code Online (Sandbox Code Playgroud)

错误:回溯(最近一次调用最后一次):MemoryError中的文件"",第1行

python python-2.7

1
推荐指数
1
解决办法
410
查看次数