This file contains hidden or 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.List; | |
import java.util.Optional; | |
interface Cabinet { | |
// zwraca dowolny element o podanej nazwie | |
Optional<Folder> findFolderByName(String name); | |
// zwraca wszystkie foldery podanego rozmiaru SMALL/MEDIUM/LARGE | |
List<Folder> findFoldersBySize(String size); |
This file contains hidden or 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
# WARNING: `ASAN_OPTIONS=detect_leaks=1` is required to make leak sanitizer work | |
# WARNING: (M1/M2 Mac) using `leak` check can lead to showing memory leaks even for programs without any leaks | |
exec := build/prog | |
sources := $(wildcard src/*.cpp) | |
include_dir := include | |
cpp_version := c++17 | |
checks := address,undefined # possible checks: address,undefined,leak,memory,thread,dataflow,cfi,kcfi,safe-stack | |
diagnostic_flags := -Wall -Wextra -Wpedantic -Wconversion -Wshadow |
This file contains hidden or 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 javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.KeyEvent; | |
public class KeyHolder { | |
private final static int KEY_TO_HOLD = KeyEvent.VK_BACK_SLASH; // Key can be configured here; backslash is the default key | |
private static boolean keepPressing = false; | |
public static void main(String[] args) throws AWTException { | |
final Robot robot = new Robot(); |