Questions tagged [circular-reference]

A circular reference is a series of references where the last object references the first, resulting in a closed loop.

A circular reference is a series of references where the last object references the first, resulting in a closed loop.

Circular references can appear in computer programming when one piece of code requires the result from another, but that code needs the result from the first.

Information is taken from Wikipedia, more information available there.

758 questions
0
votes
1 answer

How do I resolve circular reference when creating a custom validation attribute that accesses entities in the same context?

I have an entity which contains a property that must be a valid transaction type. The transaction types are defined in another entity. I want to create a custom validation attribute to validate the transaction type by verifying it is in the…
Ken
  • 57
  • 1
  • 11
0
votes
1 answer

Are DOM circular references found by chrome,firefox and IE?

I was reading about DOM circular references and how they were a cause for memory leak in javascript especially in IE 6 and 7.Do the modern browsers use mark-and-sweep technique to effectively remove these objects from memory?
0
votes
2 answers

Entity Framework circular dll reference

My solution in it's current (sad) state: I want my business layer data-provider agnostic (isn't that a good thing?) with just an interface so I can switch out EF with NHibernate or Linq to Xml or whatever type of persistance provider me or my boss…
toddmo
  • 20,682
  • 14
  • 97
  • 107
0
votes
1 answer

Can this circular dependency in TypeScript be refactored so separate TypeScript files are possible?

I have those TypeScript classes in the same .ts file because there are import dependencies. I would appreciate if someone could help me refactor the code so I could remove the circular reference of imports: The first one is the abstract GenericModel…
Michail Michailidis
  • 11,792
  • 6
  • 63
  • 106
0
votes
0 answers

Angular2 typescript import all classes from one file

I am using this kind of structure for folders that contain modules. This is a simplified core folder -- core |-- a.service.ts |-- b.service.ts |-- c.service.ts |-- core.module.ts |-- index.ts The module imports all classes except for…
undefinederror
  • 821
  • 1
  • 8
  • 16
0
votes
3 answers

Allow our app to call a customer-provided code that calls our code

I am looking for the simplest solution to allow our .Net EXE to call a DLL provided by a 3rd party. Here's the rub - that DLL calls into objects in our code. One of the nice things in .Net is that an EXE can be used as an assembly in other project,…
Maury Markowitz
  • 9,082
  • 11
  • 46
  • 98
0
votes
3 answers

Is this a case of circular reference? Should I avoid it?

In the following code I have two classes. When the Nation class is instantiated to an object, it also instantiates an object for the Population class with a reference to the nation object. class Nation def initialize(name) @name = name …
Redoman
  • 3,059
  • 3
  • 34
  • 62
0
votes
1 answer

Circular reference is user defined function VBA excel

My aim is to add the values of certain columns using a user defined function in the actual row. The columns are given in another table. I am reading the name of rows, calculating the actual value and sum them. This function called once from excel…
Istvan Heckl
  • 864
  • 10
  • 22
0
votes
2 answers

How to get rid of circular references to java objects?

I am very new to programming trying to learn it all by myself. I am facing an issue that I can not resolve and I couldn't find any good answers online. I have a series of classes implementing an interface, one of which needs to provide a reference…
0
votes
0 answers

Excel Circular reference while using sum

I have two columns A and B where one element in each of the column is a product of a constant value and the sum of all the elements in the other column, as below A x1 | x2 | x3 =c1* sum(y1:y3) B y1 | y2=c2*sum(x1:x3)| y3 When I have to sum the…
user3338307
  • 21
  • 2
  • 5
0
votes
3 answers

Avoid circular reference for classes

I have a function that creates and returns a "Person". The "Person" has a "Spouse" property which is, of course, another "Person". This causes an endless recursion since the "Person" being created is always a "new" one each time the function is…
Starfleet Security
  • 1,813
  • 3
  • 25
  • 31
0
votes
1 answer

Filtering objects with circular reference to itself (ObjectA has property List)

I have a large json structure with nested values that I have converted into a list of objects to work with. I'd like to filter out all objects that don't contain a specific property value. Problem is though, that so far all I've come up with is a…
ec3
  • 55
  • 1
  • 10
0
votes
1 answer

Handling multiple fact and multiple entities tables (MySQL) with common fields in Qlikview/QlikSense

I resolved my fact table with this post (Handling multiple fact tables in Qlikview). But I have a problem with entity tables. I will use the example in this post (Handling multiple fact tables in Qlikview) to explain my problem: test_scores_fact …
0
votes
1 answer

Delayed Ninject setter method injection

We're using Ninject dependency injection for a machine automation software and have run into a problem with circular references. We have several physical objects that needs to be aware of each other to avoid collisions. We have added a…
Anlo
  • 3,228
  • 4
  • 26
  • 33
0
votes
1 answer

jQuery - removing part of text in table on smaller screens

I'm trying to create jQuery to abbreviate a part of my text in a table so it fits more easily on smaller devices. I've tried something like this: jQuery(function($) { $(window).load(function() { $(window).resize(function() { if…
UnluckyForSome
  • 61
  • 1
  • 1
  • 9