小编Ahm*_*med的帖子

Jboss 7.0.1:176个服务中的122个(54个服务是被动的或按需的)

运行以下命令后,我在Jboss AS 7.0.1中成功部署了war文件;

/host=master/server-config=mobile:start 
Run Code Online (Sandbox Code Playgroud)

我得到以下内容;

[Server:mobile] 12:47:50,349 INFO  [org.jboss.as.logging] (MSC service thread 1-4) Removing bootstrap log handlers
[Server:mobile] 12:47:50,391 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:jboss/datasources/ExampleDS]
[Server:mobile] 12:47:51,034 INFO  [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem
[Server:mobile] 12:47:51,068 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "MobileGateway.war"
[Server:mobile] 12:47:51,515 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api dependency to MobileGateway.war
[Server:mobile] 12:47:51,809 INFO  [org.jboss.web] (MSC service thread 1-4) registering web context: /MobileGateway
[Server:mobile] 12:47:51,822 INFO  [org.jboss.as.server.controller] …
Run Code Online (Sandbox Code Playgroud)

java linux jboss java-ee jboss7.x

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

Nestjs框架中的元数据是什么以及何时使用方法@setmetadata?

我正在从 Nest 文档中学习课程主题反思和元数据。他们使用了@setmetadata('roles'),但我不知道元数据来自何处以及何时使用?

metadata express nestjs

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

Kotlin:从列表中的嵌套集中查找计数(更多功能方法)

下面的功能创建一个地图,获取乘客数量> minTrips的乘客数量.代码完全正常.请看下面

fun List<Trip>.filter(minTrips : Int): Set<Passenger> {
    var passengerMap: HashMap<Passenger, Int> = HashMap()

    this.forEach { it: Trip ->
        it.passengers.forEach { it: Passenger ->
            var count: Int? = passengerMap.get(it)
            if (count == null) {
                count = 1
                passengerMap.put(it, count)
            } else {
                count += 1
                passengerMap.put(it, count)
            }
        }
    }

    val filteredMinTrips: Map<Passenger, Int> = passengerMap.filterValues { it >= minTrips }
    println (" Filter Results = ${filteredMinTrips}")
    return filteredMinTrips.keys
}
Run Code Online (Sandbox Code Playgroud)

虽然这是用Kotlin编写的,但似乎代码最初是用Java编写的,然后转换为Kotlin.如果它真的是用Kotlin写的,我相信这不会是这么多行代码.如何减少代码行?解决这个问题的更有趣的方法是什么?我可以使用哪些功能或功能直接提取乘客设置> minTrips?这是一个太多的代码,似乎很疯狂.任何指针在这里都会有所帮助.

java kotlin kotlin-extension kotlin-android-extensions

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

ReactJS - Disabling a component

I need to disable PostList component in its initial state.

import React from 'react';
import PostList from './PostList';

const App = () => {
    return (
        <div className="ui container">
             <PostList />
        </div>
    );
};

export default App;
Run Code Online (Sandbox Code Playgroud)

Whats the best way to disable (and grey out) a component? Possible solutions are to pass a value as props and then apply it to a ui element, However please keep in mind that PostList may have inner nested components as well. Please …

javascript disabled-input web-component reactjs

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