问:
Bluemix Deployment Issue Node.js w/ Express
I'm having issues with my deployment failing, and have no idea why. Any help would be greatly appreciated! I have spent a stupid amount of hours trying find out what's going on with no luck. I'm pretty sure it might be something dumb that I'm missing. It's odd. The build will succeed, and it will server. Then it crashes, and I have zero ideas why at the moment.

Using the Node.js Buildpack: https://github.com/cloudfoundry/nodejs-buildpack

Package.json file

```<code>{
    "name": "core-backend-server",
    "version": "1.0.0",
    "dependencies": {
        "bcryptjs": "^2.1.0",
        "body-parser": "^1.13.2",
        "cors": "^2.8.1",
        "express": "^4.13.0",
        "express-error-middleware": "^1.3.0",
        "express-jwt": "^3.0.1",
        "jade": "^1.11.0",
        "jsonwebtoken": "^5.0.2",
        "lodash": "^3.10.0",
        "mongodb": "^2.1.16",
        "mongoskin": "^2.1.0",
        "q": "^1.4.1",
        "request": "^2.58.0",
        "rootpath": "^0.1.2",
        "cfenv": "1.0.x"
    },
    "license": "MIT",
    "scripts": {
        "start": "node app.js"
    },
    "engines": {
        "node" : "7.8.x"
    }
}
</code>```

Bluemix Deployment Logs:

```<code>4/16/2017 1:40:29 PM    OUT APP Exit status 143
4/16/2017 1:40:29 PM    OUT CELL    Exit status 0
4/16/2017 1:40:33 PM    OUT API Updated app with guid e6824266-a05f-     4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 1:40:33 PM    OUT STG Creating container
4/16/2017 1:40:48 PM    OUT STG Successfully created container
4/16/2017 1:40:48 PM    OUT STG Downloading app package...
4/16/2017 1:40:55 PM    OUT CELL    Successfully destroyed container
4/16/2017 1:40:56 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 1:40:56 PM    OUT STG Downloading build artifacts cache...
4/16/2017 1:40:57 PM    OUT STG Downloaded build artifacts cache (4.1M)
4/16/2017 1:40:57 PM    OUT STG Staging...
4/16/2017 1:41:00 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 1:41:00 PM    OUT STG -----> Creating runtime environment
4/16/2017 1:41:00 PM    OUT STG
4/16/2017 1:41:00 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 1:41:00 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 1:41:00 PM    OUT STG NODE_VERBOSE=false
4/16/2017 1:41:00 PM    OUT STG NODE_ENV=production
4/16/2017 1:41:00 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 1:41:00 PM    OUT STG -----> Installing binaries
4/16/2017 1:41:00 PM    OUT STG engines.node (package.json):  unspecified
4/16/2017 1:41:00 PM    OUT STG engines.npm (package.json):   unspecified (use default)
4/16/2017 1:41:00 PM    OUT STG Downloading and installing node 4.8.2...
4/16/2017 1:41:03 PM    OUT STG -----> Restoring cache
4/16/2017 1:41:03 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 1:41:03 PM    OUT STG -----> Building dependencies
4/16/2017 1:41:03 PM    OUT STG Rebuilding any native modules
4/16/2017 1:41:06 PM    OUT STG body-parser@1.17.1 /tmp/app/node_modules/body-parser
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 1:41:06 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 1:41:06 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 1:41:06 PM    OUT STG Installing any new modules (package.json)
4/16/2017 1:41:09 PM    OUT STG -----> Caching build
4/16/2017 1:41:09 PM    OUT STG Clearing previous node cache
4/16/2017 1:41:09 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 1:41:09 PM    OUT STG - .npm (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG -----> Build succeeded!
4/16/2017 1:41:23 PM    OUT STG Exit status 0
4/16/2017 1:41:23 PM    OUT STG Staging complete
4/16/2017 1:41:23 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 1:41:23 PM    OUT STG Uploading build artifacts cache...
4/16/2017 1:41:23 PM    OUT STG Uploading droplet...
4/16/2017 1:41:30 PM    OUT STG Uploaded droplet (43.7M)
4/16/2017 1:41:30 PM    OUT STG Destroying container
4/16/2017 1:41:31 PM    OUT CELL    Creating container
4/16/2017 1:41:33 PM    OUT CELL    Successfully created container
4/16/2017 1:41:38 PM    OUT CELL    Starting health monitoring of container
4/16/2017 1:41:39 PM    OUT APP Server listening on port ---- 8080
4/16/2017 1:41:40 PM    OUT CELL    Container became healthy
4/16/2017 1:43:28 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN", "buildpack"=>"https://github.com/cloudfoundry/nodejs-buildpack"})
4/16/2017 1:44:54 PM    OUT CELL    Exit status 0
4/16/2017 1:44:54 PM    OUT APP Exit status 143
4/16/2017 1:44:54 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 1:44:54 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 1:44:56 PM    OUT CELL    Successfully destroyed container
4/16/2017 1:45:16 PM    OUT STG Downloading app package...
4/16/2017 1:45:25 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 1:45:25 PM    OUT STG Staging...
4/16/2017 1:45:28 PM    OUT STG -----> Creating runtime environment
4/16/2017 1:45:28 PM    OUT STG
4/16/2017 1:45:28 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 1:45:28 PM    OUT STG NODE_VERBOSE=false
4/16/2017 1:45:28 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 1:45:28 PM    OUT STG -----> Installing binaries
4/16/2017 1:45:28 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG Downloading and installing node ...
4/16/2017 1:45:29 PM    ERR STG DEPENDENCY MISSING IN MANIFEST:
4/16/2017 1:45:29 PM    ERR STG Unfortunately, we are either unable to resolve the dependency into
4/16/2017 1:45:29 PM    ERR STG a binary and version number or the requested version or version range is not supported.
4/16/2017 1:45:29 PM    ERR STG Please replace the URL with a valid link or the requested version/range
4/16/2017 1:45:29 PM    ERR STG with a supported version or version range.
4/16/2017 1:45:29 PM    OUT STG -----> Build failed
4/16/2017 1:45:29 PM    ERR STG Failed to compile droplet
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG We're sorry this build is failing! You find more info about the nodejs buildpack here:
4/16/2017 1:45:29 PM    OUT STG https://docs.cloudfoundry.org/buildpacks/node/index.html
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG - node_modules checked into source control
4/16/2017 1:45:29 PM    OUT STG https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG Exit status 223
4/16/2017 1:45:29 PM    ERR STG Staging failed: Exited with status 223
4/16/2017 1:45:29 PM    OUT STG Destroying container
4/16/2017 1:45:48 PM    OUT STG Successfully destroyed container
4/16/2017 2:04:52 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN"})
4/16/2017 2:06:06 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:06:07 PM    OUT STG Creating container
4/16/2017 2:06:20 PM    OUT STG Successfully created container
4/16/2017 2:06:20 PM    OUT STG Downloading app package...
4/16/2017 2:06:31 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 2:06:31 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:06:31 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:06:31 PM    OUT STG Staging...
4/16/2017 2:06:34 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:06:34 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:06:34 PM    OUT STG
4/16/2017 2:06:34 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:06:34 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:06:34 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:06:34 PM    OUT STG NODE_ENV=production
4/16/2017 2:06:34 PM    OUT STG -----> Installing binaries
4/16/2017 2:06:34 PM    OUT STG engines.node (package.json):  ^6.9.x
4/16/2017 2:06:34 PM    OUT STG engines.npm (package.json):   ^2.1.x
4/16/2017 2:06:34 PM    OUT STG
4/16/2017 2:06:34 PM    OUT STG Downloading and installing node 6.10.2...
4/16/2017 2:06:36 PM    OUT STG Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-6.10.2-linux-x64-9f48b587.tgz]
4/16/2017 2:06:57 PM    OUT STG -----> Restoring cache
4/16/2017 2:06:58 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:06:58 PM    OUT STG -----> Building dependencies
4/16/2017 2:06:58 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:06:58 PM    OUT STG Rebuilding any native modules
4/16/2017 2:07:00 PM    OUT STG body-parser@1.17.1 /tmp/app/node_modules/body-parser
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:07:00 PM    OUT STG jsbn@0.1.1 /tmp/app/node_modules/jsbn
4/16/2017 2:07:00 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:07:04 PM    OUT STG -----> Caching build
4/16/2017 2:07:04 PM    OUT STG Clearing previous node cache
4/16/2017 2:07:04 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG -----> Build succeeded!
4/16/2017 2:07:27 PM    OUT STG Exit status 0
4/16/2017 2:07:27 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:07:27 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:07:27 PM    OUT STG Uploading droplet...
4/16/2017 2:07:27 PM    OUT STG Uploaded build artifacts cache (258B)
4/16/2017 2:07:30 PM    OUT STG Uploading complete
4/16/2017 2:07:31 PM    OUT STG Destroying container
4/16/2017 2:07:31 PM    OUT CELL    Creating container
4/16/2017 2:07:42 PM    OUT STG Successfully destroyed container
4/16/2017 2:07:43 PM    OUT CELL    Successfully created container
4/16/2017 2:07:50 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:07:51 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:07:52 PM    OUT CELL    Container became healthy
4/16/2017 2:11:00 PM    OUT APP Exit status 143
4/16/2017 2:11:00 PM    OUT CELL    Exit status 0
4/16/2017 2:11:00 PM    OUT CELL    Destroying container
4/16/2017 2:11:00 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:11:01 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:11:02 PM    OUT STG Creating container
4/16/2017 2:11:08 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:11:25 PM    OUT STG Downloading app package...
4/16/2017 2:11:33 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 2:11:33 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:11:34 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:11:34 PM    OUT STG Staging...
4/16/2017 2:11:36 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:11:36 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:11:36 PM    OUT STG
4/16/2017 2:11:36 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:11:36 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:11:36 PM    OUT STG NODE_ENV=production
4/16/2017 2:11:36 PM    OUT STG -----> Installing binaries
4/16/2017 2:11:36 PM    OUT STG engines.npm (package.json):   ^2.1.x
4/16/2017 2:11:36 PM    OUT STG
4/16/2017 2:11:36 PM    OUT STG Downloading and installing node 7.8.0...
4/16/2017 2:11:39 PM    OUT STG Downloading and installing npm ^2.1.x (replacing version 4.2.0)...
4/16/2017 2:11:54 PM    OUT STG -----> Restoring cache
4/16/2017 2:11:54 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:11:54 PM    OUT STG -----> Building dependencies
4/16/2017 2:11:54 PM    OUT STG Rebuilding any native modules
4/16/2017 2:11:57 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:11:57 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 2:11:57 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 2:11:57 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:12:00 PM    OUT STG -----> Caching build
4/16/2017 2:12:00 PM    OUT STG Clearing previous node cache
4/16/2017 2:12:00 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:12:00 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:12:00 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:12:00 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:12:01 PM    OUT STG -----> Build succeeded!
4/16/2017 2:12:28 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:12:28 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:12:28 PM    OUT STG Uploaded build artifacts cache (260B)
4/16/2017 2:12:33 PM    OUT STG Uploaded droplet (49.3M)
4/16/2017 2:12:33 PM    OUT STG Uploading complete
4/16/2017 2:12:33 PM    OUT STG Destroying container
4/16/2017 2:12:34 PM    OUT CELL    Creating container
4/16/2017 2:12:48 PM    OUT STG Successfully destroyed container
4/16/2017 2:12:50 PM    OUT CELL    Successfully created container
4/16/2017 2:12:58 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:12:59 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:25:44 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN"})
4/16/2017 2:27:00 PM    OUT CELL    Exit status 0
4/16/2017 2:27:00 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:27:00 PM    OUT APP Exit status 143
4/16/2017 2:27:00 PM    OUT CELL    Destroying container
4/16/2017 2:27:01 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:27:02 PM    OUT STG Creating container
4/16/2017 2:27:12 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:27:18 PM    OUT STG Successfully created container
4/16/2017 2:27:18 PM    OUT STG Downloading app package...
4/16/2017 2:27:28 PM    OUT STG Downloaded app package (44.3M)
4/16/2017 2:27:28 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:27:28 PM    OUT STG Downloaded build artifacts cache (260B)
4/16/2017 2:27:28 PM    OUT STG Staging...
4/16/2017 2:27:31 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:27:31 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:27:31 PM    OUT STG
4/16/2017 2:27:31 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:27:31 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:27:31 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:27:31 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 2:27:31 PM    OUT STG -----> Installing binaries
4/16/2017 2:27:31 PM    OUT STG engines.node (package.json):  >=4.4.x
4/16/2017 2:27:31 PM    OUT STG
4/16/2017 2:27:54 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:27:54 PM    OUT STG -----> Building dependencies
4/16/2017 2:27:54 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:27:54 PM    OUT STG Rebuilding any native modules
4/16/2017 2:27:57 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:27:57 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 2:27:57 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:27:59 PM    OUT STG -----> Caching build
4/16/2017 2:27:59 PM    OUT STG Clearing previous node cache
4/16/2017 2:27:59 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:27:59 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG -----> Build succeeded!
4/16/2017 2:28:24 PM    OUT STG Exit status 0
4/16/2017 2:28:24 PM    OUT STG Staging complete
4/16/2017 2:28:24 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:28:24 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:28:24 PM    OUT STG Uploading droplet...
4/16/2017 2:28:24 PM    OUT STG Uploaded build artifacts cache (258B)
4/16/2017 2:28:29 PM    OUT STG Uploading complete
4/16/2017 2:28:29 PM    OUT STG Destroying container
4/16/2017 2:28:42 PM    OUT STG Successfully destroyed container
4/16/2017 2:28:55 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:44:03 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN", "buildpack"=>"https://github.com/cloudfoundry/nodejs-buildpack"})
4/16/2017 2:45:18 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:45:18 PM    OUT APP Exit status 143
4/16/2017 2:45:18 PM    OUT CELL    Exit status 0
4/16/2017 2:45:18 PM    OUT CELL    Destroying container
4/16/2017 2:45:19 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:45:29 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:45:39 PM    OUT STG Successfully created container
4/16/2017 2:45:39 PM    OUT STG Downloading app package...
4/16/2017 2:45:47 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:45:47 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:45:47 PM    OUT STG Staging...
4/16/2017 2:45:52 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:45:52 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:45:52 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:45:52 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:45:52 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:45:52 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 2:45:52 PM    OUT STG -----> Installing binaries
4/16/2017 2:45:52 PM    OUT STG engines.node (package.json):  >=4.4.x
4/16/2017 2:45:52 PM    OUT STG engines.npm (package.json):   >=2.1.x
4/16/2017 2:45:52 PM    OUT STG
4/16/2017 2:45:52 PM    OUT STG Downloading and installing node 7.8.0...
4/16/2017 2:45:54 PM    OUT STG Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-7.8.0-linux-x64-a72100f9.tgz]
4/16/2017 2:45:55 PM    OUT STG Downloading and installing npm >=2.1.x (replacing version 4.2.0)...
4/16/2017 2:46:15 PM    OUT STG -----> Restoring cache
4/16/2017 2:46:16 PM    OUT STG Loading 3 from cacheDirectories (default):
4/16/2017 2:46:16 PM    OUT STG - .npm (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG - .cache/yarn (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG - bower_components (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG -----> Building dependencies
4/16/2017 2:46:16 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:46:16 PM    OUT STG Rebuilding any native modules
4/16/2017 2:46:19 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:46:19 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 2:46:19 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:46:21 PM    OUT STG -----> Caching build
4/16/2017 2:46:21 PM    OUT STG Clearing previous node cache
4/16/2017 2:46:21 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:46:21 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG -----> Build succeeded!
4/16/2017 2:46:43 PM    OUT STG Exit status 0
4/16/2017 2:46:43 PM    OUT STG Staging complete
4/16/2017 2:46:43 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:46:43 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:46:43 PM    OUT STG Uploading droplet...
4/16/2017 2:46:44 PM    OUT STG Uploaded build artifacts cache (256B)
4/16/2017 2:46:51 PM    OUT STG Uploaded droplet (50.2M)
4/16/2017 2:46:51 PM    OUT STG Uploading complete
4/16/2017 2:46:51 PM    OUT STG Destroying container
4/16/2017 2:47:10 PM    OUT CELL    Successfully created container
4/16/2017 2:47:17 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:47:18 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:47:20 PM    OUT CELL    Container became healthy
</code>```

