问:
sbt release to Maven central fails with no public key error
I tried to release better-files to Maven central and I am getting this error.
I tried this on fresh checkout on multiple different machines.

My steps:

Step 1: Generate keys

```<code>> sbt
sbt:better-files-root> pgp-cmd gen-key
Please enter the name associated with the key: Pathikrit Bhowmick
Please enter the email associated with the key: pathikritbhowmick@msn.com
Please enter the passphrase for the key: *********
Please re-enter the passphrase for the key: *********
[info] Creating a new PGP key, this could take a long time.
[info] Public key := /Users/pathikrit/.sbt/gpg/pubring.asc
[info] Secret key := /Users/pathikrit/.sbt/gpg/secring.asc
[info] Please do not share your secret key.   Your public key is free to share.
</code>```

Step 2: Release keys

```<code>sbt:better-files-root> pgp-cmd send-key pathikritbhowmick@msn.com hkp://pool.sks-keyservers.net
[info] Sending PublicKeyRing(PublicKey(27dfe5f26bf754dc, Pathikrit Bhowmick <pathikritbhowmick@msn.com>, RSA@2048)) to HkpServer(http://pool.sks-keyservers.net:11371)
</code>```

Step 3: Run release command

```sbt:better-files-root> +release
[info] Forcing Scala version to 2.11.12 on all projects.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] Starting release process off commit: 7db21fb793ebb2471983f908f9c6e99dcb7d45f6
[info] Checking remote [origin] ...
[info] Updating ...
[info] Updating core...
[info] Done updating.
Release version [3.6.0] :
Next version [3.6.1-SNAPSHOT] :
[info] Setting version to '3.6.0'.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] Packaging /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0-sources.jar ...
[info] Packaging /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0-sources.jar ...
[info] Done packaging.
[info] Done packaging.
[info] Main Scala API documentation to /Users/pathikrit/workspace/better-files/core/target/scala-2.11/api...
[info] Wrote /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0.pom
[info] Wrote /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0.pom
[info] Main Scala API documentation to /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/api...
[info] Packaging /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0.jar ...
[info] Done packaging.
[info] Packaging /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0.jar ...
[info] Done packaging.
model contains 11 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0-javadoc.jar ...
[info] Done packaging.
Please enter PGP passphrase (or ENTER to abort): *********
model contains 72 documentable templates
[error] Unable to find credentials for [Sonatype Nexus Repository Manager @ oss.sonatype.org].
[info] Main Scala API documentation successful.
[info] Packaging /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0-javadoc.jar ...
[info] Done packaging. model contains 11 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0-javadoc.jar ...
[info] Done packaging.
Please enter PGP passphrase (or ENTER to abort): *********
model contains 72 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0-javadoc.jar ...
[info] Done packaging.
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0-sources.jar.asc
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0-javadoc.jar
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0.jar.asc
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0-javadoc.jar.asc
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0.pom.asc
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0.pom
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0-sources.jar
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0.jar
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0.jar.asc
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0.pom.asc
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0-javadoc.jar
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0-sources.jar.asc
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0-javadoc.jar.asc
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0-sources.jar
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0.jar
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0.pom
[success] Total time: 23 s, completed Jul 22, 2018 11:36:28 AM
[info] Setting version to '3.6.1-SNAPSHOT'.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] [master e12f579] Setting version to 3.6.1-SNAPSHOT
[info]  1 file changed, 1 insertion(+), 1 deletion(-)
[info] Nexus repository URL: https://oss.sonatype.org/service/local
[info] sonatypeProfileName = com.github.pathikrit
[info] Reading staging repository profiles...
[info] Reading staging profiles...
[info] Closing staging repository [comgithubpathikrit-1045] status:open, profile:com.github.pathikrit(3ce6558c41fb47) description: Implicitly created (auto staging).
[info] Activity open started:2018-07-19T19:59:57.116Z, stopped:2018-07-19T20:00:04.197Z
[info] repositoryCreated: id:comgithubpathikrit-1045, user:pathikrit, ip:38.125.162.165
[info] Activity close started:2018-07-19T20:01:29.188Z, stopped:2018-07-19T20:01:53.739Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T20:17:08.278Z, stopped:2018-07-19T20:19:03.516Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T21:23:18.003Z, stopped:2018-07-19T21:23:54.750Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:00:37.521Z, stopped:2018-07-19T22:01:34.028Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:12:14.160Z, stopped:2018-07-19T22:12:42.249Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (dbe44cf5bac37b7e) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:28:06.155Z, stopped:2018-07-19T22:28:34.071Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (800be7bf8a863023) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:33:24.787Z, stopped:2018-07-19T22:35:08.982Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (800be7bf8a863023) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:35:30.600Z, stopped:2018-07-19T22:36:01.750Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (800be7bf8a863023) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T23:56:30.507Z, stopped:2018-07-19T23:57:24.229Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (dbe44cf5bac37b7e) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T00:05:25.838Z, stopped:2018-07-20T00:06:51.588Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (dbe44cf5bac37b7e) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T01:18:56.952Z, stopped:2018-07-20T01:20:14.920Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (3203329e3f571131) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T01:31:51.669Z, stopped:2018-07-20T01:32:34.830Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (3203329e3f571131) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T01:36:49.254Z, stopped:2018-07-20T01:38:56.063Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (3203329e3f571131) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T12:52:53.504Z, stopped:2018-07-20T12:54:05.016Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T14:41:07.942Z, stopped:2018-07-20T14:44:21.132Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[error] Failed to close the repository
[error] Activity close started:2018-07-20T14:41:07.942Z, stopped:2018-07-20T14:44:21.132Z
[error]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Uploadyour public key and try the operation again.
[error] java.lang.Exception: Failed to close the repository
[error]         at xerial.sbt.Sonatype$NexusRESTService.closeStage(Sonatype.scala:762)
[error]         at xerial.sbt.Sonatype$NexusRESTService.closeAndPromote(Sonatype.scala:854)
[error]         at xerial.sbt.Sonatype$SonatypeCommand$.$anonfun$sonatypeReleaseAll$2(Sonatype.scala:279)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]         at scala.collection.immutable.List.foreach(List.scala:389)
[error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]         at scala.collection.TraversableOnce.$div$colon(TraversableOnce.scala:151)
[error]         at scala.collection.TraversableOnce.$div$colon$(TraversableOnce.scala:151)
[error]         at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:104)
[error]         at scala.Function$.$anonfun$chain$1(Function.scala:24)
[error]         at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$.$anonfun$releaseCommand$2(ReleasePlugin.scala:199)
[error]         at sbt.Command$.$anonfun$applyEffect$4(Command.scala:134)
[error]         at sbt.Command$.$anonfun$applyEffect$2(Command.scala:130)
[error]         at sbt.MainLoop$.processCommand(MainLoop.scala:154)
[error]         at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:137)
[error]         at sbt.State$$anon$1.runCmd$1(State.scala:242)
[error]         at sbt.State$$anon$1.process(State.scala:248)
[error]         at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:137)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.MainLoop$.next(MainLoop.scala:137)
[error]         at sbt.MainLoop$.run(MainLoop.scala:130)
[error]         at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:108)
[error]         at sbt.io.Using.apply(Using.scala:22)
[error]         at sbt.MainLoop$.runWithNewLog(MainLoop.scala:102)
[error]         at sbt.MainLoop$.runAndClearLast(MainLoop.scala:58)
[error]         at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:43)
[error]         at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error]         at sbt.StandardMain$.runManaged(Main.scala:113)
[error]         at sbt.xMain.run(Main.scala:76)
[error]         at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error]         at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error]         at xsbt.boot.Launch$.run(Launch.scala:109)
[error]         at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error]         at xsbt.boot.Launch$.launch(Launch.scala:117)
[error]         at xsbt.boot.Launch$.apply(Launch.scala:18)
[error]         at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error]         at xsbt.boot.Boot$.main(Boot.scala:18)
[error]         at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.Exception: Failed to close the repository
[error] Use 'last' for the full log.
sbt:better-files-root>
```

