小编sdb*_*bbs的帖子

编写Skype插件/插件(2016)?

我想为Skype(桌面客户端)开发一个插件/插件,具有以下要求:

  • 安装插件/插件后,可以在Skype中获取新的菜单选项
  • 选择此选项会显示一个新窗口,其中包含允许设置的文本框,标签和复选框
  • 根据设置,创建一个图形覆盖,并覆盖Skype视频(通过Internet从主机发送给收件人)

最终,视频叠加的效果类似于此处所宣传的内容:http://blogs.skype.com/2015/10/28/add-fun-filters-to-your-skype-video-messages-in -the-最新的Skype的换Android的iphone和-IPAD /

请注意,我不想开发使用Skype的第三方应用程序 - 我想开发一个插件/插件,它将"存活"在Skype应用程序中.

我找到了一些资源,但是我很难看到仍然支持的内容:

那么,是否有一个API可以让我这样做,如果是这样,我在哪里可以找到更多资源来研究它?

如果没有这样的API,是否有可用于开发第三方独立应用程序的API,它将与Skype集成以实现我的任务目标(从GUI自定义视频叠加设置)?

api skype

16
推荐指数
0
解决办法
2513
查看次数

CSS字体大小(响应),相对于设备分辨率?

假设我们有以下内容test.htm:

<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <style type="text/css">
.testdiv, .testdivB, .testdivC {
  width: 50%;
  height: 30%;
  margin: 6px;
  border: 2px solid gray;
  font-size: 4em;
}
.testdivB {
  font-size: 12px;
}
.testdivC {
  font-size: 30pt;
}
  </style>
</head>

<body>

  <div class="testdiv">Test one writing</div>
  <div class="testdivB">Test another writing</div>
  <div class="testdivC">Test three writing</div>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

我已经尝试使用开发人员工具在Chromium中测试它,它允许我模拟不同的设备; 这里:

* Apple iPhone 4        : device resolution  320 x  480 , a/r 0.666667
* Google Nexus 10       : device resolution  800 x 1280 …
Run Code Online (Sandbox Code Playgroud)

html css

12
推荐指数
2
解决办法
7387
查看次数

pandoc markdown to pdf:修复丢失字符警告?

我已经看到使用 Pandoc 和 LaTeX 从 docx 转换为 pdf 时如何修复“缺失字符”警告?- 但不幸的是,那里的建议似乎不适用于这个测试用例:

\n
$ git clone https://github.com/raspberrypi/documentation.git\n$ cd documentation/configuration\n$ pandoc *.md --pdf-engine=xelatex -o result.pdf\n[WARNING] Missing character: There is no \xe2\x94\x8c (U+250C) in font [lmmono10-regular]:!\n[WARNING] Missing character: There is no \xe2\x94\x80 (U+2500) in font [lmmono10-regular]:!\n[WARNING] Missing character: There is no \xe2\x94\x80 (U+2500) in font [lmmono10-regular]:!\n[WARNING] Missing character: There is no \xe2\x94\x80 (U+2500) in font [lmmono10-regular]:!\n[WARNING] Missing character: There is no \xe2\x94\x80 (U+2500) in font [lmmono10-regular]:!\n...\n[WARNING] Missing character: There is no \xe2\x94\x80 …
Run Code Online (Sandbox Code Playgroud)

pdf markdown latex pandoc

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

Perl调试器 - 错误中断(异常)?

考虑这个小的perl程序,test.pl:

#!/usr/bin/env perl
use warnings;
use strict;
use Number::Format qw(:subs); # sudo perl -MCPAN -e 'install Number::Format'

my $tstr = "";
my $numFormatter = new Number::Format();

for (my $ix=0; $ix<20; $ix++) {
  $tstr = $tstr . int(rand(10));
  my $ftstr = $numFormatter->format_number($tstr, 2, 1);
  print "ix: $ix ; in: $tstr ; out: $ftstr\n";
}
Run Code Online (Sandbox Code Playgroud)

如果我运行它,它会失败并出现错误.如果我在Perl调试器中运行它,使用perl -d它也会失败,并显示错误:

$ perl -d test.pl

Loading DB routines from perl5db.pl version 1.39_10
Editor support available.

Enter h or 'h h' for help, …
Run Code Online (Sandbox Code Playgroud)

debugging perl

7
推荐指数
2
解决办法
663
查看次数

