Questions tagged [circular-reference]
A circular reference is a series of references where the last object references the first, resulting in a closed loop.
741
questions
0
votes
1
answer
38
views
How to avoid this circular import?
Asset variable must be declared from mother file (this is a simplified version).
File cannot be merged.
This mother file works :
import pandas as pd
import datetime as dt
import yfinance as yf
data=...
1
vote
0
answers
11
views
Is it possible to make circular references with Meteor's transform method?
I have the following code shared between my client and server:
class Character{
constructor(data) {
this.name = data.name
this.party = Parties.findOne(data.party)
}
}
Characters = new ...
0
votes
2
answers
34
views
Circular Referenced Objects Javascript
Having issues with this exercise:
// Let’s say we have an array of artists and we want to create a map-like object of their instruments.
const artists = [
{
id: '1',
name: 'Jimi Hendrix'...
0
votes
1
answer
59
views
Circular reference when serializing an object: Cannot set culprit properties to null
I have a circular reference exception when serializing a c# model object (I'm using Entity Framework, and the object is the model passed to the view that comes from a LINQ query).
(It does not matter ...
0
votes
0
answers
48
views
Circular referencing and typing in Python [duplicate]
Using Python 3.11.
I am trying to figure out what is the best practice when dealing with circular referencing and how to implement this (if at all is possible) with typed variables. My intention is to ...
5
votes
4
answers
92
views
Why does my lambda get illegal forward reference, but my anonymous class does not? [duplicate]
I am trying to represent a State Transition Diagram, and I want to do this with a Java enum. I am well aware that there are many other ways to accomplish this with Map<K, V> or maybe with a ...
0
votes
0
answers
26
views
linq circular query reference c# on Category and Parent Category
The category table have a circular reference to have an unlimited hierarchy structure.
Herewith is the structure im trying to achieve.
How do I write a query in linq C# to achieve the following ...
0
votes
1
answer
38
views
Getting a JSON circular structure error when updating a model's field
I am building an e-commerce web application with NodeJS with express and MongoDB. I working on an API for storing a product id and quantity in an array that is the user's cart.
This is the user model:
...
0
votes
1
answer
33
views
Symfony - I get circular reference error in index of controller
Hi I'm having troubles getting a list of all "blog tag" entities in the index function of my controller.
I tried using normalizer groups but somehow I still get a circular reference error. I ...
0
votes
1
answer
64
views
How and why interfaces will solve circular references problem?
According to this answer (and many other articles from other sites), interfaces are the solution to solve circular references, but yet none of it explained "how and why"? (except assembly ...
0
votes
2
answers
41
views
Circular import error while trying to implement a new ForeignKey() in Django
I am working on an API project that provides endpoints to front-end. There is a new field must added to related model that is "organization".
Firstly, this field must added to "File&...
0
votes
0
answers
24
views
How to show circular reference in dataframe columns
I am trying to understand the movement of product, the sample dataframe/table is included below.
date
origin
destination
cost
qty
1/1/2022
A
B
50.00
450
1/2/2022
C
D
75.00
540
1/3/2022
B
A
100.00
...
0
votes
0
answers
155
views
json_dumps - ValueError: Circular reference detected
I'm on an error since 2 days and I don't really know what to do ...
I want to display a data frame as a graph in my Flask app using Plotly.
The data frame looks good (Figure1)
The figure is well shown ...
1
vote
0
answers
49
views
mitigating vicious mutually recursive types (Type instantiation is excessively deep and possibly infinite)
I recently learned more about advanced typescript types, and I'm trying to apply what I've learned to accurately type a mechanism we use to specify includes in our REST API.
When GET-ing an entity, ...
0
votes
1
answer
83
views
Dealing with Circular References in Excel when there is no apparent circular reference
Forgive me if this isn't the right place, but I have seen a couple of posts on here relating to excel troubles like this and they don't really help. I am creating a tournament handicap tracker for my ...
0
votes
1
answer
26
views
How Can I Avoid Sql Circular Reference In This Instance?
I have a simple app and in this app there are 2 roles. Role 1 is a Buyer and Role 2 is a Seller. A seller can setup a post to list an item for sale. A buyer can bid on the item in a post the seller ...
1
vote
1
answer
49
views
c++ Handle class circular reference problem
I am not sure if the title of my question is correct and clear enough. I am not a very experienced software engineer.
I have been preparing a 3D geometry library which utilizes handles as i dont want ...
0
votes
0
answers
36
views
MongoDB KMongo Infinite Recursion - Reference to Parent in OneToMany realtionship
I have two classes, the Artist, and the Album.
I would like to embed the Album in the Artist document, but keep a reference to the Artist, and also i want to have a collection with Album document.
...
0
votes
1
answer
58
views
Angular DI circular reference when subscribing
I have two questions.
There is a full code example provided here: STACKBLITZ EXAMPLE
I need some explanation whether I understand it the right way or not. There is a short code snippet from the ...
0
votes
1
answer
96
views
Preact/Fresh Context causes error: Converting circular structure to JSON
I'm trying to create a simple Context object that will hold some global state in my Fresh / Preact app. The problem I am having is that when trying to render the app it throws an error: Converting ...
0
votes
1
answer
23
views
Stripe webhook circular reference
I'm subscribed to stripe webhook charge.refund.updated event. On that event, I need to attach specific metadata to stripe refund entity (accounting needs this data in stripe exports so I need it there)...
0
votes
0
answers
19
views
How does Python generate this result due to circular reference? [duplicate]
I'm reading on Python variables, objects and references, and stumbled on the notion of circular reference. The book presents an example:
L = [1,2]
L.append(L)
L
I tried on Python, the result is:
[1,2,...
1
vote
1
answer
110
views
Why Golang allows circular reference in global scope but not in function scope
As I'm writing DB migrations using gormigrate, I need to define a many-to-many relationship between two structs in a function scope. But in golang 1.19 or 1.18 the following won't compile
package main
...
2
votes
0
answers
65
views
Migration to .NET 6 and WCF
We are migrating our software from .NET Framework 4.5.2 to .NET 6.
As you can imagine, that’s a lot of work to do.
So far, our biggest challenge is the loss of WCF that we try to replace with Protobuf-...
0
votes
1
answer
55
views
Avoid Circular Reference
I am trying to program a counter in column E where if in cell F2=F1, increase the counter, otherwise reset the counter to 1, but I keep getting a circular reference error for that cell. This formula ...
2
votes
1
answer
77
views
Should I refrain from circular imports when using typescript?
I just spent 4 hours troubleshooting typescript error
Object literal may only specify known properties, and 'details'
does not exist in type 'Readonly<{ [x: `details.${string}.value`]:
{ value: ...
1
vote
0
answers
104
views
Circular structure to JSON when deploying
Recently, code that I wrote was being deployed to our server, and an error was thrown during deployment that would appear to be my fault.
TypeError: Converting circular structure to JSON
--> ...
1
vote
0
answers
114
views
Two classes annotate each other in a single file
class BotData:
"""Class holding data of one specific bot"""
common: dict
users: Dict[Union[int, str], dict]
__bots_data: BotsData
# ~~~~~~~...
0
votes
0
answers
87
views
Converting circular structure to JSON angular/rxstate
I am using ng-template and template ref to a templates conditionally. I am also using Rxstate. Following is my html code:
<ng-template #myTemplate>
</ng-template>
Following is my ...
0
votes
0
answers
107
views
Project references itself?
I have a Visual Studio solution that contains a number of projects, most of which build fine. However, one C# dll, called Presentation.dll, won't build, and a number of other projects reference it.
...
-1
votes
2
answers
51
views
Find 'most clicked' variant in an array of objects, given a nested array of variants in Javascript
I have an array of objects called articles. An article has 3 important properties. name, clicks, and variants. The variants property is also an array of objects that contain name (It corresponds to an ...
0
votes
0
answers
161
views
Snowflake: Flag infinite loops in hierarchical data without using cursor in Snowflake
I'm struggling with a SQL code performance issue, while trying to identify in advance circular references of a dataset with approximately 1.5 MO rows candidates.
Before heading into a custom solution, ...
0
votes
0
answers
115
views
If cell contains ["text"], return ["text2"], else...leave it alone
I am using a shared spreadsheet from my company's Sharepoint site, so it's the "online" version of Excel. Basically, If text in column G equals "Classical", I need column I to ...
1
vote
1
answer
61
views
Implement a 'List.map' function that works on a circular list
So, I found out that Ocaml supports the creation of circular lists using let rec.
utop # let rec ones = 1::ones;;
val ones : int list = [1; <cycle>]
That is pretty neat, and it even prints out ...
0
votes
2
answers
151
views
Finding cycles in a dictionary of lists
I have a python dictionary of ids. Each id has a set of other ids to which it references. How can I find circular references within the dictionary?
An example of my dictionary is:
{1: [3], 2: [1], 3: [...
1
vote
0
answers
66
views
Why order of serializing a lambda expression containing a cirular-self-reference matters and can throw a ClassCastException?
ClassCastException is thrown by java8 when a lambda expression which contains a cirular reference via its expression arguments to itself, is deserialized.
The exception only is thrown when the lambda ...
0
votes
0
answers
22
views
rearrange a list multiple times with specific patterns and save all the outputs in a nested list
I'd like to create 15 extra lists from an original list L using a circulant matrix of patterns with the following custom function.
circ_list <- function(L, patterns){
M <- vector(mode = 'list',...
0
votes
0
answers
20
views
How does R garbage collect circular references?
Below are two {R6} classes, Outer and Inner. Outer contains a reference to Inner, which also then contains a reference back to Outer. Only Outer will be instantiated (as x).
Inner <- R6::R6Class(
...
2
votes
1
answer
681
views
Angular Library build: Circular Dependency in template
I am working on upgrading an library from Angular 12 to Angular 13 which is used in another angular application. I have a case where components will be used in cyclic manner.
Example
one.component.ts:
...
0
votes
0
answers
15
views
How to implements circular interface generics in Kotlin [duplicate]
I've these two interfaces in my project:
sealed interface DataInput<T : DataModel<*>> { // <-- here's the deal (the "*")
fun toModel(): T
fun updateModel(model: T): T
...
-1
votes
1
answer
70
views
C++ circular header includes - how can I solve this type?
I implemented a visitor design pattern.
I want to eliminate the circular header includes.
The code below is working, g++ compile it.
I have a file: Classes.h
It has base and derived class declaration, ...
0
votes
0
answers
64
views
Work around for this circular/recursive SQL query in MS Access?
My goal is to append an auto calculated column to my 'Payment' table called 'AllPdUpTo' which would represent a Date data type. So far, I've been trying to perform a query that compares the amount ...
6
votes
1
answer
458
views
Why is Swift compiler complaining about circular reference when I comment out seemingly unrelated code?
Creating a brand new macOS Command Line Tool project in Xcode Version 13.3 (13E113), and replacing the contents of main.swift with the following code:
import Foundation
enum StructA {
// case ...
0
votes
0
answers
85
views
Spring boot circular reference with multi-tenant db setup
It's another one of those circular reference errors in Spring Boot. My log says:
userDetailsServiceImpl defined in file [/home/.../auth/UserDetailsServiceImpl.class]
┌─────┐
| tenantDataSource
└─────...
0
votes
0
answers
45
views
Circular reference in R data frame not able to trace
I am new to R and have a deadline to complete this project where I am stuck in a circular reference kind of problem.
I want to trace the order from Add to execution/cancel, the process include either ...
0
votes
0
answers
93
views
Power BI circular reference on a simple difference
I am trying to create a column in a table being the difference (subtraction) in between 2 fields (numbers).
My first table (Table1) has a lot of columns and in particular the 2 columns (calculated ...
0
votes
0
answers
77
views
Which cell are been calculated when iterative calculation is enable
I have a workbook that contains 20 sheets, 28K formula, VBA code and multiple UDF. I have extensive circular reference and iterative calculation is enabled. One of the sheets when calculated, does 4 ...
-2
votes
1
answer
272
views
VBA select case statements with variable set as relative cell giving off circular reference error
I am looking to utilize the user defined formula below to create a variable (cell_val) that is compared across a number of select case statements to return a specific sumif function result.
the only ...
0
votes
0
answers
288
views
@JsonIdentityInfo doesn't handle circular references correctly in a generic list
I'm serializing and deserializing a list including two objects, with circular references there.
First I tried ObjectIdGenerators.StringIdGenerator as the generator.
//Using latest version for the ...
3
votes
1
answer
921
views
Circular reference error in dependency library
I get this when I try to run my application:
> npm start
Starting the development server...
ts-loader: Using typescript@3.5.3 and C:\DevTools\git\ui.myavis\tsconfig.json
Tried to lint C:/DevTools/...