我的文件需要一个名为"加密使用"的额外属性.但是这给出了"IllegalArgumentExeption".我知道它为什么会出现这个错误,"使用加密"并不是一个属性,但有没有办法可以强制它呢?或者将自定义元数据添加到文件中?
Path path = new File("/propertyfiles/encdec.properties").toPath();
try{
Files.setAttribute(path, "encryption used", "testtesttest");
}catch(IOException e){
System.out.println(e.getMessage());
}
try{
System.out.println(Files.getAttribute(path, "encryption used"));
}catch(IOException e){
System.out.println(e.getMessage());
}
Run Code Online (Sandbox Code Playgroud) 它不是以暂存弹出窗口的形式打开,而是以页面底部对齐的方式打开。
我搜索了类似的问题,发现这个angular2 MdDialog没有显示为弹出窗口,但也不起作用。
做了一个干净的页面,也许是我的其他CSS干扰了,但是没有。
<div>
<h4 mat-dialog-title>New consultant</h4>
</div>
<mat-dialog-content>
<div *ngIf="!allFieldsAreFilledIn()" class="alert alert-info">
<strong>{{ getAddFeedback('emptyFields') }}</strong>
</div>
<div ngbDropdown class="d-inline-block">
<button class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>{{ currentNewConsultant.user ? currentNewConsultant.user.lastName + " " + currentNewConsultant.user.firstName : activeUsers[0].lastName
+ " " + activeUsers[0].firstName }}</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button class="dropdown-item" *ngFor="let user of activeUsers" (click)="updateNewConsultantProperty(user, 'user')">{{user.lastName + " " + user.firstName}}</button>
</div>
</div>
<div ngbDropdown class="d-inline-block">
<button class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>{{ currentNewConsultant.unitManager != null ? currentNewConsultant.unitManager.lastName + " " + currentNewConsultant.unitManager.firstName …Run Code Online (Sandbox Code Playgroud) 每隔一段时间,我都会通过某个查询来检索推文。这些推文必须传递给计算和操纵这些推文的服务。因此,这些服务已订阅我的发布者。因此Publisher.hasSubscribers()返回true。但是Submit或offer函数不会调用我的订阅者的onNext。因此,作为“修复”,我循环浏览订户并自己调用它。但是事实并非如此。
这是我的发布者的构造函数。
public TwitterStreamer(Executor executor, int maxBufferCapacity, long period, TimeUnit unit, String searchQuery){
super(executor, maxBufferCapacity);
this.searchQuery = searchQuery;
scheduler = new ScheduledThreadPoolExecutor(1);
this.tweetGetter = scheduler.scheduleAtFixedRate(
() -> {
List<String> tweets = getTweets(searchQuery);
/* this.lastCall = LocalDateTime.now();
for(Flow.Subscriber sub : this.getSubscribers()){
sub.onNext(tweets);
}*/
this.submit(tweets);
if(tweets.size() >= 20) this.close();
}, 0, period, unit);
}
Run Code Online (Sandbox Code Playgroud)
这是我的订户
package myFlowAPI;
import Interfaces.IProcess;
import Services.LogToFileService;
import java.util.List;
import java.util.concurrent.Flow;
import java.util.concurrent.atomic.AtomicInteger;
public class MySubscriber implements Flow.Subscriber<List<String>> {
private Flow.Subscription subscription;
private AtomicInteger count;
private IProcess processor; …Run Code Online (Sandbox Code Playgroud) 我需要一个打印名称的第一个字母的bash脚本.例如:Ruben Van Den Bosshe成为RVDB或Ken Van de Wilde成为KVdW
我想使用sed命令.

我的 Windows 主窗格位于其AnchorPane顶部,其TabPane菜单TabPane是您在图片上看到的选项卡。看到灰色的“背景”,这是一部分TabPane,当我扩展我的窗口,以更大的尺寸,TabPane不与它扩大,它保持相同的大小,所以额外的空间是空的,我会把它想与规模窗户,当然是宽度。