是否有可能在另一个heredoc中写一个heredoc?
ssh -T -q yxz@server1 <<-"END_TEXT"
.
.
ssh -T -q abc@server2 <<-"SUB_TEXT"
.
.
SUB_TEXT
.
.
END_TEXT
Run Code Online (Sandbox Code Playgroud) 我在Javascript注意到的一件事 -
a << -1
Returns 0 when a = even.
Returns -2147483648 when a = odd.
Run Code Online (Sandbox Code Playgroud)
同样,当-1更改为某个其他-ve数字时,将返回不同的值.有人可以解释引擎盖下正在进行的操作吗?或者行为未定义?
谢谢
编辑
也不应该零填充右移即-2 >>> 1返回7?
-2 = 1110.之后,使用零填充右移,应该给出0111 = 7
但是
a = -2; console.log(a >>> 1);
回归
2147483647
石英调度程序的新手.我想要实现的是在将来触发一个触发器,然后关闭调度程序.我正在使用scheduler.shutdown(true)它,但它在执行作业之前关闭.我必须调用shutdown(),因为我要在Web应用程序中实现调度程序.
那么如何在作业执行后关闭调度程序?
工作:
public class HelloJob implements Job {
public HelloJob(){
}
public void execute(JobExecutionContext context)
throws JobExecutionException {
System.out.println("Hello Quartz on " + new Date());
}
}
Run Code Online (Sandbox Code Playgroud)
调度:
public class QuartzTest {
public void scheduleLoad(String time) {
try {
// Transform user input into a date
SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy:HH:mm:ss");
Date scheduleDate = dateFormat.parse(time);
// Print Current vs. Scheduled time/date
System.out.println("Current time - " + new Date());
System.out.println("Scheduled time - " + scheduleDate);
// Grab the …Run Code Online (Sandbox Code Playgroud) 这可能是一个愚蠢的问题,因为我还没有完全理解Cognos BI的工作原理.另外,我尝试在Stack Exchange上发布此内容,但是徒劳(使用put标签时出错).
我的问题是 - Apache Hadoop可用于使Cognos BI更快地运行吗?或者Cognos做的是Hadoop做的事情(MapReduce功能)?
我开始工作的地方使用Sybase IQ(内容存储库)之上的Cognos BI套件.Apache Tomcat是Web服务器.有时会发生的事情是,如果数据集很大,Cognos会花费大量时间(几乎死掉)来生成报告.
那么,Apache Hadoop可以通过适应Cognos和Sybase之间的某种方式来帮助Cognos更好地运行吗?或者报告优化是这种情况下唯一的出路?
多谢你们.
当我cal | tail -6在我的unix机器上尝试" "时,我得到了 -
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
Run Code Online (Sandbox Code Playgroud)
但当我尝试" cal | tail -6 | awk '{print $7}'"时,我得到 -
10
17
24
Run Code Online (Sandbox Code Playgroud)
3在哪里?我的要求基本上都是工作日,即2,3,4,5和6列.但由于" cal" 的奇怪行为,我的输出错误
我试图从java执行以下命令(在unix框中正确运行) -
kill -9 `ps -ef | grep -i myScript.sh | grep bash | awk '{print $2}'`
Run Code Online (Sandbox Code Playgroud)
但是当通过Java执行时,我得到以下错误 -
/usr/bin/kill[8]: `ps: Arguments must be %job or process ids
Exit : 1
Run Code Online (Sandbox Code Playgroud)
码:
String command = "kill -9 `ps -ef | grep -i myScript.sh | grep bash | awk '{print $2}'`";
Process process=Runtime.getRuntime().exec(command);
InputStream stderr = process.getErrorStream();
InputStreamReader inputStream = new InputStreamReader(stderr);
BufferedReader reader = new BufferedReader(inputStream);
String error = null;
while((error = reader.readLine()) != null) {
System.out.println(error);
}
exitVal = …Run Code Online (Sandbox Code Playgroud)