For moved code, we commit

This commit is contained in:
YuCheng Hu 2023-09-03 10:32:14 -04:00 committed by honeymoose
parent c9f430ae03
commit fc3beeee15
3 changed files with 89 additions and 0 deletions

16
.idea/checkstyle-idea.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckStyle-IDEA" serialisationVersion="2">
<checkstyleVersion>10.12.2</checkstyleVersion>
<scanScope>JavaOnly</scanScope>
<copyLibs>true</copyLibs>
<option name="thirdPartyClasspath" />
<option name="activeLocationIds" />
<option name="locations">
<list>
<ConfigurationLocation id="bundled-sun-checks" type="BUNDLED" scope="All" description="Sun Checks">(bundled)</ConfigurationLocation>
<ConfigurationLocation id="bundled-google-checks" type="BUNDLED" scope="All" description="Google Checks">(bundled)</ConfigurationLocation>
</list>
</option>
</component>
</project>

View File

@ -0,0 +1,28 @@
package com.baeldung.imageprocessing.opencv;
import org.opencv.core.Core;
/**
* Print OpenCV Version Number
*/
public class OpencvVersion {
static {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}
public static void main(String[] args) {
if ((1 == args.length) && (0 == args[0].compareTo("--build"))) {
System.out.println(Core.getBuildInformation());
} else if ((1 == args.length) && (0 == args[0].compareTo("--help"))) {
System.out.println("\t--build\n\t\tprint complete build info");
System.out.println("\t--help\n\t\tprint this help");
} else {
System.out.println("Welcome to OpenCV " + Core.VERSION);
}
}
}

View File

@ -0,0 +1,45 @@
package com.ossez.toolkits.codebank.tests.lintcode;
import com.ossez.toolkits.codebank.tests.EmptyQuickTest;
import org.apache.commons.math3.util.FastMath;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* <p>
* 35
* <ul>
* <li>@see
* <a href= "https://www.lintcode.com/problem/reverse-linked-list/description">https://www.lintcode.com/problem/reverse-linked-list/description</a>
* <li>@see<a href= "https://www.lintcode.com/problem/reverse-linked-list/description">https://www.lintcode.com/problem/reverse-linked-list/description</a>
* </ul>
* </p>
*
* @author YuCheng
*/
public class LintCode0035BitOperationTest {
private final static Logger logger = LoggerFactory.getLogger(EmptyQuickTest.class);
/**
* 35
*/
@Test
public void testInt2Bit() {
logger.debug("BEGIN");
System.out.println(Integer.toBinaryString(5));
System.out.println(Integer.toBinaryString(2));
System.out.println(Integer.toBinaryString(2 << 2));
System.out.println(Integer.parseInt(Integer.toBinaryString(2 << 2), 2));
System.out.println(5 / 3);
System.out.println(5 % 3);
FastMath.pow(2, 3);
}
}