小编Cha*_*rew的帖子

Quartz HelloJob

我是Quartz的新手,我遇到了编译错误.我只是试图让HelloJob基于Quartz的第1课为Hello World运行.我在JobDetail使用错误声明a时遇到问题:The method newJob(Class<? extends Job>)在类型JobBuilder中不适用于参数(Class)".

原来,代码有3个错误的newJob,newTrigger以及simpleSchedule

// define the job and tie it to our HelloJob class
JobDetail job = newJob(HelloJob.class)
    .withIdentity("job1", "group1")
    .build();

// Trigger the job to run now, and then repeat every 40 seconds
Trigger trigger = newTrigger()
    .withIdentity("trigger1", "group1")
    .startNow()
    .withSchedule(simpleSchedule()
            .withIntervalInSeconds(40)
            .repeatForever())            
    .build();
Run Code Online (Sandbox Code Playgroud)

没有JobBuilder.newJob(...),TriggerBuilder.newTrigger(...),SimpleScheduleBuilder.simpleSchedule(...).与给出的示例不同,我继续添加导入并在newJob,newTrigger等前面附加类调用,从而消除了2/3错误.但似乎错误仍然存​​在

 JobDetail job = JobBuilder.newJob(HelloJob.class)
        .withIdentity("job1", "group1")
        .build();
Run Code Online (Sandbox Code Playgroud)

我也试过替换我的工作声明

JobDetail job = new JobDetail("job1", "group1", HelloJob.class);
Run Code Online (Sandbox Code Playgroud)

但这结束了Cannot instantiate …

java quartz-scheduler

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

Google通讯录数据Api 401错误

我正在使用Google通讯录数据Api按照此处的文档获取所有用户联系人https://developers.google.com/google-apps/contacts/v3/

首先,我使用Google Auth使用以下代码对应用程序的用户进行身份验证

string authSubUrl = AuthSubUtil.getRequestUrl("http://localhost:62439/ContactImporter/GoogleContacts.aspx", "https://www.google.com/m8/feeds/", true, true);
    Response.Redirect(authSubUrl);
Run Code Online (Sandbox Code Playgroud)

用户成功登陆后第二次使用Google提供的请求令牌重定向到GoogleContacts.aspx页面,然后尝试通过以下代码获取联系人

if (!string.IsNullOrEmpty(Request["token"]))
{
    GAuthSubRequestFactory authFactory = new GAuthSubRequestFactory("cp", "alpha");   
    RequestSettings rs = new Google.GData.Client.RequestSettings("alpha",Request["token"]);
    ContactsRequest cr = new ContactsRequest(rs);

    Feed<Contact> f = cr.GetContacts();

    foreach (Contact entry in f.Entries)
    {
        foreach (EMail email in entry.Emails)
        {
            Response.Write("\n" + email.Address);
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

该代码工作大约4或5天,但现在它不工作,并得到以下错误

远程服务器返回错误:(401)未经授权.Google.GData.Client.Client.Service.Execute()at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)at Google.GData.Client.GDataGAuthRequest.Execute()at Google.GData.Client.Service.Query(Uri)在Google.GData.Client.Feed的Google.GData.Client.Service.Query(FeedQuery feedQuery)上的Google.GData.Client.Service.Query(Uri queryUri,DateTime ifModifiedSince)中的queryUri,DateTime ifModifiedSince,String etag,Int64&contentLength)1.get_AtomFeed() at Google.GData.Client.Feed1.d__0.MoveNext()在GoogleContacts.Page_Load(Object sender,EventArgs e)的d:\ Working Folder\API的\ ContactImporter\GoogleContacts.aspx.cs:第25行,在System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp) System.Web.UI.Control上的System.Web.UI.Control.OnLoad(EventArgs e)上的System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,EventArgs e)中的,Object o,Object …

.net c# api contact google-contacts-api

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

用于textarea和自由文本的Facebook jQuery自动完成插件

是否存在类似于Facebook的jQuery插件,它建议/使用此标准自动填充:

  1. 适用于textarea或contenteditable div.我找到了许多只支持输入字段的插件(例如http://loopj.com/jquery-tokeninput/).
  2. 支持自由文本,标签和非标签文本的组合.这是一个只允许在输入后输入标签的例子:http://brianreavis.github.io/selectize.js/ - 这不是免费文本.自由文本的示例是At.js(http://ichord.github.io/At.js),jquery-textcomplete(http://yuku-t.com/jquery-textcomplete)和jquery.mentionsInput(http ://podio.github.io/jquery-mentions-input)
  3. 具有退格/删除功能的类似药丸的CSS效果.http://yuku-t.com/jquery-textcomplete/非常接近,但样式示例没有在其他插件中找到的删除功能.示例1具有良好的删除功能.

以下是Zapier的一个例子:

Zapier

javascript jquery textarea jquery-autocomplete jquery-tokeninput

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

wysihtml5光标跳到新行的错误位置

当点击"返回"或"输入"时,光标不会跟随实际行.这个问题有解决方案吗?插件有一些问题解决了问题,但我很好奇实际解决方案是什么解决方法.

这是一个基于项目的jQuery插件:https://github.com/jhollingworth/bootstrap-wysihtml5/你可以看到错误:http://jhollingworth.github.io/bootstrap-wysihtml5/(点击输入几个次)

javascript jquery jquery-plugins wysihtml5 bootstrap-wysihtml5

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

根据DOM,'Range.detach'现在是无操作

将Chrome更新为36.0.1985.125后,我在控制台中注意到此警告和错误消息.

警告:

'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-range-detach). 
Run Code Online (Sandbox Code Playgroud)

错误:

Discontiguous selection is not supported.
Run Code Online (Sandbox Code Playgroud)

可以看到:http://rangy.googlecode.com/svn/trunk/demos/cssclassapplier.html

其他javascript/jquery插件(wysihtml5,rangy)也受到影响,任何解决方案?

javascript jquery google-chrome rangy wysihtml5

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

在WebSphere Commerce的结帐流程/流程中调用哪些命令?

什么是是被调用从AddToCart启动控制器命令和任务命令- >我的购物- > CheckoutSignIn - > ShippingInfo - > ShippingMethod - >付款方法- >订单摘要(从购物车页面基本导航到订单摘要页)?这可能是个大问题......是否有任何链接可以提供这样的答案?

websphere wcs websphere-commerce e-commerce websphere-7

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

WebSphere Commerce:控制器命令与任务命令?

对于新手,您如何解释控制器命令和任务命令之间的区别?每个目的是什么?什么可能是使用这两种命令的例子?

java websphere wcs websphere-commerce websphere-7

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