THE ERROR:
It like it's not using the package specified version, and then it tries a bunch of different builds repeatedly.

```<code>4/16/2017 1:45:29 PM    ERR STG DEPENDENCY MISSING IN MANIFEST:
4/16/2017 1:45:29 PM    ERR STG Unfortunately, we are either unable to resolve the dependency into
4/16/2017 1:45:29 PM    ERR STG a binary and version number or the requested version or version range is not supported.
4/16/2017 1:45:29 PM    ERR STG Please replace the URL with a valid link or the requested version/range
4/16/2017 1:45:29 PM    ERR STG with a supported version or version range.
4/16/2017 1:45:29 PM    OUT STG -----> Build failed
4/16/2017 1:45:29 PM    ERR STG Failed to compile droplet
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG We're sorry this build is failing! You find more info about the nodejs buildpack here:
4/16/2017 1:45:29 PM    OUT STG https://docs.cloudfoundry.org/buildpacks/node/index.html
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG - node_modules checked into source control
4/16/2017 1:45:29 PM    OUT STG https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG Exit status 223
4/16/2017 1:45:29 PM    ERR STG Staging failed: Exited with status 223
</code>```

APP LOGS

```<code>Done uploading
OK

Stopping app Speakey Pipeline in org SpeechDictation / space dev
OK

Starting app Speakey Pipeline in org SpeechDictation / space dev
Creating container
Successfully created container
Downloading app package...
Downloaded app package (44.3M)
Downloading build artifacts cache...
Downloaded build artifacts cache (262B)
Staging...
-------> Buildpack version 1.5.32

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=false
-----> Installing binaries
       engines.node (package.json):  7.8.x
       engines.npm (package.json):   unspecified (use default)

       Downloading and installing node 7.8.0...
       Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-7.8.0-linux-x64-a72100f9.tgz]
-----> Restoring cache
       Skipping cache restore (disabled by config)
-----> Building dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
--- SECTION OF DEPENDENCIES I REMOVED FOR SPACE
       safe-buffer@5.0.1 /tmp/app/node_modules/safe-buffer
-----> Caching build
       Clearing previous node cache
       Skipping cache save (disabled by config)
-----> Build succeeded!
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (256B)
Uploaded droplet (49.1M)
Uploading complete
Destroying container

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started

OK

App Speakey Pipeline was started using this command `node app.js`

Showing health and status for app Speakey Pipeline in org SpeechDictation / space dev as
OK

requested state: started
instances: 1/1
usage: 64M x 1 instances
urls: spekra.mybluemix.net
last uploaded: Sun Apr 16 15:53:50 UTC 2017
stack: cflinuxfs2
buildpack: https://github.com/cloudfoundry/nodejs-buildpack

     state     since                    cpu    memory         disk           details
#0   running   2017-04-16 03:55:33 PM   0.0%   30.6M of 64M   284.1M of 1G
Sending deployment success of Speakey Pipeline to IBM DevOps Services...
IBM DevOps Services notified successfully.
FAILED
</code>```

答: I ran into a similar issue when I deployed a tutorial early this year on using Bluemix and Watson services. The fix that I put in place was to remove the engine specification from my package.json file. That way I ensured that Bluemix installed it's default engine when it deployed my app. </p>

Body:
I'm having issues with my deployment failing, and have no idea why. Any help would be greatly appreciated! I have spent a stupid amount of hours trying find out what's going on with no luck. I'm pretty sure it might be something dumb that I'm missing. It's odd. The build will succeed, and it will server. Then it crashes, and I have zero ideas why at the moment.

