Skip to main content
Filter by
Sorted by
Tagged with
Best practices
1 vote
4 replies
127 views

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 cover. interface I { int f(); } ...
ice1000's user avatar
  • 6,619
Advice
0 votes
2 replies
63 views

I wanted to define a record type with a Static_Predicate: -- irregular_matrices.ads generic type Element_Type is private; package Irregular_Matrices is subtype Index_Type is Positive; ...
tymurmchyk's user avatar
7 votes
1 answer
153 views

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 null. When doing the same ...
Zabuzard's user avatar
  • 26.3k
0 votes
1 answer
72 views

I've written the next piece of code in order to declare a vector of lexical elements: type Lexical_Element_Kind is ( Delimiter, -- & ' ( ) * + , - . / : ; < = > | -- => .. ...
tymurmchyk's user avatar
0 votes
1 answer
93 views

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, Private Sub Donor_Key_LostFocus() I ...
Sue Clark's user avatar
1 vote
1 answer
88 views

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, ...
Max Butler's user avatar
2 votes
1 answer
73 views

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 Color. I tried to write the following : import GHC....
141592653's user avatar
  • 794
2 votes
1 answer
144 views

I have this record: record Foo { string _bar = "initialized"; public string Bar => _bar; } I'm running the following code: var foo = new Foo(); Console.WriteLine(foo?.Bar ?? &...
Ivan Petrov's user avatar
  • 7,544
1 vote
1 answer
34 views

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 make sure that none of the three ...
Natasha's user avatar
  • 916
2 votes
3 answers
190 views

Let's say I have this: class AA(string a, string b, string? c) { ... } record BB { public string A { get; init; }; public string B { get; init; }; public string? C { get; init; }; ...
John's user avatar
  • 855
