问题列表 - 第7947页

确定远程系统何时重新启动

我正在编写一个调用批处理文件的ac#程序,该文件将远程系统重新启动到另一个分区.有没有办法知道系统何时完成重启?我想知道何时重启后我可以访问远程系统.

c#

2
推荐指数
1
解决办法
628
查看次数

Mercurial钩子没有正确执行

这应该是一个非常简单的运行,但由于某种原因它不适用于我的Mercurial存储库.我想要的只是远程仓库hg update在有人推送时自动运行.所以我在.hg/hgrc文件中有这个:

[hook]
changegroup = hg update
Run Code Online (Sandbox Code Playgroud)

简单吧?但由于某种原因,这永远不会执行.我也尝试编写一个执行此操作的shell脚本..hg/hgrc看起来像这样:

[hooks]
changegroup = /home/marc/bin/hg-update
Run Code Online (Sandbox Code Playgroud)

和hg-update看起来像这样:

#!/bin/sh
hg help >> /home/marc/works.txt;
hg update >> /home/marc/works.txt;
exit 0;
Run Code Online (Sandbox Code Playgroud)

但同样,这不会更新.hg help写出来的内容works.txt,但没有写出来hg update.有什么明显的东西我在这里不见了吗?这一直困扰着我好几天,我似乎无法让它发挥作用.

更新

好的,再次,使用-v我的工作站命令行上的开关推送到远程仓库,即使我有这些echo行,也不打印任何详细消息.hg/hgrc.但是,当我从同一文件系统上的repo克隆推送(我通过SSH登录)时,这就是我得到的:

bash-3.00$ hg -v push ../test-repo/
pushing to ../test-repo/
searching for changes
1 changesets found
running hook prechangegroup: echo "Remote repo is at `hg tip -q`"
echo "Remote repo wdir is at `hg parents -q`"
Remote repo is …

version-control mercurial mercurial-hook

7
推荐指数
2
解决办法
7555
查看次数

超时时间没有过去,但仍然超时(见代码)?

好的我在搅拌3-4分钟后仍然会收到此错误:

 Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

Line 93: 
Line 94:             DataSet getData;
Line …
Run Code Online (Sandbox Code Playgroud)

sql asp.net timeout

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

会不会增加性能?

我有六个表将加入许多查询.如果通过加入所有表创建的视图将提高性能?.是否有任何替代方案来提高性能?我使用oracle作为数据库,并且所有已连接的列都已编制索引.

database performance

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

Objective-C 2.0:class_copyPropertyList(),如何列出类别的属性

我试图列出Objective-C类的所有属性,如Objective-C 2.0运行时编程指南中所述:

id LenderClass = objc_getClass("UIView");
unsigned int outCount, i;
objc_property_t *properties = class_copyPropertyList(LenderClass, &outCount);
for (i = 0; i < outCount; i++) {
    objc_property_t property = properties[i];
    fprintf(stdout, "%s %s\n", property_getName(property), property_getAttributes(property));
}
Run Code Online (Sandbox Code Playgroud)

但是这只列出了三个属性:

userInteractionEnabled Tc,GisUserInteractionEnabled
layer T@"CALayer",R,&,V_layer
tag Ti,V_tag
Run Code Online (Sandbox Code Playgroud)

查看UIView.h的头文件,这些是在类中直接声明的三个属性.其他UIView属性通过类别添加.

如何获取课程的所有属性,包括来自类别的属性?

我尝试使用iPhone模拟器(iPhone SDK 2.2.1),顺便说一句.(如果这很重要).

iphone cocoa objective-c

19
推荐指数
2
解决办法
9720
查看次数

使用LINQ左连接

有人能举例说明如何使用LINQ/lambda表达式执行左连接操作吗?

linq lambda left-join

8
推荐指数
1
解决办法
7462
查看次数

Objective-C中是否有强类型集合?

我是Mac/iPhone编程和Objective-C的新手.在C#和Java中,我们有"泛型",集合类的成员只能是声明的类型.例如,在C#中

Dictionary<int, MyCustomObject>

只能包含整数和值为MyCustomObject类型的键.Objective-C中是否存在类似的机制?

generics collections objective-c strong-typing data-structures

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

有人可以查看这一小段代码吗?

应该发生的是将一行插入表中,然后通过比较该特定条目的名称和姓氏来选择该行的id.

然后将返回的id插入另一个表中:

$result = false;

$result = mysql_query("INSERT INTO `reunie` (`naam`, `van`,`nooiensvan`, `selfoon`, `email`, `bywoon`, `metgesel_naam`, `spesifieke_onderwysers`, `spesifieke_musiek`, `bydrae`, `voorstelle`) VALUES ('$naam','$van','$nooiensvan','$selfoon','$email','$bywoon','$metgesel','$spesifiekeOnderwysers','$musiek','$bydrae','$voorstelle')") or die(mysql_error());

// sleep in order for query to finish
while ($result === false) {
   sleep(1);
}

$result = mysql_query("SELECT `id` FROM `reunie` WHERE `naam` = '$naam' AND `van` = '$van' ORDER BY `id` DESC LIMIT 1") or die(mysql_error());
Run Code Online (Sandbox Code Playgroud)

//编辑

谢谢你们的重要评论.谢谢你教我一些重点.

php mysql

-2
推荐指数
2
解决办法
238
查看次数

用Java发送电子邮件?

任何人都可以建议使用Java发送电子邮件的库吗?

java email

4
推荐指数
3
解决办法
3396
查看次数

Emacs typeover skeleton-pair-insert-maybe

在Eclipse中,编辑Java代码,如果我输入open-paren,我会得到一对parens.如果我然后"输入"第二个paren,它不会插入额外的paren.我如何在emacs中获得它?

Eclipse编辑器非常聪明,当我输入close-paren时,我知道我刚刚完成了我的工作.光标越过关闭的paren.如果我然后键入一个分号,同样的事情:它只是覆盖了分号,我没有得到其中的两个.

在emacs,java模式或csharp模式中,如果我将open-paren绑定到skeleton-pair-insert-maybe,我会得到一个开放式关闭的paren对,这很好.但是如果我"通过"密切关注,我会得到两个近距离.

有没有办法教emacs不要在紧接着前面的骨架对插入后插入关闭paren?如果这是可能的,那么为避免分号加倍,一些类似的情报怎么样呢?

我问的是parens,但同样适用于双引号,花括号,方括号等.任何插入骨架对插入的东西也许.

c# java emacs

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