I filed an issue with sbt-release but I have not got any response to it either: https://github.com/sbt/sbt-release/issues/233

答:
In order to access instantly the public key, there is the need to add it to the server that the CI will be using.

It seems that your build is trying to fetch a key from this server http://keyserver.ubuntu.com:11371/ and you publish the key on this server
hkp://pool.sks-keyservers.net according to step two described above.
At some point, it will be available in different servers but the synchronization is not instantaneous.

To fix that run the step two now using the Ubuntu server:

This will send your PGP key to the Ubuntu keyserver. To do this, first, run

sbt:better-files-root> pgp-cmd send-key pathikritbhowmick@msn.com hkp://keyserver.ubuntu.com

```

<p>or </p>

<pre class="lang-sh prettyprint-override"><code>gpg --send-keys --keyserver hkp://keyserver.ubuntu.com keyid; replace keyid with your key ID.

</code>```

For the previous server as well, without using sbt:

```<code>$ gpg --keyserver hkp://pool.sks-keyservers.net --send-keys keyid
</code>```

Body:
I tried to release better-files to Maven central and I am getting this error.
I tried this on fresh checkout on multiple different machines.

My steps:

Step 1: Generate keys

> sbt
sbt:better-files-root> pgp-cmd gen-key
Please enter the name associated with the key: Pathikrit Bhowmick
Please enter the email associated with the key: pathikritbhowmick@msn.com
Please enter the passphrase for the key: *********
Please re-enter the passphrase for the key: *********
[info] Creating a new PGP key, this could take a long time.
[info] Public key := /Users/pathikrit/.sbt/gpg/pubring.asc
[info] Secret key := /Users/pathikrit/.sbt/gpg/secring.asc
[info] Please do not share your secret key.   Your public key is free to share.

Step 2: Release keys

sbt:better-files-root> pgp-cmd send-key pathikritbhowmick@msn.com hkp://pool.sks-keyservers.net
[info] Sending PublicKeyRing(PublicKey(27dfe5f26bf754dc, Pathikrit Bhowmick <pathikritbhowmick@msn.com>, RSA@2048)) to HkpServer(http://pool.sks-keyservers.net:11371)

Step 3: Run release command

sbt:better-files-root> +release
[info] Forcing Scala version to 2.11.12 on all projects.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] Starting release process off commit: 7db21fb793ebb2471983f908f9c6e99dcb7d45f6
[info] Checking remote [origin] ...
[info] Updating ...
[info] Updating core...
[info] Done updating.
Release version [3.6.0] :
Next version [3.6.1-SNAPSHOT] :
[info] Setting version to '3.6.0'.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] Packaging /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0-sources.jar ...
[info] Packaging /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0-sources.jar ...
[info] Done packaging.
[info] Done packaging.
[info] Main Scala API documentation to /Users/pathikrit/workspace/better-files/core/target/scala-2.11/api...
[info] Wrote /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0.pom
[info] Wrote /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0.pom
[info] Main Scala API documentation to /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/api...
[info] Packaging /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0.jar ...
[info] Done packaging.
[info] Packaging /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0.jar ...
[info] Done packaging.
model contains 11 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0-javadoc.jar ...
[info] Done packaging.
Please enter PGP passphrase (or ENTER to abort): *********
model contains 72 documentable templates
[error] Unable to find credentials for [Sonatype Nexus Repository Manager @ oss.sonatype.org].
[info] Main Scala API documentation successful.
[info] Packaging /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0-javadoc.jar ...
[info] Done packaging. model contains 11 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/pathikrit/workspace/better-files/akka/target/scala-2.11/better-files-akka_2.11-3.6.0-javadoc.jar ...
[info] Done packaging.
Please enter PGP passphrase (or ENTER to abort): *********
model contains 72 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/pathikrit/workspace/better-files/core/target/scala-2.11/better-files_2.11-3.6.0-javadoc.jar ...
[info] Done packaging.
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0-sources.jar.asc
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0-javadoc.jar
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0.jar.asc
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0-javadoc.jar.asc
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0.pom.asc
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0.pom
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0-sources.jar
[info]  published better-files-akka_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files-akka_2.11/3.6.0/better-files-akka_2.11-3.6.0.jar
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0.jar.asc
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0.pom.asc
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0-javadoc.jar
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0-sources.jar.asc
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0-javadoc.jar.asc
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0-sources.jar
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0.jar
[info]  published better-files_2.11 to https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/pathikrit/better-files_2.11/3.6.0/better-files_2.11-3.6.0.pom
[success] Total time: 23 s, completed Jul 22, 2018 11:36:28 AM
[info] Setting version to '3.6.1-SNAPSHOT'.
[info] Reapplying settings...
[info] Set current project to better-files-root (in build file:/Users/pathikrit/workspace/better-files/)
[info] [master e12f579] Setting version to 3.6.1-SNAPSHOT
[info]  1 file changed, 1 insertion(+), 1 deletion(-)
[info] Nexus repository URL: https://oss.sonatype.org/service/local
[info] sonatypeProfileName = com.github.pathikrit
[info] Reading staging repository profiles...
[info] Reading staging profiles...
[info] Closing staging repository [comgithubpathikrit-1045] status:open, profile:com.github.pathikrit(3ce6558c41fb47) description: Implicitly created (auto staging).
[info] Activity open started:2018-07-19T19:59:57.116Z, stopped:2018-07-19T20:00:04.197Z
[info] repositoryCreated: id:comgithubpathikrit-1045, user:pathikrit, ip:38.125.162.165
[info] Activity close started:2018-07-19T20:01:29.188Z, stopped:2018-07-19T20:01:53.739Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T20:17:08.278Z, stopped:2018-07-19T20:19:03.516Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T21:23:18.003Z, stopped:2018-07-19T21:23:54.750Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:00:37.521Z, stopped:2018-07-19T22:01:34.028Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:12:14.160Z, stopped:2018-07-19T22:12:42.249Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (dbe44cf5bac37b7e) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:28:06.155Z, stopped:2018-07-19T22:28:34.071Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (800be7bf8a863023) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:33:24.787Z, stopped:2018-07-19T22:35:08.982Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (800be7bf8a863023) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T22:35:30.600Z, stopped:2018-07-19T22:36:01.750Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (800be7bf8a863023) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-19T23:56:30.507Z, stopped:2018-07-19T23:57:24.229Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (dbe44cf5bac37b7e) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T00:05:25.838Z, stopped:2018-07-20T00:06:51.588Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (dbe44cf5bac37b7e) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T01:18:56.952Z, stopped:2018-07-20T01:20:14.920Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (3203329e3f571131) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T01:31:51.669Z, stopped:2018-07-20T01:32:34.830Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (3203329e3f571131) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T01:36:49.254Z, stopped:2018-07-20T01:38:56.063Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (3203329e3f571131) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T12:52:53.504Z, stopped:2018-07-20T12:54:05.016Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[info] Activity close started:2018-07-20T14:41:07.942Z, stopped:2018-07-20T14:44:21.132Z
[info]   Evaluate: id:5e9e8e6f8d20a3, rule:sources-staging
[info]   Evaluate: pom-staging
[info]     Passed: pom-staging
[info]   Evaluate: no-traversal-paths-in-archive-file
[info]     Passed: no-traversal-paths-in-archive-file
[info]   Evaluate: checksum-staging
[info]     Passed: checksum-staging
[info]   Evaluate: signature-staging
[info]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Upload your public key and try the operation again.
[info]   Evaluate: javadoc-staging
[info]     Passed: javadoc-staging
[info]   Evaluate: sources-staging
[info]     Passed: sources-staging
[info]     Failed: id:5e9e8e6f8d20a3, failureCount:1
[info] repositoryCloseFailed: id:comgithubpathikrit-1045, cause:com.sonatype.nexus.staging.StagingRulesFailedException: One or more rules have failed
[error] Failed to close the repository
[error] Activity close started:2018-07-20T14:41:07.942Z, stopped:2018-07-20T14:44:21.132Z
[error]     Failed: signature-staging, failureMessage:No public key: Key with id: (48fb4a38145efed7) was not able to be located on http://keyserver.ubuntu.com:11371/. Uploadyour public key and try the operation again.
[error] java.lang.Exception: Failed to close the repository
[error]         at xerial.sbt.Sonatype$NexusRESTService.closeStage(Sonatype.scala:762)
[error]         at xerial.sbt.Sonatype$NexusRESTService.closeAndPromote(Sonatype.scala:854)
[error]         at xerial.sbt.Sonatype$SonatypeCommand$.$anonfun$sonatypeReleaseAll$2(Sonatype.scala:279)
[error]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error]         at scala.collection.immutable.List.foreach(List.scala:389)
[error]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error]         at scala.collection.TraversableOnce.$div$colon(TraversableOnce.scala:151)
[error]         at scala.collection.TraversableOnce.$div$colon$(TraversableOnce.scala:151)
[error]         at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:104)
[error]         at scala.Function$.$anonfun$chain$1(Function.scala:24)
[error]         at sbtrelease.ReleasePlugin$autoImport$ReleaseKeys$.$anonfun$releaseCommand$2(ReleasePlugin.scala:199)
[error]         at sbt.Command$.$anonfun$applyEffect$4(Command.scala:134)
[error]         at sbt.Command$.$anonfun$applyEffect$2(Command.scala:130)
[error]         at sbt.MainLoop$.processCommand(MainLoop.scala:154)
[error]         at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:137)
[error]         at sbt.State$$anon$1.runCmd$1(State.scala:242)
[error]         at sbt.State$$anon$1.process(State.scala:248)
[error]         at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:137)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.MainLoop$.next(MainLoop.scala:137)
[error]         at sbt.MainLoop$.run(MainLoop.scala:130)
[error]         at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:108)
[error]         at sbt.io.Using.apply(Using.scala:22)
[error]         at sbt.MainLoop$.runWithNewLog(MainLoop.scala:102)
[error]         at sbt.MainLoop$.runAndClearLast(MainLoop.scala:58)
[error]         at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:43)
[error]         at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error]         at sbt.StandardMain$.runManaged(Main.scala:113)
[error]         at sbt.xMain.run(Main.scala:76)
[error]         at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error]         at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error]         at xsbt.boot.Launch$.run(Launch.scala:109)
[error]         at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error]         at xsbt.boot.Launch$.launch(Launch.scala:117)
[error]         at xsbt.boot.Launch$.apply(Launch.scala:18)
[error]         at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error]         at xsbt.boot.Boot$.main(Boot.scala:18)
[error]         at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.Exception: Failed to close the repository
[error] Use 'last' for the full log.
sbt:better-files-root>

