如何在javafx中设计如上所示的表格.我正在使用tableview并做了一些css,但设计不是我想要的.
请任何人都能告诉我如何实现上述设计
这是我试过的CSS
.table-view{
-fx-background-color: transparent;
}
.table-view:focused{
-fx-background-color: transparent;
}
/* Spaltenköpfe
Struktur column-header-background -> column-header */
.table-view .column-header-background{
-fx-background-color: linear-gradient(#131313 0%, #424141 100%);
}
.table-view .column-header-background .label{
-fx-background-color: transparent;
-fx-text-fill: white;
}
.table-view .column-header {
-fx-background-color: transparent;
}
.table-view .table-cell{
-fx-text-fill: white;
}
.table-row-cell{
-fx-background-color: -fx-table-cell-border-color, #616161;
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 0.0em; /* 0 */
}
Run Code Online (Sandbox Code Playgroud)
目前的设计表
在带有身份服务器的Angular应用程序中使用 Facebook 登录身份验证 4. 在注销方法PostLogoutRedirectUri 上,ClientName、LogoutId始终为空。
private async Task<LoggedOutViewModel> BuildLoggedOutViewModelAsync(string logoutId)
{
// get context information (client name, post logout redirect URI and iframe for federated signout)
var logout = await _interaction.GetLogoutContextAsync(logoutId);
var vm = new LoggedOutViewModel
{
AutomaticRedirectAfterSignOut = AccountOptions.AutomaticRedirectAfterSignOut,
PostLogoutRedirectUri = logout?.PostLogoutRedirectUri,
ClientName = string.IsNullOrEmpty(logout?.ClientName) ? logout?.ClientId : logout?.ClientName,
SignOutIframeUrl = logout?.SignOutIFrameUrl,
LogoutId = logoutId
};
if (User?.Identity.IsAuthenticated == true)
{
var idp = User.FindFirst(JwtClaimTypes.IdentityProvider)?.Value;
if (idp != null && idp != IdentityServer4.IdentityServerConstants.LocalIdentityProvider)
{ …Run Code Online (Sandbox Code Playgroud) 我使用了以下形式的 ngbDatepicker
<ngb-panel>
<ng-template ngbPanelTitle>
<div class="row">
<ui-switch (change)="onChange($event,2)" [checked]="professionalLearningEvent.sportsPractive" size="small"></ui-switch>
<label class="accordianTitle" (click)="onAccordianTitleClick(2)">Will your sports practice be
affected ?</label>
</div>
</ng-template>
<ng-template ngbPanelContent>
<div class="container">
<div class="input-group">
<input class="form-control" [formControl]="control" ngbDatepicker [dayTemplate]="getDayTemplate()" #d="ngbDatepicker" [ngClass]="{ 'is-invalid': isFieldInvalid(control) }">
<div class="input-group-append">
<button class="btn btn-sm btn-outline-secondary" (click)="d.toggle()" type="button">
<span class="fa fa-calendar"></span>
</button>
</div>
</div>
</div>
</ng-template>
</ngb-panel>
Run Code Online (Sandbox Code Playgroud)
日期选择器 UI 不会溢出。尝试找到一些解决方案,但无法找到。
css twitter-bootstrap bootstrap-datepicker bootstrap-4 angular
我正在尝试使用 angular 中的正则表达式来验证电话号码
HTML 内容
<div class="form-group row">
<input type="text" class="form-control" appPhoneMask placeholder="Mobile Number" autocomplete="off"
[ngClass]="{ 'is-invalid': (f.inputCountryCode.errors && mobileNumberform.submitted) }"
formControlName="inputCountryCode">
<div *ngIf="(f.inputCountryCode.invalid ) || (f.inputCountryCode.invalid && (f.inputCountryCode.dirty || f.inputCountryCode.touched))"
class="invalid-feedback">
<div *ngIf="f.inputCountryCode.errors.required">This field is required.</div>
<div *ngIf="f.inputCountryCode.errors.pattern">Invalid phone number.</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
TS代码
this.$form = this.$builder.group({
selectCountryCode: [null, Validators.required],
inputCountryCode: [null, [Validators.required, Validators.pattern("[0-9 ]{12}")]]
});
Run Code Online (Sandbox Code Playgroud)
验证模式应该允许带空格的数字,因为我使用的是电话号码屏蔽,它在 3 位数字后添加了空格。
该模式不起作用,不断让电话号码验证为假
屏蔽指令
export class PhoneMaskDirective {
constructor(public ngControl: NgControl) { }
@HostListener('ngModelChange', ['$event'])
onModelChange(event) {
this.onInputChange(event, false); …Run Code Online (Sandbox Code Playgroud) 尝试在 spring boot 2.3.1 中配置 swagger。
摇篮配置
repositories {
mavenCentral()
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
implementation "io.springfox:springfox-boot-starter:3.0.0-SNAPSHOT"
compile('io.springfox:springfox-swagger2:3.0.0-SNAPSHOT')
compile('io.springfox:springfox-swagger-ui:3.0.0-SNAPSHOT')
}
Run Code Online (Sandbox Code Playgroud)
Swagger 配置
@Configuration
@EnableSwagger2
public class ApplicationSwaggerConfig {
@Bean
public Docket employeeApi() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
.apiInfo(getApiInfo());
}
//create api metadata that goes at the top of the generated page
private ApiInfo getApiInfo() {
return new ApiInfoBuilder()
.title("Employee API")
.version("1.0")
.description("API for managing …Run Code Online (Sandbox Code Playgroud) 例如,如何将可选列表对象从一种类型转换为另一种类型
Optional<List<ProductMultipleOptionViewModel>> productOptionType1 // One type
Optional<List<ProductMultipleOption>> productOptionType2 // Other type
Run Code Online (Sandbox Code Playgroud)
ProductMultipleOptionViewModel
类型 1
@Introspected
public record ProductMultipleOptionViewModel(
ProductOptionViewModel productOption,
String optionName) {
}
Run Code Online (Sandbox Code Playgroud)
类型 2
@Introspected
public record ProductMultipleOption(
ProductOptionViewModel productOption,
String optionName) {
}
Run Code Online (Sandbox Code Playgroud)
我想从 转换Optional<List<ProductMultipleOption>>为其他Optional<List<ProductMultipleOptionViewModel>>. 我试过下面的代码
Optional<List<ProductMultipleOptionViewModel>> conveertItem = Optional.ofNullable(product.getProductMultipleOption())
.orElseGet(null)
.stream()
.map(option -> {
return new ProductMultipleOptionViewModel(
ProductOptionViewModel.valueOf(//Access the option value//), //access the option value//
);
})
.collect(Collectors.toList());
Run Code Online (Sandbox Code Playgroud)
使用上面的代码,我无法访问 map 方法中的选项值
如果product.getProductMultipleOption()为 null,则返回 null 或空列表。
我在visual studio 2017模板中更新了角4到角5.
我按照链接http://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017/的说明进行操作
npm install -g npm-check-updates
ncu -u
package.json文件已更新,但是npm没有更新,并且某些npm包没有被修改.
从图像中,右侧包更新为5.5.1,但npm依赖项仍指向旧版本.
怎么能解决这个问题.
我将我的 Angular 版本从 4 更新到 5。下面是截图,我按照链接http://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017的说明进行操作/
package.json 文件
{
"name": "VotingWebsite",
"private": true,
"version": "0.0.0",
"scripts": {
"test": "karma start ClientApp/test/karma.conf.js"
},
"devDependencies": {
"@angular/animations": "5.2.1",
"@angular/common": "5.2.1",
"@angular/compiler": "5.2.1",
"@angular/compiler-cli": "5.2.1",
"@angular/core": "5.2.1",
"@angular/forms": "5.2.1",
"@angular/http": "5.2.1",
"@angular/platform-browser": "5.2.1",
"@angular/platform-browser-dynamic": "5.2.1",
"@angular/platform-server": "5.2.1",
"@angular/router": "5.2.1",
"@ngtools/webpack": "1.9.5",
"@types/chai": "4.1.1",
"@types/jasmine": "2.8.5",
"@types/webpack-env": "1.13.3",
"angular2-router-loader": "0.3.5",
"angular2-template-loader": "0.6.2",
"aspnet-prerendering": "^3.0.1",
"aspnet-webpack": "^2.0.1",
"awesome-typescript-loader": "3.4.1",
"popper.js": "^1.12.5",
"bootstrap": "4.0.0",
"chai": "4.1.2",
"css": "2.2.1",
"css-loader": "0.28.9",
"es6-shim": "0.35.3",
"event-source-polyfill": …Run Code Online (Sandbox Code Playgroud) 我在身份服务器 4 中使用 OIDC 客户端 JS,反应不断收到错误
Client secret validation failed for client, Invalid client secret
关于授权码流程,
Oidc设置
private getClientSettings(): any {
return {
authority: "https://localhost:5001",
client_id: "Local",
redirect_uri: "https://localhost:5001/auth-callback",
post_logout_redirect_uri: "https://localhost:5001",
response_type: "code",
scope: "profile openid email IdentityPortal.API offline_access",
//filterProtocolClaims: environment.openID.filterProtocolClaims,
loadUserInfo: true,
monitorSession: true,
silent_redirect_uri: "https://localhost:5001/silent-reniew.html",
accessTokenExpiringNotificationTime: 20, //default 60
checkSessionInterval: 5000, //default 2000
silentRequestTimeout: 2000,
};
}
Run Code Online (Sandbox Code Playgroud)
身份服务器 4 配置
public static IEnumerable<Client> GetClients()
{
// client credentials client
return new List<Client>
{
new Client
{
ClientId = …Run Code Online (Sandbox Code Playgroud) asp.net reactjs openid-connect identityserver4 oidc-client-js
我在 mac 中使用 asp.net core 2.1 和 Visual Studio Code 或 Rider。我已经在 mac 上安装了 2.1 sdk,同时使用以下命令
dotnet-ef database update --project XXXX.XXXX
Run Code Online (Sandbox Code Playgroud)
我得到一个例外
zsh: command not found: dotnet-ef
Run Code Online (Sandbox Code Playgroud)
使用命令
dotnet tool install --global dotnet-ef
得到一个异常Tool 'dotnet-ef' is already installed.
然后使用这个命令dotnet tool restore
error NU3037: Package 'dotnet-ef 3.1.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature validity period has expired.
Package "dotnet-ef" failed to restore, due to Microsoft.DotNet.ToolPackage.ToolPackageException: The tool package could not be restored.
Run Code Online (Sandbox Code Playgroud) angular ×5
asp.net ×5
asp.net-core ×4
java ×3
angular5 ×2
.net-core ×1
angular7 ×1
angular8 ×1
asp.net-mvc ×1
bootstrap-4 ×1
c# ×1
css ×1
dotnet-cli ×1
java-14 ×1
java-8 ×1
java-stream ×1
javafx ×1
javafx-2 ×1
javafx-8 ×1
javascript ×1
popper.js ×1
reactjs ×1
spring ×1
spring-boot ×1
springfox ×1
swagger ×1