TreeMap in Java

Introduction The TreeMap in Java is used to implement Map interface and NavigableMap along with the AbstractMap Class. The map is sorted according to the natural ordering of its keys, or by a Comparator provided at map creation time, depending on which constructor is used. This proves to be an efficient way of sorting and …

Permission to one repository denied to another(unwanted) git account

My personal solution to solve this problem is: 1. Check the credentials ssh -T git@github.com The name printed out should be your wanted user name. If not, go step 2. 2. Connect ssh. cd ~/.ssh 3. Connect to wanted ssh ssh-add ~/.ssh/id_rsa_account1 4. Check the connected ssh list ssh-add -l If there shows your wanted …

How to import JavaXT in maven project

Maven Coordinates JavaXT releases are available via Maven using this site. All other Maven repositories, including Maven Central, are out of sync with this site. To add this maven repository to your project, simply update your project pom.xml file. Example: <repositories> <repository> <id>javaxt.com</id> <url>http://www.javaxt.com/maven</url> </repository> </repositories> Next, you will need to add one of the …

How to use two ssh keys to access two different GitHub account.

I tried to use two ssh keys for my two GitHub accounts, one for my personal account, one for my school account. However, I screwed the ssh credential for GitHub verification. When I tried to use my personal account to push my code, I got permission denied A-account@git.com to B-account. I took some time searching …

How to install tensorflow on Mac and use it in Pycharm

How to install TensorFlow on Mac Chck if you have intalled pip pip3 install tensorflow using pip3 pip3 install tensorflow check tensorflow version pip3 show tensorflow How to set TensorFlow in Pycharm Click file -> New Project Setting -> Preference Choose Python interpreter Click the plus sign on the left bottom Search for tensorflow and …

Generics in Java

Generics mean parameterized types. The idea is to allow type (Integer, String, … etc, and user-defined types) to be a parameter to methods, classes, and interfaces. Using Generics, it is possible to create classes that work with different data types. For example: // A Simple Java program to show working of user defined // Generic …