小编Poo*_*nan的帖子

Quartz 2.2和Tomcat 7的简单示例

我想在java动态Web应用程序中使用Quartz 2.2创建一个调度程序.我是这项任务的新手.我尝试了网络上的所有教程.我尝试上下文监听器方法来初始化调度程序.它似乎不起作用.hello world程序仅适用于一般的java应用程序.对于Web应用程序,它看起来很棘手.

pom.xml中:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test.ananth</groupId>
<artifactId>test-app</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>test-app Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
    <dependency>
        <groupId>org.quartz-scheduler</groupId>
        <artifactId>quartz</artifactId>
        <version>2.2.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>servlet-api</artifactId>
        <version>6.0.30</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
    </dependency>

    <dependency>
        <groupId>org.quartz-scheduler</groupId>
        <artifactId>quartz-jobs</artifactId>
        <version>2.2.0</version>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.6</version>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <finalName>test-app</finalName>
</build>
Run Code Online (Sandbox Code Playgroud)

quartz.properties:

#org.quartz.scheduler.instanceName = MyScheduler
org.quartz.threadPool.threadCount = 3
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

# Main Quartz configuration
org.quartz.scheduler.skipUpdateCheck = true
org.quartz.scheduler.instanceName = MyQuartzScheduler
org.quartz.scheduler.jobFactory.class = org.quartz.simpl.SimpleJobFactory
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool …
Run Code Online (Sandbox Code Playgroud)

java quartz-scheduler maven tomcat7

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

获取 'av_interleaved_write_frame(): Broken pipe' 错误

我正在尝试这篇博文。我是 python、numpy 和 FFMPEG 的新手。我无法弄清楚是什么导致了这个问题。

http://zulko.github.io/blog/2013/09/27/read-and-write-video-frames-in-python-using-ffmpeg/

这是代码:

import subprocess as sp
import numpy

print ("Hello World!");
FFMPEG_BIN = "ffmpeg" # on Linux ans Mac OS
#FFMPEG_BIN = "ffmpeg.exe" # on Windows

command = [ FFMPEG_BIN,
            '-i', '/Users/eananthaneshan/Movies/myvideo.mp4',
            '-f', 'image2pipe',
            '-pix_fmt', 'yuv444p',
            '-s', '420x360',
            '-r', '24',
            '-vcodec', 'h264', '-']
pipe = sp.Popen(command, stdout = sp.PIPE, bufsize=-1)

# read 420*360*3 bytes (= 1 frame)
raw_image = pipe.stdout.read(420*360*3)
# transform the byte read into a numpy array
image =  numpy.fromstring(raw_image, dtype='uint8')
image = …
Run Code Online (Sandbox Code Playgroud)

python ffmpeg numpy video-streaming python-2.7

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

无法导入项目'FirebaseUI-Android'

我尝试通过导入项目向导导入,没有用.这个项目正在使用Gradle Kotlin DSL.我使用的是Android Studio 3.1.4.

我试着跑步gradle idea并收到了这条消息

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/user/Projects/firebaseauthui/FirebaseUI-Android/build.gradle.kts' line: 400

* What went wrong:
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Run Code Online (Sandbox Code Playgroud)

导入此项目的推荐方法是什么,因为他们已迁移到Kotlin DSL?

这已在GitHub Repository上报告过.我还有问题导入.

关于使用Android …

android android-studio firebaseui gradle-kotlin-dsl

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