I filed an issue with sbt-release but I have not got any response to it either: https://github.com/sbt/sbt-release/issues/233

Body:
In order to access instantly the public key, there is the need to add it to the server that the CI will be using.

It seems that your build is trying to fetch a key from this server http://keyserver.ubuntu.com:11371/ and you publish the key on this server
hkp://pool.sks-keyservers.net according to step two described above.
At some point, it will be available in different servers but the synchronization is not instantaneous.

To fix that run the step two now using the Ubuntu server:

This will send your PGP key to the Ubuntu keyserver. To do this, first, run

sbt:better-files-root> pgp-cmd send-key pathikritbhowmick@msn.com hkp://keyserver.ubuntu.com

or

gpg --send-keys --keyserver hkp://keyserver.ubuntu.com keyid; replace keyid with your key ID.

For the previous server as well, without using sbt:

$ gpg --keyserver hkp://pool.sks-keyservers.net --send-keys keyid


来源: stackexchange

问:
Testing for letter combinations
I am building a spreadsheet to identify spelling errors. The spelling word is one cell and another cell contains a formula to determine if the word has certain combinations of letters.

The best I can do is countif, but I want to be able to create the return value instead of simply getting a 1 or 0. I want it to display the missing letter or combination.

```<code>=countifs(B2,"sw*")
</code>```

This to check that the word "switch" was spelled with "sw" at the start of it.

With countif I can search for specific letters but only get 1 or 0 return. With IF function I can create the return value but only search for numbers (as I understand it).

答:
You can use this:

```<code>=IF(ISNUMBER(IFERROR(FIND("pp",E14,1),"pp")),"","pp")
</code>```

Flow is: First we are trying to find pp in the text, if yes then it gives you a start number and if no it gives you back pp using IfError, after that I have applied a function IsNumber to give True if number is returned and False if No Number is detected. Lastly the If statement.

ContentLicense: CC BY-SA 4.0

Title: Testing for letter combinations

Body:
I am building a spreadsheet to identify spelling errors. The spelling word is one cell and another cell contains a formula to determine if the word has certain combinations of letters.

The best I can do is countif, but I want to be able to create the return value instead of simply getting a 1 or 0. I want it to display the missing letter or combination.

=countifs(B2,"sw*")

This to check that the word "switch" was spelled with "sw" at the start of it.

With countif I can search for specific letters but only get 1 or 0 return. With IF function I can create the return value but only search for numbers (as I understand it).

Body:
You can use this:

=IF(ISNUMBER(IFERROR(FIND("pp",E14,1),"pp")),"","pp")

Flow is: First we are trying to find pp in the text, if yes then it gives you a start number and if no it gives you back pp using IfError, after that I have applied a function IsNumber to give True if number is returned and False if No Number is detected. Lastly the If statement.


问:
Add and remove icon dynamically when the video is clicked
I have a div where I have list of video URL and I need to add the play icon dynamically, While the video is playing and I need to remove it. While the other video is clicked and add to that video. But I am not able to remove it while other one is clicked.

Here, is my html and script what i have tried so far,

```<code>    <div class="myDiv" >
    <ul>
    <li class="videoList" id="item-0" >
    <div class="row" href="#video1">
    <div>
    <img class="ImagContent">
    </div>
    <div>
    <label class="myClass">Text</label>
    </div>
    </div>
    </li>
<li class="videoList" id="item-1" >
    <div class="row" href="#video1">
    <div>
    <img class="ImagContent">
    </div>
    <div>
    <label class="myClass">Text</label>
    </div>
    </div>
    </li>
    </ul>
    </div>

$('.myDiv').click(function () {
var id=$(this).attr('id')
   $('#'+id).find('.myclass').append('<i style="font-size:24px" class="fa"></i>');
});
</code>```

Anyone Can help me to resolve this?

Thanks in Advance!!

答:
Try the following code</p>

