当我运行XAMPP控制面板v3.2.1时,我收到此错误:
07:37:24 [Apache] Problem detected!
07:37:24 [Apache] Port 443 in use by ""C:\Program Files (x86)\VMware\VMware Workstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml"" with PID 2148!
07:37:24 [Apache] Apache WILL NOT start without the configured ports free!
07:37:24 [Apache] You need to uninstall/disable/reconfigure the blocking application
07:37:24 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
Run Code Online (Sandbox Code Playgroud)
我自己无法修复它.很快就会得到帮助将会感激不尽.
我想生成一个密钥对,并以编程方式将其插入Java KeyStore。我可以使用命令行来完成我想要的事情,但是如何使用Java代码来做到这一点呢?
这是命令行:
keytool -genkeypair \
-dname "cn=Unknown" \
-alias main \
-keyalg RSA \
-keysize 4096 \
-keypass 654321 \
-keystore C:\\Users\\Felipe\\ks \
-storepass 123456 \
-validity 365
Run Code Online (Sandbox Code Playgroud)
这是我到目前为止拥有的Java代码:
public static void main(String[] args) {
try (
FileOutputStream fos = new FileOutputStream("C:\\Users\\Felipe\\ks");
) {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(4096, SecureRandom.getInstance("SHA1PRNG"));
KeyPair keyPair = keyPairGenerator.generateKeyPair();
Certificate[] chain = {};
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(null, null);
keyStore.setKeyEntry("main", keyPair.getPrivate(), "654321".toCharArray(), chain); // Error: Private key must be accompanied by certificate chain
keyStore.store(fos, …Run Code Online (Sandbox Code Playgroud) 我试图在不知道对象value的key情况下找到一个对象,包括嵌套对象,因此该函数将获取一个键和一个对象并返回值或未定义。这是我的功能:
/* Iterate over object and include sub objects */
function iterate (obj, key) {
for (var property in obj) {
if (obj.hasOwnProperty(property)) {
//in case it is an object
if (typeof obj[property] == "object") {
if (obj.hasOwnProperty(key)) {
return obj[key]; //return the value
}
}
else {
iterate(obj[property]);
}
}
}
return undefined;
}
Run Code Online (Sandbox Code Playgroud)
我return在一个循环内调用,所以它会更有效率(希望如此......)。
1.有没有人准备好这个功能?这个不行。
2.有人知道要改变什么才能使它工作吗?
任何帮助,包括angular.js功能都会很棒。
谢谢。