Tag Archives: Tool software

VMware this host does not support 64 bit solutions

environment

VMware version: 14.1.3
operating system: win10 x64

terms of settlement

Enter the BIOS to confirm the Intel (R) virtualization technology status. Please set the disabled status to enabled. Remove the Hyper-V status from the control panel (i.e. cancel the check of Hyper-V). If the above steps are all done or not, run the CMD program, execute Bcdedit/set hypervisorlaunchtype off, and restart the computer. (that’s my problem) in addition, you can use the following tools to check whether the computer hardware supports virtualization:
to check whether the computer hardware supports virtualization https://www.grc.com/securable.htm
After startup, it is shown in the following figure:

Push failed Unable to access ‘https://github.com/‘: Failed to connect to github.com port 443: Timed

Remote push error to GitHub warehouse:

Push failed Unable to access ‘ https://github.com/ ‘: Failed to connect to github.com port 443: Timed out

terms of settlement:

Find the GitHub login Certificate in the certificate manager of the control panel and modify the account password.

You can also open it quickly through the CMD window, enter: rundll32.exe keymgr.dll ,KRShowKeyMgr

Introducing pair in Java

describes Pair

in Java
In this article, we discussed a very useful programming concept called Pair. Pairing provides a convenient way to handle simple key-value associations, especially useful when we want to return two values from a method.

is available in the core Java library using the implementation of Pair. In addition, some third-party libraries, such as Apache Commons and Vavr, have exposed this functionality in their respective apis.

core Java pairing implementation

Pair class
In the javafx.util package, the class constructor takes two arguments, the key and the corresponding value:

Pair class

    Pair<Integer, String> pair = new Pair<>(1, "One");
    Integer key = pair.getKey();
    String value = pair.getValue();

The

example describes a simple Integer to String mapping using the Pair class. In the example, the getKey method returns the key object, and the getValue method returns the corresponding value object.

AbstractMap. SimpleEntry and AbstractMap. SimpleImmutableEntry

SimpleEntry is defined in the abstract class AbstractMap and is constructed in a similar way to Pair:

    AbstractMap.SimpleEntry<Integer, String> entry 
      = new AbstractMap.SimpleEntry<>(1, "one");
    Integer key = entry.getKey();
    String value = entry.getValue();

has keys and values that can be obtained using standard getter and setter methods.

The AbstractMap class also contains a nested class that represents an immutable pairing: the SimpleImmutableEntry class.

    AbstractMap.SimpleImmutableEntry<Integer, String> entry
      = new AbstractMap.SimpleImmutableEntry<>(1, "one");

applications with variable pairing, in addition to the configuration value cannot be modified, try to modify will throw an UnsupportedOperationException anomalies.

Apache Commons

the Apache Commons library, org.apache.com mons. Lang3. The tuple package provides Pair abstract class, cannot be instantiated directly.
has two subclasses, which represent mutable and immutable pairs: ImmutablePair and MutablePair. Both implement access to key/value and setter and getter methods:

    ImmutablePair<Integer, String> pair = new ImmutablePair<>(2, "Two");
    Integer key = pair.getKey();
    String value = pair.getValue();

try in ImmutablePair setValue method, will throw an UnsupportedOperationException anomalies. But execution on variable pairings is perfectly normal:

    Pair<Integer, String> pair = new MutablePair<>(3, "Three");
    pair.setValue("New Three");

Vavr library
The immutable Tuple2 class in the

Vavr library provides pairing:

    Tuple2<Integer, String> pair = new Tuple2<>(4, "Four");
    Integer key = pair._1();
    String value = pair._2();

in this implementation, an object cannot be modified after it has been created, so the update method returns a new instance after the change:

    tuplePair = pair.update2("New Four");

summary

this article discusses the Java pairing concept and shows examples of its different implementations, core Java and third-party provided implementations.