```<code>$('.videoList').click(function () {
    var id=$(this).attr('id');
    $('.myclass').html('text'); // set default value for all
    $('#'+id).find('.myClass').append('<i style="font-size:24px" class="fa"></i>'); // append icon to myClass
});
</code>```

Body:
I have a div where I have list of video URL and I need to add the play icon dynamically, While the video is playing and I need to remove it. While the other video is clicked and add to that video. But I am not able to remove it while other one is clicked.

Here, is my html and script what i have tried so far,

    Text

    Text

$('.myDiv').click(function () {
var id=$(this).attr('id')
   $('#'+id).find('.myclass').append('');
});

Anyone Can help me to resolve this?

Thanks in Advance!!

Body:
Try the following code

$('.videoList').click(function () {
    var id=$(this).attr('id');
    $('.myclass').html('text'); // set default value for all
    $('#'+id).find('.myClass').append('<i style="font-size:24px" class="fa">&#xf144;</i>'); // append icon to myClass
});


问:
How to create a directory in a function
Editing:

I'm trying to build a simple function that print out a name, then creates a directory. I'm new at building function in bash, so I have the below script that didn't work:

```<code>dest_path=/home/all/todo
line="name"

mkdir_for_name() {
echo $1
mkdir $2
}

mkdir_for_name $name
mkdir_for_name $dest_path/$name
</code>```

What is wrong with that syntax?

答:
Since you are using echo so I believe you want to print directory name; and off course you need to pass 2 arguments to your function. May be call your function in following way. In this way you need not to change your code.

```<code>mkdir_for_name  "$name"  "$dest_path/$name"
</code>```

Complete script:

```<code>dest_path=/home/all/todo
line="name"

mkdir_for_name() {
echo "$1"
mkdir "$2"
}

mkdir_for_name  "$name"  "$dest_path/$name"
</code>```

Title: How to create a directory in a function

Body:
Editing:

I'm trying to build a simple function that print out a name, then creates a directory. I'm new at building function in bash, so I have the below script that didn't work:

dest_path=/home/all/todo
line="name"

mkdir_for_name() {
echo $1
mkdir $2
}

mkdir_for_name $name
mkdir_for_name $dest_path/$name

What is wrong with that syntax?

Body:
Since you are using echo so I believe you want to print directory name; and off course you need to pass 2 arguments to your function. May be call your function in following way. In this way you need not to change your code.

mkdir_for_name  "$name"  "$dest_path/$name"

Complete script:

dest_path=/home/all/todo
line="name"

mkdir_for_name() {
echo "$1"
mkdir "$2"
}

mkdir_for_name  "$name"  "$dest_path/$name"


问:
Is it better to give a function an additional parameter, or to make the parameter static?
Many times I've come across a situation where I am calling a method many times with one parameter always exactly the same, and I need to add some additional parameter defined in my main method. I'm never sure what to do about the additional parameter. It seems like it might be a better idea to make the parameter static to make the code cleaner, but then, static variables are not very good. Still, adding parameters can in some cases lead to very long lists of parameters that are in a way unnecessary, and I imagine that there will be a speed disadvantage as well when your function is short, called often, and has a lot of parameters.

Here's the most recent code (kotlin) that has had me thinking about this problem, but I've ran into the problem a lot in different languages.

```<code>tailrec fun getAncestor(ind: Int, parent: IntArray): Int {
        if (parent[ind] == ind) return ind else return getAncestor(parent[ind], parent);
}
</code>```

Is it better to make parent a static variable and not have it as a parameter to the method? (Assume that every time that this method is called, the second parameter will be the same. I'm usually only writing short 100 line code files for competitive programming so there is no chance the method will be reused with a different second parameter)

答:
In general if you're working on a project, you'll want to stay away from static variables because when the project starts scaling up and getting bigger, it'll be very hard to keep track of the static variables and this will make it very hard to debug.
In competitive programming, I suggest go for the quicker approach.</p>

Body:
Many times I've come across a situation where I am calling a method many times with one parameter always exactly the same, and I need to add some additional parameter defined in my main method. I'm never sure what to do about the additional parameter. It seems like it might be a better idea to make the parameter static to make the code cleaner, but then, static variables are not very good. Still, adding parameters can in some cases lead to very long lists of parameters that are in a way unnecessary, and I imagine that there will be a speed disadvantage as well when your function is short, called often, and has a lot of parameters.

Here's the most recent code (kotlin) that has had me thinking about this problem, but I've ran into the problem a lot in different languages.

tailrec fun getAncestor(ind: Int, parent: IntArray): Int {
        if (parent[ind] == ind) return ind else return getAncestor(parent[ind], parent);
}

Is it better to make parent a static variable and not have it as a parameter to the method? (Assume that every time that this method is called, the second parameter will be the same. I'm usually only writing short 100 line code files for competitive programming so there is no chance the method will be reused with a different second parameter)


问:
Angular 7 hide particular attribute inside ngFor loop
I'm using a ngFor loop angular 7 I need to a hidden particular attribute(example userNo and UserType ) inside a ngFor loop.</p>

```<code>emailId: "afsageg@dgvsf"
groupName: "dfsfgfdg"
mobileNo: "+91fyrtyrtyty"
userId: "ttrur"
userName: "srurttuidharan"
userNo: 2
userType: "rrhjty"
userTypeDisplay: "Operator Maker"

<tr *ngFor="let key of formData | keyvalue" >
    <td [hidden]="key.userNo">{{key.key | titlecase}}</td>
    <td>{{key.value}}</td>
</tr>
</code>```

答:
```<code>emailId: "afsageg@dgvsf"
groupName: "dfsfgfdg"
mobileNo: "+91fyrtyrtyty"
userId: "ttrur"
userName: "srurttuidharan"
userNo: 2
userType: "rrhjty"
userTypeDisplay: "Operator Maker"

<tr *ngFor="let key of formData | keyvalue" >
    <td [hidden]="key.userNo === true">{{key.key | titlecase}}</td>
    <td>{{key.value}}</td>
</tr>
</code>```

Body:
I'm using a ngFor loop angular 7 I need to a hidden particular attribute(example userNo and UserType ) inside a ngFor loop.

emailId: "afsageg@dgvsf"
groupName: "dfsfgfdg"
mobileNo: "+91fyrtyrtyty"
userId: "ttrur"
userName: "srurttuidharan"
userNo: 2
userType: "rrhjty"
userTypeDisplay: "Operator Maker"

    {{key.key | titlecase}}
    {{key.value}}


问:
Couldn't Calculate Price and Qty on table using Php Ajax
I am creating a ecommerce site for my final year project.while I am creating a project I ran in to the problem with product shall be able add the  card but when I view the card product shown which I added into the card.my problem is if the give qty it will auto calculation  and display result on the total textbox.and final totel show display below. I attached image below what i tried so far. But couldn’t calculate the total and final total.
Display the Products

```<code><script>
getProducts();

    function getProducts() {
        $.ajax({
            type: 'GET',
            url: 'all_cart.php',
            dataType: 'JSON',
            success: function(data) {
                data.forEach(function(element) {
                    var id = element.id;
                    var product_name = element.product_name;
                    var price = element.price;
                   $('#mytable tbody').after
                   (
                        '<tr> ' +
                        '<td>' + id + '</td>' +
                        '<td>' + product_name + '</td>' +
                        '<td>' + price + '</td>' +
                        "<input type='hidden' name='price' value='" + price + "'>" +
                        '<td>' + "<input type = 'text' id='qty' name='qty'/>" + '</td>' +
                        '<td>' + "<input type = 'text' id='amount'/>" + '</td>' +
                        '</tr>');
                  });
            },
            error: function(xhr, status, error) {
                alert(xhr.responseText);
            }
        });
    }
</code>```

Auto calcaltion the price * qty

```<code>$(function() {
    $("#price, #qty").on("keydown keyup click", qty);
    function qty() {
        var sum = (
        Number($("#price").val()) * Number($("#qty").val())
        );

        $('#amount').val(sum);
        console.log(sum);
    }
});
</code>```

答:
You dont should append multiple elements with same ID in a page

Can you try

```<code>function getProducts() {
    $.ajax({
        ...
               $('#mytable tbody').after
               (
                    '<tr> ' +
                    '<td>' + id + '</td>' +
                    '<td>' + product_name + '</td>' +
                    '<td>' + price + '</td>' +
                    "<input type='hidden' name='price' class='price' value='" + price + "'>" +
                    '<td>' + "<input type = 'text' class='qty' name='qty'/>" + '</td>' +
                    '<td>' + "<input type = 'text' class='amount'/>" + '</td>' +
                    '</tr>');
              });
        },
        error: function(xhr, status, error) {
            alert(xhr.responseText);
        }
    });
}

$(function() {
  $(".price, .qty").on("keydown keyup click", function () {
    var price = $(this).parents('tr').find('.price');
    var qty= $(this).parents('tr').find('.qty');
    var sum = (
    Number($(price).val()) * Number($(qty).val())
    );
    $(this).parents('tr').find('.amount').val(sum);
        calculateAmount();
  });
  function calculateAmount() {
       var total = 0;
       $('.amount').each(function(e){
          total += Number($(this).val());
       });
       $('#total-amount').text(total);
  }
});
</code>```

This is a demo: https://codepen.io/phuongnm153/pen/bymYOQ

Body:
You dont should append multiple elements with same ID in a page

Can you try

function getProducts() {
    $.ajax({
        ...
               $('#mytable tbody').after
               (
                    '<tr> ' +
                    '<td>' + id + '</td>' +
                    '<td>' + product_name + '</td>' +
                    '<td>' + price + '</td>' +
                    "<input type='hidden' name='price' class='price' value='" + price + "'>" +
                    '<td>' + "<input type = 'text' class='qty' name='qty'/>" + '</td>' +
                    '<td>' + "<input type = 'text' class='amount'/>" + '</td>' +
                    '</tr>');
              });
        },
        error: function(xhr, status, error) {
            alert(xhr.responseText);
        }
    });
}

