我想在VS Team Services中创建一个集成构建,当对除master之外的任何分支(develop/feature xy)进行提交时触发.
我能够为此创建一个触发器:
但是我如何检查触发构建的分支的来源?
在任务选项卡中,第一步是"获取源",这里我只能选择一个分支(这里不能使用*通配符):
否则,例如,构建由特征分支触发,但源是从开发分支获取的.我怎样才能做到这一点?
continuous-integration azure-devops azure-pipelines-build-task azure-pipelines
我有一个外部托管的iis网络服务器,我运行我的网站.我想在本网站上添加一个自签名证书,并在我的本地客户端上信任它,从浏览器中删除"不安全连接".
到目前为止我所做的是以下内容
当我尝试在firefox中打开网站时(使用https:// ABCD01),我仍然得到"你的连接不安全".我错过了什么?
我有一个覆盖整个屏幕的网格,我用故事板将其翻译到屏幕的顶部(或者向后).现在我想做同样但距离顶部48px的距离.要做到这一点,我计算在顶部位置SlideToPosition有SlideToPosition = -GridContent.ActualHeight + 48;.当屏幕尺寸是静态时,这是可以的.
问题是有很多情况,我必须重新计算这个位置:
- 应用调整大小
- 方向变化
- 移动屏幕菜单可见
调整大小时有时会出现紧张情绪,有时候也会出错.我也尝试使用
ApplicationView.GetForCurrentView().VisibleBounds.Top,但这与不同的变量是一样的.有没有更好的方法来转换到这个位置,而无需一直重新计算变量?
<Grid Name="GridContent">
<Grid Name="GridTranslate">
<Grid.RenderTransform>
<TranslateTransform x:Name="TranslateTransformContent" />
</Grid.RenderTransform>
</Grid>
</Grid>
<Storyboard x:Name="StoryboardUp">
<DoubleAnimation Storyboard.TargetName="TranslateTransformContent" Storyboard.TargetProperty="Y" To="{x:Bind Path=SlideToPosition, Mode=OneWay}" Duration="0:0:0.4">
</Storyboard>
<Storyboard x:Name="StoryboardDown">
<DoubleAnimation Storyboard.TargetName="TranslateTransformContent" Storyboard.TargetProperty="Y" To="0" Duration="0:0:0.4">
</Storyboard>
Run Code Online (Sandbox Code Playgroud) 目前,我可以动态加载单个组件并将其显示在 ViewChild 中,如下所示:
@Component({
selector: '...',
template: '<ng-container #viewRef></ng-container>'
})
export class SomeComponent {
@ViewChild('viewRef', {read: ViewContainerRef}) public viewRef;
constructor(private compiler: Compiler) {}
ngAfterViewInit() {
this.compiler.compileModuleAndAllComponentsAsync(SomeModule).then((factory) => {
this.componentRef = this.placeholder.createComponent(factory);
});
}
}
Run Code Online (Sandbox Code Playgroud)
现在我想加载多个组件并在列表中动态显示它们。ViewChildren应该是解决这个问题的方法。问题是,ViewChildren不允许添加新元素或创建类似于createComponentonViewChild元素。
如何创建动态组件并将它们添加到ViewChildren?
我尝试ngx-datatable在我的 angular 4 项目中使用 system.js 来加载模块,但它会引发如下错误:
无法绑定到“行”,因为它不是 ngx-datatable 的已知属性。
无法绑定到“列”,因为它不是 ngx-datatable 的已知属性。
ngx-datatable 不是已知元素:
我猜 system.js 没有正确加载模块,但我找不到有关如何执行此操作的有效演示。该文档也没有帮助。
system.config.js:
map: {
...
'@swimlane/ngx-datatable': 'npm:@swimlane/ngx-datatable/release/index.js',
...
}
Run Code Online (Sandbox Code Playgroud)
app.module.ts:
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
...
imports: [
...
NgxDatatableModule,
...
],
Run Code Online (Sandbox Code Playgroud)
组件.html:
<ngx-datatable
[rows]="rows"
[columns]="columns">
</ngx-datatable>
Run Code Online (Sandbox Code Playgroud)
组件.ts:
rows = [
{ name: 'Austin', gender: 'Male', company: 'Swimlane' },
{ name: 'Dany', gender: 'Male', company: 'KFC' },
{ name: 'Molly', gender: 'Female', company: 'Burger King' },
];
columns = …Run Code Online (Sandbox Code Playgroud) 我已经使用 CLI 创建并捆绑了一个 Angular (7.2.0) 库:
ng g 图书馆 MyLibrary
ng 建立我的图书馆
这给了我my-libary.umd.js我需要的包。
目前,所有依赖项都作为 peerDependencies 添加到库 package.json 中。我想要做的是实际将一些依赖项与库 (.umd) 捆绑在一起。将它们添加为 " dependencies" 而不是 " peerDependencies" 似乎不起作用,我真的不明白有什么区别?
我怎样才能做到这一点?
应捆绑 ngx-spinner 的 package.json 示例
{
"name": "demo-plugin",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^7.1.0",
"@angular/core": "^7.1.0"
},
"dependecies": {
"ngx-spinner": "^7.1.4"
},
"bundledDependencies": [
"ngx-spinner"
]
}
Run Code Online (Sandbox Code Playgroud) 有人可以解释这两个属性究竟是做什么的吗?
IsHorizontalScrollChainingEnabled
IsHorizontalRailEnabled
Docs:True表示从子级到父级的水平滚动链接; 否则,错误.
HorizontalScrollBarVisibility(Visible/Collapsed)和HorizontalScrollMode(Enabled/Disabled)对我有意义,但在什么情况下我应该使用IsHorizontalRailEnabled?
Docs:True表示启用水平滚动轨道; 否则,错误.默认值为true.
我正在使用 .netCore 和实体框架从 SQL 数据库获取一些数据。
我已经设置了一个DbContext
public partial class DashboardContext : DbContext
{
public NotfallDashboardContext(DbContextOptions<NotfallDashboardContext> options) : base(options) {}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<DashboardData>(entity =>
{
...
}
}
public virtual DbSet<DashboardData> DashboardData { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
并使用以下设置将其注入我的控制器
services.AddDbContext<DashboardContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DashboardDatabase")));
Run Code Online (Sandbox Code Playgroud)
现在,该类DashboardData使用TableAttirbute 连接到正确的表和架构。
[Table("TableName", Schema = "dbo")]
public partial class DashboardData
{
...
}
Run Code Online (Sandbox Code Playgroud)
我想做的是将这两个字符串“TableName”和“dbo”提取到我的 appsettings.json 配置中。我已经将配置添加到 appsettings,创建了 TableConfiguration 类并设置依赖项注入:
表配置.cs
public class TableConfiguration
{
public string DatabaseView { get; set; } …Run Code Online (Sandbox Code Playgroud) angular ×3
c# ×2
uwp ×2
xaml ×2
asp.net-core ×1
azure-devops ×1
certificate ×1
datatable ×1
iis ×1
iis-8 ×1
javascript ×1
systemjs ×1
wpf ×1