好的,这里有一点背景.我有一个大型的Web应用程序(MVC3),它可以完成各种不重要的工作.我需要这个Web应用程序才能在Oracle数据库中安排特定的Quartz.NET作业.然后,我希望稍后通过Windows服务执行作业.理想情况下,我想安排它们以均匀的间隔运行,但可以选择通过Web应用程序添加作业.
基本上,所需的架构是这方面的一些变化:
Web应用程序< - > Quartz.NET < - >数据库< - > Quartz.NET < - > Windows服务
到目前为止我编写的内容:
还有几个重要的注意事项:
现在,几个问题:
只要符合条件,这个问题就会得到赏金.如果在此之前以令人满意的方式回答问题,我仍然会将奖励奖励给答案的海报.所以,无论如何,如果你在这里给出一个好的答案,你将获得赏金.
我今天刚刚安装了Visual Studio 2012 Professional.出于某种原因,我的视图文件中没有行号,但我确实在.cs文件中有这些行号.在tools-> editors-> whatever中选择打开行号的选项.
我右键单击了项目(asp.net Web站点),转到属性页面,查看了调试输出选项,并注意到它被发送到一个奇怪的目录.我将其更改为当前应用程序的bin文件夹,清除了临时的asp.net文件,重新启动了VS2012,再次尝试,没有运气.还是一样的症状.
关于可能导致这种情况的任何想法?
编辑:我刚刚注意到在更改调试输出位置后,现在,当我打开.aspx文件时,VS冻结并变得完全没有响应.
这应该是一个非常简单的问题.我为Quartz.NET创建了数据库并填充了所有表和内容,现在我只是尝试配置我的项目以与数据库进行交互.我可以处理它的编码部分,我只是不知道使用什么配置文件..
提前致谢!
我有一个Telerik Grid,它有一个需要显示列总和的页脚.但是,其中一个列的数据类型是TimeSpanTelerik的Sum聚合不支持的.我需要用来GridBoundColumnBuilder.Aggregate()添加聚合.所以我想基本上问题是如何在telerik的Aggregate()方法中引用我的自定义聚合.如果你发现其他任何我做错了,请随意指出:)使用这篇文章,我为我的自定义聚合创建了一个类SumAggregate,如下所示.(请注意,这还没有完成 - 它取自文章.它实际上实现了一个完全不同的聚合)
SumAggregate.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Web.Mvc;
namespace TelerikPOC.CustomAggregates
{
public class SumAggregate : AggregateFunction
{
private System.Collections.Generic.List<object> distinctValues;
/// <summary>
/// Initializes the current aggregate function to its initial
/// state ready to accumulate and merge values.
/// </summary>
/// <remarks>
/// This method is called every time the accumulation of values
/// must start over for a new subset of …Run Code Online (Sandbox Code Playgroud) 我正在尝试获取一个下拉列表,以使用Web Deployment 3.0进行显示。对于整个Web部署过程,我还是一个新手,但是基本上,这就是我想要做的事情:
阅读题目的文章,特别是本文节选自以后这篇文章:
枚举-枚举使您可以将用户输入限制为离散值的列表。大多数用户界面会将其实现为下拉列表框,其中[...]。枚举的语法为:
<parameter name="Enumeration Parameter">
<parameterValidation type="Enumeration" validationString="value1,value2,value3,value4" />
</parameter>
Run Code Online (Sandbox Code Playgroud)
并且,出于测试目的,我将上面的代码复制并粘贴到了我的parameters.xml文件中,该文件适用于任何其他类型的参数。显示枚举参数,但这只是一个文本框-没有下拉列表。这仅仅是IIS导入界面中的预期行为,还是我在这里遗漏了一些东西?
当我查看基于Windows服务的Quartz.NET项目的事件日志时,我得到:
Connection-Transaction Pair cannot be null
parameter name: cth
当然,我用谷歌搜索,但没有找到任何关于异常的文档.有人知道这意味着什么或如何解决它?
提前致谢.
编辑:这是扩展(但仍未完成)异常/堆栈跟踪:
Service cannot be started. Parameters: refire = False, unscheduleFiringTrigger = False, unscheduleAllTriggers = False Quartz.JobExecutionException: System.ArgumentNullException: Connnection-transaction pair cannot be null Parameter name: cth at Quartz.Impl.AdoJobStore.JobStoreSupport.CheckNotZombied(ConnectionAndTransactionHolder cth) in c:\Work\OpenSource\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 3487 at Quartz.Impl.AdoJobStore.JobStoreSupport.RollbackConnection(ConnectionAndTransactionHolder cth) in c:\Work\OpenSource\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 3300 at Quartz.Impl.AdoJobStore.JobStoreSupport.ExecuteInNonManagedTXLock(String lockName, Func2 txCallback) in c:\Work\OpenSource\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 3467 at Quartz.Impl.AdoJobStore.JobStoreTX.ExecuteInLock(String lockName, Func2 txCallback) in c:\Work\OpenSource\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreTX.cs:line 76 at Quartz.Impl.AdoJobStore.JobStoreSupport.Store...
另外,有没有办法获得完整的堆栈跟踪?我无法以编程方式执行此操作,因为它在服务启动之前失败了.
这是我的Generic bubbleSorter的Java代码:
public class BubbleSorter<E extends Comparable<E>> {
E[] a;
void swap(int i, int j) {
E temp;
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
void bubbleSort(E[] a) {
this.a=a;
for (int i=0 ;i<a.length;i++) {
for (int j=0;j<a.length;j++) {
if ( a[i].compareTo(a[j]) > 0) swap(i,j);
}
}
}
}
public interface Comparable<E> {
public int compareTo(E e);
}
Run Code Online (Sandbox Code Playgroud)
这是一个使用它的例子:
public class Test {
public static void main (String arg[]) {
Rational[] a = new Rational[3];
a[0]=Rational.rationalFactory(9,2);
a[1]=Rational.rationalFactory(1,3);
a[2]=Rational.rationalFactory(10,11);
Complex[] b = new Complex[3]; …Run Code Online (Sandbox Code Playgroud) 好吧,这可能是一个双重问题.我有一个类User,其中包含Location类型的属性UserLocation.起初,我被映射都在User类,并在UserLocation类和存储他们无论是在分贝,但并没有做出很大的意义对我来说,因为对于唯一的目的UserLocation是要成为其中的一部分User.无论如何,现在,我的映射看起来像这样:
public class UserMap : ClassMap<User>
{
public UserMap()
{
Id(x => x.Id).Access.ReadOnlyPropertyThroughLowerCaseField().GeneratedBy.Identity();
Map(x => x.Location.Address);
Map(x => x.Location.City);
Map(x => x.Location.State);
Map(x => x.Location.ZipCode);
}
}
Run Code Online (Sandbox Code Playgroud)
但我收到错误"无法找到getter UserLocation.Address".我也得到了一堆转换错误,因为似乎NHibernate仍在生成一个计算类UserLocation.所以我想问题是从映射的自定义类中引用非映射自定义类的最佳方法是什么.
哦,只是补充一点,我很确定UserLocation没有被映射到任何地方.我甚至尝试从User映射中引用它,并且我仍然会尝试将计算类转换为真实类的转换错误.我不可能理解为什么在这一点上甚至会有一个计算类型..
我有html发回一个表单,像这样:
@(message: String)
@main("Contact") {
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/contact.css")">
<div id="pageContainer">
<div id="form">
<div id="topText">
<p>Have a question or need some assistance? Let us know and we'll get back to you ASAP.</p>
</div>
<br/>
<form method="POST" action="@routes.Home.contact()">
<div id="contactInfo">
<label class="contactLabel">First Name:</label><input type="text" name="firstName" id="firstName" class="contactInput" /> <br />
<label class="contactLabel">Last Name:</label><input type="text" name="lastName" id="lastName" class="contactInput" /> <br />
<label class="contactLabel">Email:</label><input type="text" name="email" id="email" firstName" class="contactInput" /> <br />
<label class="contactLabel">Company:</label><input type="text" id="company" name="company" class="contactInput" /> <br />
<input type="hidden" …Run Code Online (Sandbox Code Playgroud) 我有一个自定义的 Windows 服务,我想使用 Quartz .NET 来安排服务运行的时间。现在,我了解了quartz.NET 的基础知识,但我不确定如何将它连接到Windows 服务。所以,假设我有Service.exe,我想每小时运行一次。我将如何通过 Quartz 实现这个功能?我知道这是一个模糊的问题,但真的没有其他方法可以问它。
提前致谢。