This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void actionPerformed(ActionEvent arg0 @Override | |
public void actionPerformed(ActionEvent arg0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeWork1b { | |
private static <T> void findFirstElement(LinkedList<T> linkA, | |
LinkedList<T> linkB) { | |
int offsetA = 0; | |
int offsetB = 0; | |
if (linkB.size() > linkA.size()) | |
offsetB = linkB.size() - linkA.size(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.czxttkl.homework; | |
import java.util.LinkedList; | |
public class HomeWork1b { | |
private static <T> void findFirstElement(LinkedList<T> linkA, | |
LinkedList<T> linkB) { | |
int offsetA = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.czxttkl.homework; | |
import java.util.Arrays; | |
import java.util.LinkedList; | |
import java.util.List; | |
public class HomeWork1b { | |
private static <T> void findFirstElement(LinkedList<T> linkA, | |
LinkedList<T> linkB) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.LinkedList; | |
import java.util.List; | |
public class HomeWork1b { | |
private static <T> void findFirstSharedElement(LinkedList<T> linkA, | |
LinkedList<T> linkB) { | |
int offsetA = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TryJoin { | |
public static void main(String... arg) throws InterruptedException { | |
Thread a = new Thread(new Runnable() { | |
@Override | |
public void run() { | |
try { | |
Thread.sleep(5000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setCurrentMode(int currentMode) { | |
this.currentMode = currentMode; | |
switch(mode) { | |
case MODE_MAIN_MENU: | |
OpenGLBugManager.generateMainMenuBug(); | |
break; | |
case MODE_TUTORIAL_1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setCurrentMode(int currentMode) { | |
this.currentMode = currentMode; | |
switch(mode) { | |
case MODE_MAIN_MENU: | |
OpenGLBugManager.generateMainMenuBug(); | |
break; | |
case MODE_TUTORIAL_1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Return if the point is in the floor's contour +1: inside the contour -1: outside the contour 0:lies on the edge; | |
* | |
* @param openCvWidth | |
* The width in the opencv screen | |
* @param openCvHeight | |
* The height in the opencv screen | |
*/ | |
public int isPointInFloor(int openCvWidth, int openCvHeight) { | |
return isPointInFloor(openCvWidth, openCvHeight, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestConSum { | |
public static void main(String... args) { | |
int[] arr = new int[]{-2,11,-4,13, -9, -10,99}; | |
int negsum = 0; | |
int maxsum = 0; | |
for (int i = 0; i < arr.length; i++) { | |
if (arr[i] < 0) { |
OlderNewer