1 vote
1 answer
78 views

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 CountOpen that, for each row, counts ...
Giampaolo Levorato's user avatar
1 vote
2 answers
175 views

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 public record Point(int X, int Y); public static void Main() { ...
Mohamed's user avatar
  • 273
6 votes
1 answer
177 views

I want a procedure that does something like this: procedure RecordStringToLower(var MyRecord); begin // 1. Loop through all fields // 2. Find string fields // 3. Convert all string fields to ...
Shaun Roselt's user avatar
  • 4,464
6 votes
1 answer
241 views

Given this declaration: type TRec = record FNr: integer; FName: string; constructor Create(ANr: integer); end; and this implementation of the constructor: constructor TRec.Create(ANr: ...
Anders G's user avatar
0 votes
3 answers
114 views

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 index within the array. However, I ...
LeCarbonator's user avatar
5 votes
1 answer
182 views

Using TEqualityComparer<T>.Default for record types seems to "work" in some situations ("work" as in checking for value-equivalence across all fields between two records), ...
easely's user avatar
  • 63
1 vote
0 answers
57 views

I don't understand why TAdsTable.Bof does not return True after a call to TAdsTable.AdsGotoTop. The question may seem stupid, but I want to understand the real reason why this happens. I'll give an ...
Ivan Yuzafatau's user avatar
1 vote
1 answer
119 views

I'm developing a .NET 8 WorkerService project where I load configuration from multiple sources (e.g., appsettings.json and appsettings.Development.json). My configuration file defines a section Units ...
Christopher Fontaine's user avatar
1 vote
2 answers
321 views

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? public record Car( long id, String model, List<...
S.Dan's user avatar
  • 1,940
0 votes
0 answers
21 views

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 ...
paul Jiang's user avatar
0 votes
0 answers
46 views

I have a table like below create table public.test_dynamic_data_tbl(col1 int,col2 character varying,col3 double precision); insert into public.test_dynamic_data_tbl values(1,'test1',12) insert into ...
Amar's user avatar
  • 1
1 vote
1 answer
258 views

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%. ...
tjholmes66's user avatar
  • 2,040
0 votes
2 answers
234 views

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 ...
Voldemort's user avatar
0 votes
1 answer
145 views

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&...
Germán Castro's user avatar
0 votes
0 answers
114 views

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 examples...). Am I doing something wrong, ...
Valo's user avatar
  • 2,130
0 votes
1 answer
111 views

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. ...
Paulo Aboim Pinto's user avatar
1 vote
0 answers
51 views

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 ...
Haroon's user avatar
  • 21
-1 votes
1 answer
34 views

I have a JSON record I converted to a PHP array. $db=array( array("Name"=>"Beans","Price"=>"10"), array("Name"=>"Salad","...
mike_s's user avatar
  • 27
0 votes
0 answers
45 views

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. ...
Harbinger's user avatar
0 votes
1 answer
162 views

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 ...
Marek Wdowiak's user avatar
0 votes
1 answer
66 views

I have an object type type_object created in the database and want to declare a record type type_record in a package for fetching data in a loop using a ref cursor, which doesn't seem to work with an ...
NablaDelta's user avatar
0 votes
2 answers
114 views

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 ...
Alex_Pap's user avatar
  • 556
-1 votes
2 answers
108 views

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. ʾallik \refnumbers{...
Robert E's user avatar
2 votes
1 answer
688 views

I found how to convert Table to Record using the following code here. let fruits_original = [[key, value]; [apple 10] [banana 42] [mango 5]] let fruits = $fruits_original | reduce -f {} {|it, acc| $...
undercutvirus's user avatar
0 votes
2 answers
305 views

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 ...
Dennis's user avatar
  • 1
1 vote
0 answers
34 views

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, ...
Reew1nd's user avatar
  • 31
1 vote
1 answer
184 views

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 ...
t232006's user avatar
  • 21
0 votes
0 answers
82 views

This is my C# code: record struct recName(int A) { } And this is generated code behind the scenes: internal struct recName : IEquatable<recName> { public recName(int A) { <A&...
FR3Y4's user avatar
  • 1
0 votes
1 answer
50 views

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 ...
nixxe's user avatar
  • 1
-2 votes
3 answers
438 views

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 ...
vehk's user avatar
  • 107
1 vote
1 answer
57 views

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,...
Hi-Angel's user avatar
  • 5,875
1 vote
2 answers
67 views

In principle (T & Record<K, U>)[K] should evaluate to U but it doesn't seem to work in the case where K is generic and extends a template literal. function foo3< K extends `a${string}`...
Exifers's user avatar
  • 2,932
0 votes
2 answers
422 views

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 ...
Adam's user avatar
  • 3
-2 votes
3 answers
162 views

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. **Input Record** - ====================== Begin of ...
Prashant 's user avatar
3 votes
1 answer
541 views

Consider this Minimal Reproducible Example. Point point1 = new Point(1, 2, 3); Point point2 = new Point(1, 2, 31); Console.WriteLine(point1 == point2); // True Console.WriteLine(point1.Equals(point2)...
FluidMechanics Potential Flows's user avatar
2 votes
2 answers
127 views

From the spec: The record type implements System.IEquatable<R> and includes a synthesized strongly-typed overload of Equals(R? other) where R is the record type. The method is public, and the ...
Ivan Petrov's user avatar
  • 7,544
0 votes
2 answers
64 views

I have created a pandas dataframe as follows: ds = {'col1' : ["A","B"], 'probability' : [0.3, 0.6]} df = pd.DataFrame(data=ds) The dataframe looks like this: print(df) col1 ...
Giampaolo Levorato's user avatar
2 votes
1 answer
205 views

The class MyClass interfaces with an indexing sub-system that requires each record (Record<string, any>) to contain a specific primary key field. I'm trying to use Typescript's type system to ...
sbgrl's user avatar
  • 23
2 votes
2 answers
181 views

In Delphi you can declare a record containing a String. This means the record just contains a pointer the heap when the string is located; does the heap memory get freed when this record goes out of ...
John John's user avatar
  • 383
1 vote
2 answers
73 views

Consider the scenario where we create a record for capturing a JSON payload. (application/json content type) Is there any benefit of using a closed record with a JSON type rest descriptor over an open ...
YUK7HI's user avatar
  • 13

1
2 3 4 5
74