小编ver*_*joe的帖子

如何让多个项目共享node_modules目录?

每当我创建项目时,我都必须下载节点模块的所有依赖项.在不复制node_modules的情况下,无论如何都要共享多个项目中的中心node_modules?

像下面这样,我每次都要运行很多命令..

npm install gulp-usemin                                                                        
npm install gulp-wrap
npm install gulp-connect
npm install gulp-watch
npm install gulp-minify-css
npm install gulp-uglify
npm install gulp-concat
npm install gulp-less
npm install gulp-rename
npm install gulp-minify-html
Run Code Online (Sandbox Code Playgroud)

node.js npm

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

Maven构建错误失败

像下面一样,我跑步时出错了 mvn package

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar (default-jar) on project hello-world: Execution default-jar of goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar failed: Unable to load the mojo 'jar' in the plugin 'org.apache.maven.plugins:maven-jar-plugin:2.3.1'. A required class is missing: org/codehaus/plexus/components/io/resources/PlexusIoResourceCollection
    [ERROR] -----------------------------------------------------
    [ERROR] realm =    plugin>org.apache.maven.plugins:maven-jar-plugin:2.3.1
    [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    [ERROR] urls[0] = file:/C:/maven/repository/org/apache/maven/plugins/maven-jar-plugin/2.3.1/maven-jar-plugin-2.3.1.jar
    [ERROR] urls[1] = file:/C:/maven/repository/junit/junit/3.8.1/junit-3.8.1.jar
    [ERROR] urls[2] = file:/C:/maven/repository/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.jar
    [ERROR] urls[3] = file:/C:/maven/repository/org/codehaus/plexus/plexus-archiver/1.0/plexus-archiver-1.0.jar
    [ERROR] urls[4] = file:/C:/maven/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
    [ERROR] urls[5] = file:/C:/maven/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
    [ERROR] Number of foreign imports: 1
    [ERROR] import: Entry[import  from realm …
Run Code Online (Sandbox Code Playgroud)

maven

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

pip install numpy不起作用:"找不到匹配的发行版"

我是Python的新手.我安装了Python 2.7.10,它已经有了pip.我试图运行此命令来下载NumPy库.

D:\workspace\python>pip install numpy
Collecting numpy
  Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
Run Code Online (Sandbox Code Playgroud)

但我得到了这个错误.我怎么解决这个问题?

我也想知道之间的区别easy_installpip.

python windows python-2.7

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

com.mysema.query和com.querydsl之间的区别?

我是querydsl的新手.我看到了两种类型的querydsl实现.

有什么不同吗?我已经开发了com.mysema.query实现.但我认为我走错了路.请解释一下.

querydsl

12
推荐指数
1
解决办法
3892
查看次数

也不会抛出DataAccessException类型的异常; 异常类型必须是Throwable的子类

我的源代码如下.它有一个错误,"不能抛出DataAccessException类型的异常;异常类型必须是Throwable的子类".

我无法理解为什么错误发生了.让我知道.谢谢.

package com.sds.afi.cosmos.cmm.db.impl;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import com.sds.afi.cosmos.cmm.db.MainDao;

@Repository
//@SuppressWarnings("unchecked")   // ???? ????? ??? ??
public class MainDaoImpl extends SqlMapClientDaoSupport  implements MainDao {

    @Autowired
    private SqlMapClientTemplate sqlMapClientTemplate;

    @SuppressWarnings("unchecked")
    @Override
    public List<HashMap> getUserInfo() throws DataAccessException {

        List<HashMap> lists;

        lists = sqlMapClientTemplate.queryForList("common.getList");

        return lists;
    }

}
Run Code Online (Sandbox Code Playgroud)

exception-handling exception

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

通过brew安装yum的确切命令是什么?

我尝试通过brew install命令安装yum.但它没有使用下面的消息.问题是什么?我找不到任何好材料.

S0106602ad06e3352:ds jouk$ brew install "yum"
Error: No available formula with the name "yum" 
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: Non-HTTP proxy URI: https://70.10.15.12:8080
S0106602ad06e3352:ds jouk$ 
S0106602ad06e3352:ds jouk$ 
S0106602ad06e3352:ds jouk$ 
Run Code Online (Sandbox Code Playgroud)

yum

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

spring rest模板中exchange方法和execute方法的区别?

我有三个问题!

第一.

我使用spring框架通过rest协议发送数据.

restTemplate.exchange(requestUrl,HttpMethod.POST, request, listVo.getClass());

org.springframework.web.client.RestTemplate.exchange(String url, HttpMethod method, HttpEntity<?> requestEntity, Class<? extends Object> responseType, Object... uriVariables) throws RestClientException
Run Code Online (Sandbox Code Playgroud)

我没有任何问题地使用它,但我想知道参数responseType的用途.客户端不使用响应数据,而只使用响应状态代码/ msg.所以,我发送了一些毫无意义的String数据.但是他们接受"null"的错误被抛出.所以我发送了一个"null"字符串.不是空的.然后,错误摆脱了.但还有另一个问题.客户端从服务器收到数据并暂停了很长时间后.然后执行下一行代码.有什么问题?

第二

我找不到任何使用Spring RestTemplate的execute方法的引用.

第三

与标题一样,spring rest模板中的exchange方法和execute方法有什么区别?

感谢您的时间和精力.干杯.

rest spring

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

Chrome控制台中"[Object]"和"[object Object]"之间的区别?

我有一些代码如下.

MyRequests.cors_request("POST", 
        APP_CONFIG.APP_URL+"/users/selectAllUsers", 
        null, 
        function ok(users) {  

            $scope.usersNotFiltered = users;

            console.log('users--->', users);
            console.log('$scope.userPerSystem--->', $scope.userPerSystem);

            // delete the items that is already exists in the userPerSystem
            function filterUsers(element, index, array) {

                console.log("$scope.usersNotFiltered :: " + users);
                commonFindAndRemove($scope.usersNotFiltered, 'userId', element.userId);
                console.log('a[' + index + '] = ' + element.userId);
            }

            $scope.userPerSystem.forEach(filterUsers);

            $scope.users = $scope.usersNotFiltered;   
}, 
Run Code Online (Sandbox Code Playgroud)

我运行代码并观看控制台.chrome控制台中'[Object]'和'[object Object]'有什么区别?

用户---> [对象,对象,对象,对象,对象,对象,对象,对象,对象,对象,对象,对象,对象,对象,对象,对象,对象]

$ scope.userPerSystem ---> [Object] 0:Objectlength:1__proto __:Array [0] redca-ias.concat.js:5258

$ scope.usersNotFiltered :: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] ,[object Object],[object …

javascript

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

插件标签中的依赖项和依赖项之间有区别吗?

我有个问题.

在pom.xml中,依赖包含在两个地方.一个地方可以在<project>标签中,另一个地方可以在<plugin>标签中.

我认为标签中的依赖关系只与插件有关?这是对的吗?

提前致谢 :)

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>clustered-queue</artifactId>
   <packaging>jar</packaging>
   <name>HornetQ JMS Clustered Queue Example</name>

   <dependencies>

      <dependency>
         <groupId>org.hornetq.examples.jms</groupId>
         <artifactId>hornetq-jms-examples-common</artifactId>
         <version>${project.version}</version>
      </dependency>
      <dependency>
         <groupId>org.jboss.spec.javax.jms</groupId>
         <artifactId>jboss-jms-api_1.1_spec</artifactId>
      </dependency>

   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.hornetq</groupId>
            <artifactId>hornetq-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>start1</id>
                  <goals>
                     <goal>start</goal>
                  </goals>
                  <configuration>
                     <jndiPort>1199</jndiPort>
                     <jndiRmiPort>1198</jndiRmiPort>
                     <hornetqConfigurationDir>${basedir}/target/classes/hornetq/server1</hornetqConfigurationDir>
                     <fork>true</fork>
                     <systemProperties>
                        <property>
                           <name>udp-address</name>
                           <value>${udp-address}</value>
                        </property>
                     </systemProperties>
                  </configuration>
               </execution>
            </executions>
            <dependencies>

               <dependency>
                  <groupId>org.hornetq</groupId>
                  <artifactId>hornetq-core-client</artifactId>
                  <version>${project.version}</version>
               </dependency>
               <dependency>
                  <groupId>org.hornetq</groupId>
                  <artifactId>hornetq-server</artifactId>
                  <version>${project.version}</version>
               </dependency>

            </dependencies>
            <configuration>
               <waitOnStart>false</waitOnStart>
            </configuration>
         </plugin>
      </plugins>
   </build>

</project>
Run Code Online (Sandbox Code Playgroud)

maven-plugin maven

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

如何在 jenkins 的 windows 上使用批处理命令输出设置变量值

我想让 Jenkins 运行“执行 Windows 批处理命令” 在此处输入图片说明

运行此命令后,此命令将输出多行。这些行将在下一个构建步骤中使用,以便我想将它们保存到我的 Jenkins 环境变量中。

如何保存这些值?如果有其他方法,请告诉我。谢谢!

jenkins

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