在 Pandoc Markdown 中对 html 和 pdf 使用 span (f) 或字体颜色?

我想用 Markdown 编写,然后使用 或<font color="red">red text</font><span style="color: red;">red text</span>为文本着色,这样当在 Gitlab 中签入 .md 文件时,浏览 HTML 格式版本时会自动解析字体颜色 - 但我也想使用相同的.md 文件作为通过 (xe)latex 生成 PDF 的源。

我见过:

...我的选择似乎是:

  • 显式用于<span>HTML,并\textcolor通过 Latex 显式用于 PDF,这迫使我保留同一 Markdown 文档的两个版本
  • 使用 Lua 过滤器,并像这样编写violets are [blue]{color="blue"}- 这绝对不会被 Gitlab 等使用的任何 Markdown-to-HTML 引擎解析

所以,我在想 - 一定有可能,我在我的文件中写入<span><font>(这将/应该被 Gitlab 和此类解析器识别),然后有一个用于 pandoc 的 Lua 过滤器,\textcolor当使用.md 文件作为创建 PDF 的源。

不幸的是,我对 Lua 很烂,并且对 Pandoc 的内部文档模型了解不够,无法轻松猜测如何在 Markdown 文件中获取这些类型的标签。所以我的问题是:是否有一个现有的过滤器或设置pandoc已经可以做到这一点 - …

markdown lua pandoc

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

pip3命令升级所有包,那要小心依赖冲突吗?

