Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
objects
- Page 1
Re: Calling an object from another in PHP using construct
Programming
Web Development
4 Weeks Ago
by aishamushtaq
To avoid infinite loops when including
objects
of multiple classes in PHP OOP: 1. Use dependency injection to pass
objects
as dependencies. 2. Review class design for circular dependencies. 3. Refactor classes to break cyclic dependencies if necessary.
Re: minimal-mvc: Frugal PHP micro-framework with basic routing and templating
Programming
Web Development
1 Week Ago
by Dani
… an almost necessary way to organize code, work with data
objects
, and work with data stores. For example, in the most…. In the case of DaniWeb, there are Post
objects
, Thread
objects
, Forum
objects
, and Member
objects
, and pretty much all functionality can be accomplished…
Re: minimal-mvc: Frugal PHP micro-framework with basic routing and templating
Programming
Web Development
1 Week Ago
by Dani
> In the case of DaniWeb, there are Post
objects
, Thread
objects
, Forum
objects
, and Member
objects
, and pretty much all functionality can be accomplished…
Re: Unpopular Opinion: Bootstrap+jquery+CI is the best thing since sliced bread
Programming
Web Development
2 Weeks Ago
by pyeri
…, it is just feeble wrappers on top of core PHP
objects
like `$_SESSION`, `$_POST`, etc. With a framework like CodeIgniter, you…
Paris Olympics Ticket Information Chatbot with Memory Using LangChain
Programming
Computer Science
2 Months Ago
by usmanmalik57
… following script. The `chat_history` list will contain `HumanMessage` and `AIMessage`
objects
corresponding to user queries and chatbot responses. Next, while invoking… response. Inside the `generate_response_with_memory()` function, we create `HumanMessage` and `AIMessage`
objects
using the user queries and chatbot responses and add them…
Re: Calling an object from another in PHP using construct
Programming
Web Development
1 Month Ago
by FarrisFahad
… should I create an object? I want
objects
to use other methods from other
objects
. Your example is good ... class A { private…
Using Natural Language to Query SQL Databases with Python LangChain Module
Programming
Computer Science
2 Months Ago
by usmanmalik57
… so, we need a large language model (LLM) and database
objects
. The following script imports the GPT-4 LLM via LangChain…
Calling an object from another in PHP using construct
Programming
Web Development
1 Month Ago
by FarrisFahad
How can I include
objects
in each other using PHP OOP? I have 3 classes all classes make use of one another. I am trying to call them on `__construct` but it's creating an infinite calls to one another. How can I solve this?
Re: Calling an object from another in PHP using construct
Programming
Web Development
1 Month Ago
by Dani
I'm not understanding your question. You can definitely create
objects
within the methods of other classes. As pritaeas says, please post some code so we can understand better.
Re: Extract Tabular Data from PDF Images using Hugging Face Table Transformer
Programming
Computer Science
1 Month Ago
by Harini sri
Hi, Thank you so much for the above code. Its giving better results compared to other libraries. I have few questions. In some tables, I have common column name for three columns and further I have sub columns like below.... in these cases the tables are not getting extracted properly...Do you have any suggestions for handling such cases? Also …
Re: Using Natural Language to Query SQL Databases with Python LangChain Module
Programming
Computer Science
1 Month Ago
by aishamushtaq
very helpful
Re: Calling an object from another in PHP using construct
Programming
Web Development
1 Month Ago
by pritaeas
Show some code of how you expect it to work.
Re: Calling an object from another in PHP using construct
Programming
Web Development
1 Month Ago
by jkon
In every OOP language that I know you can create infinite recursive loops in a construction method . Lets play a bit with it in PHP: class A { private $obj; public function __construct() { $this->obj = new B(); } } class B { private $obj; public …
Re: Calling an object from another in PHP using construct
Programming
Web Development
1 Month Ago
by pritaeas
That causes an infinite loop as described by jkon. I'd go for a container class: ```php class Container { private $A; private $B; private $C; public function __construct($A, $B, $C) { $this->A = $A; $this->B = $B; $this->C = $C; } } $A = new A(); $B = new B(); $C = new …
Re: Calling an object from another in PHP using construct
Programming
Web Development
1 Month Ago
by Dani
I feel like you're going to end up in an infinite loop if you create a new A from the constructor function of class A. Same with class B having `new B()` in its contruxtor, and and C having `new C()` in its constructor.
Re: Calling an object from another in PHP using construct
Programming
Web Development
1 Month Ago
by Dani
Oh, sorry. I didn't see the post by pritaeas.
Re: Objects
Programming
Software Development
13 Years Ago
by Momerath
… values Properties can refer to
objects
or values. Methods are not
objects
, but you can have
objects
that reference methods (events and delegates… statement is almost true :) There are other methods that create
objects
other than using new to instantiate them in the .NET…
Re: Objects as arguments
Programming
Software Development
15 Years Ago
by Ezzaral
"
Objects
are the same" is the entire purpose of the equals() method. [url]http://www.ibm.com/developerworks/java/library/j-jtp05273.html[/url]
Objects
Programming
Software Development
13 Years Ago
by james6754
… passed in to the constructor. I know I can create
objects
myself such as myob1,myob2,myob3 etc and store different… values in those
objects
. What I want to know is..can I make an… do this.. So therefore if I wanted to make new
objects
every time different values are passed in to the constructor…
Re: Objects
Programming
Software Development
13 Years Ago
by james6754
… heap. I am thinking that variables are
objects
, methods are variables, properties are
objects
etc...I think this is confusing me the… if the above are actually classed as
objects
or do you only class the
objects
as instances you create with the new…
Re: Objects
Programming
Software Development
13 Years Ago
by james6754
Hmmm, stumped! It seems like this is going against what I have learnt to now....you say multiple
objects
...do you mean one object would be the set of values in a list or database? If not can you advise anywhere I can read about multiple
objects
..? Thanks James
Re: Objects
Programming
Software Development
13 Years Ago
by Momerath
….Title, bookData); // Object 3[/code] We've create multiple book
objects
and stored them in the dictionary (this is what I… believe your instructor means about multiple
objects
). We can now iterate through all the books if we…
Re: Objects
Programming
Software Development
13 Years Ago
by james6754
Thanks! This is what I thought...you would just create one object..but my lecturer was saying that you create a whole number of
objects
, which I could not understand. But the reality is that you create one object and send values to that object, saving each different set of values as you go! Thanks, understand now!
Re: Objects
Programming
Software Development
13 Years Ago
by Momerath
… to store stuff in a database. As for the multiple
objects
, you'd create one object for each book. Maybe that…
Re: Objects
Programming
Software Development
13 Years Ago
by jay.gadhavi
… c# class, the object will be as below > Form
objects
> Local Variables > Parent Class , and parent class accessible…
objects
> Local, Global Declared ADO Controls, which will be used …
objects
Programming
Software Development
15 Years Ago
by QuantNeeds
…. But now I am struggling with another issue: getting my
objects
recognized. And also, must I always have an object? Because…
Objects
Programming
Software Development
13 Years Ago
by james6754
… something similar to this before. I understand how to use
objects
and what they do etc... What I am struggling to…
Re: Objects
Programming
Software Development
13 Years Ago
by kvprajapati
… storage in the heap. These areas of storage define "
Objects
". Read - [URL="http://www.petebecker.com/js/js199906…
Re: Objects
Programming
Software Development
13 Years Ago
by Momerath
… 'boxes' value types when it needs to treat them as
objects
.
Re: Objects
Programming
Software Development
13 Years Ago
by Momerath
No, int is a value type. [code]Form f = new MyForm();[/code] There is an object :) One way to tell if something is going to be an object is to ask yourself "Can it be set to null?" Value types can't be set to null (though there are nullable value types which are
objects
that act like value types).
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC