我试图显示弹出,但弹出自动消失,而历史=假弹出保持可见,但在随后关闭弹出窗口浏览器的后退动作被触发
<div data-role="page" id="indexpage">
<div data-role="popup" data-history="false" id="appPopup">test popup</div>
<script>
$("#indexpage").on("pageshow", function () {
$("#appPopup").popup("open");
});
</script>
</div>
Run Code Online (Sandbox Code Playgroud)
检查这里发生了什么:http: //jsfiddle.net/francisdb/ThtfZ/
有关如何解决此问题的任何想法?
jquery setinterval jquery-mobile clearinterval jquery-mobile-popup
在playframework 2 scala中play.mvc.Router.routes的等价物是什么?
在playframework 1.x中我可以迭代控制器中的可用路由:
for(Route route:Router.routes){
...
}
Run Code Online (Sandbox Code Playgroud)
我如何使用playframework 2 scala执行此操作?
未找到的开发模式模板似乎能够迭代它们,但我需要在控制器中执行此操作.
在发布我们的插件时,我们得到了这个
[info] Done packaging.
[trace] Stack trace suppressed: run last *:publish for the full output.
[error] (*:publish) java.io.IOException: PUT operation to URL https://nexus.mycompany.com/repository/maven-snapshots/com/foo/foo-sbt-plugin_2.10_0.13/1.0.0-SNAPSHOT/foo-sbt-plugin-1.0.0-SNAPSHOT.pom failed with status code 400: Invalid path for a Maven 2 repository
Run Code Online (Sandbox Code Playgroud)
我们使用设置插件
sbtPlugin := true
publishMavenStyle := true
Run Code Online (Sandbox Code Playgroud) 在Play 1.4.x下,如果我想反向生成一个URL,我可能会使用以下内容:
Map<String, Object> map = new TreeMap();
map.put("myParam", myParam);
ActionDefinition ad = Router.reverse("MyAction.query", map);
String url = ad.url;
Run Code Online (Sandbox Code Playgroud)
根据可靠的简洁的Play 2.x 文档,在Play 2下使用Scala,我应该使用重定向:
val action = Action {Redirect(routes.MyAction.query(myParam))}
Run Code Online (Sandbox Code Playgroud)
但是我如何处理获取实际URL的操作?
我们希望并行化流的一部分,像 mapAsync 那样保持排序,但没有 Future。
目前我们有以下解决方案,但这需要一个物化器,而普通的 flatMapConcat 则不需要。
def flatMapConcatParallel[In, Out](parallelism: Int)(f: In => Source[Out, _])(implicit mat: Materializer): Flow[In, Out, NotUsed] = {
// TODO there should be a better way to add parallelism that avoids a run (and the need for a materializer)
Flow[In].mapAsync(parallelism){i =>
f(i).runWith(Sink.head)
}
}
Run Code Online (Sandbox Code Playgroud)
和
if (parallel){
val parallelism = 4
Flow[Batch].via(flatMapConcatParallel(parallelism)(singleRun))
} else{
Flow[Batch].flatMapConcat(singleRun)
}
Run Code Online (Sandbox Code Playgroud)
关于如何使用现有构造实现这一点而不必进入低级(GraphStageLogic)有任何提示吗?
---> f() --->
--d-c-b-a--> OrderedBalance ---> f() ---> OrderedMerge --d'-c'-b'-a'--->
---> f() --->
Run Code Online (Sandbox Code Playgroud)