小编frh*_*rhd的帖子

nvm在新的终端会话中保持"遗忘"节点

在OS X中使用新的终端会话时,nvm忘记节点版本并默认为空:

$ nvm ls:

         .nvm
     v0.11.12
     v0.11.13
Run Code Online (Sandbox Code Playgroud)

我必须nvm use v.0.11.13在每个会话中继续打击:

         .nvm
     v0.11.12
->   v0.11.13
Run Code Online (Sandbox Code Playgroud)

我已经尝试了brew安装,以及官方安装脚本.

.profile的brew版本:

#nvm
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
Run Code Online (Sandbox Code Playgroud)

对于install.sh脚本:

$ curl https://raw.githubusercontent.com/creationix/nvm/v0.10.0/install.sh | bash

#nvm
export NVM_DIR="/Users/farhad/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
Run Code Online (Sandbox Code Playgroud)

我有什么不对的任何线索?

macos homebrew node.js npm nvm

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

错误:[$ injector:unpr]未知提供者:$ stateProvider

我试图使用ui.router时遇到错误:

Uncaught Error: [$injector:modulerr] Failed to instantiate module bApp due to:
Error: [$injector:unpr] Unknown provider: $stateProvider
http://errors.angularjs.org/1.4.5/$injector/unpr?p0=%24stateProvider
at REGEX_STRING_REGEXP (http://localhost:9000/bower_components/angular/angular.js:68:12)
at http://localhost:9000/bower_components/angular/angular.js:4284:19
at getService (http://localhost:9000/bower_components/angular/angular.js:4432:39)
at Object.invoke (http://localhost:9000/bower_components/angular/angular.js:4464:13)
at runInvokeQueue (http://localhost:9000/bower_components/angular/angular.js:4379:35)
at http://localhost:9000/bower_components/angular/angular.js:4388:11
at forEach (http://localhost:9000/bower_components/angular/angular.js:336:20)
at loadModules (http://localhost:9000/bower_components/angular/angular.js:4369:5)
at createInjector (http://localhost:9000/bower_components/angular/angular.js:4294:11)
at doBootstrap (http://localhost:9000/bower_components/angular/angular.js:1655:20)
http://errors.angularjs.org/1.4.5/$injector/modulerr?p0=bApp&p1=Error%3A%20…F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A1655%3A20)
Run Code Online (Sandbox Code Playgroud)

angular.module('bApp', ['ui.router']);
angular.module('bApp').config(function($stateProvider, $urlRouterProvider) {
    urlRouterProvider.otherwise('/');

    $stateProvider
        .state('main', {
            url: "/",
            templateUrl: "/views/main.html"
        })

    .state('register', {
        url: "/register",
        templateUrl: "/views/register.html"
       
    });
});
Run Code Online (Sandbox Code Playgroud)
<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" …
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui-router

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

用于箱形阴影的触笔中的多线属性

如何在手写笔中将以下行重写为多行形式?

div
  box-shadow 0 0 0 black, 1 0 0, black, 0 0 1, black
Run Code Online (Sandbox Code Playgroud)

使用更大的box-shadow属性列表将使我的编辑器爆炸.我想要这样,但是Stylus语法不允许它:

div
  box-shadow
    0 0 0 black,
    1 0 0 black,
    0 0 1 black
Run Code Online (Sandbox Code Playgroud)

省略逗号也无效.这令人沮丧......

css stylus css3

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

Gradle解压存档,其中包含.git文件夹

使用Gradle 2.11JVM 1.8.0_77

ziptree的Gradle复制任务似乎不喜欢ziptree中的点文件夹,因为它.git完全忽略了该文件夹:

Archive.zip:

archive/someFile
archive/.manifest
archive/.git/objects/93/
archive/.git/objects/93/c426c3ffd836bfc0af36e6fd97a72b7b4f67be
archive/.git/objects/info/
archive/.git/objects/aa/
Run Code Online (Sandbox Code Playgroud)

摇篮任务

task unzip(type: Copy) {
  def zipFile = file("archive.zip")
  from zipTree(zipFile)
  into workingDir
}
Run Code Online (Sandbox Code Playgroud)

结果:

> $ gradle unzip
> $ find archive/.

archive/someFile
archive/.manifest
Run Code Online (Sandbox Code Playgroud)

使用类似的东西include '**/.git'似乎也不起作用。

有任何想法吗?

gradle

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

单个 web 应用程序重新加载会获取修改后的 Tomcat setenv.sh 吗?

是否可以修改 Tomcat 环境变量并让它们在不重新启动整个服务器的情况下由单个重新加载的 web 应用程序获取?

假设我们有 webapp A 和 B,以及 a setenv.sh

#!/bin/bash

BASE_DIR=/var/srv
JAVA_HOME=/opt/java/jdk1.8.0_45
TOMCAT_DIR=/opt/apache-tomcat-8.0.18
TOMCAT_PORT=8080
SOME_PROPERTY=SOMETHING
Run Code Online (Sandbox Code Playgroud)

如果我们SOME_PROPERTY只更改并重新加载 A,它会捕获新值,还是需要重新启动 Tomcat?

java tomcat

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

标签 统计

angular-ui-router ×1

angularjs ×1

css ×1

css3 ×1

gradle ×1

homebrew ×1

java ×1

macos ×1

node.js ×1

npm ×1

nvm ×1

stylus ×1

tomcat ×1