小编use*_*545的帖子

使用Bootstrap在同一行输入和按钮

我想将输入字段和Button放在同一行.我想为按钮设置修复大小,并且我希望表单填充可用空间.我试图创建自己的解决方案,但遗憾的是按钮低于输入字段.我怎样才能解决这个问题?

在此输入图像描述

CSS:

.input-bar {
    display: table;
    width: 100%;
}

.input-bar-item {
    display: table-cell;
}

.input-bar-item > button {
    margin-left: 5px;
}

.width100 {
  width: 100%;
}
Run Code Online (Sandbox Code Playgroud)

HTML:

  <div class="input-bar">
    <div class="input-bar-item width100">
      <form>
         <div class="form-group">
            <input class="form-control width100">
        </div>
      </form>
    </div>
    <div class="input-bar-item">
      <button class="btn btn-info">MyButton</button>
    </div>
  </div>
Run Code Online (Sandbox Code Playgroud)

https://plnkr.co/edit/5clqg067q4DiMHRkoPEY?p=preview

html css twitter-bootstrap twitter-bootstrap-3

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

如何更改弹簧环境中的属性?

我在我的应用程序中使用spring Environment Bean来获取应用程序配置属性.我想从java代码更改spring环境中的属性值,而无需重新启动应用程序服务器.我怎样才能做到这一点?

@Service
public void MyService {
    @Autowired
    private Environment environment;

    public void doSomething(){
        String value = environment.getProperty("myproperty");
        ...
    }
}
Run Code Online (Sandbox Code Playgroud)

java spring

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

如何在 Ag-Grid 中设置过滤器的默认值?

我想为 Ag-Grid 中的列过滤器设置默认值,该值在初始化后处于活动状态。我怎样才能做到这一点?

ag-grid

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

Hibernate没有在Spring Boot Project中抛出LazyInitializationException

我使用Hibernate 5.0处理Spring Boot项目.不幸的是,LazyInitializationException即使提交了事务,Hibernate 也会在不抛出的情况下读取延迟的初始化对象.如何启用LazyInitializationException交易外部?

(当前行为隐藏了代码中的错误.)

java spring hibernate jpa

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

Spring构造函数中的非必需属性?

我想通过构造函数注入将 bean 列表注入到 spring bean 中。

@Component
public void MyBean {
    @Autowired
    public MyBean(List<BeanToInject> beanList) {
        ...
    }
}
Run Code Online (Sandbox Code Playgroud)

但 BeanToInject 的实现在其他模块中。这些模块可能已关闭。如果 applicationcontext 中没有 BeanToInject 的实现,则 spring 在启动时抛出异常,而不是注入空列表。我能做些什么?(基于设置器和私有财产的自动装配对我来说不是一个选择。)

java spring

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

Java中的Oracle等效排序

我想按字母顺序对Java字符串进行排序.排序应该类似于Oracle SQL order by.我曾尝试使用Java Collat​​or,但它优先考虑大字母上的小写字母.非英文字母也存在问题......

例如:

select * from TABLE1 order by COLUMN1;
Run Code Online (Sandbox Code Playgroud)

按以下顺序返回字符串:A,a,Á,á,Ä,ä,B,b,C,C(对我来说是正确的)

Collections.sort(strings, Collator.getInstance());
Run Code Online (Sandbox Code Playgroud)

订购这样的字符串:a,A,á,ä,Ä,Á,b,B,C,C(á,ä,Ä,Á顺序有问题)

(两种情况下的语言环境相同)

我不想输入整个字母表,因为我会忘记一些特别的字母.来自许多欧洲国家的许多不同的人将使用该申请.

java sql sorting oracle sql-order-by

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

在IE 11/Edge中使用Roboto字体

我想使用谷歌Roboto字体,但它在IE11/Edge中看起来非常难看.这是我的示例代码:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <link href='http://fonts.googleapis.com/css?family=Roboto:300' rel='stylesheet' type='text/css'>
    <title></title>
</head>
<body>
<div style="font-family: 'Roboto'">
    közötti m?veleteire.
</div>
Run Code Online (Sandbox Code Playgroud)

上部文本显示在IE/Edge中,较低的是Chrome版本.(字母ű非常难看)如何在IE中正确使用Roboto?

html css fonts roboto

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

如何在Spring集成中使用JAVA配置创建http outbound-gateway?

我有以下http出站网关.如何使用Java Config或Spring DSL进行此配置?

<int-http:outbound-gateway id="test"
                           url="http://localhost:8080/"
                           http-method="POST"
                           charset="UTF-8"
                           header-mapper="soapHeaderMapper"
                           request-factory="requestFactory"
                           request-channel="inputChannel"/>
Run Code Online (Sandbox Code Playgroud)

java spring spring-integration

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

如何在 Spring 集成中使用 Java DSL 创建 ws 入站网关?

我有以下 ws 入站网关。如何使用 Spring Integration Java 8 DSL 进行此配置?

<int-ws:inbound-gateway id="ws-inbound-gateway"
                        request-channel="ws-request-channel"
                        reply-channel="ws-response-channel"
                        error-channel="ws-error-channel"/>
Run Code Online (Sandbox Code Playgroud)

java spring spring-integration

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

在Spring与Java config集成中接收邮件

我想通过Spring Integration接收邮件。我在xml配置中找到了很多示例,但在Java DSL配置中却找不到任何示例。如何使用Java DSL编写以下xml配置?

<int-mail:inbound-channel-adapter id="imapAdapter"
      store-uri="imaps://[username]:[password]@imap.gmail.com/INBOX"
      channel="receiveChannel"
      should-delete-messages="true">
      <int:poller max-messages-per-poll="1" fixed-rate="5000"/>
</int-mail:inbound-channel-adapter>
Run Code Online (Sandbox Code Playgroud)

我尝试了以下解决方案,但我不知道如何向其中添加轮询器。

@Bean
public IntegrationFlow mailListener() {
    return IntegrationFlows.from(Mail.imapInboundAdapter("imaps://[username]:[password]@imap.gmail.com/INBOX").shouldDeleteMessages(true).get())
            .<Message>handle((payload, header) -> logMail(payload))
            .get();
}
Run Code Online (Sandbox Code Playgroud)

java dsl spring spring-integration

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

Bootstrap $ uibModal焦点到元素

我创建了一个AngularJs指令,该指令将焦点设置为html元素。但是它不适用于$ uibModal元素:

angular.module('ui.bootstrap.demo')
    .directive('focus', ['$timeout', function ($timeout) {
        return {
            restrict: 'A',
            link: function postLink(scope, element, attrs) {
                scope.$watch(attrs.focus, function(value) {
                    if(value === true) {
                        $timeout(function() {
                            element[0].focus();
                        });
                    }
                });
            }
        };
    }]);
Run Code Online (Sandbox Code Playgroud)

http://plnkr.co/edit/BrnFt1kYZN7VsIFRCt3S?p=preview

如何将焦点设置到$ uibModal中的元素?

javascript angularjs angular-ui-bootstrap bootstrap-modal jqlite

0
推荐指数
1
解决办法
2462
查看次数

什么:?运营商在bash做什么?

我在bash文件中有这样的表达式:

MY_NEW_VAR="path/${MY_VARIABLE:?}"
Run Code Online (Sandbox Code Playgroud)

什么:?运营商意味着

bash operators

-2
推荐指数
1
解决办法
842
查看次数