Questions tagged [record]
A record in programming is a data type with labels to access fields of the record.
record
3,676 questions
2
votes
1
answer
158
views
How can I prevent CS7036 error when initializing a record object?
I have created the following book dto:
public record BookDto(string? Id, string Name, string Genre, string Author);
Using linq, I select a book from my database ...
4
votes
1
answer
126
views
.NET 10 behavior change - Configuration binding an IEnumerable record has missing entries when nullable parameters are null
We have a web application with configuration supplied by an appsettings.json file. The configuration includes a collection of a custom type with nullable values. ...
Advice
1
vote
7
replies
123
views
When is a record not a value type?
Introduction
Jep 401 will introduce "value classes" to the Java programming language. As such, they have no identity, as their inherent state completely describes what they are. The non-...
3
votes
1
answer
107
views
Record's read-only Property not getting recalculated when using `with`?
I have encountered this strange behavior:
...
Best practices
1
vote
4
replies
130
views
In Java, should I use `@Override` for record fields?
If my record implements an interface, with a field accessor implicitly implementing a method, it should be an instance of what the @Override annotation is meant to ...
Advice
0
votes
2
replies
66
views
Is it possible to use Static_Predicate with a record type?
I wanted to define a record type with a Static_Predicate:
...
7
votes
1
answer
155
views
Records don't deserialize cycles
I stumbled upon something that got me curious. Apparently, serializing a record with a cyclic reference does not retain the cycle when deserializing it again, it becomes ...
0
votes
1
answer
79
views
What is "freezing" and how to declare a vector of variant record type?
I've written the next piece of code in order to declare a vector of lexical elements:
...
0
votes
1
answer
93
views
User Friendly Duplicate value message [duplicate]
I want to check to see if value from a form exists in Microsoft Access table using vba or macro that is user friendly but need help putting it together.
I've tried, ...
1
vote
1
answer
97
views
How do I specify the correct record dependency version for my Flutter app in VSCode?
I want the app to record the user's voice and send it to a CSV file (Google Sheets). I have it working for user input so far. In my "pubspec.yaml" file, I've defined the record, ...
2
votes
1
answer
73
views
GHC.Record : Record data type may not be a data family
I would like to create a virtual record field "r" for the red component of a color using the Color package. This package uses a data family ...
2
votes
1
answer
152
views
Why is a field not initialized when using a custom record copy constructor?
I have this record:
record Foo {
string _bar = "initialized";
public string Bar => _bar;
}
I'm running the ...
1
vote
1
answer
35
views
Null checks for record constructor arguments in Groovy
We are in the Groovy universe. Let's say I have a record like follows:
record Person(String firstName, String lastName, String city) {}
What is the shortest way to ...
2
votes
3
answers
193
views
Automatic property dependent on other properties
Let's say I have this:
...
1
vote
1
answer
85
views
SAS - Count how many times a value appear in a field for each record
I have the following SAS dataset, with a single columns called STAT (This field contains a series of values for each record):
I need to create a new field called <...
1
vote
2
answers
182
views
Why do I get errors CS8803 and CS0106?
I am a new to C# and .NET 9. I am trying to execute the following program I found from the official MS tutorial - Create record types
...
6
votes
1
answer
180
views
How do I make a generic method that can convert all strings in a record to lowercase in Delphi?
I want a procedure that does something like this:
...
6
votes
1
answer
249
views
Can I trust the Delphi default() to initialize string in a record to be empty?
Given this declaration:
type
TRec = record
FNr: integer;
FName: string;
constructor Create(ANr: integer);
end;
and this implementation of the ...
0
votes
3
answers
116
views
Shift data associated with an array's index based on filter data
I have an array of any values, as well as data associated with each value.
This data is stored as Record<string,FooData> where the key is generated using the ...
5
votes
1
answer
187
views
Why does the default equality comparer for records behave differently when the record contains certain fields and is accessed by list index?
Using TEqualityComparer<T>.Default for record types seems to "work" in some situations ("work" as in checking for value-equivalence across ...
1
vote
0
answers
58
views
After a call to TAdsTable.AdsGotoTop, the TAdsTable.Bof function returns False but not True
I don't understand why TAdsTable.Bof does not return True after a call to TAdsTable.AdsGotoTop.
The question may seem stupid, ...
1
vote
1
answer
141
views
Unexpected Duplicate Configuration Values in .NET 8 WorkerService
I'm developing a .NET 8 WorkerService project where I load configuration from multiple sources (e.g., appsettings.json and ...
1
vote
2
answers
442
views
Avoiding null attributes in records
I have the following record. But the collection cannot be null. Is there a way to default it to an empty list if it's null?
...
0
votes
0
answers
21
views
I want to save 5+ waves which is in different sizes using the RT-lab opwritefile block
I want to save 5+ waves which is in different sizes and different sample times using the RT-lab opwritefile block.
But the max RT-lab opwritefile group number is only 5.
max opwritefile group number
...
1
vote
1
answer
290
views
Record Class with findAll with Spring Data JPA
I am using SpringBoot 3.4.2 (latest as of right now) I can create RESTful controllers that access the Service, and then we make a Repository call to get data from the database which all works 100%. ...
0
votes
2
answers
259
views
Record vs. typical class
I don't understand why the authors of Dart defined fields of record instance as 'final'.
I think, that Record concept is convenient shortcut to create typical class. But fields in class don't have to ...
0
votes
1
answer
157
views
Get value from a record using a combobox
Ok, this seems quite basic, but I can't figure out.
I have a record myRecord = {key1: "value1", key2: "value2"}
I also have myCombo with the options ["key1", "key2&...
0
votes
0
answers
124
views
Can you map a record struct or list of record struct-s in Entity Framework Core 9?
I am a bit confused as to whether EF Core 8 and 9 support owned record structs and collections of those or not (ChatGPT says you can do it and even gives me ...
0
votes
1
answer
112
views
Complex JSON Serialization and Deserialization of record in C#
I'm diving into the world of Functional Programming in C# and trying to replicate some of my projects using functional programming. One aspect of functional programming is functions and immutability.
...
1
vote
1
answer
65
views
Flutter App Crashes During Real-time Audio Playback with Fatal Signal 6 (SIGABRT)
Description
I am developing a Flutter app designed to assist people with hearing impairments by playing real-time audio from the microphone to the speaker. The app uses a recorder to capture audio and ...
-1
votes
1
answer
34
views
sorting internal index of multidimensional array with column in PHP
I have a JSON record I converted to a PHP array.
...
0
votes
0
answers
55
views
Creating Multiple New Records at Same Time in Existing Access/SQL Table [duplicate]
I have been asked by our company to begin work on a new Sample Register for test pieces we handle. I have found a way to append information to a list of samples once they have been allocated a number. ...
0
votes
1
answer
170
views
C# records, is there a way to property Name is a part of a record so I can use with expression?
I am writing a library similar to Fluent Validator that will allow object modification. For ordinary classes, it works without a problem but I try to code a similar approach with a record and stumble ...
0
votes
1
answer
72
views
Declare record type from object or table type
I have an object type type_object created in the database and want to declare a record type type_record in a package for ...
0
votes
2
answers
117
views
How to Solve Law of Demeter Violation in Java Records?
I am using the below record in my Quarkus application and at some point I need to access the requestId field, located in Statements nested record. I want to avoid using the getters provided by the ...
-1
votes
2
answers
109
views
Sort numbers in Latex file between delimiters [closed]
I have a latex file which consists of a list of about 10,000 records consisting of a head word plus reference numbers separated by a comma. Some numbers are marked with latex codes.
...
2
votes
1
answer
756
views
How to convert Record to Table in Nushell?
I found how to convert Table to Record using the following code
here.
...
0
votes
2
answers
326
views
Oracle APEX 24.1: Generate page links from placeholders in text
I'm converting an old Perl/MySQL database application to Oracle APEX and there's one feature in the old system that I've been unable to figure out a way to do...
Assume that each table is made up of a ...
1
vote
0
answers
37
views
Can the chunk size or IMFSample of the IMFSourceReader:: OnReadSample method be modified?
I use Flutter to call the record package and start the recording stream on Windows.
The audio format I set is 16bit PCM, 48000HZ, signal channel.
The source code in the package uses IMFSourceReader, ...
1
vote
1
answer
187
views
Record’s field as formal parameter of procedure in Delphi
I want to create a procedure which performs some manipulations on a variable record type. Globally, I have an array of records. I want to sort the array, but by the records’ fields. I want to pass the ...
0
votes
0
answers
83
views
Why can't record struct contain init property?
This is my C# code:
record struct recName(int A) { }
And this is generated code behind the scenes:
...
0
votes
1
answer
53
views
Cloudkit records disappeared
App crashed showing error index out of range. In cloudkit dashboard, querying the table showed half of the records missing.
No changes were made neither to the app nor the database since the last ...
-2
votes
3
answers
487
views
Best way to fix data inconsistency [closed]
If you have a column in your table that contains inconsistent data for destinations, for example some may be "New York", some "New York, USA", "NY", etc. for different ...
1
vote
1
answer
57
views
How to make different record `type`s unequal
I am learning PureScript due to not being satisfied (in particular) with TypeScript's type safety of what's called "records" in PS. While doing so I stumble upon the exact same problem in PS,...
1
vote
2
answers
72
views
Intersection of Record with generic key extending template literal doesn't infer result of index access
In principle (T & Record<K, U>)[K] should evaluate to U but it doesn't seem to work in the case where ...
0
votes
2
answers
480
views
'record' keyword not working in Visual Studio
When I try to use the record keyword in my C# WPF .NET Framework file, it is recognised as a keyword, in the sense in appears in the code completion drop-down menu when you start typing, but then does ...
-2
votes
3
answers
172
views
Batch Script to split record by fixed length [closed]
I have an input text file with a single line having thousands of records one after another. I want to split them after length of 10 characters each.
...
2
votes
1
answer
211
views
Using generics to match a single string literal in Typescript
The class MyClass interfaces with an indexing sub-system that requires each record (Record<string, any>) to contain a ...
0
votes
0
answers
340
views
Powershell out-file throwing a file in use error
I have a script that has been running for several years. In the past week, it has started throwing file-in-use-by-another process errors: Out-File : The process cannot access the file '\OB-UTIL-PRD-01\...