最近我的ISP将我们的网站切换到IIS7.0高可用性集群.该网站运行在PHP5.2.1上,我只能上传文件(所以没有注册表调整).我之前测试过网站,一切似乎都有效,但现在结帐页面失败了:
500内部服务器错误.您正在查找的资源存在问题,无法显示.
随着错误消息的发生,这不是很有用.我试过了:
ini_set('display_errors', 1);
ini_set('error_log', $file_php_can_write_to );
Run Code Online (Sandbox Code Playgroud)
但两者似乎都没有做任何事情.
谁知道如何获得更好的调试输出?
在我的LINQ to SQL设置中,我有各种表映射到基本上支持相同接口以支持版本控制的类,即
public interface IValid
{
int? validTo { get; }
int validFrom { get; }
}
Run Code Online (Sandbox Code Playgroud)
LINQ to SQL类派生自此接口,如下所示:
public partial class representationRevision : IValid
{
}
Run Code Online (Sandbox Code Playgroud)
现在我想定义一个DRY(不要重复自己)过滤的方式EntitySet<T>,IEnumerable<T>并IQueryable<T>使得所得到的名单是有效的特定修订.我试过这样做:
public static class ExtensionMethods
{
public static IQueryable<T> ValidFor<T>(this IQueryable<T> v, int? revision)
where T : IValid
{
return v.Where(cr => ((cr.validFrom <= revision) &&
((cr.validTo == null) || (cr.validTo > revision)))
|| ((revision == null) && (cr.validTo == null))
);
}
}
Run Code Online (Sandbox Code Playgroud)
但是这给出了问题 …
由于缩小规模和节省成本,我们的组织正在从CM/Telogic/Rational Synergy转向免费工具(最可能是SVN).无论如何,将历史和分支信息从Synergy转移到免费工具?
我想创建一个集成测试,该测试显示某个操作会导致显示模态视图控制器.故事板设置有2个viewcontrollers,一个带有自定义ViewController类,第二个带有默认的UIViewController类和标题"second".segue设置为模态,标识符为"modalsegue".在模拟器中运行应用程序非常出色,但我在定义正确的测试时遇到了很多麻烦.
ViewController.m:
@implementation ViewController
- (IBAction)handleActionByPerformingModalSegue {
[self performSegueWithIdentifier:@"modalsegue" sender:self];
}
@end
Run Code Online (Sandbox Code Playgroud)
测试:
- (void)testActionCausesDisplayOfSecondViewController {
ViewController * vc =
[[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]
instantiateViewControllerWithIdentifier:@"ViewController"];
[vc handleActionByPerformingModalSegue];
STAssertEquals(vc.presentedViewController.title, @"second",
@"Title of presented view controller should be second but is %@",
vc.presentedViewController.title, nil);
}
Run Code Online (Sandbox Code Playgroud)
在以下输出中运行测试结果:
2013-06-23 17:38:44.164 SeguesRUs[15291:c07] Warning: Attempt to present <UIViewController: 0x7561370> on <ViewController: 0x7566590> whose view is not in the window hierarchy!
SeguesRUsTests.m:33: error: -[SeguesRUsTests testActionCausesDisplayOfSecondViewController] : '<00000000>' should be equal to '<9c210d07>': Title of presented view controller should …Run Code Online (Sandbox Code Playgroud) .net ×1
c# ×1
cm-synergy ×1
cocoa-touch ×1
git ×1
iis ×1
iis-7 ×1
ios ×1
linq ×1
linq-to-sql ×1
mercurial ×1
objective-c ×1
php ×1
svn ×1
unit-testing ×1