小编d-m*_*man的帖子

android向下滚动

我有文本区域,然后到"确定"和"取消"按钮.当我点击文本区域键盘出现并聚焦在文本区域时,按钮会隐藏在键盘后面.

我希望当文本区域获得焦点时稍微滚动一下,并在选择文本区域ID时显示底部按钮.

android scroll textview

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

Java jasper报告列表作为数据源

我想将列表对象作为我的数据源,你能告诉我.jrxml文件我应该如何设计我的报告?

public class TestReport 
{
 public void runReport(String fileName, String outFileName) 
 {
  try 
  {
   List<R> list = new ArrayList<R>(5);

   Map parameters = new HashMap();
   list.add(new R("a1" ,"a2"));
   list.add(new R("b1" ,"b2"));
   list.add(new R("c1" ,"c2"));
     /*parameters.put("my_name", "faisal khan");
     parameters.put("my_addr", "address comes here");*/
            JasperPrint print = JasperFillManager.fillReport( fileName, parameters, new JREmptyDataSource());
            JRExporter exporter = new JRPdfExporter();
            exporter.setParameter(
            JRExporterParameter.OUTPUT_FILE_NAME,outFileName);
            exporter.setParameter(
            JRExporterParameter.JASPER_PRINT, print);
            JasperExportManager.exportReportToPdfFile(print, outFileName);
            print = null;
            exporter = null;
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

 private class R{
  private …
Run Code Online (Sandbox Code Playgroud)

java jasper-reports

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

每30分钟后出现一次春天的cron表达

Java spring - 我有cron job的cron表达式.

0 0/35 * * * ?
Run Code Online (Sandbox Code Playgroud)

但是上面提到的cron表达式在一小时内就会发生一次,如下所示

1:35 2:35 3:35 4:35

我想在35分钟后每隔一小时开一次

有什么快速建议吗?

cron spring expression

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

Maven删除外部文件

我正在使用Eclipse/maven插件.我想用aboslute路径删除外部文件,我有以下示例,但它声称只删除驻留在项目内的相关文件

<plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>some/relative/path</directory>
                            <includes>
                                <include>**/*.tmp</include>
                                <include>**/*.log</include>
                            </includes>
                            <excludes>
                                <exclude>**/important.log</exclude>
                                <exclude>**/another-important.log</exclude>
                            </excludes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
Run Code Online (Sandbox Code Playgroud)

file-io maven

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

使用FOR XML的SQL Server EXPLICIT模式

我正在使用SQL Server 2008,我正在尝试使用EXPLICIT模式生成自定义xml FOR XML.

我有以下查询的一对多关系

select  
    p.personid, p.firstname, a.P_City 
from 
    tblPeople p with (nolock) 
left outer join 
    tblAddresses a with (nolock) on p.personid = a.personid 
where 
    p.personid = 120773
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我希望人作为父母和地址作为孩子可能是多个因为人们要解决有一对多的关系.

我写了以下查询

 select 1 as TAG,
        null as parent, 
        p.personid as [person!1!personid],
        p.FirstName as [person!1!firstname],

        null as [addr!2!] 
        from tblPeople p with (nolock) where p.PersonID in (120773,117396)

        union all 

select 2,1, 
        p.PersonID, p.FirstName, a.P_City from tblAddresses a with(nolock), tblPeople p 
        where p.PersonID=a.PersonID and p.PersonID in (120773,117396)

        for …
Run Code Online (Sandbox Code Playgroud)

t-sql for-xml sql-server-2008 for-xml-explicit

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

angular2最终版本ng-bootstrap systemjs.config.js问题

有角度的人最近发布了angular2最终版本

一切都很好但是systemjs.config.js坏了.我看了他们的官方快速启动和angular2核心库的固定配置,但ng-bootstrap配置仍然被打破.以为有人在这里可以帮助我

我得到了404

http:// localhost:8080/my-proj/node_modules /%40ng-bootstrap/ng-bootstrap / 404(未找到)

以下是我的systemjs.config.js

(function (global) {

  System.config({
    paths: {
      // paths serve as alias
      'npm:': 'node_modules/'
    },
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: 'app',
      // angular bundles
      '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
      '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
      '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
      '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
      '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
      '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
      '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
      // other libraries
      'rxjs':                       'npm:rxjs',
      'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
     '@ng-bootstrap':              'npm:@ng-bootstrap',
      '@ng-bootstrap/ng-bootstrap':'npm:@ng-bootstrap/ng-bootstrap',


      '@ng-bootstrap/accordion':'npm:@ng-bootstrap/ng-bootstrap/accordion',
      '@ng-bootstrap/alert': 'npm:@ng-bootstrap/ng-bootstrap/alert', …
Run Code Online (Sandbox Code Playgroud)

ng-bootstrap angular

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

ng-bootstrap示例从组件调用方法

angular2 ng-bootstrap下拉下拉组件

有人可以帮我找出如何用下拉键绑定angular2组件并调用open或close方法.

他们没有太多文件.

ng-bootstrap angular

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

Angular2 this.route.params.map

Angular2我是懒惰加载模块并设置子路由如下

module.ts

const routes: Routes = [
    { path: '', component: ProgramsComponent},
    { path: 'create/:id', component: CreateProgramComponent}

];
Run Code Online (Sandbox Code Playgroud)

这里是利用"创建"路线的链接

<a [routerLink]="['create','123']" class="btn btn-primary">New</a>
Run Code Online (Sandbox Code Playgroud)

在接收器组件中试图提取如下的id值

constructor(private route: ActivatedRoute, private programService:ProgramService) {

    this.route.params
        .map(params => params['id'])
        .switchMap(id => this.programService.getProgramById(id))
        .subscribe(program => this.model = program);
}
Run Code Online (Sandbox Code Playgroud)

我得到以下错误,任何帮助表示赞赏

core.umd.js:3462 EXCEPTION: Uncaught (in promise): TypeError: this.route.params.map is not a function
TypeError: this.route.params.map is not a function
Run Code Online (Sandbox Code Playgroud)

angular2-routing angular

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

angular-cli简单配置,无需测试和ng服务

我有java webapp angular2支持.

.java和.ts文件的打包和编译是通过maven完成的,然后我们使用spring-boot运行.war,它提供了代码的热部署.

我想angular-cli只使用同意,生成组件,服务等.我没有计划添加茉莉花测试,所以我不担心测试,服务器配置等..我不想要webpacking和额外的angular-cli垃圾文件.只有已经定义的package.json 是否有一种方法我可以在现有项目上使用angular-cli来生成文件结构?

以下是项目和文件结构.

src/main/webapp
src/main/webapp/package.json
src/main/webapp/systemjs.config.js
src/main/webapp/app
src/main/webapp/main.ts
src/main/webapp/module.ts
src/main/webapp/component.ts
src/main/webapp/landing.html
src/main/webapp/node_modules
Run Code Online (Sandbox Code Playgroud)

以下是我的 package.json

{
  "name": "angular-simple-start",
  "version": "1.0.0",
  "description": "Simple app",
  "scripts": {
  },
  "dependencies": {
    "@angular/common": "~2.4.0",
    "@angular/compiler": "~2.4.0",
    "@angular/core": "~2.4.0",
    "@angular/forms": "~2.4.0",
    "@angular/http": "~2.4.0",
    "@angular/platform-browser": "~2.4.0",
    "@angular/platform-browser-dynamic": "~2.4.0",
    "@angular/router": "~3.4.0",

    "angular-in-memory-web-api": "~0.2.4",
    "systemjs": "0.19.40",
    "core-js": "^2.4.1",
    "rxjs": "5.0.1",
    "zone.js": "^0.7.4"
  },
  "devDependencies": {
    "concurrently": "^3.2.0",
    "typescript": "~2.0.10",
    "@types/node": "^6.0.46",
  },

}
Run Code Online (Sandbox Code Playgroud)

java spring-boot angular-cli angular

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

使用 Cucumber-jvm 4 并行运行 Cucumber 测试

Java v8.x - spring v5.x 黄瓜 v4.2.0

我试过了temyers/cucumber-jvm-parallel-plugin,它工作正常,但是当我到达他们的 gitihub 页面时,他们宣布停止使用这个插件 b/c Cucumber 已经开始支持来自 Cucumber-jvm 4.0.0 的并行测试运行支持。

我有使用以下 Maven 依赖项的现有测试。

cucumber-java v4.2.0
cucumber-junit v4.2.0
cucumber-spring v4.2.0
Run Code Online (Sandbox Code Playgroud)

我有两个问题让我感到困惑。

  1. 为了使用cucumber-jvm,我是否必须更改我的依赖项,否则我当前的依赖项将起作用。
  2. 我可以只通过参数 --parallel 开始并行黄瓜测试吗?

任何帮助表示赞赏。

cucumber cucumber-jvm cucumber-junit

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