Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
103 views

I am a beginner in C# trying to figure out how ref-safe-context is defined in C#. I declared a function Foo which didn't work since it tries to ref assign a variable with declaration-block to a ref ...
Louis Nicolas Davout's user avatar
2 votes
2 answers
58 views

I have a simple form and I'm using EmailJS to handle it and I'm sure my IDs and key are correct. Here's an example of my form: <form (ngSubmit)="sendEmail(form)" #form="ngForm"&...
Michael's user avatar
  • 21
4 votes
1 answer
116 views

Consider this code: struct Struct { public int Num; } class Program { public void A(ref readonly Struct s) { } public void B(ref readonly Struct s) => A(ref s); } I get a compilation ...
Yaakov Shoham's user avatar
0 votes
1 answer
81 views

I'm new on C# and NSubstitute - I've been having a rough time trying to mock a avoid function and that it has a ref argument. I've been trying a combination of these docs and these docs (as well as ...
Antonio's user avatar
  • 11.5k
0 votes
2 answers
35 views

I have a scenario involving a 3rd party component in an array: let array = [{comp:(<Component/>)},{comp:(<Component/>)},{comp:(<Component/>)}] array.map((arElem, index) => ( <...
Neph's user avatar
  • 418
0 votes
0 answers
82 views

Sorry for the long message, but I was wondering if you could give me some advice. What I want to achieve is to handle tree-structured data in the nim language using tasks with the nim-taskpool package....
vert2air's user avatar
-1 votes
1 answer
87 views

Please consider the following class/method being called from a Blazor page instance class. My question is: if two threads call the MyStaticMethod concurrently passing the same ref int index reference ...
David Rosenblum's user avatar
0 votes
0 answers
69 views

I have tried creating a schema and validating yaml file structures based on their datatype and I have been constantly getting the same error no matter how I try to resolve it. The source code where I'...
Sanjay Agamamidi's user avatar
0 votes
0 answers
41 views

I would like to disable the submit button in my Vue application if the user hasn't entered data in the donationInput input field. I'm sure I'm missing something basic, thanks for your help identifying ...
Nick Bewley's user avatar
  • 9,319
0 votes
1 answer
48 views

I only came across very hacky solutions, so maybe someone has a better idea how to solve it. Here's what I'm trying to do: The UploadComponent lets the user select files using refs. Once a file is ...
Katharina Schreiber's user avatar
3 votes
3 answers
132 views

Given the method ref readonly State GetState(); where State is a struct, the following code accesses State.SimTime without copying State: ref readonly var state = ref GetState(); var t = state....
Arne Claassen's user avatar
0 votes
0 answers
31 views

All the children always equal 100%. This means when I increase one child, all the other children are reduced. I want to change the slider value manually and by programming I am using typescript in a ...
sv savage's user avatar
2 votes
1 answer
225 views

I have a function with following signature State MoveForward(in Path path); Path is a ref struct State is also a ref struct with just integer. Now I have another helper function bool TryMoveForward(...
Vivek MVK's user avatar
  • 1,179
0 votes
1 answer
147 views

This issue keeps reoccurring and I always seem to code around it so I'm hoping someone out there can help me shed some light on the correct way to type this. function MyComponent({ isCondition }): ...
Nicholas Rice's user avatar
1 vote
1 answer
53 views

This official Vue.js documentation claims that the ref() API in Vue 3 uses getters and setters. In Vue 3, Proxies are used for reactive objects and getter / setters are used for refs. This would ...
Ahmad Shahwan's user avatar
0 votes
0 answers
50 views

Getting this error while closing the modal from closeModal component. I have written path replace using history.push() function. Ex. const OnClose = () =>{ history.push({ pathname: "/...
Dinesh Kumar's user avatar
0 votes
0 answers
190 views

The below code shows an error on the line tableItemsOptions.value.search = searchArray Error: Type 'Record<string, string | null>' is not assignable to type 'UnwrapRef<Record<keyof T, ...
Gilad Dahan's user avatar
1 vote
1 answer
183 views

I am working on a Vuetify 3 data tabe and need to implement a "View More" button for description that exceed three lines. I want to use scrollHeight and clientHeight to determine if the text ...
Jessica's user avatar
  • 634
0 votes
1 answer
85 views

I have two classes declared.Goods and User class Goods { #price: number #quantity: number constructor(price: number, quantity: number) { this.#price = price; this.#quantity =...
accbear's user avatar
  • 23
2 votes
1 answer
134 views

An external C library allocates/frees memory via FFI. My rust code is a thin wrapper layer called by C, and allows other Rust developers to write safe Rust code without dealing with FFI from C. My ...
Yuri Astrakhan's user avatar
0 votes
1 answer
90 views

First of all, I understand that the ref, in and out parameters are forbidden in asynchronous tasks. However, as I have this need, I'm trying to find the cleanest, simplest and most effective solution. ...
jeheel's user avatar
  • 21
0 votes
1 answer
114 views

Something is confusing me, and I hope you can maybe clarify. // This class assumes that T is definitively compatible to TheStruct class ValueHolder<T> { T _value; TheStruct _structValue; ...
Teneko's user avatar
  • 1,500
3 votes
1 answer
69 views

I am trying to understand the behavior of ref and const ref applied to the members of a composite type (e.g. record). Here, is it OK to assume that the behavior of them is similar to auto& and ...
tbzy's user avatar
  • 109
0 votes
1 answer
68 views

I was trying to implement the From trait for a custom struct in order to build it from a reference to another struct: struct Base { ...properties } struct Derived { ...other_properties } impl From&...
Xapadoan's user avatar
  • 1,031
2 votes
1 answer
34 views

I am working on a schedule component in React, the relevant code is available in this code sanbox. And can be accessed here: https://6rcv9w.csb.app/ As the console logs show the touchmove event stops ...
Iván Hidalgo's user avatar
0 votes
0 answers
72 views

I am working on a Vue.js component that uses the VueTelInput component for phone number input. I am encountering an issue where this.$refs.creationPhoneInput is undefined: <template> <...
José Tomás Meyer's user avatar
0 votes
1 answer
102 views

I am new to vue js, I am using this vue-form-wizard and I am not sure if there is a way to disable the next button by some conditions, so depends on the conditions will enable or disable the button &...
Rooh Al-mahaba's user avatar
0 votes
1 answer
501 views

I'm reviewing some Vue code where the developer has assigned a computed value to a ref property. I've never seen this done before, and although it works, it seems odd to me. Are there any potential ...
Josh's user avatar
  • 958
0 votes
0 answers
122 views

I am creating a react component that creates a custom html element and sets innerhtml using dangerouslySetInnerHTML, everything goes fine but the issue arises when I provide the dynamic type to the ...
Dhiraj sah's user avatar
2 votes
0 answers
147 views

I'm new to vue.js and I've encountered a problem that I can't fix. In my SelectField.vue component I have written the following method: getModalBodyElement() { return document.querySelector('....
michael.brilz's user avatar
0 votes
1 answer
183 views

<input type="file" id="fieldBoxContentAddPhoto" accept="image/png" @input="inputPhoto(this,fieldBoxContentAddPhoto2,fieldBoxContentAddPhoto3)" > <...
MGJH's user avatar
  • 11
1 vote
2 answers
983 views

In React, both useEffect and useMemo have a dependencies argument. I naively thought they worked identically: whenever the values in that dependencies argument changed, I thought the useEffect or ...
machineghost's user avatar
1 vote
1 answer
330 views

i have a component which renders conditionally and i pass a ref to it via forwardRef of React ,but when condition met and component renders, the ref still has not any value, what should i do? here is ...
Faraz's user avatar
  • 99
1 vote
1 answer
91 views

I'm currently fetching an object from an api to my vue frontend. This object has many properties, even deep nested ones. For example a project object: { id: 1, title: "My Project", ...
Play4Fun2310's user avatar
0 votes
1 answer
186 views

i'm trying to use custom component for ListboxComponent prop in Autocomplete MUI v5, but i'm getting this error: Function components cannot be given refs. Attempts to access this ref will fail. Did ...
Hadji Andrei's user avatar
1 vote
1 answer
213 views

In Rust, I'm trying to make a group of objects that can be related to one another in a sort of target/dependency chain. I figured I could use a trait and, for each object, assign a "target" ...
RodoGM's user avatar
  • 21
1 vote
1 answer
202 views

I'm currently writing a lot of functions that accept blocks and expressions as input. I generally find it much easier to work with Refs, as they are simple, lightweight, and it's also easy to ensure ...
Svalorzen's user avatar
  • 5,637
3 votes
0 answers
80 views

I'm having some issues updating a reactive object in a Vue.js 3 project. I'm creating an array of google.maps.marker.AdvancedMarkerElement, and I'm creating the array like this: localizaciones.forEach(...
francesco14's user avatar
1 vote
1 answer
298 views

I have a reusable wrapper component which like this: import { FC, HTMLAttributes } from "react"; const Wrapper: FC<HTMLAttributes<HTMLDivElement>> = ({ children, className, ...
Mehdi Faraji's user avatar
  • 4,104
0 votes
2 answers
72 views

I'm very new to Oracle and struggling with REF's. I have an employee type with the following structure: CREATE TYPE person_type AS OBJECT( address at_address_type, name at_name_type, ...
Andrew Taison's user avatar
0 votes
0 answers
177 views

I have a component like this: const ColumnTaskPrompt = () => { const promptRef = useRef<HTMLDivElement>(null); useClickOutside(promptRef, () => { console.log("do something";...
Party Favor's user avatar
0 votes
2 answers
2k views

I have field validation and during submit I need to focus on the First input field which has errors from my parent component CustomForm I can't access my child component input in CustomInput <...
Славик Гусев's user avatar
1 vote
0 answers
916 views

I have tried everything. When I run this in overleaf I get (??) but I'm also able to click the (??) to get to the figure in my pdf so clearly the machine understands what I'm referencing but it doesn'...
ArvidSteen's user avatar
0 votes
3 answers
289 views

Ok, I am trying to create a dropdown and when selecting an item, the page should scroll to a specific section (ref). I have several divs with the same ref (as I have more than 30 divs that require a ...
udarts's user avatar
  • 886
0 votes
1 answer
123 views

I have a component that is conditionally rendered and i don't know the height of it beforehand (and also would like to avoid setting it manually). It should automatically be equal to the size of its ...
Saltuk Kezer's user avatar
0 votes
1 answer
1k views

Source generators should target .NET Standard 2.0. This is the last .NET Standard version that supports .NET Framework. The default C# version in latest .NET Framework releases is C# 7.3. Suppose a ...
patvax's user avatar
  • 659
0 votes
1 answer
53 views

I have the following code: and it looks like this: I need to add a div with a reference inside it: And if I do so, all the UI moves up. See this picture: I realized this happens only when I add ...
Sonhja's user avatar
  • 8,510
0 votes
2 answers
188 views

I have these components and I have 12 checkboxes in child component. I want to have them checked by default when the component loads. I can't do that. I can't use checked='true' as an attribute for my ...
Arman Ebrahimi's user avatar
0 votes
0 answers
45 views

There are two variants of ref usage in react: ref object: const CustomInput = () => { const ref = useRef(); return <input ref={ref} /> } and callback ref: const CustomInput = () => { ...
Volok's user avatar
  • 73
0 votes
1 answer
1k views

I'm trying to write a code for the row Echelon form of \ matrix using Python without using any inbuilt functions. But I'm getting an error for last column. A=[[1,2,3],[4,5,6],[7,8,9]] j=0;k=0 print(&...
Eruganti raghava chary's user avatar

1
2 3 4 5
29