5 questions
4
votes
0
answers
55
views
How to effectively search $home in PowerShell if you are looking for hidden directories?
I am writing a Powershell script which has a function:
$CutFiles3 = @(Get-ChildItem $home -Force -Directory -Filter autoruntemp*)
This command is slowing down my script and is taking 10 seconds to ...
3
votes
1
answer
165
views
Prevent Rest Condition in Rust Match Statement
I'm working on a rust project that relies heavily on match statements. Rust's exhaustive matching is a big part of the reason that we picked this language to work in, and I'm curious if it's possible ...
1
vote
2
answers
391
views
Overriding a method with a sealed class/interface parameter in java
Given this java code:
public class Main {
public static void main(String[] args) {
// These are objects of the only 2 classes that implement Parent
// `sealed` defines that there ...
0
votes
1
answer
108
views
Creating union type to ensure each value of `enum` is handled
I have an enum of operations (that I can't change, unfortunately):
enum OpType {
OpA = 0,
OpB = 1,
}
…and a set of types for objects that carry the data needed for each operation:
type A = {
...
2
votes
2
answers
2k
views
How to create a sealed abstract class in TypeScript?
In Kotlin, a sealed class is an abstract class whose direct subclasses are known at compile time. All the direct subclasses of the sealed class must be defined in the same module as the sealed class. ...