发布时grunt shell:test,我收到警告"输入设备不是TTY"并且不想使用-f:
$ grunt shell:test
Running "shell:test" (shell) task
the input device is not a TTY
Warning: Command failed: /bin/sh -c ./run.sh npm test
the input device is not a TTY
Use --force to continue.
Aborted due to warnings.
Run Code Online (Sandbox Code Playgroud)
这是Gruntfile.js命令:
shell: {
test: {
command: './run.sh npm test'
}
Run Code Online (Sandbox Code Playgroud)
这是run.sh:
#!/bin/sh
# should use the latest available image to validate, but not LATEST
if [ -f .env ]; then
RUN_ENV_FILE='--env-file .env'
fi …Run Code Online (Sandbox Code Playgroud) 如何从其IP地址获取pod的名称?无论在何处调用,kubectl+ sed/ awk/ grep/ etc 的神奇咒语kubectl是什么?
应该是一个简单的问题.我正在使用Akka 2.4.2(包含Akka Streams和HTTP).我希望这个Source完成&程序终止,因为它Source是有限的,但它永远不会.为什么这个程序不会终止?
import scala.concurrent._
import scala.collection.immutable._
import akka._
import akka.actor._
import akka.stream._
import akka.stream.scaladsl._
import akka.util._
object Test extends App {
implicit val system = ActorSystem("TestSystem")
implicit val materializer = ActorMaterializer()
val s = Source.single(1)
s.runForeach(println)
}
Run Code Online (Sandbox Code Playgroud)
输出:
$ sbt run
...
[info] Running Test
[DEBUG] [02/23/2016 10:59:19.904] [run-main-0] [EventStream(akka://TestSystem)] logger log1-Logging$DefaultLogger started
[DEBUG] [02/23/2016 10:59:19.904] [run-main-0] [EventStream(akka://TestSystem)] Default Loggers started
1
Run Code Online (Sandbox Code Playgroud)
我build.sbt文件的相关部分:
scalaVersion := "2.11.7"
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8")
libraryDependencies …Run Code Online (Sandbox Code Playgroud) 注意:如果您想查看完整的项目,此问题的公共 git 存储库位于https://github.com/matthewadams/ts-test 。
我正在尝试将项目中的主源编译与测试源编译分开。这是源目录结构:
src
main
...typescript source files and possibly child directories with sources
test
unit
...unit test sources
integration
...integration test sources
Run Code Online (Sandbox Code Playgroud)
我的目标是仅将主要源代码lib/main编译到.lib/test
我试图将主编译和测试编译通用的所有编译器选项放入 中tsconfig.json,然后使用命令行参数来tsc提供特定于每个编译的选项。这是我目前的tsconfig.json:
{
"compilerOptions": {
"strict": true,
"alwaysStrict": true,
"diagnostics": true,
"disableSizeLimit": true,
"esModuleInterop": true,
"extendedDiagnostics": true,
"forceConsistentCasingInFileNames": true,
"inlineSourceMap": true,
"inlineSources": true,
"listEmittedFiles": true,
"listFiles": true,
"module": "commonjs",
"pretty": true,
"target": "es2015"
}
}
Run Code Online (Sandbox Code Playgroud)
该节的一个片段package.json scripts如下(我拒绝 Gulp、Grunt 等,因为其复杂性,故意牺牲了可移植性): …
我想知道com.datastax.cassandra:cassandra-driver-core:2.0.0-beta2是否可以与org.apache.cassandra一起使用:cassandra-all:1.2.1.我正在使用cassandra-maven-plugin:1.2.1-1(使用org.apache.cassandra:cassandra-all:1.2.1),添加
start_native_transport: true
native_transport_port: ${cassandra.nativePort}
Run Code Online (Sandbox Code Playgroud)
到yaml插件属性.我可以成功telnet到端口.
但是,当我尝试通过以下代码连接时,
// Ports.NATIVE has the same value as "${cassandra.nativePort}" above
Cluster cluster = Cluster.builder().addContactPoint("127.0.0.1")
.withPort(Ports.NATIVE).build();
Session session = cluster.connect();
Run Code Online (Sandbox Code Playgroud)
我得到以下异常:
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1 (com.datastax.driver.core.ConnectionException: [/127.0.0.1] Unexpected error during transport initialization (com.datastax.driver.core.TransportException: [/127.0.0.1] Unexpected exception triggered (com.datastax.driver.core.exceptions.DriverInternalError: Server response from unsupported protocol version: 1))))
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:179)
at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:868)
at com.datastax.driver.core.Cluster$Manager.newSession(Cluster.java:888)
at com.datastax.driver.core.Cluster$Manager.access$200(Cluster.java:792)
at com.datastax.driver.core.Cluster.connect(Cluster.java:155)
Run Code Online (Sandbox Code Playgroud)
我认为它的关键在于Server response from unsupported protocol version: 1.
这是否意味着2.0.0-beta2驱动程序不能与Cassandra 1.2.1一起使用?驱动程序/服务器兼容性矩阵在哪里? …
我正在寻找 Mac OS X Accessibility API 来获取当前键盘(而不是鼠标)焦点位置的坐标。根据我在http://www.apple.com/accessibility/pdf/Mac_OS_X_Tiger_vpat.pdf找到的文档的第 2 页,这是可行的:
支持:Mac OS X 通过辅助功能 API 将当前键盘和鼠标焦点的位置公开给辅助技术,并在屏幕上提供焦点的视觉指示。
尽管有上面的声明,我似乎找不到 API 本身。我是一名经验丰富的开发人员(从 1982 年开始编码),但从未在 Mac OS X 上进行过开发;请温柔一点。
我想将Pod部署到我的GKE Kubernetes集群中,该集群使用来自私有第三方Docker注册表(而不是 GCP的私有Docker注册表)的映像。
如何为GKE Kubernetes群集提供该私有存储库的凭据,以便可以在需要时提取图像?
google-cloud-platform kubernetes google-kubernetes-engine docker-registry gcp
我正在使用带有子类工厂模式的 TypeScript 的 mixins/traits,如https://mariusschulz.com/blog/mixin-classes-in-typescript 所述。有问题的特征被称为Identifiable,它将一个id属性赋予一个应该表达Identifiable特征的类。当我尝试以Nameable特定顺序将 trait 与另一个非通用 trait ( ) 一起使用时,编译失败。
class Empty {}
type ctor<T = Empty> = new(...args: any[]) => T;
function Nameable<T extends ctor = ctor<Empty>>(superclass: T = Empty as T) {
return class extends superclass {
public name?: string;
};
}
function Identifiable<ID, T extends ctor = ctor<Empty>>(superclass: T = Empty as T) {
return class extends superclass {
public id?: ID;
};
}
class Person1 …Run Code Online (Sandbox Code Playgroud) kubernetes ×2
typescript ×2
akka-stream ×1
cassandra ×1
docker ×1
focus ×1
gcp ×1
generics ×1
grunt-shell ×1
gruntjs ×1
keyboard ×1
macos ×1
mixins ×1
traits ×1
tsc ×1
tty ×1