到目前为止,我已经使用了(通过如何使用 pip 升级所有 Python 包

pip3 list --format freeze --outdated | cut -d= -f1 | xargs pip3 install --upgrade-strategy eager --upgrade
Run Code Online (Sandbox Code Playgroud)

升级我所有的 Python pip 包。到目前为止,它对我来说效果很好 - 除了一次,当我收到某种冲突消息时,不幸的是我没有保留它的副本;我的猜测是,这与此处提到的类似: https://pip.pypa.io/en/stable/user_guide/#fixing-conflicting-dependencies

Due to conflicting dependencies pip cannot install
package_coffee and package_tea:
- package_coffee depends on package_water<3.0.0,>=2.4.2
- package_tea depends on package_water==2.3.1
Run Code Online (Sandbox Code Playgroud)

无论如何,现在我只是尝试安装voila我的 Jupyter 安装,结果如下:

(notebook) user@server:/home/web/Jupyter$ pip3 install voila
...
Installing collected packages: jupyter-client, voila
  Attempting uninstall: jupyter-client
    Found existing installation: jupyter-client 7.0.3
    Uninstalling jupyter-client-7.0.3:
      Successfully uninstalled jupyter-client-7.0.3 …
Run Code Online (Sandbox Code Playgroud)

python pip

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

样式化 div 使其为两行文本高,宽度基于文本内容适合两行?

考虑这个例子:

CSS

.a1 {
      border-style: solid;
      border-width: 1px;
      font-size: 1em;
      line-height: 1.25em;
      height: 2.5em;
      max-height: 2.5em;
    }
Run Code Online (Sandbox Code Playgroud)
.a1 {
      border-style: solid;
      border-width: 1px;
      font-size: 1em;
      line-height: 1.25em;
      height: 2.5em;
      max-height: 2.5em;
    }
Run Code Online (Sandbox Code Playgroud)

目前,在 Firefox 43 中,调整页面宽度时的行为如下:

ffox-scale.gif

也就是说,文本尝试填充 div 的宽度(由页面宽度设置)。

我想做的是:

  • 将高度固定为两个文本行(或者像我一样,如果行高为 1.25em,字体大小为 1em,则为 2.5em);
  • (假设文本是单行)-固定宽度,使文本适合两行文本,并且第一行的宽度与第二行的宽度大致相同

...也就是说,我希望 div 的格式如下:

ffox-两行-ok

...并且它会保持这样 - 具有固定的宽度/高度 - 在浏览器窗口缩放时。具体来说 - 我不想为 div 设置显式宽度,但 div 宽度应根据文本内容设置:

  • 如果文本内容的宽度小于 200 px(即假设为单行),则 div 宽度为 200 px
  • 如果文本内容的宽度大于 200 px,则假定为两行,因此文本会被分解,因此两行中的内容大致相同,然后取较长行的宽度

这是否可以用纯 CSS 来实现 - 如果不能,是否有人可以建议使用 JS(或 jQuery)+ CSS 的方法?

html javascript css

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

Jupyter Notebook Markdown 和围栏代码块

我正在尝试这个 Markdown 文本:

Hello, this should just be a paragraph, and there should be a test of Markdown fenced code block with backticks below:

```
Hello there
This should be in
a code block
```
Run Code Online (Sandbox Code Playgroud)

...在 Jupyter 笔记本 Markdown 单元中:

jupyter笔记本Markdown单元代码

...这实际上表现得很好:

Jupyter Notebook Markdown 单元格渲染


现在我想做同样的事情,但我想将源文本存储在Python字符串变量中,然后用IPython.display.Markdown()它来转换它;所以我有这个代码:

from IPython.display import display
from IPython.display import Markdown as md, Javascript, HTML

mdstr="""
Hello, this should just be a paragraph, and there should be a test of Markdown fenced code block with backticks:

```
Hello there …
Run Code Online (Sandbox Code Playgroud)

markdown ipython jupyter-notebook

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

什么是 AVR 的 __brkval,它在哪里定义?

freeMemoryhttps://playground.arduino.cc/Code/AvailableMemory看到了这个函数,它似乎使用了一个叫做__brkval. 但是,我根本找不到这个宏或变量的定义位置:

$ grep -ri brkval /c/arduino-1.8.8/ --include='*.c' --include='*.h'
/c/arduino-1.8.8/libraries/Robot_Control/src/Fat16util.h:  extern int* __brkval;
/c/arduino-1.8.8/libraries/Robot_Control/src/Fat16util.h:  if (reinterpret_cast<int>(__brkval) == 0) {
/c/arduino-1.8.8/libraries/Robot_Control/src/Fat16util.h:                  - reinterpret_cast<int>(__brkval);
/c/arduino-1.8.8/libraries/SD/src/utility/SdFatUtil.h:  extern int* __brkval;
/c/arduino-1.8.8/libraries/SD/src/utility/SdFatUtil.h:  if (reinterpret_cast<int>(__brkval) == 0) {
/c/arduino-1.8.8/libraries/SD/src/utility/SdFatUtil.h:                  - reinterpret_cast<int>(__brkval);

$ grep -ri brkval /c/avr-gcc-8.2.0-x64-mingw/ --include='*.c' --include='*.h'
# nothing

$ grep -ri brkval /c/Program\ Files\ \(x86\)/Atmel/Studio/ --include='*.c' --include='*.h'
# nothing

$ grep -ri brkval /c/cvavr/ --include='*.c'
# nothing
Run Code Online (Sandbox Code Playgroud)

也就是说,只有 Arduino IDE 对它有一些引用,但仅作为extern int*参考,它没有定义。

我最接近某种详细解释的是https://github.com/greiman/SdFat/blob/master/src/FreeStack.h

/** …
Run Code Online (Sandbox Code Playgroud)

c avr

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

Pandoc Markdown 到 Latex PDF:具有交替行颜色的表格?

我想要一个表格,在 Markdown 文档的 (xe)latex PDF 输出中pandoc,具有交替的行颜色 - 如此处所述:

https://tex.stackexchange.com/questions/518097/booktabs-but-with-enending-border-around-the-table

...并且xcolor可以选择table添加交替行颜色

所以,我正在尝试这个test.md

---
title: "Testing"
author: Bob Alice
date: July 13, 2010
geometry: margin=2cm
documentclass: extarticle
fontsize: 12pt
header-includes: |
    \usepackage[table]{xcolor}
    \rowcolors{2}{white}{gray!25}
output: pdf_document
---

Here is a test of a table:

+----------+-------------------+-----------------+
| Box name | Another parameter |  The IP address |
+==========+===================+=================+
| Test 1   | random-string-01  |       10.0.0.20 |
| Test 2   | random-string-02  |       10.0.0.30 |
+----------+-------------------+-----------------+
Run Code Online (Sandbox Code Playgroud)

如果我通过 …

pdf markdown latex pandoc

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

标签 统计

markdown ×4

pandoc ×3

css ×2

html ×2

latex ×2

pdf ×2

api ×1

avr ×1

c ×1

debugging ×1

ipython ×1

javascript ×1

jupyter-notebook ×1

lua ×1

perl ×1

pip ×1

python ×1

skype ×1