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
| IRCClient bot = new IRCClient(config.json); | |
| bot.addServer(name, host, port, nick, user, real, encoding, tls, rooms); | |
| bot.addListener("join", new IRCListener() { | |
| handle(IRCMessage msg) { | |
| String line = msg.read(); | |
| msg.send("hello!"); | |
| } | |
| }): | |
| IRCNameManager nameManager = new IRCNameManager(); | |
| nameManager.addListener(new IRCListener(){ |
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
| public static final DateTimeFormatter TIME_PATTERN = DateTimeFormatter.ofPattern("HHmm"); | |
| public BigDecimal getRealKosu() { | |
| LocalTime start = LocalTime.parse(strTime, TIME_PATTERN); | |
| LocalTime end = LocalTime.parse(endTime, TIME_PATTERN); | |
| LocalTime rest = LocalTime.parse(restTime, TIME_PATTERN); | |
| Duration du = Duration.between(start, end); | |
| Duration du2 = Duration.between(LocalTime.MIN, rest); | |
| Duration du3 = du.minus(du2); | |
| return new BigDecimal(du3.toMinutes() / 60.0); |
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
| // 月オブジェクトを取得 | |
| YearMonth currentMonth = YearMonth.now(); | |
| YearMonth backMonth = currentMonth.minusMonths(1); | |
| YearMonth nextMonth = currentMonth.plusMonths(1); | |
| // 日オブジェクトを取得 | |
| LocalDate firstDay = currentMonth.atDay(1); | |
| LocalDate endDay = currentMonth.atEndOfMonth(); | |
| LocalDate endDay2 = currentMonth.atDay(currentMonth.lengthOfMonth()); |
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
| LocalTime a = LocalTime.parse("09:00"); | |
| LocalTime b = LocalTime.parse("17:00"); | |
| Duration c = Duration.between(LocalTime.MIN, LocalTime.parse("01:00")); | |
| Duration d = Duration.between(a, b).minus(c); |
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
| Dim a = Date.Parse("09:00") | |
| Dim b = Date.Parse("17:00") | |
| Dim c = Date.Parse("01:00").TimeOfDay | |
| Dim d = b - a - c |
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
| KeyCombination copyKey = KeyCombination.valueOf("Shortcut+c"); | |
| copyMenu.setAccelerator(copyKey); |
OlderNewer