小编hor*_*rux的帖子

支持自动换行的 Canvas create_text() 版本?

是否有create_text()支持自动换行的模式或技术?我一直在使用create_text()vs. aLabelText小部件,因为我将文本放在画布上的图像顶部。

此外,是否有一个 Tkinter API 可以截断不适合特定宽度的文本,例如后缀之类的省略号,例如。Where very, very, very long text被转换为类似Where very, very, ....

python user-interface word-wrap tkinter-canvas

2
推荐指数
1
解决办法
4829
查看次数

WS-BaseNotification与WS-Eventing

根据网络上的文献,我可以看到有两个与Web服务事件相关的规范:

  1. WS-BaseNotification - 由OASIS于2004年提交
  2. WS-Eventing - 由W3C于2006年提交

对我来说,两者似乎都具有相同的功能.现在行业中最可接受的规格是什么?

soa web-services ws-eventing ws-notification

2
推荐指数
1
解决办法
2270
查看次数

如何在Notepad++中每3行添加一个换行符

我的Notepad++文件是这样的:

1
yyy                          
xxx
2
yyy
xxx
3
yyy
xxx
Run Code Online (Sandbox Code Playgroud)

我希望它是这样的:

1
yyy                          
xxx

2
yyy
xxx

3
yyy
xxx
Run Code Online (Sandbox Code Playgroud)

我如何让它每 3 行添加一个换行符,看起来像这样?谢谢。

notepad++

2
推荐指数
1
解决办法
4760
查看次数

如何创建本地维基数据查询服务?

我正在尝试在 Wikidata 上运行 SPARQL 查询,但它超时了。我想下载转储并将其索引到某个数据库中,以便我可以使用 HTTP 请求运行本地 SPARQL 查询。我还需要支持特定于维基数据的扩展,如SERVICE wikibase:label. 我已经下载了一个 RDF 转储。什么是下一步?

rdf dump sparql wikidata

2
推荐指数
1
解决办法
1818
查看次数

将内容拉入 td 数据标签属性

