record Questions
3
Solved
If I have a positional record like this:
public record Version(int Major, int Minor);
it seems that I can only provide a <summary> documentation, like this:
/// <summary>
/// Version r...
Baluster asked 17/12, 2020 at 13:45
10
Solved
I use ffmpeg to record a window using this code:
ffmpeg.exe
-f dshow
-y
-i video="screen-capture-recorder":audio="virtual-audio-capturer":audio="Microphone (USB Audio Device)"
-framerate 15
-v...
Complicity asked 20/8, 2014 at 4:33
1
Solved
I'm having trouble understanding how to initialize a C# record using named parameters.. This obviously works with more traditional classes with get; set; (or init) properties. Am I missing some spe...
2
Solved
I'm trying to use graphviz to do something similar to UML class diagrams.
I wonder whether there is a way to make a node of style 'register' have its first field in a bold font, to make it differe...
4
Solved
I need to be able to have AVCaptureVideoDataOutput and AVCaptureMovieFileOutput working at the same time. The below code works, however, the video recording does not. The didFinishRecordingToOutput...
Decomposed asked 19/10, 2010 at 13:32
3
Solved
Here I have a tricky situation, I guess. I need to be able to free an object which is a field of a record. I would normally write the cleanup code in the destructor, if it was a class. But since re...
2
Solved
I was taught that structs should almost always be immutable, so this unusual behaviour of record classes vs. record structs threw me off guard.
Using a record class...
record class Person(string Fi...
Cypriot asked 18/7, 2022 at 18:22
2
Assume a JSON structure with multiple optional fields. With classes, you can do something like
public static final class Foo {
@JsonProperty("x")
private int x = 1;
@JsonProperty(&qu...
Keramic asked 27/5, 2022 at 11:17
3
Solved
I have a procedure which receive as input parameter a record with 170 columns (it is based on the structure of a table).
In the procedure I want to call a debugging procedure one of whose paramete...
1
Solved
If I have a Java record with 2 properties and I want to define default values for the properties which should be used instead of null. I can either override the getters:
public record MyRecord(Set&...
1
Solved
The Optional<T> type introduced in Java 8 is mostly recommended to be used for return types and results. Hence, whenever I use it in a class field or a method parameter, I get a warning in In...
Stereobate asked 20/8, 2022 at 6:42
1
Creating immutable data structures, I really like the concept of Scala, where you can enforce object instantiation only via factory method in this way using case class (having a private canonical c...
Limacine asked 7/1, 2022 at 8:20
2
Solved
3
I have just started playing around with C# 9 and .NET 5.0, specifically the new record construct. I find I have a lot of excellent use cases for the shorthand syntax of the record types.
One of the...
16
Solved
I can't find anywhere it has been documented this. By default, the find() operation will get the records from beginning. How can I get the last N records in mongodb?
Edit: also I want the returned...
3
I've created a Java record, and would like to have a constructor that takes in a reduced number of arguments compared to the default constructor, and calculate and initialise all members based on t...
2
Solved
In simple words what is the difference between a final class and a record in Java 17?
In which case should I use a record?
Kalevala asked 14/3, 2022 at 19:52
1
I am learning about monads in the book 'Learn You a Haskell for Great Good!' by Miran Lipovaca. I am reading about how the Control.Monad.Writer module exports the Writer w a type along with its Mon...
Trepang asked 12/3, 2022 at 10:13
2
Solved
I am trying to access a nested record using lenses and prisms in Haskell:
import Data.Text (Text)
import Control.Lens.TH
data State = State
{ _stDone :: Bool
, _stStep :: StateStep
}
data Stat...
Cacophony asked 28/2, 2022 at 21:52
4
Solved
I can record normally, but after a WebRTC call, I get a crash:
required condition is false: format.sampleRate == hwFormat.sampleRate
Here is how I start the crash and installTap:
func startRecord...
Steading asked 6/4, 2021 at 15:18
1
Solved
I'm using @ConfigurationProperties annotation to auto-config my properties. Before my config class was working fine, but I tried to achieve the same thing with records and just fails.
I was followi...
Performing asked 23/11, 2021 at 11:24
1
Solved
Consider the following code:
const testOne: Record<"foo"|"bar", string> = {
"foo": "xyz"
};
const testTwo: Record<string, string> = {
"foo...
Justinjustina asked 23/7, 2021 at 6:24
3
Solved
I am creating a radio application for iPhone (coded in Swift 4.2) and I want to add a function allowing me to record and save in a file, the sound produced by my radio (read from an AVPlayer) when ...
3
Solved
I have a project using .NET Standard 2.1 and .NET core 3.1 - so the C# version is 8.0
According to a few articles I found (e.g. one, two), it should be possible to define a record type using this s...
1
Solved
I did a long search and felt the need to ask here. The npm packages I used before did nothing. Has anyone done or experienced such an application before? All I want to do is record it as a video wh...
Steato asked 21/5, 2021 at 7:47
© 2022 - 2024 — McMap. All rights reserved.