Using the Node.js Buildpack: https://github.com/cloudfoundry/nodejs-buildpack

Package.json file

{
    "name": "core-backend-server",
    "version": "1.0.0",
    "dependencies": {
        "bcryptjs": "^2.1.0",
        "body-parser": "^1.13.2",
        "cors": "^2.8.1",
        "express": "^4.13.0",
        "express-error-middleware": "^1.3.0",
        "express-jwt": "^3.0.1",
        "jade": "^1.11.0",
        "jsonwebtoken": "^5.0.2",
        "lodash": "^3.10.0",
        "mongodb": "^2.1.16",
        "mongoskin": "^2.1.0",
        "q": "^1.4.1",
        "request": "^2.58.0",
        "rootpath": "^0.1.2",
        "cfenv": "1.0.x"
    },
    "license": "MIT",
    "scripts": {
        "start": "node app.js"
    },
    "engines": {
        "node" : "7.8.x"
    }
}

Bluemix Deployment Logs:

4/16/2017 1:40:29 PM    OUT APP Exit status 143
4/16/2017 1:40:29 PM    OUT CELL    Exit status 0
4/16/2017 1:40:33 PM    OUT API Updated app with guid e6824266-a05f-     4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 1:40:33 PM    OUT STG Creating container
4/16/2017 1:40:48 PM    OUT STG Successfully created container
4/16/2017 1:40:48 PM    OUT STG Downloading app package...
4/16/2017 1:40:55 PM    OUT CELL    Successfully destroyed container
4/16/2017 1:40:56 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 1:40:56 PM    OUT STG Downloading build artifacts cache...
4/16/2017 1:40:57 PM    OUT STG Downloaded build artifacts cache (4.1M)
4/16/2017 1:40:57 PM    OUT STG Staging...
4/16/2017 1:41:00 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 1:41:00 PM    OUT STG -----> Creating runtime environment
4/16/2017 1:41:00 PM    OUT STG
4/16/2017 1:41:00 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 1:41:00 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 1:41:00 PM    OUT STG NODE_VERBOSE=false
4/16/2017 1:41:00 PM    OUT STG NODE_ENV=production
4/16/2017 1:41:00 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 1:41:00 PM    OUT STG -----> Installing binaries
4/16/2017 1:41:00 PM    OUT STG engines.node (package.json):  unspecified
4/16/2017 1:41:00 PM    OUT STG engines.npm (package.json):   unspecified (use default)
4/16/2017 1:41:00 PM    OUT STG Downloading and installing node 4.8.2...
4/16/2017 1:41:03 PM    OUT STG -----> Restoring cache
4/16/2017 1:41:03 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 1:41:03 PM    OUT STG -----> Building dependencies
4/16/2017 1:41:03 PM    OUT STG Rebuilding any native modules
4/16/2017 1:41:06 PM    OUT STG body-parser@1.17.1 /tmp/app/node_modules/body-parser
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 1:41:06 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 1:41:06 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 1:41:06 PM    OUT STG Installing any new modules (package.json)
4/16/2017 1:41:09 PM    OUT STG -----> Caching build
4/16/2017 1:41:09 PM    OUT STG Clearing previous node cache
4/16/2017 1:41:09 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 1:41:09 PM    OUT STG - .npm (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 1:41:09 PM    OUT STG -----> Build succeeded!
4/16/2017 1:41:23 PM    OUT STG Exit status 0
4/16/2017 1:41:23 PM    OUT STG Staging complete
4/16/2017 1:41:23 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 1:41:23 PM    OUT STG Uploading build artifacts cache...
4/16/2017 1:41:23 PM    OUT STG Uploading droplet...
4/16/2017 1:41:30 PM    OUT STG Uploaded droplet (43.7M)
4/16/2017 1:41:30 PM    OUT STG Destroying container
4/16/2017 1:41:31 PM    OUT CELL    Creating container
4/16/2017 1:41:33 PM    OUT CELL    Successfully created container
4/16/2017 1:41:38 PM    OUT CELL    Starting health monitoring of container
4/16/2017 1:41:39 PM    OUT APP Server listening on port ---- 8080
4/16/2017 1:41:40 PM    OUT CELL    Container became healthy
4/16/2017 1:43:28 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN", "buildpack"=>"https://github.com/cloudfoundry/nodejs-buildpack"})
4/16/2017 1:44:54 PM    OUT CELL    Exit status 0
4/16/2017 1:44:54 PM    OUT APP Exit status 143
4/16/2017 1:44:54 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 1:44:54 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 1:44:56 PM    OUT CELL    Successfully destroyed container
4/16/2017 1:45:16 PM    OUT STG Downloading app package...
4/16/2017 1:45:25 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 1:45:25 PM    OUT STG Staging...
4/16/2017 1:45:28 PM    OUT STG -----> Creating runtime environment
4/16/2017 1:45:28 PM    OUT STG
4/16/2017 1:45:28 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 1:45:28 PM    OUT STG NODE_VERBOSE=false
4/16/2017 1:45:28 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 1:45:28 PM    OUT STG -----> Installing binaries
4/16/2017 1:45:28 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG Downloading and installing node ...
4/16/2017 1:45:29 PM    ERR STG DEPENDENCY MISSING IN MANIFEST:
4/16/2017 1:45:29 PM    ERR STG Unfortunately, we are either unable to resolve the dependency into
4/16/2017 1:45:29 PM    ERR STG a binary and version number or the requested version or version range is not supported.
4/16/2017 1:45:29 PM    ERR STG Please replace the URL with a valid link or the requested version/range
4/16/2017 1:45:29 PM    ERR STG with a supported version or version range.
4/16/2017 1:45:29 PM    OUT STG -----> Build failed
4/16/2017 1:45:29 PM    ERR STG Failed to compile droplet
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG We're sorry this build is failing! You find more info about the nodejs buildpack here:
4/16/2017 1:45:29 PM    OUT STG https://docs.cloudfoundry.org/buildpacks/node/index.html
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG - node_modules checked into source control
4/16/2017 1:45:29 PM    OUT STG https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG Exit status 223
4/16/2017 1:45:29 PM    ERR STG Staging failed: Exited with status 223
4/16/2017 1:45:29 PM    OUT STG Destroying container
4/16/2017 1:45:48 PM    OUT STG Successfully destroyed container
4/16/2017 2:04:52 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN"})
4/16/2017 2:06:06 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:06:07 PM    OUT STG Creating container
4/16/2017 2:06:20 PM    OUT STG Successfully created container
4/16/2017 2:06:20 PM    OUT STG Downloading app package...
4/16/2017 2:06:31 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 2:06:31 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:06:31 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:06:31 PM    OUT STG Staging...
4/16/2017 2:06:34 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:06:34 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:06:34 PM    OUT STG
4/16/2017 2:06:34 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:06:34 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:06:34 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:06:34 PM    OUT STG NODE_ENV=production
4/16/2017 2:06:34 PM    OUT STG -----> Installing binaries
4/16/2017 2:06:34 PM    OUT STG engines.node (package.json):  ^6.9.x
4/16/2017 2:06:34 PM    OUT STG engines.npm (package.json):   ^2.1.x
4/16/2017 2:06:34 PM    OUT STG
4/16/2017 2:06:34 PM    OUT STG Downloading and installing node 6.10.2...
4/16/2017 2:06:36 PM    OUT STG Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-6.10.2-linux-x64-9f48b587.tgz]
4/16/2017 2:06:57 PM    OUT STG -----> Restoring cache
4/16/2017 2:06:58 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:06:58 PM    OUT STG -----> Building dependencies
4/16/2017 2:06:58 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:06:58 PM    OUT STG Rebuilding any native modules
4/16/2017 2:07:00 PM    OUT STG body-parser@1.17.1 /tmp/app/node_modules/body-parser
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:07:00 PM    OUT STG jsbn@0.1.1 /tmp/app/node_modules/jsbn
4/16/2017 2:07:00 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:07:04 PM    OUT STG -----> Caching build
4/16/2017 2:07:04 PM    OUT STG Clearing previous node cache
4/16/2017 2:07:04 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:07:04 PM    OUT STG -----> Build succeeded!
4/16/2017 2:07:27 PM    OUT STG Exit status 0
4/16/2017 2:07:27 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:07:27 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:07:27 PM    OUT STG Uploading droplet...
4/16/2017 2:07:27 PM    OUT STG Uploaded build artifacts cache (258B)
4/16/2017 2:07:30 PM    OUT STG Uploading complete
4/16/2017 2:07:31 PM    OUT STG Destroying container
4/16/2017 2:07:31 PM    OUT CELL    Creating container
4/16/2017 2:07:42 PM    OUT STG Successfully destroyed container
4/16/2017 2:07:43 PM    OUT CELL    Successfully created container
4/16/2017 2:07:50 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:07:51 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:07:52 PM    OUT CELL    Container became healthy
4/16/2017 2:11:00 PM    OUT APP Exit status 143
4/16/2017 2:11:00 PM    OUT CELL    Exit status 0
4/16/2017 2:11:00 PM    OUT CELL    Destroying container
4/16/2017 2:11:00 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:11:01 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:11:02 PM    OUT STG Creating container
4/16/2017 2:11:08 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:11:25 PM    OUT STG Downloading app package...
4/16/2017 2:11:33 PM    OUT STG Downloaded app package (44.6M)
4/16/2017 2:11:33 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:11:34 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:11:34 PM    OUT STG Staging...
4/16/2017 2:11:36 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:11:36 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:11:36 PM    OUT STG
4/16/2017 2:11:36 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:11:36 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:11:36 PM    OUT STG NODE_ENV=production
4/16/2017 2:11:36 PM    OUT STG -----> Installing binaries
4/16/2017 2:11:36 PM    OUT STG engines.npm (package.json):   ^2.1.x
4/16/2017 2:11:36 PM    OUT STG
4/16/2017 2:11:36 PM    OUT STG Downloading and installing node 7.8.0...
4/16/2017 2:11:39 PM    OUT STG Downloading and installing npm ^2.1.x (replacing version 4.2.0)...
4/16/2017 2:11:54 PM    OUT STG -----> Restoring cache
4/16/2017 2:11:54 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:11:54 PM    OUT STG -----> Building dependencies
4/16/2017 2:11:54 PM    OUT STG Rebuilding any native modules
4/16/2017 2:11:57 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:11:57 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 2:11:57 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 2:11:57 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:12:00 PM    OUT STG -----> Caching build
4/16/2017 2:12:00 PM    OUT STG Clearing previous node cache
4/16/2017 2:12:00 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:12:00 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:12:00 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:12:00 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:12:01 PM    OUT STG -----> Build succeeded!
4/16/2017 2:12:28 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:12:28 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:12:28 PM    OUT STG Uploaded build artifacts cache (260B)
4/16/2017 2:12:33 PM    OUT STG Uploaded droplet (49.3M)
4/16/2017 2:12:33 PM    OUT STG Uploading complete
4/16/2017 2:12:33 PM    OUT STG Destroying container
4/16/2017 2:12:34 PM    OUT CELL    Creating container
4/16/2017 2:12:48 PM    OUT STG Successfully destroyed container
4/16/2017 2:12:50 PM    OUT CELL    Successfully created container
4/16/2017 2:12:58 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:12:59 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:25:44 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN"})
4/16/2017 2:27:00 PM    OUT CELL    Exit status 0
4/16/2017 2:27:00 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:27:00 PM    OUT APP Exit status 143
4/16/2017 2:27:00 PM    OUT CELL    Destroying container
4/16/2017 2:27:01 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:27:02 PM    OUT STG Creating container
4/16/2017 2:27:12 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:27:18 PM    OUT STG Successfully created container
4/16/2017 2:27:18 PM    OUT STG Downloading app package...
4/16/2017 2:27:28 PM    OUT STG Downloaded app package (44.3M)
4/16/2017 2:27:28 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:27:28 PM    OUT STG Downloaded build artifacts cache (260B)
4/16/2017 2:27:28 PM    OUT STG Staging...
4/16/2017 2:27:31 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:27:31 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:27:31 PM    OUT STG
4/16/2017 2:27:31 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:27:31 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:27:31 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:27:31 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 2:27:31 PM    OUT STG -----> Installing binaries
4/16/2017 2:27:31 PM    OUT STG engines.node (package.json):  >=4.4.x
4/16/2017 2:27:31 PM    OUT STG
4/16/2017 2:27:54 PM    OUT STG Skipping cache restore (new runtime signature)
4/16/2017 2:27:54 PM    OUT STG -----> Building dependencies
4/16/2017 2:27:54 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:27:54 PM    OUT STG Rebuilding any native modules
4/16/2017 2:27:57 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:27:57 PM    OUT STG jodid25519@1.0.2 /tmp/app/node_modules/jodid25519
4/16/2017 2:27:57 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:27:59 PM    OUT STG -----> Caching build
4/16/2017 2:27:59 PM    OUT STG Clearing previous node cache
4/16/2017 2:27:59 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:27:59 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:27:59 PM    OUT STG -----> Build succeeded!
4/16/2017 2:28:24 PM    OUT STG Exit status 0
4/16/2017 2:28:24 PM    OUT STG Staging complete
4/16/2017 2:28:24 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:28:24 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:28:24 PM    OUT STG Uploading droplet...
4/16/2017 2:28:24 PM    OUT STG Uploaded build artifacts cache (258B)
4/16/2017 2:28:29 PM    OUT STG Uploading complete
4/16/2017 2:28:29 PM    OUT STG Destroying container
4/16/2017 2:28:42 PM    OUT STG Successfully destroyed container
4/16/2017 2:28:55 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:44:03 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"name"=>"Speakey Pipeline", "command"=>"PRIVATE DATA HIDDEN", "buildpack"=>"https://github.com/cloudfoundry/nodejs-buildpack"})
4/16/2017 2:45:18 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STOPPED"})
4/16/2017 2:45:18 PM    OUT APP Exit status 143
4/16/2017 2:45:18 PM    OUT CELL    Exit status 0
4/16/2017 2:45:18 PM    OUT CELL    Destroying container
4/16/2017 2:45:19 PM    OUT API Updated app with guid e6824266-a05f-4f99-9ca4-69e303dfacfd ({"state"=>"STARTED"})
4/16/2017 2:45:29 PM    OUT CELL    Successfully destroyed container
4/16/2017 2:45:39 PM    OUT STG Successfully created container
4/16/2017 2:45:39 PM    OUT STG Downloading app package...
4/16/2017 2:45:47 PM    OUT STG Downloading build artifacts cache...
4/16/2017 2:45:47 PM    OUT STG Downloaded build artifacts cache (258B)
4/16/2017 2:45:47 PM    OUT STG Staging...
4/16/2017 2:45:52 PM    OUT STG -------> Buildpack version 1.5.32
4/16/2017 2:45:52 PM    OUT STG -----> Creating runtime environment
4/16/2017 2:45:52 PM    OUT STG NPM_CONFIG_LOGLEVEL=error
4/16/2017 2:45:52 PM    OUT STG NPM_CONFIG_PRODUCTION=true
4/16/2017 2:45:52 PM    OUT STG NODE_VERBOSE=false
4/16/2017 2:45:52 PM    OUT STG NODE_MODULES_CACHE=true
4/16/2017 2:45:52 PM    OUT STG -----> Installing binaries
4/16/2017 2:45:52 PM    OUT STG engines.node (package.json):  >=4.4.x
4/16/2017 2:45:52 PM    OUT STG engines.npm (package.json):   >=2.1.x
4/16/2017 2:45:52 PM    OUT STG
4/16/2017 2:45:52 PM    OUT STG Downloading and installing node 7.8.0...
4/16/2017 2:45:54 PM    OUT STG Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-7.8.0-linux-x64-a72100f9.tgz]
4/16/2017 2:45:55 PM    OUT STG Downloading and installing npm >=2.1.x (replacing version 4.2.0)...
4/16/2017 2:46:15 PM    OUT STG -----> Restoring cache
4/16/2017 2:46:16 PM    OUT STG Loading 3 from cacheDirectories (default):
4/16/2017 2:46:16 PM    OUT STG - .npm (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG - .cache/yarn (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG - bower_components (not cached - skipping)
4/16/2017 2:46:16 PM    OUT STG -----> Building dependencies
4/16/2017 2:46:16 PM    OUT STG Prebuild detected (node_modules already exists)
4/16/2017 2:46:16 PM    OUT STG Rebuilding any native modules
4/16/2017 2:46:19 PM    OUT STG bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
-- I ADDED: DELETED SECTION OF MODULES INSTALLING --
4/16/2017 2:46:19 PM    OUT STG uglify-to-browserify@1.0.2 /tmp/app/node_modules/uglify-to-browserify
4/16/2017 2:46:19 PM    OUT STG Installing any new modules (package.json)
4/16/2017 2:46:21 PM    OUT STG -----> Caching build
4/16/2017 2:46:21 PM    OUT STG Clearing previous node cache
4/16/2017 2:46:21 PM    OUT STG Saving 3 cacheDirectories (default):
4/16/2017 2:46:21 PM    OUT STG - .npm (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG - .cache/yarn (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG - bower_components (nothing to cache)
4/16/2017 2:46:21 PM    OUT STG -----> Build succeeded!
4/16/2017 2:46:43 PM    OUT STG Exit status 0
4/16/2017 2:46:43 PM    OUT STG Staging complete
4/16/2017 2:46:43 PM    OUT STG Uploading droplet, build artifacts cache...
4/16/2017 2:46:43 PM    OUT STG Uploading build artifacts cache...
4/16/2017 2:46:43 PM    OUT STG Uploading droplet...
4/16/2017 2:46:44 PM    OUT STG Uploaded build artifacts cache (256B)
4/16/2017 2:46:51 PM    OUT STG Uploaded droplet (50.2M)
4/16/2017 2:46:51 PM    OUT STG Uploading complete
4/16/2017 2:46:51 PM    OUT STG Destroying container
4/16/2017 2:47:10 PM    OUT CELL    Successfully created container
4/16/2017 2:47:17 PM    OUT CELL    Starting health monitoring of container
4/16/2017 2:47:18 PM    OUT APP Server listening on port ---- 8080
4/16/2017 2:47:20 PM    OUT CELL    Container became healthy

THE ERROR:
It like it's not using the package specified version, and then it tries a bunch of different builds repeatedly.

4/16/2017 1:45:29 PM    ERR STG DEPENDENCY MISSING IN MANIFEST:
4/16/2017 1:45:29 PM    ERR STG Unfortunately, we are either unable to resolve the dependency into
4/16/2017 1:45:29 PM    ERR STG a binary and version number or the requested version or version range is not supported.
4/16/2017 1:45:29 PM    ERR STG Please replace the URL with a valid link or the requested version/range
4/16/2017 1:45:29 PM    ERR STG with a supported version or version range.
4/16/2017 1:45:29 PM    OUT STG -----> Build failed
4/16/2017 1:45:29 PM    ERR STG Failed to compile droplet
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG We're sorry this build is failing! You find more info about the nodejs buildpack here:
4/16/2017 1:45:29 PM    OUT STG https://docs.cloudfoundry.org/buildpacks/node/index.html
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG - node_modules checked into source control
4/16/2017 1:45:29 PM    OUT STG https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
4/16/2017 1:45:29 PM    OUT STG
4/16/2017 1:45:29 PM    OUT STG Exit status 223
4/16/2017 1:45:29 PM    ERR STG Staging failed: Exited with status 223

APP LOGS

Done uploading
OK

Stopping app Speakey Pipeline in org SpeechDictation / space dev
OK

Starting app Speakey Pipeline in org SpeechDictation / space dev
Creating container
Successfully created container
Downloading app package...
Downloaded app package (44.3M)
Downloading build artifacts cache...
Downloaded build artifacts cache (262B)
Staging...
-------> Buildpack version 1.5.32

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=false
-----> Installing binaries
       engines.node (package.json):  7.8.x
       engines.npm (package.json):   unspecified (use default)

       Downloading and installing node 7.8.0...
       Downloaded [https://buildpacks.cloudfoundry.org/dependencies/node/node-7.8.0-linux-x64-a72100f9.tgz]
-----> Restoring cache
       Skipping cache restore (disabled by config)
-----> Building dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       bcryptjs@2.4.3 /tmp/app/node_modules/bcryptjs
--- SECTION OF DEPENDENCIES I REMOVED FOR SPACE
       safe-buffer@5.0.1 /tmp/app/node_modules/safe-buffer
-----> Caching build
       Clearing previous node cache
       Skipping cache save (disabled by config)
-----> Build succeeded!
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (256B)
Uploaded droplet (49.1M)
Uploading complete
Destroying container

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started

OK

App Speakey Pipeline was started using this command `node app.js`

Showing health and status for app Speakey Pipeline in org SpeechDictation / space dev as
OK

requested state: started
instances: 1/1
usage: 64M x 1 instances
urls: spekra.mybluemix.net
last uploaded: Sun Apr 16 15:53:50 UTC 2017
stack: cflinuxfs2
buildpack: https://github.com/cloudfoundry/nodejs-buildpack

     state     since                    cpu    memory         disk           details
#0   running   2017-04-16 03:55:33 PM   0.0%   30.6M of 64M   284.1M of 1G
Sending deployment success of Speakey Pipeline to IBM DevOps Services...
IBM DevOps Services notified successfully.
FAILED


来源: stackexchange

问:
Spring data JPA. Find by in
I have an usual Spring Data JPA repository in my spring project.

```<code>@Repository
public interface EventRepository extends CrudRepository<Event, Long> {
  List<Event> findByOriginalIdIn(Collection<String> originalEventIds);
  ...
</code>```

I used before method findByOriginalIdIn it was working good. But situation is changed and I need to handle same request using collection of pairs to find and filter correct events.

My alternative method should Handle next logic:
find by (originalId1 AND originalCalendarId1) OR (originalId2 AND originalCalendarId2) OR (originalId..N AND originalCalendarId..N) OR

Is it possible handle this request using Selectively exposing CRUD methods? If yes, could I have an example please?

答:
Try to use criteria with following restrictions:</p>

```<code>Criteria criteria = session.createCriteria(Event.class)
                    .add(Restrictions.in("id", values));
</code>```

ContentLicense: CC BY-SA 3.0

Title: Spring data JPA. Find by in

Body:
I have an usual Spring Data JPA repository in my spring project.

@Repository
public interface EventRepository extends CrudRepository<Event, Long> {
  List<Event> findByOriginalIdIn(Collection<String> originalEventIds);
  ...

I used before method findByOriginalIdIn it was working good. But situation is changed and I need to handle same request using collection of pairs to find and filter correct events.

My alternative method should Handle next logic:
find by (originalId1 AND originalCalendarId1) OR (originalId2 AND originalCalendarId2) OR (originalId..N AND originalCalendarId..N) OR

Is it possible handle this request using Selectively exposing CRUD methods? If yes, could I have an example please?

Body:
Try to use criteria with following restrictions:

Criteria criteria = session.createCriteria(Event.class)
                    .add(Restrictions.in("id", values));


问:
Transfer Microsoft SQL Server data to Oracle tables on daily basis
I want to transfer SQL Server data to Oracle tables on a daily basis.

What's the best way to do it? I am using Windows 7 as OS and SQL Developer as a tool.

Please suggest.

Thanks.

答:
You can setup a transactional replication and create a non-sql server subscriber in oracle.
See : https://learn.microsoft.com/en-us/sql/relational-databases/replication/non-sql/non-sql-server-subscribers

Or if you only need the data to be updated once a day, consider to use snapshot replication.
Both transaction and snapshot replication can have a non-sql server subscriber.


问:
every letter different color in string, HTML PHP
I need to print every character of string with different color (not random colors) using only HTML and PHP. It almost works, but first letter from array is black. Do you know why?</p>

```<code><html>
    <?php
        $myString = ["s","t","r","i","n","g"];
        $myColors = ["blue","green","yellow","brown","gray","pink"];

        for ($i = 0; $i < count($myString); $i++) {
            echo "$myString[$i] <span style='color:$myColors[$i]'</span>";
        }
    ?>
</html>
</code>```

答:
Seems like you didn't close your span tag correctly, and putting your string inside your span will help coloring it.</p>

```<code><?php
$myString = ["s","t","r","i","n","g"];
$myColors = ["blue","green","yellow","brown","gray","pink"];

for ($i = 0; $i < count($myString); $i++) {
   echo "<span style='color:$myColors[$i]'>$myString[$i]</span>";
}
</code>```

Body:
I need to print every character of string with different color (not random colors) using only HTML and PHP. It almost works, but first letter from array is black. Do you know why?

    <?php
        $myString = ["s","t","r","i","n","g"];
        $myColors = ["blue","green","yellow","brown","gray","pink"];

        for ($i = 0; $i < count($myString); $i++) {
            echo "$myString[$i] <span style='color:$myColors[$i]'";
        }
    ?>

Body:
Seems like you didn't close your span tag correctly, and putting your string inside your span will help coloring it.

<?php
$myString = ["s","t","r","i","n","g"];
$myColors = ["blue","green","yellow","brown","gray","pink"];

for ($i = 0; $i < count($myString); $i++) {
   echo "<span style='color:$myColors[$i]'>$myString[$i]</span>";
}


答:
The character is not inside the colored span and you're missing a >:

```<code>echo "<span style='color:$myColors[$i]'>$myString[$i]</span>";
</code>```

Title: every letter different color in string, HTML PHP

Body:
The character is not inside the colored span and you're missing a >:

echo "<span style='color:$myColors[$i]'>$myString[$i]</span>";


答:
I think your HTML is broken. You need to include $myString[$i] inside the  element and close it properly.

```<code>$myString = ["s","t","r","i","n","g"];
$myColors = ["blue","green","yellow","brown","gray","pink"];

for ($i = 0; $i < count($myString); $i++) {
   echo "<span style='color:$myColors[$i]'>$myString[$i]</span>";
}
</code>```

Body:
I think your HTML is broken. You need to include $myString[$i] inside the <span> element and close it properly.

$myString = ["s","t","r","i","n","g"];
$myColors = ["blue","green","yellow","brown","gray","pink"];

for ($i = 0; $i < count($myString); $i++) {
   echo "<span style='color:$myColors[$i]'>$myString[$i]</span>";
}


问:
Angular 4: access template element in other component
I'm using Angular 4. I'm trying to access one component's template element inside another component. The only thing I've found that works (illustrated below) is not very 'Angular'.

Component #1 (which contains the template):

```<code>  @Component({
    template: `...<input type="text" id="txtUserName" />`
</code>```

Component #2 (which is getting the above component's template element value in a click event):

```<code>  (<HTMLInputElement>document.getElementById('txtUserName')).value;
</code>```

I've found countless snippets on ElementRef, ViewChild, etc., but none of them actually work for getting the template element's value.
Does anyone know of an Angular 4 approach that accomplishes the same thing I'm doing above?

答:
Is there any relation between Component #1 and Component #2.

if both have parent and child relation ship you can access using @ViewChild() or @input

if there is no relation ship than try to access using shared service
More info https://angular.io/docs/ts/latest/cookbook/component-communication.html

Body:
I'm using Angular 4. I'm trying to access one component's template element inside another component. The only thing I've found that works (illustrated below) is not very 'Angular'.

Component #1 (which contains the template):

  @Component({
    template: `...<input type="text" id="txtUserName" />`

Component #2 (which is getting the above component's template element value in a click event):

  (<HTMLInputElement>document.getElementById('txtUserName')).value;

I've found countless snippets on ElementRef, ViewChild, etc., but none of them actually work for getting the template element's value.
Does anyone know of an Angular 4 approach that accomplishes the same thing I'm doing above?


问:
Spring Boot without the web server
I have a simple Spring Boot application that gets messages from a JMS queue and saves some data to a log file, but does not need a web server. Is there any way of starting Spring Boot without the web server?</p>

答:
Spring Boot 2.x, 3.x

Application Properties

```<code>  spring.main.web-application-type=NONE
  # REACTIVE, SERVLET
</code>```

or SpringApplicationBuilder

```<code>  @SpringBootApplication
  public class MyApplication {

      public static void main(String[] args) {
          new SpringApplicationBuilder(MyApplication.class)
              .web(WebApplicationType.NONE) // .REACTIVE, .SERVLET
              .run(args);
     }
  }
</code>```

Where WebApplicationType:

NONE - The application should not run as a web application and should not start an embedded web server.

REACTIVE - The application should run as a reactive web application and should start an embedded reactive web server.

SERVLET - The application should run as a servlet-based web application and should start an embedded servlet web server.

Title: Spring Boot without the web server

Body:
Spring Boot 2.x, 3.x

Application Properties

  spring.main.web-application-type=NONE
  # REACTIVE, SERVLET

or SpringApplicationBuilder

  @SpringBootApplication
  public class MyApplication {

      public static void main(String[] args) {
          new SpringApplicationBuilder(MyApplication.class)
              .web(WebApplicationType.NONE) // .REACTIVE, .SERVLET
              .run(args);
     }
  }

Where WebApplicationType:

NONE - The application should not run as a web application and should not start an embedded web server.

REACTIVE - The application should run as a reactive web application and should start an embedded reactive web server.

SERVLET - The application should run as a servlet-based web application and should start an embedded servlet web server.

ContentLicense: CC BY-SA 4.0


问:
AWS cognito returning - 'Invalid Login Token. Not a Cognito Token'
I am able to successfully retrieve an identity token for my Custom Authentication Provider (Developer Authentication).  This is implemented using the Cognito devauth demo servlet.

This token is returned to a browser running AWS JS SDK.  When I make a call to getCredentialsForIdentiy, I receive the 'Invalid Login Token' error.

```<code>POST https://cognito-identity.us-west-2.amazonaws.com/ 400 (Bad Request)
app.js:150 Error: Invalid login token. Not a Cognito token.
    at constructor.a (aws-sdk-2.58.0.min.js:41)
    at constructor.callListeners (aws-sdk-2.58.0.min.js:41)
    at constructor.emit (aws-sdk-2.58.0.min.js:41)
    at constructor.emitEvent (aws-sdk-2.58.0.min.js:41)
    at constructor.e (aws-sdk-2.58.0.min.js:41)
    at i.runTo (aws-sdk-2.58.0.min.js:43)
    at aws-sdk-2.58.0.min.js:43
    at constructor.<anonymous> (aws-sdk-2.58.0.min.js:41)
    at constructor.<anonymous> (aws-sdk-2.58.0.min.js:41)
    at constructor.callListeners (aws-sdk-2.58.0.min.js:41) "NotAuthorizedException: Invalid login token. Not a Cognito token.
    at constructor.a (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:615)
    at constructor.callListeners (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:30513)
    at constructor.emit (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:30224)
    at constructor.emitEvent (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:16590)
    at constructor.e (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:12285)
    at i.runTo (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:43:7277)
    at https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:43:7482
    at constructor.<anonymous> (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:12495)
    at constructor.<anonymous> (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:16645)
    at constructor.callListeners (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:30619)"
</code>```

I am passing to getCredentialsForIdentity the following params.

```<code>identityId: <returned from servlet in region:guid format>
customRoleArn: <that maps to authenticated role>
Logins: <cognito-identity.amazonaws.com = token returned by congito>
</code>```

I notice that new congnito identity was created by using id browser.  So, the token interaction with the servlet seems correct.  But the token is being rejected.

What am I missing here? How can I troubleshoot it further?

Edit:
Browser client: javascript sdk, version 2.58.
Essentially writing a JS client to this demo .  The modifications is only to get token as part of login call itself.  The generated token corresponds to a role that only has IOT client access.  (I wonder if that policy needs to expand).  Eventually the users will be validated against an internal ID store instead of this demo.

Edit 2:
Instead of calling getCredentialsForIdentiy against Cognito Service, I invoked assumeRoleWithWebIdentity against STS and that worked. The use of Basic Flow instead of Enhanced flow here. .  Really not sure why enhanced flow did not work but will take the basic flow approach for now.

答:
So, the AWS documentation here is either inaccurate or documents an inefficient scenario.

Using JavaScript Cognito API, my Developer Provider returned token could not be used with GetCredentialsForIdentity against Cognito API. (this is what prompted me to ask this question).

However, I can use the same token against STS API and invoke AssumeRoleWithWebIdentity which essentially returns the same response parameters as GetCredentialsForIdentity above.  This is the approach I took.

Basic Auth Flow documentation in the first link seems inaccurate. Because it lists 'get credentials' and 'assume role' as required steps but only one is actually needed.  Also, from a browser, this is an API call out to an Amazon service.  So using Enhanced Flow instead of Basic does not seem like an advantage if it worked.

Body:
I am able to successfully retrieve an identity token for my Custom Authentication Provider (Developer Authentication).  This is implemented using the Cognito devauth demo servlet.

This token is returned to a browser running AWS JS SDK.  When I make a call to getCredentialsForIdentiy, I receive the 'Invalid Login Token' error.

POST https://cognito-identity.us-west-2.amazonaws.com/ 400 (Bad Request)
app.js:150 Error: Invalid login token. Not a Cognito token.
    at constructor.a (aws-sdk-2.58.0.min.js:41)
    at constructor.callListeners (aws-sdk-2.58.0.min.js:41)
    at constructor.emit (aws-sdk-2.58.0.min.js:41)
    at constructor.emitEvent (aws-sdk-2.58.0.min.js:41)
    at constructor.e (aws-sdk-2.58.0.min.js:41)
    at i.runTo (aws-sdk-2.58.0.min.js:43)
    at aws-sdk-2.58.0.min.js:43
    at constructor.<anonymous> (aws-sdk-2.58.0.min.js:41)
    at constructor.<anonymous> (aws-sdk-2.58.0.min.js:41)
    at constructor.callListeners (aws-sdk-2.58.0.min.js:41) "NotAuthorizedException: Invalid login token. Not a Cognito token.
    at constructor.a (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:615)
    at constructor.callListeners (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:30513)
    at constructor.emit (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:30224)
    at constructor.emitEvent (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:16590)
    at constructor.e (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:12285)
    at i.runTo (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:43:7277)
    at https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:43:7482
    at constructor.<anonymous> (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:12495)
    at constructor.<anonymous> (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:16645)
    at constructor.callListeners (https://sdk.amazonaws.com/js/aws-sdk-2.58.0.min.js:41:30619)"

I am passing to getCredentialsForIdentity the following params.

identityId: <returned from servlet in region:guid format>
customRoleArn: <that maps to authenticated role>
Logins: <cognito-identity.amazonaws.com = token returned by congito>

I notice that new congnito identity was created by using id browser.  So, the token interaction with the servlet seems correct.  But the token is being rejected.

What am I missing here? How can I troubleshoot it further?

Edit:
Browser client: javascript sdk, version 2.58.
Essentially writing a JS client to this demo .  The modifications is only to get token as part of login call itself.  The generated token corresponds to a role that only has IOT client access.  (I wonder if that policy needs to expand).  Eventually the users will be validated against an internal ID store instead of this demo.

Edit 2:
Instead of calling getCredentialsForIdentiy against Cognito Service, I invoked assumeRoleWithWebIdentity against STS and that worked. The use of Basic Flow instead of Enhanced flow here. .  Really not sure why enhanced flow did not work but will take the basic flow approach for now.


问:
span tag text-align not working
I'm trying to make a line for price and I want the text-align like the first one on the left, second one on the center and the third one will be on right.

Normally the text-align works but I can't keep all three of them in them in the same line. Should I use something different? or there's a solution for this!?

First I tried like this:

.price span {
  display: inline;
  /* also tried with block and inline-block */
}

.previous-price {
  text-align: left;
}

.present-price {
  text-align: center;
}

.discount-price {
  text-align: right;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><p class="price">
  <span class="previous-price"><s>Tk. 350000</s></span>
   <span class="present-price">Tk. 227500</span>
   <span class="discount-price">(35% OFF)</span>
  </p></code>```

答:
 is an inline element and so it inherits the width of it's content.
 is a block element so it's width is always the size of it's parent container. For this reason text-align: center will only align the  elements grouped into the center of
.

If the desired outcome is to have one all the way to the left, one item in the center, and one item right,

You can use the flex solution above, which will push everything to the corners.

You can set the display to inline-block and set the width percentages in your css. Additionally, once set to inline-block with a set width, you can text-align center within that.

Title: span tag text-align not working

Body:
I'm trying to make a line for price and I want the text-align like the first one on the left, second one on the center and the third one will be on right.

Normally the text-align works but I can't keep all three of them in them in the same line. Should I use something different? or there's a solution for this!?

First I tried like this:

.price span {
  display: inline;
  /* also tried with block and inline-block */
}

.previous-price {
  text-align: left;
}

.present-price {
  text-align: center;
}

.discount-price {
  text-align: right;
}

  <s>Tk. 350000</s>
   Tk. 227500
   (35% OFF)

Body:
<span> is an inline element and so it inherits the width of it's content. <p> is a block element so it's width is always the size of it's parent container. For this reason text-align: center will only align the <span> elements grouped into the center of <p>.

If the desired outcome is to have one all the way to the left, one item in the center, and one item right,

You can use the flex solution above, which will push everything to the corners.

You can set the display to inline-block and set the width percentages in your css. Additionally, once set to inline-block with a set width, you can text-align center within that.


问:
What is my wrong argument or invalid property assignment?
I am trying to filter the Carrier sheet using the userform / comboboxes.  I am receiving an error on the line " Sheets("Carrier").range.AutoFilter field:=16, Criteria1:=ComboBoxA.value". "Wrong number of arguments or invalid property assignment"

I jhave deleted a previous question as I added bad information in the middle of the night.

Public Sub CommandButton1_Click()

```<code>Dim strCriteria1 As String
Dim lastrow As Long, lastcol As Long

With Me
    Select Case True
    Case ComboBoxA.value <> "": strCriteria1 = ComboBoxA.value
    'Case ComboBox1.value <> "": strCriteria1 = ComboBox1.value
    'Case Else: Exit Sub
    End Select
End With

With Sheets("Carrier")
    '.ClearAllFilters
    lastrow = .Cells(Rows.count, "E").End(xlUp).Row
    lastcol = .Cells(1, Columns.count).End(xlToLeft).Column

    .AutoFilterMode = False
    If ComboBoxA.value <> "" Then
    Sheets("Carrier").range.AutoFilter field:=16, Criteria1:=ComboBoxA.value
    End If
End With
</code>```

End Sub

答: You haven't provided an argument to Range.  E.g. Sheets("Carrier").range("A1").AutoFilter field:=16, Criteria1:=ComboBoxA.value

Body:
I am trying to filter the Carrier sheet using the userform / comboboxes.  I am receiving an error on the line " Sheets("Carrier").range.AutoFilter field:=16, Criteria1:=ComboBoxA.value". "Wrong number of arguments or invalid property assignment"

I jhave deleted a previous question as I added bad information in the middle of the night.

Public Sub CommandButton1_Click()

Dim strCriteria1 As String
Dim lastrow As Long, lastcol As Long

With Me
    Select Case True
    Case ComboBoxA.value <> "": strCriteria1 = ComboBoxA.value
    'Case ComboBox1.value <> "": strCriteria1 = ComboBox1.value
    'Case Else: Exit Sub
    End Select
End With

With Sheets("Carrier")
    '.ClearAllFilters
    lastrow = .Cells(Rows.count, "E").End(xlUp).Row
    lastcol = .Cells(1, Columns.count).End(xlToLeft).Column

    .AutoFilterMode = False
    If ComboBoxA.value <> "" Then
    Sheets("Carrier").range.AutoFilter field:=16, Criteria1:=ComboBoxA.value
    End If
End With

End Sub


问:
Java orm problem
There is a big table business_apply in our system. It's used to store business apply information, and contains hundreds of columns.

When business type differs, a column may mean different things.

What kind of orm framework can make our life easier? Hibernate, iBatis or something else?

答:
I think your design sounds like it's in need of some normalization.  Columns that change their meaning depending on other columns sounds like a nightmare to understand and maintain.

With that said, I think any persistence solution can work.  Using Hibernate won't save you from the hard work of coming up with a good object model in which to map the data.  Your object model will be of a finer grain than the table(s).  You can use whatever technology you're comfortable with to get that data mapped into the objects, and loading modified objects back into the tables.

But first you have to have the objects.

ContentLicense: CC BY-SA 2.5

Title: Java orm problem


问:
How do I change background color of UITabItem when item is selected
I would like a different background color when the user selects a tab bar item than when it is unselected.</p>

答:
Currently in Xcode 8.3.2 you can do it inside the storyboard using an image that will represent the actual background.

Select the tab bar inside your tab bar controller:

Inside the Utilities choose the Attributes Inspector and change the selection background image:


问:
Concat multiple C++ strings at once?
I'm new to C++ strings. Is there a way to concatenate more than two strings at once? Or I have to concat two strings at the time? My concern is that it probably needs to allocate memory on each operation, instead of only once for the final result.

Remember something like that in java, wonder if there is a method for that somewhere in std. Actually, std::stringstream might be it, but I don't know how exactly it works.

答:
Yes, to avoid expensive memory waste use the stringstream

std::stringstream might be it, but I don't know how exactly it works.

this is how it works: include the sstream, create an object, append to it as much as you need using the stream operator << get the result as string calling the function str

example:

```<code>#include <sstream>
std::stringstream mySS;

mySS << "Hello" << " World!" << "end!!" << " Foo";
</code>```

and when you are done

```<code>std::string stringResult = mySS.str();
</code>```

Title: Concat multiple C++ strings at once?

Body:
Yes, to avoid expensive memory waste use the stringstream

std::stringstream might be it, but I don't know how exactly it works.

this is how it works: include the sstream, create an object, append to it as much as you need using the stream operator << get the result as string calling the function str

example:

#include <sstream>
std::stringstream mySS;

mySS << "Hello" << " World!" << "end!!" << " Foo";

and when you are done

std::string stringResult = mySS.str();


问:
Which C++ versions are supported by specific Visual Studio versions?
Which Visual Studio Version support C++11, C++14 or C++17?

I assume, that some version do support not all functions, but the question is aimed at the core functions.

Are there any differences between the Community Versions concerning the supported C++ version?

Thanks.

答:
I find that this page should answer your question.

As for the Community Version, it supports the same C++ version as the other versions. The difference is in the tool provided(profiler, static analysis, etc.).


答:
You can concatenate multiple strings - no problem:

```<code>std::string hello = "Hello";
std::string cruel = "cruel";
std::string world = "world";
std::string result = hello + " " + cruel + " " + world;
</code>```

Results in result holding the string "Hello cruel world".

Title: Concat multiple C++ strings at once?

Body:
I'm new to C++ strings. Is there a way to concatenate more than two strings at once? Or I have to concat two strings at the time? My concern is that it probably needs to allocate memory on each operation, instead of only once for the final result.

Remember something like that in java, wonder if there is a method for that somewhere in std. Actually, std::stringstream might be it, but I don't know how exactly it works.

Body:
You can concatenate multiple strings - no problem:

std::string hello = "Hello";
std::string cruel = "cruel";
std::string world = "world";
std::string result = hello + " " + cruel + " " + world;

Results in result holding the string "Hello cruel world".


问:
How to find repeating sequence of Integers in an array of Integers in java?
For example if input is:

2 0 6 3 1 6 3 1 6 3 1

then output should be 6 3 1.Need to find the first repetition cycle.

```<code>class FindDuplicate
{
void printRepeating(int arr[], int size)
{
    int i;
    System.out.println("The repeating elements are : ");

    for (i = 0; i < size; i++)
    {
        if (arr[Math.abs(arr[i])] >= 0)
            arr[Math.abs(arr[i])] = -arr[Math.abs(arr[i])];
        else
            System.out.print(Math.abs(arr[i]) + " ");
    }
}

public static void main(String[] args)
{
    FindDuplicate duplicate = new FindDuplicate();
    int arr[] = {1, 2, 3, 1, 2, 3, 1, 2, 3 };
    int arr_size = arr.length;
    duplicate.printRepeating(arr, arr_size);
}
}
</code>```

答:
```<code>class FindDuplicate {
    static int STRING_LENGTH = 3;

    void printRepeating(int arr[], int size) {
        int i;
        System.out.println("The repeating elements are : ");
        String strVal = "";
        for (int ii = 0; ii < size; ii++) {
            strVal += arr[ii];
        }
        // strVal now has something we can search with.

        for (i = 0; i < size; i++) {
            int end = Math.min(size,i+STRING_LENGTH );
            String searchString = strVal.substring(i, end);
            if (searchString.length() != STRING_LENGTH)
                break;  // at end of arr, doesn't have length to search
            int matchIndex = strVal.indexOf(searchString, i+1);
            if (matchIndex != -1) {
               String match = strVal.substring(matchIndex, matchIndex + STRING_LENGTH);
               System.out.print(match + " ");
               break; // done with loop
            }
        }
    }

    public static void main(String[] args) {
        FindDuplicate duplicate = new FindDuplicate();
        int arr[] = {1, 2, 3, 1, 2, 3, 1, 2, 3 };
        int arr_size = arr.length;
        duplicate.printRepeating(arr, arr_size);
    }
}
</code>```

Body:
For example if input is:

2 0 6 3 1 6 3 1 6 3 1

then output should be 6 3 1.Need to find the first repetition cycle.

class FindDuplicate
{
void printRepeating(int arr[], int size)
{
    int i;
    System.out.println("The repeating elements are : ");

    for (i = 0; i < size; i++)
    {
        if (arr[Math.abs(arr[i])] >= 0)
            arr[Math.abs(arr[i])] = -arr[Math.abs(arr[i])];
        else
            System.out.print(Math.abs(arr[i]) + " ");
    }
}

public static void main(String[] args)
{
    FindDuplicate duplicate = new FindDuplicate();
    int arr[] = {1, 2, 3, 1, 2, 3, 1, 2, 3 };
    int arr_size = arr.length;
    duplicate.printRepeating(arr, arr_size);
}
}


问:
How do I change text within
 tags with Javascript?

I need some help on editing elements which are in HTML with JavaScript. Is it possible to change the "text" with javascript? I've tried using document.getElementById but I don't think I'm doing it correctly.

答:
You can try something like this - </p>

```<code><button id="click">
CLICK
</button>
<div class="header" id="textChange">Text</div>
</code>```

<p>And then in your JS - </p>

```<code>$( "#click" ).click(function() {
$( "#textChange" ).replaceWith( "<h2>New heading</h2>" );
});
</code>```

Title: How do I change text within <div> tags with Javascript?

Body:
You can try something like this -

<button id="click">
CLICK
</button>
<div class="header" id="textChange">Text</div>

And then in your JS -

$( "#click" ).click(function() {
$( "#textChange" ).replaceWith( "<h2>New heading</h2>" );
});


问:
Cassandra config change to use hostnames after ip's changed
Initial installation of Cassandra was done using IP addresses and it has been working for 6+ months.  This past weekend DevOps changed security to not allow IP addresses and also reassigned new IP addresses.  I modified the required files (cassandra.yaml, cassandra-rackdc.properties, etc) to contain hostnames.  The issue is nodetool status gives the error, Failed to connect to '127.0.0.1:7199, and I do have JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=blah" in cassandra-env.sh. Any ideas how to proceed to the environment back up?  Should I go through the same files and replace hostnames with the new IP addresses?  Thanks.  </p>

答:
There are two options to provide listen address in Cassandra.yaml.

listen_address

listen_interface

To be completely agnostic of the IP address or hostname, use the option of listen_interface and comment the listen_address. Here is the Cassandra.yaml change required

```<code># Address or interface to bind to and tell other Cassandra nodes to  connect to.
#
#listen_address: xx.xxx.xx.xxx

# Set listen_address OR listen_interface, not both. Interfaces must    correspond
# to a single address, IP aliasing is not supported.
listen_interface: eth0
</code>```

To figure out the actual listen_interface, issue the command

ifconfig -a

Pick the interface that shows, "UP BROADCAST RUNNING". (eth0 in mycase)

The output should look like

```<code>root@ip-xx-xxx-x-xxx:~# ifconfig -a
docker0   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
      inet addr:xxx.xx.x.x  Bcast:0.0.0.0  Mask:255.255.0.0
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:2 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:152 (152.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
         inet addr:xx.xxx.xx.xx  Bcast:xx.xxx.xx.xx  Mask:255.255.0.0
         UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
         RX packets:169552382 errors:0 dropped:0 overruns:0 frame:0
         TX packets:185182015 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:88406501352 (88.4 GB)  TX bytes:126516101404 (126.5 GB)

lo        Link encap:Local Loopback
          inet addr:xx.xxx.xx.xx  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:38490371 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38490371 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:41155731774 (41.1 GB)  TX bytes:41155731774 (41.1 GB)
</code>```

Restart Cassandra and you should be good to go. Another advantage is that Cassandra.yaml no longer has to be different across your nodes (assuming all have the same network interface).

Body:
There are two options to provide listen address in Cassandra.yaml.

listen_address

listen_interface

To be completely agnostic of the IP address or hostname, use the option of listen_interface and comment the listen_address. Here is the Cassandra.yaml change required

# Address or interface to bind to and tell other Cassandra nodes to  connect to.
#
#listen_address: xx.xxx.xx.xxx

# Set listen_address OR listen_interface, not both. Interfaces must    correspond
# to a single address, IP aliasing is not supported.
listen_interface: eth0

To figure out the actual listen_interface, issue the command

ifconfig -a

Pick the interface that shows, "UP BROADCAST RUNNING". (eth0 in mycase)

The output should look like

root@ip-xx-xxx-x-xxx:~# ifconfig -a
docker0   Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
      inet addr:xxx.xx.x.x  Bcast:0.0.0.0  Mask:255.255.0.0
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:2 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:152 (152.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
         inet addr:xx.xxx.xx.xx  Bcast:xx.xxx.xx.xx  Mask:255.255.0.0
         UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
         RX packets:169552382 errors:0 dropped:0 overruns:0 frame:0
         TX packets:185182015 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:88406501352 (88.4 GB)  TX bytes:126516101404 (126.5 GB)

lo        Link encap:Local Loopback
          inet addr:xx.xxx.xx.xx  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:38490371 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38490371 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:41155731774 (41.1 GB)  TX bytes:41155731774 (41.1 GB)

Restart Cassandra and you should be good to go. Another advantage is that Cassandra.yaml no longer has to be different across your nodes (assuming all have the same network interface).


问:
Bitmap to Mat? android opencv
Hi i have my Bitmap object that i need to convert in Mat object .I saw that somebody used the bitmaptoMat function,but in my Utils package i have a lot of function with points list input to get Mat output but i have my Bitmap file.I tried another solution: Imgcodecs.imread that need string input,and i guess it needs the images path but i tried giving uri.toString() but it doesnt work.What can i do?
This is my Bitmap:</p>

```<code> Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);
</code>```

答:
You can use pointer to bitmap, to generate a Mat file.
I did this with QT and it looks like this :

```<code>QImage  img((uchar*)frame->data(), frame->width(), frame->height(), QImage::Format::Format_RGB888);
</code>```

I did it in opencv, but I don't remember the exact constructor:
try to do something like this:

```<code>cv::Mat bitmapMat = cv::Mat(bitmap.height, bitmap.width, CV_8UC1, bitmap.data());
</code>```

or

```<code>cv::Mat bitmapMat = cv::Mat(Size _size, int _type, void* _data, size_t _step=AUTO_STEP);
</code>```

Title: Bitmap to Mat? android opencv

Body:
Hi i have my Bitmap object that i need to convert in Mat object .I saw that somebody used the bitmaptoMat function,but in my Utils package i have a lot of function with points list input to get Mat output but i have my Bitmap file.I tried another solution: Imgcodecs.imread that need string input,and i guess it needs the images path but i tried giving uri.toString() but it doesnt work.What can i do?
This is my Bitmap:

 Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);

Body:
You can use pointer to bitmap, to generate a Mat file.
I did this with QT and it looks like this :

QImage  img((uchar*)frame->data(), frame->width(), frame->height(), QImage::Format::Format_RGB888);

I did it in opencv, but I don't remember the exact constructor:
try to do something like this:

cv::Mat bitmapMat = cv::Mat(bitmap.height, bitmap.width, CV_8UC1, bitmap.data());

or

cv::Mat bitmapMat = cv::Mat(Size _size, int _type, void* _data, size_t _step=AUTO_STEP);


问:
Represent Flowchart-specified Algorithms in Haskell
I'm confronted with the task of implementing algorithms (mostly business logic style) expressed as flowcharts. I'm aware that flowcharts are not the best algorithm representation due to its spaghetti-code property (would this be a use-case for CPS?), but I'm stuck with the specification expressed as flowcharts.

Although I could transform the flowcharts into more appropriate equivalent representations before implementing them, that could make it harder to "recognize" the orginal flow-chart in the resulting implementation, so I was hoping there is some way to directly represent flowchart-algorithms as (maybe monadic) EDSLs in Haskell, so that the semblance to the original flowchart-specification would be (more) obvious.

答: Sounds like Arrows would fit exactly what you describe. Either do a visualization of arrows (should be quite simple) or generate/transform arrow code from flow-graphs if you must.</p>


问:
Jenkinsfile with user input with variable in choices
I want to use new Jenkinsfile for new job.

I have jenkinsfile wich I have in solo repository:

I get branches from another gitlab repository by git ls-remote in bash. And I store them in variables: branch1, branch2, brach3....

Then I want to use these variables in user input choices

```<code>script {
  env.BRANCHDEPLOY = input message: 'User input required',
  ok: 'Deploy!',
  parameters: [choice(name: 'Branch to deploy', choices: '${branch1}\n${branch2}\n${branch3}', description: 'What branch you wont deploy?')]
}
echo "${env.BRANCHDEPLOY}"
</code>```

Then I will use ${env.BRANCHDEPLOY} for git to deploy selected branch.

Problem is that I can't get to work it with variables in user choice.

I just need to let user choose branch what he wants deploy from another gitlab repository.

答:
You are just making the mistake of doing single quotes around your variables which have to be replaced by the script, So just change the single quotes around to double quotes and it works.

```<code>"${branch1}\n${branch2}\n${branch3}"
</code>```

Example: Stage two prints the selected choice

```<code>pipeline {
agent any

environment{
    branch1 = 'stack'
    branch2 = 'over'
    branch3 = 'flow'
}

stages {
    stage('Stage-One') {
        steps {
            script {
                env.BRANCHDEPLOY = input message: 'User input required',
                ok: 'Deploy!',
                parameters: [choice(name: 'Branch to deploy', choices: "${branch1}\n${branch2}\n${branch3}", description: 'What branch you wont deploy?')]
            }
        }
    }
    stage('Stage-Two'){
        steps{
            sh "echo ${BRANCHDEPLOY}"
        }
    }
}
</code>```

}

Body:
I want to use new Jenkinsfile for new job.

I have jenkinsfile wich I have in solo repository:

I get branches from another gitlab repository by git ls-remote in bash. And I store them in variables: branch1, branch2, brach3....

Then I want to use these variables in user input choices

script {
  env.BRANCHDEPLOY = input message: 'User input required',
  ok: 'Deploy!',
  parameters: [choice(name: 'Branch to deploy', choices: '${branch1}\n${branch2}\n${branch3}', description: 'What branch you wont deploy?')]
}
echo "${env.BRANCHDEPLOY}"

Then I will use ${env.BRANCHDEPLOY} for git to deploy selected branch.

Problem is that I can't get to work it with variables in user choice.

I just need to let user choose branch what he wants deploy from another gitlab repository.

Body:
You are just making the mistake of doing single quotes around your variables which have to be replaced by the script, So just change the single quotes around to double quotes and it works.

"${branch1}\n${branch2}\n${branch3}"

Example: Stage two prints the selected choice

pipeline {
agent any

environment{
    branch1 = 'stack'
    branch2 = 'over'
    branch3 = 'flow'
}

stages {
    stage('Stage-One') {
        steps {
            script {
                env.BRANCHDEPLOY = input message: 'User input required',
                ok: 'Deploy!',
                parameters: [choice(name: 'Branch to deploy', choices: "${branch1}\n${branch2}\n${branch3}", description: 'What branch you wont deploy?')]
            }
        }
    }
    stage('Stage-Two'){
        steps{
            sh "echo ${BRANCHDEPLOY}"
        }
    }
}

}


问:
Remove/Hide Woocommerce Added to Cart Message but Keep/Display Coupon Applied Message
I'm trying to remove or hide the added to cart message at the top of my WooCommerce checkout page (I have removed the cart page so this message is showing up on the checkout page). I tried adding this to my CSS:

```<code>.woocommerce-message {display: none;}.
</code>```

Although this hides the added to cart message as I want it to, it also hides the coupon applied message, which I do not want hidden.

Next I tried this code snippet from the Business Bloomer blog in the functions.php file:

```<code>// Removes Product Successfully Added to Cart

add_filter( 'wc_add_to_cart_message', 'custom_add_to_cart_message' );

function custom_add_to_cart_message() {

echo '<style>.woocommerce-message {display: none !important;}</style>';

}
</code>```

This hides the text, but the styles applied to the div with the class of .woocommerce-message are still visible, including background-color, padding etc. So I'm left with a rectangle at the top of my page with no text in it.

Any thoughts on how I can completely hide the .woocommerce-message div just for the added to cart message, but not the .woocommerce-message div for the coupon applied message or any other messages would be appreciated!

答:
this worked for me:</p>

```<code>add_filter( 'wc_add_to_cart_message', 'remove_add_to_cart_message' );

function remove_add_to_cart_message() {
    return;
}
</code>```

Body:
I'm trying to remove or hide the added to cart message at the top of my WooCommerce checkout page (I have removed the cart page so this message is showing up on the checkout page). I tried adding this to my CSS:

.woocommerce-message {display: none;}.

Although this hides the added to cart message as I want it to, it also hides the coupon applied message, which I do not want hidden.

Next I tried this code snippet from the Business Bloomer blog in the functions.php file:

// Removes Product Successfully Added to Cart

add_filter( 'wc_add_to_cart_message', 'custom_add_to_cart_message' );

function custom_add_to_cart_message() {

echo '';

}

This hides the text, but the styles applied to the div with the class of .woocommerce-message are still visible, including background-color, padding etc. So I'm left with a rectangle at the top of my page with no text in it.

Any thoughts on how I can completely hide the .woocommerce-message div just for the added to cart message, but not the .woocommerce-message div for the coupon applied message or any other messages would be appreciated!

Body:
this worked for me:

add_filter( 'wc_add_to_cart_message', 'remove_add_to_cart_message' );

function remove_add_to_cart_message() {
    return;
}