723 questions
0
votes
0
answers
46
views
apache camel smpp and lazy-start-producer for a TRX connection
I am having an issue where my camel SMPP routes won't start up if any one of the two SMPP servers are not available at the point the spring-boot application is started.
To combat this, I have found ...
0
votes
0
answers
52
views
Could not write JSON: failed to lazily initialize a collection ...Project.issues: no Session
Project Name: Project-Manager
I am trying to implement a service class which would fetch all the projects or single projects from the DB by id but in both the cases I am getting this lazy ...
2
votes
1
answer
306
views
Naming convention for private properties with backing field in C#
Is there an official naming convention for private properties?
I use them for lazy initialization of expensive fields:
private string _veryExpensive;
private string VeryExpensive => _veryExpensive ?...
0
votes
1
answer
50
views
What are Lazy Properties good for? What's their aim?
What is the purpose, respectively the aim, of a lazy property?
Kotlin-language documentation: https://kotlinlang.org/docs/delegated-properties.html#lazy-properties
Saving memory? Or is it something ...
2
votes
1
answer
51
views
Scala initialization order object vs. val
In the following program an object is reported as null, even though it is clearly initialized.
class MyClass()
class MyOtherClass(c: MyClass)
object Foo {
val myClass = new MyClass()
object ...
0
votes
1
answer
48
views
Spring boot: dependency cycle between beans could not be broken
I am working on creating an Airline website using Spring Boot. I have a Seat class and a Flight class which represent tables in the database. The idea is that whenever a flight is added, seats for the ...
0
votes
1
answer
33
views
TransientObjectException during commit when adding entity to an uninitialized lazy collection in Hibernate
Assume, we have two simple entities Parent and Child like the following:
@Entity
public class Parent extends BaseEntity {
private String content;
@OneToMany(mappedBy = "parent", ...
0
votes
1
answer
44
views
Instantiate lazy val which depends on runtime parameter in concurrent env
I need to instantiate MyHttpClient as Singleton. MyHttpClient is used by multiple threads.
Solution below works, but it's ugly and should have issue with endpoint, I just didn't hit it yet.
endpoint ...
-2
votes
1
answer
334
views
Selenium WebDriver PageFactory Webelement initialization
I have more than 500 web-elements in a webpage. If I use Page Object Model with PageFactory.initElements() in selenium it will initialize all the elements once the object is created.
Lets says I am ...
1
vote
0
answers
107
views
Issue with Re-rendering of Horizontal ScrollView Inside Vertical ScrollView in SwiftUI
I am encountering an issue with re-rendering of a horizontal ScrollView inside a vertical ScrollView in SwiftUI. The vertical ScrollView contains multiple horizontal ScrollViews, each displaying a ...
1
vote
1
answer
219
views
Using AtomicReference for lazy init
can the lazy init be done safely this way? We had a dispute where a colleague was claming for some first threads it could fail and they would see the null value.
public class TestAtomicReference {
...
0
votes
1
answer
235
views
How to Initialize Redux Store asynchronously?
I have a Next.js Application and for State Management I am using Redux Toolkit. Now, to maintain authentication status in frontend side, I need to take the existing token and send it to backend for ...
1
vote
1
answer
514
views
Am I using in a wrong way async lazy initialization?
I have a view model with 2 collections, that takes the data from database. For example countries and type of VAT.
I would like to defer the initialization of this collections until I will, becauase if ...
0
votes
0
answers
38
views
Fortran: Initialization of allocatable array with another array [duplicate]
I read a Fortran code :
program t
real :: x(5) =[1.,-2.,3.,-4.,5.]
real,allocatable :: y(:)
y = x
...
For me the normal way is
allocate(y,source=x)
I'm surprised that it works, both ...
1
vote
2
answers
193
views
Racy Single-Check Idiom with Intermediate Result
The racy single-check idiom is a technique for lazy initialization without synchronization or volatile. It can be used when initialization is allowed to be performed concurrently by multiple threads, ...