diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 065997d555..e7d33da724 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,11 +4,9 @@
-
-
+
-
-
+
@@ -43,7 +41,7 @@
-
+
@@ -56,12 +54,13 @@
+
-
+
@@ -75,17 +74,30 @@
-
-
+
+
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -136,16 +148,18 @@
-
+
+
+
+
-
@@ -165,6 +179,10 @@
+
+
+
+
1632420206392
@@ -243,7 +261,14 @@
1633461594898
-
+
+ 1633632799545
+
+
+
+ 1633632799545
+
+
@@ -271,6 +296,18 @@
-
+
+
+
+
+
+
+
+ jar://C:/Program Files/RedHat/java-11-openjdk-11.0.11-1/lib/src.zip!/java.base/java/lang/Integer.java
+ 1056
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/ossez/codebank/algorithm/Main.java b/src/main/java/com/ossez/codebank/algorithm/Main.java
index eb5e8b5d20..33a19698c6 100644
--- a/src/main/java/com/ossez/codebank/algorithm/Main.java
+++ b/src/main/java/com/ossez/codebank/algorithm/Main.java
@@ -10,82 +10,88 @@ import org.apache.commons.cli.Options;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+/**
+ * Main Test Class
+ *
+ * @author YuCheng Hu
+ */
public class Main {
- private static final Logger logger = LoggerFactory.getLogger(Main.class);
+ private static final Logger logger = LoggerFactory.getLogger(Main.class);
- private static Options options = new Options();
- private static Properties properties = new Properties();
+ private static Options options = new Options();
+ private static Properties properties = new Properties();
- private static CommandLine cl = null;
+ private static CommandLine cl = null;
- private static boolean dryRun = false;
- private static int limit = 0;
- private static boolean force = false;
+ private static boolean dryRun = false;
+ private static int limit = 0;
+ private static boolean force = false;
- public static void main(String[] args) {
- // get the idx feed properties file
- Main.parseProperties();
+ public static void main(String[] args) {
- // load console options
- Main.parseCommandLine(args);
+ // get the idx feed properties file
+ Main.parseProperties();
- logger.debug("Starting feeds...");
- System.out.println("starting feeds...");
+ // load console options
+ Main.parseCommandLine(args);
- // execute the feeds
- Main.executeFeeds();
+ logger.debug("Starting feeds...");
+ System.out.println("starting feeds...");
- }
+ // execute the feeds
+ Main.executeFeeds();
- /**
- * Executes the feeds specified in the feeds.properties file.
- */
- private static void executeFeeds() {
+ }
- }
+ /**
+ * Executes the feeds specified in the feeds.properties file.
+ */
+ private static void executeFeeds() {
- /**
- * Parses the properties file to get a list of all feeds.
- */
- private static void parseProperties() {
- try {
- // load the properties file
- logger.debug("Parsing properties");
- Main.properties.load(Main.class.getClassLoader().getResourceAsStream("rets.properties"));
+ }
- // load the feeds
+ /**
+ * Parses the properties file to get a list of all feeds.
+ */
+ private static void parseProperties() {
+ try {
+ // load the properties file
+ logger.debug("Parsing properties");
+ Main.properties.load(Main.class.getClassLoader().getResourceAsStream("rets.properties"));
- } catch (Exception ex) {
- ex.printStackTrace();
- logger.error("Could not parse feed properties", ex);
- }
- }
+ // load the feeds
- /**
- * Handles creation of console options.
- */
- private static void parseCommandLine(String[] args) {
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ logger.error("Could not parse feed properties", ex);
+ }
+ }
- // parse command line options
- CommandLineParser parser = new GnuParser();
+ /**
+ * Handles creation of console options.
+ */
+ private static void parseCommandLine(String[] args) {
- try {
- Main.cl = parser.parse(Main.options, args);
+ // parse command line options
+ CommandLineParser parser = new GnuParser();
- // get the dry run option
- Main.dryRun = Main.cl.hasOption("d");
- logger.trace("Value of dryRun: " + dryRun);
+ try {
+ Main.cl = parser.parse(Main.options, args);
- // get the limit option
- // Main.limit = Utility.parseInt(Main.cl.getOptionValue("l", "0"));
- logger.trace("Value of limit: " + Main.limit);
+ // get the dry run option
+ Main.dryRun = Main.cl.hasOption("d");
+ logger.trace("Value of dryRun: " + dryRun);
- // get the force option
- Main.force = Main.cl.hasOption("u");
- logger.trace("Value of force: " + Main.force);
- } catch (Exception ex) {
- logger.error("An error ocurred parsing command line arguments", ex);
- }
- }
+ // get the limit option
+ // Main.limit = Utility.parseInt(Main.cl.getOptionValue("l", "0"));
+ logger.trace("Value of limit: " + Main.limit);
+
+ // get the force option
+ Main.force = Main.cl.hasOption("u");
+ logger.trace("Value of force: " + Main.force);
+ } catch (Exception ex) {
+ logger.error("An error ocurred parsing command line arguments", ex);
+ }
+ }
}
diff --git a/src/test/java/com/ossez/codebank/algorithm/tests/BlankTemplateTest.java b/src/test/java/com/ossez/codebank/algorithm/tests/BlankTemplateTest.java
new file mode 100644
index 0000000000..9b487b5905
--- /dev/null
+++ b/src/test/java/com/ossez/codebank/algorithm/tests/BlankTemplateTest.java
@@ -0,0 +1,45 @@
+package com.ossez.codebank.algorithm.tests;
+
+import junit.framework.TestCase;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.lang.reflect.Array;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author YuCheng
+ */
+public class BlankTemplateTest extends TestCase {
+
+ private final static Logger logger = LoggerFactory.getLogger(BlankTemplateTest.class);
+
+ /**
+ * Blank Template Test
+ */
+ @Test
+ public void testBlank() {
+
+ Integer[] inputArrayB = {3, 7, 1, 2, 8, 4, 5};
+ List inListA = Arrays.asList(inputArrayB);
+
+ int[] inputArrayA = {3, 7, 1, 2, 8, 4, 5};
+ List inList = Arrays.stream(inputArrayA).sorted().boxed().collect(Collectors.toList());
+
+
+ for (int i = 0; i < 8; i++) {
+ if (!inListA.contains(i)) {
+ System.out.println(i);
+ }
+
+ }
+
+
+ System.out.println((int)'E');
+ System.out.println((byte)0xFF);
+
+ }
+
+}