$(function() {
  $(".price, .qty").on("keydown keyup click", function () {
    var price = $(this).parents('tr').find('.price');
    var qty= $(this).parents('tr').find('.qty');
    var sum = (
    Number($(price).val()) * Number($(qty).val())
    );
    $(this).parents('tr').find('.amount').val(sum);
        calculateAmount();
  });
  function calculateAmount() {
       var total = 0;
       $('.amount').each(function(e){
          total += Number($(this).val());
       });
       $('#total-amount').text(total);
  }
});

This is a demo: https://codepen.io/phuongnm153/pen/bymYOQ


问:
How to fabricate ASPX POST request
I'm battling with this for days, I have an ASPX page that has a file upload control and an upload button, and no matter what I do, I can't get the page to accept the automated POST request.

The request body is as follows (all newlines CRLF), all UTF8 == ANSII (no spec chars right now)

```<code>-----------------------------8cdc74445fc88d0
Content-Disposition: form-data; name="btnUpload"

Upload
-----------------------------8cdc74445fc88d0
Content-Disposition: form-data; name="ctrFileUpload"; filename="myfile.txt"
Content-Type: text/plain

This is a test!

-----------------------------8cdc74445fc88d0--
</code>```

The form has multiple buttons, so I need to kinda fill the file upload, and press the upload button. But this doesn't seem to work.

The same page works just fine from a web browser, although, in that scenario there is a viewstate garbage as one of the parts. I tried EnableViewState="false", ValidateRequest="false", EnableSessionState="ReadOnly", but the garbage part is still there when I use the browser.

Am I missing something? Tried studying the RFC and everything, but nothing seems to work.

答:
You don't actually need the viewstate for a form to work, unless there is something in there that is needed. what you do need is to make sure the name of button that is clicked to submit the form is included in your submitted data.

The clicked control is needed so that asp.net can figure out on which control to raise the click event. the viewstate is just a list of key:value pairs for each control that are different to the default values. by comparing these values to the submitted values it can raise onchange events etc.

ContentLicense: CC BY-SA 3.0

Title: How to fabricate ASPX POST request

Body:
I'm battling with this for days, I have an ASPX page that has a file upload control and an upload button, and no matter what I do, I can't get the page to accept the automated POST request.

The request body is as follows (all newlines CRLF), all UTF8 == ANSII (no spec chars right now)

-----------------------------8cdc74445fc88d0
Content-Disposition: form-data; name="btnUpload"

Upload
-----------------------------8cdc74445fc88d0
Content-Disposition: form-data; name="ctrFileUpload"; filename="myfile.txt"
Content-Type: text/plain

This is a test!

-----------------------------8cdc74445fc88d0--

The form has multiple buttons, so I need to kinda fill the file upload, and press the upload button. But this doesn't seem to work.

The same page works just fine from a web browser, although, in that scenario there is a viewstate garbage as one of the parts. I tried EnableViewState="false", ValidateRequest="false", EnableSessionState="ReadOnly", but the garbage part is still there when I use the browser.

Am I missing something? Tried studying the RFC and everything, but nothing seems to work.


问:
Why do String behaves like an Array ? - JS
We all know Strings somewhat behaves like an Array.You can even apply some of the array methods to it and take benefits, like the below example.

```<code>[].filter.call('abcdef',function(val){
    return val<'e';
});
</code>```

Also,

```<code>var a='xyz';
</code>```

I can access first element using a[0] or I can call a.length like an Array

My question is why String behaves like an Array. and if it does, why do I get false below when I check if it is an instance of Array. Is String Array-like?

```<code>'a' instanceof Array
</code>```

答:
All that Array.prototype.filter really requires is that the variable being iterated over has a length property, and that the variable has numeric-indexed values. See (part of) the polyfill:

```<code>var len = this.length >>> 0,
    res = new Array(len), // preallocate array
    t = this, c = 0, i = -1;
if (thisArg === undefined){
  while (++i !== len){
    // checks to see if the key was set
    if (i in this){
      if (func(t[i], i, t)){
        res[c++] = t[i];
      }
    }
  }
}
</code>```

Strings fulfill this condition - strings have a length property, and numeric indicies accessed on the string resolve to individual characters.

But you can do the same thing with arbitrary objects:

const obj = {
  0: 'foo',
  1: 'bar',
  length: 2
};

