我试图用maven 3.3.1替换maven 3.1.1.在将所有路径和M2_HOMe替换为新地址后,我已经在我的Idea IDE中运行了构建并获得了subj消息.
不幸的是,无法获得构建的问题以及为什么它不再使用新的maven
在 Prometheus 中,有时我们需要同时绘制多个指标(例如,具有名称、拟合相同的正则表达式),就像 PromQL 查询一样:
{name=~"camel_proxy.*count"}
Run Code Online (Sandbox Code Playgroud)
它工作正常,相同的标签集线用不同的名称绘制。
当我们想要绘制它们的rate()时,我们面临标题中的错误:
rate({name=~"camel_proxy.*count"}[5m])
Run Code Online (Sandbox Code Playgroud)
因此,这里的方法是使标签集不相同,并将 移动__name__到某个标签,使每个标签集都是唯一的:
rate(label_replace({name=~"camel_proxy.*count"},"name_label","$1","name", "(.+)")[5m])
Run Code Online (Sandbox Code Playgroud)
但我们仍然收到这样的错误
1:90: parse error: ranges only allowed for vector selectors"
Run Code Online (Sandbox Code Playgroud)
如何避免它并正确绘制比率?
我正在使用ffmpeg从图像文件创建mjpeg流并将其写入ffserver的feed:
sudo ffmpeg -loop 1 -i fon.jpeg -vcodec mjpeg -f mjpeg http://localhost:8090/feed1.ffm
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 19 2013 23:10:58 with gcc 4.7 (Debian 4.7.2-5)
configuration:
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Input #0, image2, from 'fon.jpeg': …Run Code Online (Sandbox Code Playgroud) 我收到错误消息
\njava.lang.IllegalArgumentException: Schema must be specified when creating a streaming source DataFrame. If some files already exist in the directory, then depending on the file format you may be able to create a static DataFrame on that directory with 'spark.read.load(directory)' and infer schema from it.\n\n at org.apache.spark.sql.execution.datasources.DataSource.sourceSchema(DataSource.scala:251)\n at org.apache.spark.sql.execution.datasources.DataSource.sourceInfo$lzycompute(DataSource.scala:115)\n at org.apache.spark.sql.execution.datasources.DataSource.sourceInfo(DataSource.scala:115)\n at org.apache.spark.sql.execution.streaming.StreamingRelation$.apply(StreamingRelation.scala:35)\n at org.apache.spark.sql.streaming.DataStreamReader.load(DataStreamReader.scala:232)\n at org.apache.spark.sql.streaming.DataStreamReader.load(DataStreamReader.scala:242)\n at org.apache.spark.sql.streaming.DataStreamReader.csv(DataStreamReader.scala:404)\n at io.sekai.core.streaming.KafkaDataGenerator.readFromCSVFile(KafkaDataGenerator.scala:38)\nRun Code Online (Sandbox Code Playgroud)\n当我加载 csv 文件时
\nspark2\n .readStream\n .format("csv")\n .option("inferSchema", "true")\n .option("header", "true")\n //.schema(schema)\n .option("delimiter", ",")\n .option("maxFilesPerTrigger", 1)\n .csv(path)\n …Run Code Online (Sandbox Code Playgroud) 看一下下面的代码:在二进制运算符中,我们有reduce((x,y)-> x + x)。为什么实际上计算为Optional [512]?我没有解释
System.out.println((Stream.generate(()->1d).limit(10).
peek((doubleValue)->{
System.out.println("Call the first peek: "+doubleValue);
}).
reduce((x,y)->x+x)));
Run Code Online (Sandbox Code Playgroud)
这是输出:为了向您澄清,我在peek部分中显示了各个x为1.0。
Call the first peek: 1.0
Call the first peek: 1.0
Call the first peek: 1.0
Call the first peek: 1.0
Call the first peek: 1.0
Call the first peek: 1.0
Call the first peek: 1.0
Call the first peek: 1.0
Call the first peek: 1.0
Call the first peek: 1.0
Optional[512.0]
Run Code Online (Sandbox Code Playgroud)
那么问题是,在获得Optional [512]之前,什么样的治理才能起作用?
我正在使用thucydides jbehave插件来运行Selenium测试.但是,由于jbehave超时,我总共不能运行超过5分钟的测试.我无法弄清楚如何配置thucydides/jbehave来覆盖这个限制.硒测试使用时间超过5分钟,因此对许多人来说这应该是一个实际问题.
我正在尝试根据http://www.csee.umbc.edu/~pmundur/courses/CMSC691C/lab5-kurose-ross.html示例在Java中实现RTSP协议;我已经成功地通过RTSP请求和RTP流数据包与VLC进行了成功通信;VLC无法很好地识别具有JPEG有效负载的RTP数据包。这就是为什么我认为我发送格式不正确的RTP的原因。我用Wireshark嗅探了它们,并将它们与数据包进行了比较,并从gstreamer RTSP streamer和VLc的成功RTSP通信中嗅到了它们。令我惊讶的是,我的应用程序和VLC的RTSP和RTP请求在wireshark UI中都被标记为简单的TCP和UDP数据包,而gstreamer&VLC的一个被标记为RTSP,RTP,RTCP甚至是RTSP / SDP。
我真的很困惑,我不明白为什么在某些情况下,wireshark将VLC的请求解析为纯RTSP / RTP,而我的情况则解析为纯TCP / UDP数据。至少,即使我的请求,VLC的请求也没有格式错误。
如何强制Wireshark将请求识别为某些特定协议?
我有自己的本地对象流StudentInGroup(请参见下文),我想用3种几乎相同的方式将其放入地图中。由于某些原因,其中两个成功了,而最后一个引发了异常:
Exception in thread "main" java.lang.UnsupportedOperationException
at java.util.AbstractCollection.add(AbstractCollection.java:262)
at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
at containers.streams.StreamsTest3.lambda$main$13(StreamsTest3.java:93)
at java.util.HashMap.merge(HashMap.java:1245)
at java.util.stream.Collectors.lambda$toMap$172(Collectors.java:1320)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at containers.streams.StreamsTest3.main(StreamsTest3.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Run Code Online (Sandbox Code Playgroud)
所以对象是:
import java.util.Optional;
public class StudentInGroup {
private Optional<String> groupNumber;
private String name;
private boolean isGirl;
private int age;
@Override
public String toString() {
return "StudentInGroup{" +
"groupNumber=" + groupNumber +
", name='" …Run Code Online (Sandbox Code Playgroud) 实际上,亚马逊Kindle Fire HD中没有开箱即用的屏幕功能.我喜欢将它安装到/ system/bin /通过adb从命令行调用(仍然通过adb),当我需要截屏时,logcat不足以附加到bug描述.
有一些描述如何使用screencap实用程序用于此目的:http://habrahabr.ru/company/intel/blog/152122/ (请参阅
adb shell screencap /sdcard/screen.png
adb pull /sdcard/screen.png screen.png
adb shell rm /sdcard/screen.png
Run Code Online (Sandbox Code Playgroud)
)
但是,我的设备似乎使用Android 2.3 Gingerbread,因此没有开箱即用的screencap实用程序.那么,问题是1)有没有办法将其他Android版本的screencap推送到/ system/bin/2)我可以在线下载?
其他使用adb shell的方法也是受欢迎的.
如果没有任何Java库可以编码djvu,那么在尝试实现它时可能会出现什么样的潜在困难?
java ×3
java-stream ×2
adb ×1
android ×1
apache-spark ×1
djvu ×1
encoder ×1
ffmpeg ×1
ffserver ×1
grafana ×1
jbehave ×1
maven ×1
prometheus ×1
promql ×1
requirements ×1
rtp ×1
rtsp ×1
scala ×1
selenium ×1
spark-csv ×1
tcp ×1
thucydides ×1
udp ×1
wireshark ×1