当我试图通过lambda扩展一个导航属性,如下所示: query = query.Expand(x => x.Dealers); 我的查询失败 内部例外 内部exception消息: expression式“x => x.Dealers”不是导航path的有效expression式。 lambdaexpression式主体中唯一受支持的操作是MemberAccess和TypeAs。 expression式必须至less包含一个MemberAccess,并且不能以TypeAs结尾。 然而,当我试图通过一个string参数进行扩展: query = query.Expand("Dealers"); 一切似乎正常工作。 我的“地区”微风客户实体: public class Region : BaseEntity { public Region(); public NavigationSet<Dealership> Dealers { get; set; } public string Name { get; set; } public Region Parent { get; set; } public int? ParentId { get; set; […]
我正在使用Geolocation.watchPosition()并在callback中得到以下错误 “ https://www.googleapis.com/ ”上的networking位置提供商:返回了错误代码403。 这似乎只发生在Chrome桌面浏览器。 Firefox似乎很好。 这也是刚刚开始发生的今天,我从来没有遇到过这个错误之前,我的web应用程序使用Geolocation.watchPosition() 。 更新:bug https://bugs.chromium.org/p/chromium/issues/detail?id=753242
是否有可能在gson中编写一个json反序列化器,首先调用默认行为,然后我可以对我的对象做一些后期处理。 例如: public class FooDeserializer implements JsonDeserializer<Foo> { public Foo deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { Foo foo = context.deserialize(json, typeOfT);//Standard deserialization call????? foo.doSomething(); return foo(); } } 我正在使用GSON 1.3(我不能使用任何其他版本,因为我只能使用公司存储库中的版本) 谢谢
理想情况下,我需要实现WP7控件,该控件可以添加到任何XAML中,并显示dynamic的交互式3D场景。 目前,我已经通过XNA以共享模式实现了这个function,UI使用UIElementRenderer渲染在场景的顶部。 然而这个解决scheme是次优的,因为 应用程序必须呈现整个屏幕,因为在共享模式下,Silverlight本身不会绘制任何东西。 我找不到任何检测Silverlight控件需要更改其表示的方式,无论是由于用户交互还是animation。 只有在3D场景因此而改变时,才会呈现控件,所以它们缺less原生WP7应用程序的光滑外观和感觉。 那么,是否有一种方法可以在一个控件中渲染3D场景,并让Silverlightpipe理其余的UI?
使用Google openidlogin我的应用程序时,出现间歇性错误。 他们发送的链接是http://www.example.com/_ah/login_redir?claimid=www.google.com/accounts/o8/id&continue=http://www.example.com/login2?returl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8 。 然后当他们授予访问我的应用程序,有时有一个500错误的url: http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 : http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 continue= http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 : http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 returl% http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 http://www.example.com/_ah/openid_verify?continue=http://www.example.com/login2?returl%3Dhttp%253A%252F%252Fwww.example.com%252Ftest-list-8%2523additem&gx.rp_st=AEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2011-12-06T20%3A00%3A53ZGU1ZOot7AJ4DGg&openid.return_to=http%3A%2F%2Fwww.example.com%2F_ah%2Fopenid_verify%3Fcontinue%3Dhttp%3A%2F%2Fwww.example.com%2Flogin2%3Freturl%253Dhttp%25253A%25252F%25252Fwww.example.com%25252Ftest-list-8%252523additem%26gx.rp_st%3DAEp4C1sATcZr10BWADPx0hXZOeG49Vdr6GjYqvx83JXTTXjEFdqS8KaHIfZD3wmwTNl-wu8r7DMwoQMvWLpqgoV8RtAUigMMjw&openid.assoc_handle=AMlYA9W4FErBlE7i17Z-YVirs2a0eP_LEjoDRJDVgEq9FhOSKt8xq4HT&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.attr0%2Cext1.value.attr0%2Cext1.type.auto2%2Cext1.value.auto2&openid.sig=b7TBbUBO0mgF26qCpAjkS0AYeX8%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawkBkv0HezgbtJVspVv8hxIBizNbHP_4t_M&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.attr0=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.attr0=myemail%40gmail.com&openid.ext1.type.auto2=http%3A%2F%2Fwww.google.com%2Faccounts%2Fapi%2Ffederated-login%2Fid&openid.ext1.value.auto2=105848731220363187343 500错误甚至不出现在我的日志中。 这似乎发生了约5-10%的login。
我创build了一个ListView的Android应用程序。 我已经添加了页眉和页脚到列表中。 但是,当添加分隔符/分隔符时,它还会在标题和第一个ListView项目之间创build一个空白空间。 它对上一个ListView项目和页脚也是一样的。 空白空间相当于所有ListView项目之间的分隔符的大小,不同之处在于它不绘制分隔符,只留下空白空间。 我以为我find了解决scheme的xml属性“页脚分隔符启用”和“标题分隔符启用”。 但是当它们设置为false时,它不会改变任何东西。 我什至尝试用编程方式设置它们 list.setFooterDividerEnabled(false); list.setHeaderDividerEnabled(false); 但它不起作用。 有什么办法解决这个问题? 我只是不想空的空间在那里,我想要的第一个项目正好适合标题(相同的页脚)。
在我的设置中,如果Web API请求发生任何错误,我将收到错误500。 例如这个简单的代码。 public IQueryable<Article> Get(){ throw new Exception("error"); return db.Articles; //yeah i know.. unreachable, not the point } 我期望的(以及常规的MVC控制器中会发生什么): 我得到(在Web API中): 我的网页configuration: <customErrors mode="Off"/> <compilation debug="true" targetFramework="4.5"> //under webserver <httpErrors errorMode="detailed"/> 应用程序池在集成模式下运行4.0。 启用32位应用程序。 我怎样才能得到在浏览器中出现的错误? 或者至less在debugging过程中?
我有一个(C#)函数类似于以下内容。 private static bool SpecialCase = false; public void Foo() { if (SpecialCase) { InternalMethod(); return; } Console.WriteLine(); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InternalMethod(); 当我在debugging器中使用.NET Framework 4执行此操作时,该方法成功地将空白行打印到控制台并返回。 当我在debugging器外部执行它时,它会抛出一个exception,并显示以下消息: System.Security.SecurityException: ECall methods must be packaged into a system module. 当JIT编译器编译方法而不是调用(if) InternalMethod时,会出现exception。 有什么我能做的(例如属性)告诉CLI要么不抛出SecurityException ,要么延迟exception,直到实际调用方法? 使用案例的附注:使用Microsoft .NET Framework运行时, SpecialCase字段实际上是错误的,而在CLI的另一个(特定)实现下运行时,则为true。 在Microsoft .NET Framework下运行时,对InternalMethod的调用实际上是无法访问的。
Facebook,为什么你没有共享意图的图像和文字? 我试图使用标准的Android共享意图共享一个图像,和一些文字。 我的意图是build立正确的,我已经在那里形象了,我已经完成了交易的结束。 我的代码,让我告诉你: public void doShare() { File image = getShareFile(); Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.setType("*/*"); shareIntent.putExtra(Intent.EXTRA_SUBJECT, resultObject.getShareSubject()); shareIntent.putExtra(Intent.EXTRA_TEXT, resultObject.getShareText()); shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(image)); shareActionProvider.setShareIntent(shareIntent); } Facebook显示在将处理我的意图的应用程序列表,但它谎言! 当点击Facebook实际做一个分享它说: 请只附上照片或一个video。 为什么Facebook,为什么? 为什么你会出现一个可以处理我的意图的应用程序,然后让我看起来愚蠢的我的用户不处理意图? 你承诺Facebook。 我在这个网站和networking上看到了很多很多的线索。 有没有人得到这个工作,而不必使用他们的API?
我想知道是否有人有任何build议处理与Apache POI损坏的文件 我试图打开一个文件,并收到此消息: Exception in thread "main" org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x1C left 2 bytes remaining still to be read. at org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:156) at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:231) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:480) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:301) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:95) at ExcelImporter.EditFileImportDialog.main(EditFileImportDialog.java:409) 这是一个SSCCE import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; public class EditFileImportDialog { /* Omitted irrelevent code */ public static void main(String[] args) { File […]