小编mic*_*ele的帖子

JQgrid设置行高

我正在使用jqGrid和javascript.我会设置每个表行的高度,但我不明白该怎么做.

这是我的代码:

 function jobList(){
var json=doShowAll(); 
alert("jobList() ==> php/get_job_status.php?value="+json);
jQuery("#jobList").jqGrid({
    url:'php/get_job_status.php?value='+json,
 datatype: "xml",
    colNames:['id','title', 'start', 'stop','completed'],
    colModel:[
     {name:'id',index:'id', width:15,hidden:true, align:"center"},
     {name:'title',index:'title', width:150, align:"center"},
     {name:'start',index:'start', width:350, align:"center", sorttype:"date"},
     {name:'fine',index:'fine', width:350, align:"center", sorttype:"date"},
     {name:'completed',index:'completed', width:120, align:"center",formatter:highlight},//il solitoformatter:infractionInFormatter},  
    ],
    //rowNum:8,
    //rowList:[8,10,20,30],
    pager: '#pagerJobList',
    sortname: 'id',
    viewrecords: true,
    sortorder: "desc",
 multiselect: false,
 subGrid: false,
 autowidth: true,
 height: 250,
 rowheight: 300,

 caption: "Job Progress",
  afterInsertRow: function(rowid, aData){
     jQuery("#jobList").jqGrid('setCell', rowid, 'completed', '', {
      background: 'red',
     color: 'white'
     });
  },
  onSelectRow: function(id){
        //alert(id);
        var title="";
        if (id) …
Run Code Online (Sandbox Code Playgroud)

javascript jquery height row jqgrid

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

错误:'jQuery未定义'

我用jQuery编写了一个脚本.它适用于Firefox和GoogleChrome.只有使用IE我才会返回此错误:

'jQuery'未定义为jquery-ui-1.8.4.custom.min.js,第10行字符1

这是我页面的负责人:

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Contattaci - TheItalianBrand.com</title>
    <script type="text/javascript" src="lib/jquery.js"></script>
    <script type="text/javascript" src="lib/js/jquery-ui-1.8.4.custom.min.js"></script>
    <link type="text/css" href="lib/css/smoothness/jquery-ui-1.8.4.custom.css" rel="stylesheet" /> 
    <script type="application/javascript">
       $(function(){



    $('#dialog_link, ul#icons li').hover(
     function() { $(this).addClass('ui-state-hover'); }, 
     function() { $(this).removeClass('ui-state-hover'); }
    );

    $('input').change(function() {
      validate();
    });
    $('input').keydown(function() {
      validate();
    });
    $('textarea').change(function() {
      validate();
    });
    $('textarea').keydown(function() {
      validate();
    });
   });
   </script>
   </head>
Run Code Online (Sandbox Code Playgroud)

我能做什么?

javascript jquery internet-explorer

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

正则表达式preg_split由新行

这是我的档案:

0.0 5.0 5.0 6.0 7.0 2.0 5.0 2.0 1.0 5.0 5.0 1.0 2.0 7.1 5.0
5.0 0.0 5.0 5.0 5.0 2.0 5.0 1.0 5.0 6.0 6.0 6.0 6.0 1.0 7.1
5.0 5.0 0.0 6.0 1.0 6.0 5.0 5.0 1.0 6.0 5.0 7.0 1.0 5.0 6.0
6.0 5.0 6.0 0.0 5.0 2.0 1.0 6.0 5.0 6.0 2.0 1.0 2.0 1.0 5.0
7.0 5.0 1.0 5.0 0.0 7.0 1.0 1.0 2.0 1.0 5.0 6.0 2.0 2.0 5.0
2.0 2.0 6.0 2.0 …
Run Code Online (Sandbox Code Playgroud)

php regex preg-split

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

html5视频标签和http 206部分内容

我正在尝试在视频标签中加载mp4文件.

    <!doctype html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Video</title>
        <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
        <!--script type="text/javascript" src="app.js"></script-->
        <script type="text/javascript">
            $(document).ready(function(){

            });
        </script>

    </head>
    <body>
        <video src="video2.mp4" autoplay="true" controls="true"></video>
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

问题是我已经返回了206个部分内容,但我无法看到任何内容.可能是什么问题?

视频网址为:http: //michelepierri.it/examples/video/video2.mp4

谢谢.

video mp4 html5-video

8
推荐指数
0
解决办法
8175
查看次数

jquery-mobile创建动态控制组并应用jquery-ui css

这是我的代码:http: //jsfiddle.net/YKvR3/34/

我将创建一个控件组,其值在我的数组(名称)中.问题是,当我点击Load按钮在controlgroup添加值,但jQuery的UI风格不加载类的形象.控制组未使用jquery-ui mobile css进行样式设置.

$("#load").click(function(){
var name=["one","two"];
var html='<fieldset id="listPlayers" data-role="controlgroup"><legend><h1>Choose as many players as youd like to remove:</h1></legend>';
for ( var int = 0; int < 2; int++) {
        html+='<input type="checkbox" name="checkbox-'+int+'a" id="checkbox-'+int+'a" class="custom" /><label for="checkbox-'+int+'a">'+name[int]+'</label>';
    }
    alert('<legend><h3>Choose as many players as you would like to remove:</h3></legend>'+html+'</fieldset');
    $("#list").html(html+'</fieldset');       
//$("#list").page();});?
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述 我做错了什么?谢谢.

fieldset dynamic-html jquery-mobile

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

Java geotools 检查点是否包含在具有公差的多边形中

我正在使用 Java Geotools 库来检查 POINT(...) 是否包含在 POLYGON(...) 中。

我已经做到了:

Geometry sPG = reader.read(wktStartPoint); //startpointgeometry
Geometry sEG = reader.read(wktEndPoint);
if(wktLayerGeo.contains(sPG) || wktLayerGeo.contains(sEG)){
 // do something
}
Run Code Online (Sandbox Code Playgroud)

但现在我必须设置一个容差:例如,我会检查一个点是否包含在容差距离为 50 公里的多边形中。

我可以用 GeoTools 做吗?

谢谢

java contain geotools

7
推荐指数
1
解决办法
2945
查看次数

Spring Mockito - Junit 控制器测试 - 模拟一项服务

我有一个管理两个类服务的控制器类ControllerClass

  • 解析一些文件的ServiceA

  • 管理文件系统的ServiceB

我想测试ControllerClass,特别是:

  • ServiceA 自动装配类

  • ServiceB模拟这个服务,用一个模拟类来实现接口,总是返回固定值。

我能怎么做?

java spring spring-boot

7
推荐指数
2
解决办法
5171
查看次数

css渐变背景按钮

我会在这个页面中创建一个这样的按钮(GetStarted按钮):http: //www.behance.net/signup/

我不知道如何创建蓝色背景渐变按钮.我不明白使用什么css属性.

谁能帮我?

非常感谢.

html css gradient input button

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

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

maven Surefire 插件不使用 --enable-preview 模式

这是我的 pom.xml:

...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>13</source>
                <target>13</target>
                <release>13</release>
                <compilerArgs>
                    --enable-preview
                </compilerArgs>
            </configuration>
        </plugin>
...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.2</version>
            <configuration>
                <reuseForks>false</reuseForks>
                <argLine>--enable-preview</argLine>
            </configuration>
        </plugin>
Run Code Online (Sandbox Code Playgroud)

问题是构建正常,但是当启动测试时我得到:

[错误] 无法在项目 foo-project 上执行目标 org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test):执行目标 org.apache.maven 的默认测试.plugins:maven-surefire-plugin:3.0.0-M4:测试失败:java.lang.UnsupportedClassVersionError:未为其/project/MyTest启用预览功能(类文件版本57.65535)。尝试使用 '--enable-preview' 运行 -> [帮助 1]

我必须在 pom.xml 中插入什么才能在启用预览模式的情况下执行测试?

谢谢。

java maven maven-surefire-plugin java-13

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