我使用的是响应式表格样式,该样式将在较小的屏幕尺寸下折叠并在每个单元格之前显示表格标题。

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.25;
}
table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: 100%;
  table-layout: fixed;
}
table caption {
  font-size: 1.5em;
  margin: .5em 0 .75em;
}
table tr {
  background: #f8f8f8;
  border: 1px solid #ddd;
  padding: .35em;
}
table th,
table td {
  padding: .625em;
  text-align: center;
}
table th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;
}
@media screen and (max-width: 600px) {
  table {
    border: 0;
  } …
Run Code Online (Sandbox Code Playgroud)

html javascript css html-table responsive

2
推荐指数
1
解决办法
1万
查看次数

Notepad ++ Help:删除列?

我有一个包含错误列表的.yml文件.这是它的样子:

    explosivearrow:
        spell-class: ".instant.ProjectileSpell"
        name: explosivearrow
        spell-icon: arrow
        description: Cause an explosion where an arrow lands
        cast-item: blaze_rod
        cooldown: 1
        projectile: arrow
        velocity: 0
        require-hit-entity: false
        cancel-damage: true
        remove-projectile: true
        max-distance: 30
        spells: [explode]
        cost:
            - mana 30
        str-cost: 30 mana
        str-cast-self: Shebang! Take that one!
Run Code Online (Sandbox Code Playgroud)

这是它需要的样子:

explosivearrow:
    spell-class: ".instant.ProjectileSpell"
    name: explosivearrow
    spell-icon: arrow
    description: Cause an explosion where an arrow lands
    cast-item: blaze_rod
    cooldown: 1
    projectile: arrow
    velocity: 0
    require-hit-entity: false
    cancel-damage: true
    remove-projectile: true
    max-distance: 30
    spells: [explode] …
Run Code Online (Sandbox Code Playgroud)

notepad++

1
推荐指数
1
解决办法
1万
查看次数

如何在维基数据SPARQL中获取电影成本货币?

我知道如何获得指定电影的费用:

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?item (GROUP_CONCAT( ?_cost; SEPARATOR = "~~~") AS ?budget) 
WHERE {
VALUES ?selectedMovies { wd:Q24515019 wd:Q20762698 }
?item wdt:P31/wdt:P279* wd:Q11424 filter (?item = ?selectedMovies).
OPTIONAL {
?item wdt:P2130 ?_cost.
}
}
GROUP BY ?item
Run Code Online (Sandbox Code Playgroud)

但是当我尝试以成本换取货币时,我什么也没得到:

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?item (GROUP_CONCAT( ?_cost; SEPARATOR = "~~~") AS ?budget) 
(GROUP_CONCAT( ?_currency; SEPARATOR = "~~~") AS ?_currency)
WHERE {
VALUES ?selectedMovies { wd:Q24515019 wd:Q20762698 }
?item wdt:P31/wdt:P279* wd:Q11424 filter (?item = ?selectedMovies).
OPTIONAL {
?item wdt:P2130 ?_cost.
?_cost wdt:P2237 …
Run Code Online (Sandbox Code Playgroud)

sparql wikidata

1
推荐指数
1
解决办法
340
查看次数

Notepad ++:如何删除除url之外的所有内容?

我有一个包含许多URL的文本文档.URls有许多不同的结局,如.net,.com,.de等......所有的URL都没有http:// oder www.在前.文档中还有许多其他文本,它看起来像这样:

2014/05/03  Red V!per       M   R   United States       jsugarcia.com/viper.gif Linux   mirror
2014/05/03  Red V!per       M   R   United States       thepeoplecenter.org/viper.gif   Linux   mirror
2014/05/03  Red V!per           R   Netherlands     ghijbeek.nl/viper.gif   Linux   mirror
2014/05/03  Red V!per       M   R   Netherlands     straalbedrijfsanders.nl/viper.gif   Linux   mirror
2014/05/03  Red V!per           R   European Union      serialnastya.com/viper.gif  Linux   mirror
2014/05/03  Red V!per       M   R   Denmark     thueringer-treppenlifte.de/vip...   Linux   mirror
2014/05/03  Red V!per           R   United States       tapitwater.com/images/viper.gif Linux   mirror
2014/05/03  Red V!per           R   Norway      sekureco.no/viper.gif   Linux   mirror
Run Code Online (Sandbox Code Playgroud)

我想现在在Notepad ++中过滤,这样我只有带有这样的linebrak的URL:

site.com

regex notepad++

0
推荐指数
1
解决办法
742
查看次数

维基数据 SPARQL - 获取公司实体及其总部位置

我在提取公司总部的位置属性时遇到问题。

我的查询:查找所有公司或子类,并返回一些基本属性,例如 ISIN 和 URL 以及总部位置。

我尝试使用此示例来扩展查询的 Headquarter 部分,以返回位置信息,例如城市、国家以及坐标 latitude 和 longitude。然而,我陷入了坚持价值观或标签的困境。

谢谢

SELECT
  ?item ?itemLabel ?web ?isin ?hq ?hqloc ?inception

# valueLabel is only useful for properties with item-datatype
WHERE 
{
  ?item p:P31/ps:P31/wdt:P279* wd:Q783794.

  OPTIONAL{?item wdt:P856 ?web.} # get item
  OPTIONAL{?item wdt:P946 ?isin.} # get item
  OPTIONAL{?item wdt:P571 ?inception.} # get item
  OPTIONAL{?item wdt:P159 ?hq.}  

  OPTIONAL{?item p:P159 ?hqItem. # get property
           ?hqItem ps:P159 wd:Q515. # get property-statement wikidata-entity
           ?hqItem pq:P17 ?hqloc. # get …
Run Code Online (Sandbox Code Playgroud)

sparql wikidata

0
推荐指数
1
解决办法
1483
查看次数