我有对象的数组,DataTestplans从中我尝试检索特定的记录DataID,并ProductID使用所示的LINQ查询,我目前的查询有Distinct()哪些用于区分所有5点提到的属性,我该如何找回基于性能不重复的记录DataID,TestPlanName,TCIndexList和ProductID?
DataTestplans: -
[
{
"DataTestPlanID": 0,
"DataID": 19148,
"TestPlanName": "string",
"TCIndexList": "string",
"ProductID": 2033915
},
{
"DataTestPlanID": 0,
"DataID": 19148,
"TestPlanName": "string",
"TCIndexList": "string",
"ProductID": 2033915
},
{
"DataTestPlanID": 0,
"DataID": 19149,
"TestPlanName": "string",
"TCIndexList": "string",
"ProductID": -2642
}
]
Run Code Online (Sandbox Code Playgroud)
LINQ
DataTestPlans_DataID_ProductID = DataTestPlans.Where(c => c.DataID == DataID_ProductID_Record.DataID && c.ProductID == DataID_ProductID_Record.ProductID).Distinct();
Run Code Online (Sandbox Code Playgroud) 我的 swagger UI 显示,它显示了我的所有路线。一切看起来都很棒,除了右下角有一个红色的大错误指示器。当我点击它时,我得到:
{
"schemaValidationMessages":[
{
"level":"error",
"message":"Can't read from file http://devxxxx.com:80/swagger/docs/v1"
}
]
}
Run Code Online (Sandbox Code Playgroud)
我该如何修复这个错误?
我想出于开发目的打开 localhost 之外的角度应用程序,但遇到以下错误,有关于如何修复它的指导吗?
username$ ng serve --open --host=ibaitdev.company.com
getaddrinfo ENOTFOUND ibatdev.company.com
Error: getaddrinfo ENOTFOUND ibatdev.company.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
Run Code Online (Sandbox Code Playgroud)
我改变了我的/etc/hosts如下
#
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 ibaitdev.company.com
255.255.255.255 broadcasthost
::1 ibaitdev.company.com
Run Code Online (Sandbox Code Playgroud) 我正在尝试将字符串列表转换为用引号变量分隔的逗号,我只能将它们以逗号分隔的形式连接,但不能在列表中的每个条目周围加上引号..任何人都可以提供有关如何修复它的指导?
输入:
variants =
[
"CI_ABC1234.LA.0.1-03391-STD.INT-32",
"CI_ABC1234.LA.0.1-33103-STD.INT-32"
]
Run Code Online (Sandbox Code Playgroud)
预期产出:
('CI_ABC1234.LA.0.1-03391-STD.INT-32','CI_ABC1234.LA.0.1-33103-STD.INT-32')
Run Code Online (Sandbox Code Playgroud)
代码:-
string variants_str = String.Join(",", variants);
Run Code Online (Sandbox Code Playgroud) 我按照链接@ https://linuxize.com/post/how-to-install-pip-on-centos-7/#2-install-pip来安装pip,不过它是为系统附带的python 2.6而安装的,我如何为python 2.7安装它?
sudo yum install epel-release
Loaded plugins: security
Setting up Install Process
Package epel-release-6-8.noarch already installed and latest version
Nothing to do
Run Code Online (Sandbox Code Playgroud)
安装点子
sudo yum install python-pip
Loaded plugins: security
Setting up Install Process
Package python-pip-7.1.0-1.el6.noarch already installed and latest version
Nothing to do
Run Code Online (Sandbox Code Playgroud)
点子版
pip --version
pip 7.1.0 from /usr/lib/python2.6/site-packages (python 2.6)
Run Code Online (Sandbox Code Playgroud)
机器配置:
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 6.6
Release: 6.6
Codename: n/a
Run Code Online (Sandbox Code Playgroud)
在/ usr /本地
我需要submitOut从 async Task testWCF2下面的函数返回值吗?任何人都可以提供如何操作的指导吗?
public static async Task testWCF2(string xmlConfig)
{
string submitOut;
using (var client = new System.Net.Http.HttpClient())
{
var url = "http://server:8100/api/SoftwareProductBuild";
var content = new StringContent(xmlConfig, Encoding.UTF8, "application/xml");
var response = await client.PostAsync(url, content);
if (response.IsSuccessStatusCode)
{
var responseBody = await response.Content.ReadAsStringAsync();
submitOut = responseBody;
}
else
{
submitOut = string.Format("Bad Response {0} \n", response.StatusCode.ToString());
submitOut = submitOut + response;
}
}
}
public string QlasrSubmit(List<XMLSiInfo> xmlConfigs)
{
string submitOut = "QLASR: ";
foreach …Run Code Online (Sandbox Code Playgroud) 我试图从两个列表创建一个字典,字典应该将listA的每个元素的一对一映射到同一索引的listB中的相应元素,我有当前输出和预期输出,可以任何人建议如何解决这个问题?
destination_milestones_gerrit_branches ={}
destination_milestones =['m1','m2','m3']
gerrit_branches = ['b1','b2','b3']
for milestone in destination_milestones:
print milestone
for branch in gerrit_branches:
print branch
destination_milestones_gerrit_branches[milestone]= branch
print destination_milestones_gerrit_branches
Run Code Online (Sandbox Code Playgroud)
目前的输出: -
{'m1': 'b3', 'm3': 'b3', 'm2': 'b3'}
Run Code Online (Sandbox Code Playgroud)
预期产量: -
{'m1': 'b1', 'm2': 'b2','m3':'b3'}
Run Code Online (Sandbox Code Playgroud)