小编rog*_*ack的帖子

使用VLC以最低延迟流式传输RTP桌面

我一直试图弄清楚如何使用VLC流式传输我的桌面(通过LAN)并实现尽可能低的延迟(<100ms).目标是让另一台计算机接收流并可能在流式传输时玩游戏(即在电视旁边的PC上从PC1玩游戏).

我应该使用什么设置?我尝试了多种方法,但还没有成功.

编辑:我也愿意使用VLC以外的东西.

streaming vlc stream rtp rtsp

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

可以列出使用JavaScript加载到网页上的外部资源吗?

我想要一个时间间隔来跟踪当前页面上正在加载的项目.例如,假设我有一个加载css文件的页面,一些脚本,图片,一个flash视频播放器,然后flash视频播放器加载一个视频文件.加载的元素可能来自或可能不是与页面相同的域.其中一些可能通过ajax或flash加载,而页面上没有标记.我想跟踪每个并创建一个存储有关它们的信息的数组.

我想要一个类似于这个伪代码的脚本:

var all_external_resources = array();

setInterval(function() {
  var external_items = list_external_resources();
  for (var i in external_items) {
    if (all_external_resources.indexOf(external_items[i]) < 0)
      all_external_resources.push(external_items[i]);
  }
}, 100);
Run Code Online (Sandbox Code Playgroud)

这可能吗?

javascript

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

如何显示rpm内部内容的文件权限

我想看看在安装rpm之后rpm中的文件将"拥有"的权限.但无需安装rpm.

rpm

7
推荐指数
3
解决办法
4195
查看次数

如何在没有rubygems的情况下启动ruby 1.9

我希望我的应用程序无法使用任何已安装的宝石.是否有ruby 1.9启动参数或以编程方式执行此操作的方法?

ruby ruby-1.9

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

c3p0中的默认连接池大小是多少

在下面的配置中,如果我错过了初始,最大,最小池大小.c3p0中的默认连接池大小是多少?

<bean class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close" id="dataSource">
    <property name="driverClass" value="${dbDriver}"/>
    <property name="jdbcUrl" value="${dbURL}"/>
    <property name="user" value="${dbUsername}"/>
    <property name="password" value="${dbPassword}"/>
    <property name="initialPoolSize" value="5"/>
    <property name="maxPoolSize" value="50"/>
    <property name="minPoolSize" value="5"/>
    <property name="maxIdleTime" value="3000"/>
</bean>
Run Code Online (Sandbox Code Playgroud)

java spring tomcat hibernate java-ee

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

rpm scriptlet使用yum进行安装/删除/升级

我正在研究rpm scriptlets中的一个错误,这可能源于我们在安装/删除/升级软件包期间执行scriptlet的顺序.我们在Redhat Enterprise上使用yum.

显然我首先需要很好地理解rpm scriptlet的顺序 - 有趣的是,我没有在任何地方找到一个很好的总结.

根据我收集的内容,这是用于升级的scriptlet :

  • %pretrans 新包装
  • %pre 新包装 prein
  • 包安装
  • %post 新包装 postin
  • %preun 旧包装
  • 拆除旧包裹
  • %postun 旧包装
  • %posttrans 新包装

但是,它没有列出用于安装以前不在系统上的新软件包的scriptlet排序(即不是升级)和删除一个?从上面的排序中我可以猜出这些排序可能看起来如何,但我也希望得到一些有关这方面的教育意见......

rpm scriptlet

6
推荐指数
2
解决办法
5813
查看次数

如何卸载自制程序?

我今天安装了 homebrew,但并不真正知道自己在做什么,现在我的 scikit-learn 包坏了。我想通过卸载自制程序来撤消所做的一切,并尝试按照此处的提示进行操作: https: //github.com/Homebrew/homebrew/wiki/FAQ

但是,我认为自制程序安装到 /usr/bin/local 中,而不是 /usr/bin/ 中,所以我不确定是否可以使用链接中的说明。

当我最初安装 homebrew ( ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)") 时,我收到以下消息:

==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/lib/pkgconfig
/usr/local/share/man/man3
/usr/local/share/man/man5
/usr/local/share/man/man7
Run Code Online (Sandbox Code Playgroud)

我可以直接删除里面的文件吗

/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
Run Code Online (Sandbox Code Playgroud)

