无法连接到jcenter地址 https://jcenter.bintray.com/
得到了502错误的网关响应
还有在单击gradle刷新后在我的intellj IDE中
Could not GET 'https://jcenter.bintray.com/com/github/jnr/jffi/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Run Code Online (Sandbox Code Playgroud)
有人知道发生了什么吗?
我想使用其postMessageAPI 将Markdown表发送到Slack ,但是我在Slack中获得了原始内容,而不是呈现的表。Slack是否支持Markdown表?是否有其他方法可以在Slack中显示表格数据?我知道Slack不支持HTML。
我尝试了chat.postMessage和files.upload,还设置了具有固定列长的文本格式,但是看起来有点丑陋,所以我想出一种方法来使它看起来更好。
这是我的HTTP请求代码,内容类型为JSON:
url : https://slack.com/api/chat.postMessage
body :
{
"channel": "RKAID4I",
"text": " | Tables | Are | Cool |
|---------- |:-------------: |------: |
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |"
}
Run Code Online (Sandbox Code Playgroud)
我期望表格像格式,但是实际输出与我发送的完全一样。是因为我的Markdown消息错误还是Slack根本不支持Markdown表?
在下面的代码片段中, StringConverter.fromString 的目的是什么?我认为转换后的对象应该是我选择的对象,并且 ComboBox 应该已经处理了这个问题,那么为什么必须提供转换后的对象呢?
public class Person{
public String firstName;
public Stirng lastName;
}
@FXML ComboBox<Person> peopleComboBox;
public void setComboBox(){
// add people to peopleComboBox in here...
// set object converter
peopleComboBox.setConverter(new StringConverter<Person>() {
@Override
public String toString(Person person) {
return person.firstName;
}
@Override
public Person fromString(String string) {
return peopleComboBox.getSelectionModel().getSelectedItem();
}
});
}
Run Code Online (Sandbox Code Playgroud) 我需要我的 slack bot 来支持用户输入日期和时间,我知道有 DatePicker 可以输入某个日期。但是我也需要时间,我想用一个文本字段来只输入字符串,但是用户每次都要处理格式的东西很烦人。有一个更好的方法吗?还是可以自己制作日期时间选择器?
编辑:用户可以输入任何特定时间,任何小时或分钟。