小编Him*_*dav的帖子

Grails中的jQuery Ajax请求

如何使用jQuery在Grails页面中发出Ajax请求?

如何在Grails Controller上设置访问方法的URL?让我们说控制器:'机场',动作:'getJson'并且动作的输入是'iata'.

我能够设置静态URL,http://localhost:8080/trip/airport/getJson但无法弄清楚如何传递iata的输入.

我是Grails的新手,并且遵循IBM的"掌握Grails"教程系列.建议我一些关于在Grails中使用jQuery的好教程.

ajax jquery grails

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

安装Websphere Application Server网络部署的步骤

我已将Websphere Application Server Network Deployment试用版下载为3部分的http下载。解压缩这些文件后,我对它的安装一无所知。
在Windows 7 64位计算机上安装它的步骤是什么?如果有任何链接解释了这些步骤,请告诉我。我厌倦了谷歌搜索,但是找不到安装步骤的清晰解释。

websphere websphere-8

4
推荐指数
1
解决办法
7070
查看次数

Freemarker For循环

他们以任何方式根据他们而不是一个一个地遍历列表项吗?我想以1,3,5,7,9和2,4,6,8的顺序遍历一系列字段.我尝试过像这样使用

<#list section.field as field>
 <div class="col1">
 ${field.@label}:<input type="text"/></div>
 <#if field_has_next>
 <div class="col2">
   ${field[field_index+1].@label}:<input type="text"/>
 </div>
 </#if>
</#list>
Run Code Online (Sandbox Code Playgroud)

但它给了我错误.

java freemarker

4
推荐指数
1
解决办法
9940
查看次数

普通jQuery中的会话超时

如何在不使用任何插件的情况下在普通jQuery中编写sessionTimeOut功能?我想使用我自己的警告ui.要弄清楚我可以写的任何UI活动,但不知道如何在超时功能中将它组合.

$('*').on('click', function () {
    console.log('click', this);

});

$('*').on('change', function() {
    console.log('change', this);
});
Run Code Online (Sandbox Code Playgroud)

jquery

4
推荐指数
1
解决办法
3774
查看次数

如何为Tomcat设置Spring日志

使用Spring MVC而没有Spring日志使得调试变得困难.我已经阅读了关于这个问题的其他几篇文章,似乎没有人帮助我. log4j.propertiessrc文件夹中.slf4j-api-1.5.11,slf4j-log4j12-1.5.11,slf4j-simple-1.5.11,commons-logging-1.1.jarlog4j-1.2.16.jar罐子在classpath.
Log4j的内容是:

log4j.rootLogger=INFO, console


# Console appender
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
Run Code Online (Sandbox Code Playgroud)

但我在控制台中看不到任何Spring日志.

注意:使用Spring 3.1

spring log4j spring-mvc

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

XSLT:当前日期时间长,为毫秒

我升级了XSLT处理器.并获得当前日期时间.但它不是所需的格式.

<xsl:value-of select="format-dateTime(current-dateTime(), '[Y,4][D,2][M,2] [H]:[m]:[s]:[f01] [Z]')" />
Run Code Online (Sandbox Code Playgroud)

20132409 14:03:17:54 -04:00
Run Code Online (Sandbox Code Playgroud)

但我希望以长格式使用毫秒.像1346498794643之类的东西

xslt

4
推荐指数
1
解决办法
8267
查看次数

Angular2:如何更改iFrame src?

我是Angular2的新手,并尝试通过点击按钮更改iframe的网址.通过了几个障碍,比如safe urlsetting the src for iframe.无法想出一个很好的方法来点击按钮/链接更改网址.
如何根据按钮ID更改iFrame网址?
HTML

<button md-button (click)="updateSrc($event)"  id="first" class="top-link">First</button>
  <button md-button  (click)="updateSrc($event)" id="second" class="top-link">Second</button>

<iframe id="frame" frameborder="0" [src]="changeUrl()"></iframe>
Run Code Online (Sandbox Code Playgroud)

零件

private first_url = "some url";
private second_url = "some other url":

updateSrs(event) {
    console.log('Here');
    console.log(event.currentTarget.id);
    this.reportUrl();
  }
;
  changeUrl() {
    return this.sanitizer.bypassSecurityTrustResourceUrl(this.first_url);
  }
Run Code Online (Sandbox Code Playgroud)

javascript iframe angular

4
推荐指数
1
解决办法
8801
查看次数

Java 8流:处理空值

以下代码为属性Salary抛出NPE为null.class Person有属性:string:name,Integer:age,Integer:salary salary在这里可以为null.我想创建一份工资清单.

persons.stream().mapToDouble(Person::getSalary).boxed().collect(Collectors.toList())
在这里,我必须在结果列表中保留空值.null不能替换为0.

java java-8 java-stream

4
推荐指数
1
解决办法
1705
查看次数

Java:了解静态方法的执行

printA内部class AprintB内部有两种方法class B.printA是一种static方法,printB是一种非静态方法.这两种方法都是synchronized.有确切亿个线程两个发射printAprintB每个.

哪种方法执行需要的时间更少?

我对static方法的理解围绕对象创建相关的东西.你知道,如果不需要类obj来调用静态方法.或者util方法可以是静态方法.或者静态方法是全局的,难以进行单元测试.
在这种情况下,我想静态方法的执行会更快,因为它将被创建一次,然后被其他所有线程重用.

java performance

3
推荐指数
1
解决办法
180
查看次数

Spark Dataframe:选择不同的行

我尝试了两种方法来从镶木地板中找到不同的行,但它似乎不起作用。
尝试 1: Dataset<Row> df = sqlContext.read().parquet("location.parquet").distinct();
但是抛出

Cannot have map type columns in DataFrame which calls set operations
(intersect, except, etc.), 
but the type of column canvasHashes is map<string,string>;;
Run Code Online (Sandbox Code Playgroud)

尝试2: 尝试运行sql查询:

Dataset<Row> df = sqlContext.read().parquet("location.parquet");
    rawLandingDS.createOrReplaceTempView("df");
    Dataset<Row> landingDF = sqlContext.sql("SELECT distinct on timestamp * from df");
Run Code Online (Sandbox Code Playgroud)

我得到的错误:

= SQL ==
SELECT distinct on timestamp * from df
-----------------------------^^^
Run Code Online (Sandbox Code Playgroud)

有没有办法在读取镶木地板文件时获取不同的记录?我可以使用的任何阅读选项。

java sql dataframe apache-spark apache-spark-sql

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