const result = [].filter.call(obj, val => val.startsWith('f'));
console.log(result);```

You could say that obj is array-like as well, since it has a length property and numeric indicies. Most array methods like .filter, .reduce, etc can be .called on array-like objects, even if those objects aren't actual arrays.

(Technically, you can also call array methods on non-array-like objects too, it just won't do anything useful - no iterations may be performed)

Body:
We all know Strings somewhat behaves like an Array.You can even apply some of the array methods to it and take benefits, like the below example.

[].filter.call('abcdef',function(val){
    return val<'e';
});

Also,

var a='xyz';

I can access first element using a[0] or I can call a.length like an Array

My question is why String behaves like an Array. and if it does, why do I get false below when I check if it is an instance of Array. Is String Array-like?

'a' instanceof Array

Body:
All that Array.prototype.filter really requires is that the variable being iterated over has a length property, and that the variable has numeric-indexed values. See (part of) the polyfill:

var len = this.length >>> 0,
    res = new Array(len), // preallocate array
    t = this, c = 0, i = -1;
if (thisArg === undefined){
  while (++i !== len){
    // checks to see if the key was set
    if (i in this){
      if (func(t[i], i, t)){
        res[c++] = t[i];
      }
    }
  }
}

Strings fulfill this condition - strings have a length property, and numeric indicies accessed on the string resolve to individual characters.

But you can do the same thing with arbitrary objects:

const obj = {
  0: 'foo',
  1: 'bar',
  length: 2
};

const result = [].filter.call(obj, val => val.startsWith('f'));
console.log(result);

You could say that obj is array-like as well, since it has a length property and numeric indicies. Most array methods like .filter, .reduce, etc can be .called on array-like objects, even if those objects aren't actual arrays.

(Technically, you can also call array methods on non-array-like objects too, it just won't do anything useful - no iterations may be performed)


问:
How to find data length and index length of particular tables in a postgresql schema?
I am migrating my application from MySQL to PostgreSQL. In MySQL, I have used a query to calculate memory size of particular tables as per my requirement using the below Query,

```<code>SELECT SUM(ROUND(((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024),2)) 'Size in MB' FROM  INFORMATION_SCHEMA.TABLES where TABLE_NAME like 'table_name';
</code>```

But I can't do the same in PostgreSQL. If I run the same query it is displaying as,

```<code>ERROR:  type "sum" does not exist
</code>```

And I have tried the solutions in various sites but I can't find the exact solution for my requirement. Please suggest me a solution. Thanks in advance.

答:
PostgreSQL does not have this information in INFORMATION_SCHEMA.TABLES but you can try using the table SVV_TABLE_INFO to get the table size instead.

Hope it helps!

Body:
I am migrating my application from MySQL to PostgreSQL. In MySQL, I have used a query to calculate memory size of particular tables as per my requirement using the below Query,

SELECT SUM(ROUND(((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024),2)) 'Size in MB' FROM  INFORMATION_SCHEMA.TABLES where TABLE_NAME like 'table_name';

But I can't do the same in PostgreSQL. If I run the same query it is displaying as,

ERROR:  type "sum" does not exist

And I have tried the solutions in various sites but I can't find the exact solution for my requirement. Please suggest me a solution. Thanks in advance.


问:
Only when all statuses the same than return result
I am selecting Q_GRADEBOOK_ID if all the status against Q_GRADEBOOK_ID is 488 than return Q_GRADEBOOK_ID otherwise return empty

```<code>TABLE Q_GB_CAT_SCORE
---------------------------------------------------------
 Q_GRADEBOOK_ID | PERSON_ID | STATUS | Q_GRADEBOOK_CAT_ID
      1         |     1     |  488   |       1
      1         |     1     |  488   |       2
      1         |     2     |  488   |       1
      2         |     2     |  486   |       1
      2         |     2     |  488   |       2
</code>```

My Query

```<code> SELECT
 DISTINCT
 Q_GRADEBOOK_ID
 FROM
 Q_GB_CAT_SCORE WHERE
 STATUS IN ('488')
</code>```

This query return this result

```<code>Q_GRADEBOOK_ID
      1
      2
</code>```

Expected Result

```<code>Q_GRADEBOOK_ID
      1
</code>```

I expect it because Q_GRADEBOOK_ID 1 return because against Q_GRADEBOOK_ID 1 all the status is 488.

答:
You can GROUP BY Q_GRADEBOOK_ID and put the condition in the HAVING clause:

```<code>SELECT Q_GRADEBOOK_ID
FROM Q_GB_CAT_SCORE
GROUP BY Q_GRADEBOOK_ID
HAVING COUNT(*) = SUM(CASE WHEN STATUS = '488' THEN 1 ELSE 0 END)
</code>```

or

```<code>SELECT Q_GRADEBOOK_ID
FROM Q_GB_CAT_SCORE
GROUP BY Q_GRADEBOOK_ID
HAVING SUM(CASE WHEN STATUS <> '488' THEN 1 ELSE 0 END) = 0
</code>```

Body:
I am selecting Q_GRADEBOOK_ID if all the status against Q_GRADEBOOK_ID is 488 than return Q_GRADEBOOK_ID otherwise return empty

TABLE Q_GB_CAT_SCORE
---------------------------------------------------------
 Q_GRADEBOOK_ID | PERSON_ID | STATUS | Q_GRADEBOOK_CAT_ID
      1         |     1     |  488   |       1
      1         |     1     |  488   |       2
      1         |     2     |  488   |       1
      2         |     2     |  486   |       1
      2         |     2     |  488   |       2

My Query

 SELECT
 DISTINCT
 Q_GRADEBOOK_ID
 FROM
 Q_GB_CAT_SCORE WHERE
 STATUS IN ('488')

This query return this result

Q_GRADEBOOK_ID
      1
      2

Expected Result

Q_GRADEBOOK_ID
      1

I expect it because Q_GRADEBOOK_ID 1 return because against Q_GRADEBOOK_ID 1 all the status is 488.

Body:
You can GROUP BY Q_GRADEBOOK_ID and put the condition in the HAVING clause:

SELECT Q_GRADEBOOK_ID
FROM Q_GB_CAT_SCORE
GROUP BY Q_GRADEBOOK_ID
HAVING COUNT(*) = SUM(CASE WHEN STATUS = '488' THEN 1 ELSE 0 END)

or

SELECT Q_GRADEBOOK_ID
FROM Q_GB_CAT_SCORE
GROUP BY Q_GRADEBOOK_ID
HAVING SUM(CASE WHEN STATUS <> '488' THEN 1 ELSE 0 END) = 0


问:
Extract specific values from a file using shell script
How can I extract values from a file using shell-script (grep, awk or sed for example). I have the following structure (described below) and I want to get an output file with only the second column of the file.
I tried using grep:
grep -oP '\s*U238\s*\*\s+[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?' file >U238_out to extract all U238 values from the entire file and store it in an output file (U238_out).With this I get the following output:

```<code> U238     *  1.779265E+03
 U238     *  5.418484E-03
 U238     *  1.777156E+03
         ...
</code>```

but I want to obtain this structure:

```<code>1.779265E+03
5.418484E-03
1.777156E+03
</code>```

File Structure:

```<code>  PERIODICITY : 0
  SYMMETRY    : 0

  MATERIAL MFUEL
  MEDIUM   MFUEL    VOLUME  8.308106E+05

  *******************************************************
  * ISOTOPE  *   MASS (KG)   *   CIP    *    EQFMASS    *
  *******************************************************
  * U238     *  1.779265E+03 *   28.125 *  0.000000E+00 *
</code>```

Thanks in advance.

答:
You can use:

```<code>awk '$2=="U238" {print $4}' file > U238_out
</code>```

or

```<code>awk '$2~/^U238$/ {print $4} file > U238_out
</code>```

If U238 in 2nd field, print 4th field:

```<code>1.779265E+03
</code>```

Body:
How can I extract values from a file using shell-script (grep, awk or sed for example). I have the following structure (described below) and I want to get an output file with only the second column of the file.
I tried using grep:
grep -oP '\s*U238\s*\*\s+[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?' file >U238_out to extract all U238 values from the entire file and store it in an output file (U238_out).With this I get the following output:

 U238     *  1.779265E+03
 U238     *  5.418484E-03
 U238     *  1.777156E+03
         ...

but I want to obtain this structure:

1.779265E+03
5.418484E-03
1.777156E+03

File Structure:

  PERIODICITY : 0
  SYMMETRY    : 0

  MATERIAL MFUEL
  MEDIUM   MFUEL    VOLUME  8.308106E+05

  *******************************************************
  * ISOTOPE  *   MASS (KG)   *   CIP    *    EQFMASS    *
  *******************************************************
  * U238     *  1.779265E+03 *   28.125 *  0.000000E+00 *

Thanks in advance.

Body:
You can use:

awk '$2=="U238" {print $4}' file > U238_out

or

awk '$2~/^U238$/ {print $4} file > U238_out

If U238 in 2nd field, print 4th field:

1.779265E+03


问:
oracle diff: how to compare two tables?
Suppose I have two tables, t1 and t2 which are identical in layout but which may contain different data.

What's the best way to diff these two tables?

答:
Try This,

alter session set "_convert_set_to_join"= true;

The other alternative is to rewrite the SQL query manually [replacing the minus operator with a NOT IN subquery] evidences about 30% improvement in execution time .

```<code> select *
   from A
    where (col1,col2,?) not in
   (select col1,col2,? from B)
   union all
   select * from B
  where (col1,col2,?) not in
  (select col1,col2,? from A);
</code>```

I have referred from this post click here

OwnerDisplayName: Mark Harrison

ContentLicense: CC BY-SA 2.5

Title: oracle diff: how to compare two tables?

Body:
Try This,

alter session set "_convert_set_to_join"= true;

The other alternative is to rewrite the SQL query manually [replacing the minus operator with a NOT IN subquery] evidences about 30% improvement in execution time .

 select *
   from A
    where (col1,col2,?) not in
   (select col1,col2,? from B)
   union all
   select * from B
  where (col1,col2,?) not in
  (select col1,col2,? from A);

I have referred from this post click here


问:
Compiling only selected files in Maven
I want to compile only selected files or directories (including subdirectories) within source directory. I was pretty sure I can do this using <includes> of maven-compiler-plugin's configuration, but it seems to not work as I expect since it still compiles all classes into target/classes. What is really strange, Maven output suggest that the setting actually does its work, because with:

  <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.5.1</version>
    <configuration>
      <includes>
        <include>com/example/dao/bean/*.java</include>
      </includes>
    </configuration>
  </plugin>
```

<p>I have:</p>

```[INFO] Compiling 1 source file to c:\Projects\test\target\classes
```

<p>but with no compiler's configuration I have:</p>

```[INFO] Compiling 14 source file to c:\Projects\test\target\classes
```

In both cases however, all 14 classes are compiled into target/classes as I mentioned. Can you explain that or suggest another solution to compile only selected files?

答:
I have faced a similar situation. We needed to hot swap only modified files to our remote docker container in order to improve changes-deploy time. This is how we solved it.

Add includes option in build plugin with command line argument.
Note since we wanted to add multiple files, so we have used includes and not include

```<code>         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.7.0</version>
            <configuration>
                <compilerVersion>1.8</compilerVersion>
                <source>1.8</source>
                <target>1.8</target>
                <includes>${changed.classes}</includes>
            </configuration>
        </plugin>
</code>```

Now run compile phase with argument, example:

```<code>mvn compile -Dchanged.classes=com/demo/ClassA.java,com/demo/ClassB.java,com/demo2/*
</code>```

Title: Compiling only selected files in Maven

Body:
I want to compile only selected files or directories (including subdirectories) within source directory. I was pretty sure I can do this using <includes> of maven-compiler-plugin's configuration, but it seems to not work as I expect since it still compiles all classes into target/classes. What is really strange, Maven output suggest that the setting actually does its work, because with:

  <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.5.1</version>
    <configuration>
      <includes>
        <include>com/example/dao/bean/*.java</include>
      </includes>
    </configuration>
  </plugin>

I have:

[INFO] Compiling 1 source file to c:\Projects\test\target\classes

but with no compiler's configuration I have:

[INFO] Compiling 14 source file to c:\Projects\test\target\classes

In both cases however, all 14 classes are compiled into target/classes as I mentioned. Can you explain that or suggest another solution to compile only selected files?

Body:
I have faced a similar situation. We needed to hot swap only modified files to our remote docker container in order to improve changes-deploy time. This is how we solved it.

Add includes option in build plugin with command line argument.
Note since we wanted to add multiple files, so we have used includes and not include

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.7.0</version>
            <configuration>
                <compilerVersion>1.8</compilerVersion>
                <source>1.8</source>
                <target>1.8</target>
                <includes>${changed.classes}</includes>
            </configuration>
        </plugin>

Now run compile phase with argument, example:

mvn compile -Dchanged.classes=com/demo/ClassA.java,com/demo/ClassB.java,com/demo2/*


问:
Cast with GetType()
Is it possible to cast an object to the type returned from GetType()? I'd like a generic method that can accept an object (for anonymous types) but then return an object cast as the anonymous type. I've been thinking of using the LCG DynamicMethod to build a method on a container class, but I can't exactly figure out what that would look like. The idea to cast with the GetType() method was to be able to get the anonymous type and cast an object to its actual type without actually knowing the type.

The overarching goal is to stick anonymous-typed objects into a container, that I could then share and pass between methods.

答:
You can use the Activator.CreateInstance method to create an instance from a type.

FYI reflection is SLOOWWWW, so if you need to do this cast many times in a row, it may be better to define your types in an enum or something like this then create instances without using reflection.

LastEditorDisplayName: panesofglass

Title: Cast with GetType()

OwnerDisplayName: Spence


问:
Managing an objects Constructors across multiple software versions
I'm designing a library where I am debating if I should use a constructor to initialize objects in the api's model.  My considerations are:

By using a constructor I can enforce what data is required to have a valid object according to the model.

However, by using a constructor I am curious as to how to maintain the code as it is modified in order to maintain this requirement without breaking existing code across the code base.

I could avoid using constructors in the object design, but I need the library to communicate to the developer using it which fields are required in order for the object to satisfy its model.

How can I create an object model that expresses the requirement of particular properties being initialized as well as provide scalability as it relates to code maintenance?

```<code>dim objV1 as new ObjectOfSomeType(Param1, Param2, Param3)
</code>```

VS

```<code>dim objV1 as new ObjectOfSomeType()

objV1.Property1 = Param1
objV1.Property2 = Param2
objV1.Property3 = Param3
</code>```

答:
As you sum up, constructors are the simplest means to ensure that only valid objects are instantiated.

However, by using a constructor I am curious as to how to maintain the code as it is modified in order to maintain this requirement without breaking existing code across the code base.

I am not quite sure what you are referring to: the risk that later you may realize that you need additional (or less) parameter(s) for creating a valid objects? IMHO that should be mitigated by careful design, prototyping and testing prior to publishing your library. Public APIs are very hard to change. In case of a widely used one, even broken and obsolete features need to be supported indefinitely (witness Object.clone() in Java). Whatever you (or clients) do to construct an object, if a required parameter turns out to be missing, it is an error. IMO it is better to detect such cases compile time than runtime, and constructors provide the simplest and easiest way to achieve this.

Other options you may want to consider:

using a Factory Method (you still need to have all required parameters inside the creation method, but you might be able to use some defaults for missing parameters, thus avoid breaking client code),

using a Builder (similar to the above, but it gives you much greater flexibility in setting construction parameters or providing defaults).

Body:
I'm designing a library where I am debating if I should use a constructor to initialize objects in the api's model.  My considerations are:

By using a constructor I can enforce what data is required to have a valid object according to the model.

However, by using a constructor I am curious as to how to maintain the code as it is modified in order to maintain this requirement without breaking existing code across the code base.

I could avoid using constructors in the object design, but I need the library to communicate to the developer using it which fields are required in order for the object to satisfy its model.

How can I create an object model that expresses the requirement of particular properties being initialized as well as provide scalability as it relates to code maintenance?

dim objV1 as new ObjectOfSomeType(Param1, Param2, Param3)

VS

dim objV1 as new ObjectOfSomeType()

objV1.Property1 = Param1
objV1.Property2 = Param2
objV1.Property3 = Param3


答:
If you want hide an attribute you can do some like

```<code><td [attrib]="key.userNo?'value':null">
</code>```

If you want not show a text, you can do

```<code><td>{{key.userNo?'':key.key | titlecase}}</td>
</code>```

Others is use style.display

```<code><td [style.display]="key.userNo?'none':null">
</code>```

of *ngIf

```<code><td *ngIf="!key.userNo">
</code>```

Title: Angular 7 hide particular attribute inside ngFor loop

Body:
If you want hide an attribute you can do some like

<td [attrib]="key.userNo?'value':null">

If you want not show a text, you can do

<td>{{key.userNo?'':key.key | titlecase}}</td>

Others is use style.display

<td [style.display]="key.userNo?'none':null">

of *ngIf

<td *ngIf="!key.userNo">


问:
Fast vectorized merge of list of data.frames by row
Most of the questions about merging data.frame in lists on SO don't quite relate to what I'm trying to get across here, but feel free to prove me wrong.

I have a list of data.frames. I would like to "rbind" rows into another data.frame by row. In essence, all first rows form one data.frame, second rows second data.frame and so on.
Result would be a list of the same length as the number of rows in my original data.frame(s). So far, the data.frames are identical in dimensions.

Here's some data to play around with.

```<code>sample.list <- list(data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)))
</code>```

Here's what I've come up with with the good ol' for loop.

```<code>#solution 1
my.list <- vector("list", nrow(sample.list[[1]]))
for (i in 1:nrow(sample.list[[1]])) {
    for (j in 1:length(sample.list)) {
        my.list[[i]] <- rbind(my.list[[i]], sample.list[[j]][i, ])
    }
}

#solution 2 (so far my favorite)
sample.list2 <- do.call("rbind", sample.list)
my.list2 <- vector("list", nrow(sample.list[[1]]))

for (i in 1:nrow(sample.list[[1]])) {
    my.list2[[i]] <- sample.list2[seq(from = i, to = nrow(sample.list2), by = nrow(sample.list[[1]])), ]
}
</code>```

Can this be improved using vectorization without much brainhurt? Correct answer will contain a snippet of code, of course. "Yes" as an answer doesn't count.

EDIT

```<code>#solution 3 (a variant of solution 2 above)
ind <- rep(1:nrow(sample.list[[1]]), times = length(sample.list))
my.list3 <- split(x = sample.list2, f = ind)
</code>```

BENCHMARKING

I've made my list larger with more rows per data.frame. I've benchmarked the results which are as follows:

```<code>#solution 1
system.time(for (i in 1:nrow(sample.list[[1]])) {
    for (j in 1:length(sample.list)) {
        my.list[[i]] <- rbind(my.list[[i]], sample.list[[j]][i, ])
    }
})
   user  system elapsed
 80.989   0.004  81.210

# solution 2
system.time(for (i in 1:nrow(sample.list[[1]])) {
    my.list2[[i]] <- sample.list2[seq(from = i, to = nrow(sample.list2), by = nrow(sample.list[[1]])), ]
})
   user  system elapsed
  0.957   0.160   1.126

# solution 3
system.time(split(x = sample.list2, f = ind))
   user  system elapsed
  1.104   0.204   1.332

# solution Gabor
system.time(lapply(1:nr, bind.ith.rows))
   user  system elapsed
  0.484   0.000   0.485

# solution ncray
system.time(alply(do.call("cbind",sample.list), 1,
                .fun=matrix, ncol=ncol(sample.list[[1]]), byrow=TRUE,
                dimnames=list(1:length(sample.list),names(sample.list[[1]]))))
   user  system elapsed
 11.296   0.016  11.365
</code>```

答:
addind tidyverse solution:

```<code>library(tidyverse)
bind_rows(sample.list)
</code>```

Body:
Most of the questions about merging data.frame in lists on SO don't quite relate to what I'm trying to get across here, but feel free to prove me wrong.

I have a list of data.frames. I would like to "rbind" rows into another data.frame by row. In essence, all first rows form one data.frame, second rows second data.frame and so on.
Result would be a list of the same length as the number of rows in my original data.frame(s). So far, the data.frames are identical in dimensions.

Here's some data to play around with.

sample.list <- list(data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)),
        data.frame(x = sample(1:100, 10), y = sample(1:100, 10), capt = sample(0:1, 10, replace = TRUE)))

Here's what I've come up with with the good ol' for loop.

#solution 1
my.list <- vector("list", nrow(sample.list[[1]]))
for (i in 1:nrow(sample.list[[1]])) {
    for (j in 1:length(sample.list)) {
        my.list[[i]] <- rbind(my.list[[i]], sample.list[[j]][i, ])
    }
}

#solution 2 (so far my favorite)
sample.list2 <- do.call("rbind", sample.list)
my.list2 <- vector("list", nrow(sample.list[[1]]))

for (i in 1:nrow(sample.list[[1]])) {
    my.list2[[i]] <- sample.list2[seq(from = i, to = nrow(sample.list2), by = nrow(sample.list[[1]])), ]
}

Can this be improved using vectorization without much brainhurt? Correct answer will contain a snippet of code, of course. "Yes" as an answer doesn't count.

EDIT

#solution 3 (a variant of solution 2 above)
ind <- rep(1:nrow(sample.list[[1]]), times = length(sample.list))
my.list3 <- split(x = sample.list2, f = ind)

BENCHMARKING

I've made my list larger with more rows per data.frame. I've benchmarked the results which are as follows:

#solution 1
system.time(for (i in 1:nrow(sample.list[[1]])) {
    for (j in 1:length(sample.list)) {
        my.list[[i]] <- rbind(my.list[[i]], sample.list[[j]][i, ])
    }
})
   user  system elapsed
 80.989   0.004  81.210

# solution 2
system.time(for (i in 1:nrow(sample.list[[1]])) {
    my.list2[[i]] <- sample.list2[seq(from = i, to = nrow(sample.list2), by = nrow(sample.list[[1]])), ]
})
   user  system elapsed
  0.957   0.160   1.126

# solution 3
system.time(split(x = sample.list2, f = ind))
   user  system elapsed
  1.104   0.204   1.332

# solution Gabor
system.time(lapply(1:nr, bind.ith.rows))
   user  system elapsed
  0.484   0.000   0.485

# solution ncray
system.time(alply(do.call("cbind",sample.list), 1,
                .fun=matrix, ncol=ncol(sample.list[[1]]), byrow=TRUE,
                dimnames=list(1:length(sample.list),names(sample.list[[1]]))))
   user  system elapsed
 11.296   0.016  11.365

Body:
addind tidyverse solution:

library(tidyverse)
bind_rows(sample.list)