小编Mer*_*cer的帖子

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

如何在shell脚本中包含包含变量的文件

我有很多脚本shell,我想在这个shell中包含一个包含变量的文件

脚本?

我的var脚本:

###################################################################################
ORACLE_LOGIN=login
ORACLE_PWD=pwd
CHEMIN_1="/home/"
CHEMIN_2="/scripts/"
LOG_FILE="$CHEMIN_1/max.log"
export ORACLE_SID=oracle_sid
###################################################################################
Run Code Online (Sandbox Code Playgroud)

我的脚本sh:

#!/bin/ksh
#set -x

# ==============   LOAD VAR HERE  ====================================
????

##################################################################
####                          Begin                           ####
##################################################################

write "Begin $0"  

$ORACLE_HOME/bin/sqlplus -s $ORACLE_LOGIN/$ORACLE_PWD@$ORACLE_SID <<EOF >> $LOG_FILE 2>&1 
@$CHEMIN_2/sp_rep_alim_dia_date_max.sql
exit
EOF

write "End."
Run Code Online (Sandbox Code Playgroud)

谢谢.

linux bash sh

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

无法找到合适的角度版本

我继续得到这个错误.有什么想法吗?

$ bower install ng-roundabout --save
bower cached        git://github.com/angular/bower-angular-mocks.git#1.3.15
bower validate      1.3.15 against git://github.com/angular/bower-angular-mocks.
git#>=1.2.*
bower cached        git://github.com/Wildhoney/ngRoundabout.git#0.2.5
bower validate      0.2.5 against git://github.com/Wildhoney/ngRoundabout.git#*
bower cached        git://github.com/angular/bower-angular-mocks.git#1.2.28
bower validate      1.2.28 against git://github.com/angular/bower-angular-mocks.
git#~1.2.24
bower cached        git://github.com/angular/bower-angular.git#1.2.28
bower validate      1.2.28 against git://github.com/angular/bower-angular.git#~1
.2.24
bower cached        git://github.com/angular/bower-angular.git#1.3.15
bower validate      1.3.15 against git://github.com/angular/bower-angular.git#>=
1.2.0
bower cached        git://github.com/angular/bower-angular.git#1.3.15
bower validate      1.3.15 against git://github.com/angular/bower-angular.git#>=
1.2.*
bower cached        git://github.com/angular/bower-angular.git#1.3.15
bower validate      1.3.15 against git://github.com/angular/bower-angular.git#>=
1
bower cached        git://github.com/angular/bower-angular.git#1.2.28
bower validate      1.2.28 against git://github.com/angular/bower-angular.git#1.
2.28
bower cached        git://github.com/angular/bower-angular.git#1.3.15 …
Run Code Online (Sandbox Code Playgroud)

angularjs bower

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

FileWriter不存在目录

我使用FileWriter创建一个文件.我有一个错误目录不存在我认为FileWriter创建目录,如果它不存在

FileWriter writer = new FileWriter(sFileName);
Run Code Online (Sandbox Code Playgroud)

java filewriter

5
推荐指数
1
解决办法
9089
查看次数

使用POI创建单元格时出错

我从Java导出到xls,我使用POI库.

我的createCell方法:

private Cell createCell(Row ligne, int col, String value, CellStyle style, HSSFWorkbook classeur) {        
    //org.apache.poi.hssf.usermodel.HSSFOptimiser.optimiseCellStyles(classeur);
    CellStyle styleCell = classeur.createCellStyle();
    styleCell.cloneStyleFrom(style);
    return createCell(ligne, col, value, styleCell);
}


protected Cell createCell(Row ligne, int col, String value, CellStyle style) {
    Cell cell = createCell(ligne, col, value);
    cell.setCellStyle(style);
    return cell;
}
Run Code Online (Sandbox Code Playgroud)

我在For中调用此方法,我有此消息错误:

Echec de l'export:超出了最大单元格样式数.您可以在.xls工作簿中定义最多4000个样式

如何重用我的单元格而不必重新创建每次迭代?

谢谢

java excel apache-poi

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

无法自动装配依赖Jar中存在的Bean

我在以下问题中尝试过这个解决方案,但在我的情况下没有一个工作:

@Configuration
@EnableWebMvc
@ComponentScan("myapp.framework.export")
public class WebConfig extends MyAppWebConfig {

    @Override
    public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) {

        super.configureContentNegotiation(configurer);

    }

    @Override
    public void configureMessageConverters(final List<HttpMessageConverter<?>> converters) {

        super.configureMessageConverters(converters);

    }

}
Run Code Online (Sandbox Code Playgroud)

错误:

INFO: Initializing Spring FrameworkServlet 'services-rest'
2017-04-11 15:25:52,774|localhost-startStop-1|NO_TID|NO_USER|ERROR|org.springframework.web.servlet.DispatcherServlet.initServletBean|Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xlsHttpMessageConverter': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'myapp.framework.export.ExportXlsModelService<?>[]' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class …
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc

5
推荐指数
1
解决办法
1229
查看次数

创建一个过程,检索我的表上的所有索引并重建

我想创建一个过程来检索我的表上的所有索引并重建

我使用此查询检索所有索引:

select index_name from user_indexes where table_name='your_table_name'
Run Code Online (Sandbox Code Playgroud)

我用这个查询重建:

alter index <index_name> rebuild;
Run Code Online (Sandbox Code Playgroud)

谢谢.

indexing rebuild stored-procedures oracle10g

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

如何使用Join定义JPA存储库查询?

我想通过注释@Query通过Jpa存储库创建一个Join查询我有三个表.

本机查询是:

select application.APP_ID 
from user, customer, application 
where user.USE_CUSTOMER_ID = customer.CUS_ID 
and application.APP_CUSTOMER_ID = customer.CUS_ID 
and user.USE_ID=1;
Run Code Online (Sandbox Code Playgroud)

现在我有了Table Hibernate实体,所以我在ApplicationRepository中尝试过

@Query(SELECT  application FROM  Application a
  INNER JOIN customer c ON c.customer.id = a.customer.id 
  INNER JOIN user u ON u.customer.id = c.customer.id
  INNER JOIN application a ON a.user.id = u.id
  WHERE
  u.id = :user.id)
List<Application> findApplicationsByUser(@Param("User") User user);
Run Code Online (Sandbox Code Playgroud)

日志说

意外的标记

请问有什么想法吗?

我的表实体

Application.java:

@Entity
@Table
public class Application extends BaseSimpleEntity {
...
    @ManyToOne(optional = false)
    private Customer customer;
...
}
Run Code Online (Sandbox Code Playgroud)

Customer.java: …

java mysql sql hibernate jpa

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

对元素仍在第一个位置的列表进行排序

我有一个String列表:

List<String> listString  = new ArrayList<String>();
listString.add("faq");
listString.add("general");
listString.add("contact");
Run Code Online (Sandbox Code Playgroud)

我在列表上做了一些处理,我想对这个列表进行排序,但我希望"general"始终以第一个位置结束.谢谢 ;)

java sorting list

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

在我的输入中显示多个信息

我有一个输入:

<div class="search-field search-field-date search-field-calendar ui-datepicker-calendar columns small-3">
    <input type="text" data-ng-model="goDate"
           placeholder="Date d'aller" data-mtx-datepicker data-mtx-maxdate="returnDate" data-mtx-time="horairesAller" />
</div>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

当我选择日期时,我有这个:

在此输入图像描述

现在我想显示如下的多个信息:

在此输入图像描述

当我选择日期时:

在此输入图像描述

我不知道该怎么做.

Plnkr.

html css angularjs

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