我在 Jenkins 构建中突然收到此错误,我尝试升级到最新的 Angular 10.1,但即使升级后问题仍未解决。所以我回滚到 Angular 10.0,下面的 package.json 依赖
[09/11/2020 03:26:56.420] - Build:: 编译@angular/platform-browser-dynamic/testing:es2015 为 esm2015 [09/11/2020 03:27:09.120] - Build:: 错误:错误在工人 #5 上:TypeError: dir[ioType].hasBindingPropertyName 不是函数 [09/11/2020 03:27:09.120] - Build:: at Project_folder/node_modules/@angular/compiler/bundles/compiler.umd.js :30061:79 [09/11/2020 03:27:09.120] - Build:: at Array.find () [09/11/2020 03:27:09.120] - Build:: at setAttributeBinding
包.json
"dependencies": {
"@angular-devkit/build-angular": "0.1000.4",
"@angular/animations": "^10.0.7",
"@angular/common": "^10.0.7",
"@angular/compiler": "^10.0.7",
"@angular/core": "^10.0.7",
"@angular/forms": "^10.0.7",
"@angular/platform-browser": "^10.0.7",
"@angular/platform-browser-dynamic": "^10.0.7",
"@angular/router": "^10.0.7",
"@ng-idle/core": "^8.0.0-beta.4",
"@ng-idle/keepalive": "^8.0.0-beta.4",
"@nguniversal/express-engine": "^9.1.1",
"@nguniversal/module-map-ngfactory-loader": "^8.1.1",
"async-exit-hook": "^2.0.1",
"body-parser": "^1.18.3",
"cfenv": "^1.2.2", …Run Code Online (Sandbox Code Playgroud) 我如何找到有多少个 id 的类型 id 超过一个..
Id Name Type_id
1 A 11
1 B 11
1 A 22
1 C 22
2 A 11
2 B 11
3 A 22
3 C 22
4 A 11
4 B 22
Run Code Online (Sandbox Code Playgroud)
我需要一个输出,哪些 id 有多个类型 id,在上面的例子中,Id 1 和 4 有多个类型 id 11,22
输出
Id
1
4
Run Code Online (Sandbox Code Playgroud) 字符串是一个输入,我必须检查它是否是这些格式中的任何一种.如果它是sdf1格式然后传递,如果它在sdf2,3 ....然后我添加缺少格式并用sdf1格式解析它
SimpleDateFormat sdf1 = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a");
SimpleDateFormat sdf2 = new SimpleDateFormat("MM/dd/yyyy hh:mm:ssa");
SimpleDateFormat sdf3 = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
SimpleDateFormat sdf3 = new SimpleDateFormat("MM/dd/yyyy hh:mma");
SimpleDateFormat sdf3 = new SimpleDateFormat("MM/dd/yyyy hh:mm");
SimpleDateFormat sdf3 = new SimpleDateFormat("MM/dd/yyyy");
Run Code Online (Sandbox Code Playgroud)
这就是我所拥有的
try{
// Parse if it is MM/dd/yyyy hh:mm:ss a
cal = Calendar.getInstance();
cal.setTime(sdf1.parse(inStr));
}catch(Exception exp){
try{
cal = Calendar.getInstance();
//Parse if it is MM/dd/yyyy hh:mm:ssa
sdf2.parse(inStr);
inStr = new StringBuilder(inStr).insert(str.length()-2, " ").toString();
cal.setTime(sdf1.parse(inStr));
}catch(Exception dte2){
try{
cal = Calendar.getInstance();
//Parse …Run Code Online (Sandbox Code Playgroud) 我如何从下面的选择调用updateFunc.
ngAfterViewChecked() {
$(".datepicker").datepicker({
changeMonth: true,
changeYear: true,
onSelect: function (selected, evnt) {
this.updateFunc(evnt);
}
});
}
updateFunc(evnt: any) {
alert("hi");
}
Run Code Online (Sandbox Code Playgroud)
这不起作用,我应该使用=>来调用另一个函数,this.function不会工作?