我正在用 C# 为 VS 项目构建安装程序解决方案。在编译过程中我得到以下信息warnings:
WARNING: 'System.Linq.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Linq\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Linq.dll' is under Windows System File Protection.
WARNING: 'System.Net.Http.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll' is under Windows System File Protection.
WARNING: 'System.Collections.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Collections\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.dll' is under Windows System File Protection.
WARNING: 'System.Runtime.Serialization.Primitives.dll' should be excluded because its source file 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Primitives\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Primitives.dll' is under Windows System File Protection.
WARNING: 'System.Diagnostics.Debug.dll' should be excluded because …Run Code Online (Sandbox Code Playgroud) 我想在Mongo“订单”字段中更新所有文档,因此它们将是1..2..3..4 .... 34。
运行此命令后,它们都具有“ order”:“ 34”。我究竟做错了什么?
var i = 1;
db.images.find().forEach(function() {
db.images.update(
{},
{ "$set": {"order": NumberInt(i)} },
{ multi: true }
);
i++;
})
Run Code Online (Sandbox Code Playgroud) list_a = [['name1', 4.12]]
list_b = [['name2', 2, 'name4', 4, 'name4', 1, 'name4', 6, 'name2', 6]]
def data_sums(matrix):
sums = defaultdict(int)
for name, value in matrix:
sums[name] += value
result = [[k,v] for k,v in sums.items()]
return result
Run Code Online (Sandbox Code Playgroud)
当我传递list_a给data_sums它时,它返回[['name1', 4.12]](对于这个特定的情况,它没有任何总和).
当我传递list_b给data_sums它时,它返回一个错误:
对于名称,矩阵中的值:ValueError:要解压缩的值太多
我试图理解为什么会发生这种情况,但这两个列表的嵌套结构看起来完全相同.
我正在尝试ifc使用IfcOpenShellPython读取文件中对象的最深层次的数量。到目前为止,我有:
import ifcopenshell
path = r'D:\ifcos_1\slab.ifc'
ifc_file = ifcopenshell.open(path)
geometries = ifc_file.by_type("IfcProduct")
for geometry in geometries:
if geometry.is_a("IfcSlab"):
print geometry
test = geometry.IfcPhysicalQuantity()
print test
Run Code Online (Sandbox Code Playgroud)
我研究了定义
无论我尝试为 放置哪种类型的函数test = geometry.X(),我都会收到错误消息:
Run Code Online (Sandbox Code Playgroud)File "C:\Python27\lib\site-packages\ifcopenshell\entity_instance.py", line 48, in __getattr__ "entity instance of type '%s' has no attribute '%s'" % (self.wrapped_data.is_a(), name)) AttributeError: entity instance of type 'IfcSlab' has no attribute 'IfcPhysicalQuantity'
不知道如何解决这个问题,希望得到帮助。
编辑:
获得平板和进一步参考的进一步工作:
for geometry in geometries:
if geometry.is_a("IfcSlab"):
print geometry
definedBy = geometry.IsDefinedBy
print …Run Code Online (Sandbox Code Playgroud) python ×2
c# ×1
compilation ×1
dll ×1
foreach ×1
ifc ×1
items ×1
loops ×1
mongodb ×1
nested-lists ×1