我害怕在卸载过程中搞砸一些东西。顺便说一句,卸载自制程序是否会将我的系统恢复到以前的状态?我该怎么做呢?

homebrew

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

卡桑德拉乐观锁定

我有一个cassandra table1:

CREATE TABLE Policy.table1 (
name VARCHAR ,
date TIMESTAMP ,
version_num INT,
PRIMARY KEY   (
         name
         )) WITH caching = 'all'
     --   and memtable_flush_period_in_ms = 7200 ;
     ;
Run Code Online (Sandbox Code Playgroud)

我需要在tis表上实现乐观锁定.当我们从table1读取一行时,我们记得它的version_num.当我们想要更新这一行时,我们比较当前的version_num值和我们记住的值.我们还需要在每次更新时增加version_num.

问题:

  1. 我们不能把version_num放到where子句中,这会产生错误:错误的请求:在where子句中找到的非PRIMARY KEY version_num:

     update table where name = 'abc' and version = 3
    
    Run Code Online (Sandbox Code Playgroud)
  2. 我们不能将version_num设置为主键的一部分,因为我们需要更新其值

  3. 如果我们索引version_num它将对update语句没有帮助,将抛出相同的异常
  4. 我看到的唯一方法是通过Java获取当前的version_num值,并且如果预期和实际的version_num值相同 - 则执行更新.问题是在这种情况下我们没有检查version_num值的原子操作并更新行.

你看到这个问题的解决方案吗?

cassandra nosql

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

未知操作系统'msys_nt-6.1'.在win7 64bit上使用Mingw

我尝试使用MSYS2和MIngW从源代码编译FFmpeg我使用的是win7 64位.使用.

$ ./configure --enable-shared
Run Code Online (Sandbox Code Playgroud)

我收到这个错误:

Unknown OS 'msys_nt-6.1'.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
Run Code Online (Sandbox Code Playgroud)

查看config.log我看到(日志的结尾):

gcc -std=c99 -Wall -O3 -c -o /tmp/ffconf.fnJeLuIu.o /tmp/ffconf.e8DJYGJM.c
check_code cc  int test[2*(sizeof(void *) > 4) - 1]
check_cc
BEGIN /tmp/ffconf.e8DJYGJM.c …
Run Code Online (Sandbox Code Playgroud)

ffmpeg mingw configure

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

如何使用commons-beanutils对beanutils依赖项进行重复数据删除?

我有一个具有多个依赖项的项目,最终导致依赖于以下各项(我从sbt-dependency-graph plugin中获得了这些依赖项):

  • commons-beanutils:commons-beanutils:1.7.0
  • commons-beanutils:commons-beanutils-core:1.8.0

因此,当我尝试使用sbt-assembly构建胖JAR时,它将失败,并出现以下重复数据删除错误:

[error] deduplicate: different file contents found in the following:
[error] /Users/someuser/.ivy2/cache/commons-beanutils/commons-beanutils/jars/someuser-beanutils-1.7.0.jar:org/apache/commons/beanutils/BasicDynaBean.class
[error] /Users/someuser/.ivy2/cache/commons-beanutils/commons-beanutils-core/jars/commons-beanutils-core-1.8.0.jar:org/apache/commons/beanutils/BasicDynaBean.class
Run Code Online (Sandbox Code Playgroud)

由于我需要两个依赖项,因此我尝试使用以下规则对其中之一进行着色:

ShadeRule.rename("org.apache.commons.beanutils.**" -> "shadedstuff.beanutils.@1").inLibrary("commons-beanutils" % "commons-beanutils" % "1.7.0").inAll
Run Code Online (Sandbox Code Playgroud)

但是然后我得到以下错误:

[error] deduplicate: different file contents found in the following:
[error] /Users/someuser/.ivy2/cache/commons-beanutils/commons-beanutils/jars/someuser-beanutils-1.7.0.jar:shadedstuff/beanutils/BasicDynaBean.class
[error] /Users/someuser/.ivy2/cache/commons-beanutils/commons-beanutils-core/jars/commons-beanutils-core-1.8.0.jar:shadedstuff/beanutils/BasicDynaBean.class
Run Code Online (Sandbox Code Playgroud)

好像对两个工件都应用了阴影处理。如何遮蔽特定的伪影?

dependencies sbt maven-shade-plugin sbt-assembly

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