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 org.example; | |
public class JavaSwitchExpressions { | |
public static int intSwitchExpression(Node node) { | |
return switch(node.typeInt()){ | |
case 0 -> ((Node.FirstNodeType) node).firstId(); | |
case 1 -> ((Node.SecondNodeType) node).secondId(); | |
case 2 -> ((Node.ThirdNodeType) node).thirdId(); | |
case 3 -> ((Node.FourthNodeType) node).fourthId(); |
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 org.example; | |
import org.openjdk.jmh.annotations.*; | |
import java.util.concurrent.TimeUnit; | |
@BenchmarkMode(Mode.Throughput) | |
@OutputTimeUnit(TimeUnit.MICROSECONDS) | |
@Warmup(iterations = 5, time = 5) | |
@Measurement(iterations = 5, time = 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
parser = argparse.ArgumentParser() | |
parser.addArgument('--print-metadata') | |
subparsers = parser.add_subparsers(dest='command') | |
subparsers.add_parser(name='build') | |
subparsers.add_parser(name='predict') | |
parsed_args = parser.parse_args() | |
match vars(parsed_args): |
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
sealed interface PathTrace<out T> { | |
val elements: List<Nodable> | |
class Composite(override val elements: List<Nodable>): PathTrace<Nothing> | |
open class Empty: PathTrace<Nothing> { | |
override val elements: List<Nodable> get() = emptyList() | |
} | |
} |
This file has been truncated, but you can view the full file.
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
Initialize engine version: 5.6.7f1 (e80cc3114ac1) | |
GfxDevice: creating device client; threaded=1 | |
Direct3D: | |
Version: Direct3D 11.0 [level 11.1] | |
Renderer: AMD Radeon RX 5700 XT (ID=0x731f) | |
Vendor: ATI | |
VRAM: 8151 MB | |
Driver: 30.0.13023.4001 | |
Begin MonoManager ReloadAssembly | |
Platform assembly: H:\SteamLibrary\steamapps\common\Cities_Skylines\Cities_Data\Managed\UnityEngine.dll (this message is harmless) |
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 com.empowerops.jargon.model.opt2 | |
import java.lang.IndexOutOfBoundsException | |
/** | |
* Why, why on gods green earth would you implement this geoff!? | |
* | |
* Ok, after studying the access patterns, we need fast contains and fast indexOf. | |
* fast contains is easily provided by hashMap, | |
* to get indexOf, you want a NavigableSet (indexOf(elem) == headSet(elem).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 com.empowerops.visualizer; | |
import com.empowerops.common.*; | |
import com.empowerops.common.eventbus.EventBus; | |
import com.empowerops.common.ui.FXController; | |
import com.empowerops.common.ui.FXMLLoader; | |
import com.empowerops.dal.OptimizationMetadata; | |
import com.empowerops.dal.OptimizationModel; | |
import com.empowerops.jargon.OptimizerService; | |
import com.empowerops.jargon.events.NewExpensivePointFoundEvent; |
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
Write-Host "Host Version:" $Host.Version | |
Try | |
{ | |
Write-Host "before!" | |
Stop-Process 123456789 -EA Stop | |
Write-Host "after!" | |
} | |
Catch | |
{ |
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
@FXML fun onRunButtonClick(): Job { | |
println("clicked... launch coming") | |
val job = launch(Dispatchers.Default + CoroutineName("Run-button-click")) { | |
println("launched!") | |
} | |
println("launched, job=$job") | |
Platform.runLater { | |
println("Platform.runlater: running later, job=$job") |
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
Caused by: java.nio.file.NoSuchFileException: C:\Users\Inhal\AppData\Roaming\OASIS 2020.1\licenses\trial-license.l4j | |
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79) | |
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) | |
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) | |
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53) | |
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38) | |
at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:193) | |
at java.nio.file.Files.readAttributes(Files.java:1737) | |
at java.nio.file.Files.size(Files.java:2332) | |
at com.empowerops.front_end.LicenseImportingServiceImpl$findLicenseCacheSources$2.invokeSuspend(LicenseImportingService.kt:142) |
NewerOlder