object

How to dynamically change the "src" or "data" for a PDF Object / Embed file using JavaScript?

I have a web application that is dynamically loading PDF files for viewing in the browser. Currently, it uses "innerHTML" to replace a div with the PDF Object. This works. But, is there a better way to get the ID of the element and set the "src" or "data" parameter for the Object / Embed and have it instantly load up a new document? I...

Accessing object memory address

When you call the object.__repr__() method in python you get something like this back: <__main__.Test object at 0x2aba1c0cf890>, is there any way to get a hold of the memory address if you overload __repr__(), other then calling super(Class, obj).__repr__() and regexing it out? ...

Php Check If a Static Class is Declared

How can i check to see if a static class has been declared? ex Given the class class bob { function yippie() { echo "skippie"; } } later in code how do i check: if(is_a_valid_static_object(bob)) { bob::yippie(); } so i don't get: Fatal error: Class 'bob' not found in file.php on line 3 ...

Use custom objects as the source for Microsoft Reports (.rdlc)

In some instances, I prefer working with custom objects instead of strongly typed datasets and data rows. However, it seems like Microsoft Reporting (included with VS2005) requires strongly typed datasets. Is there a way to use my custom objects to design and populate reports? ...

LabVIEW Objects

Hi All, I have a base class object array into which I have typecasted many different child class objects and am passing it to a sub vi. Is there any way by which I can find out the original type of the object of each individual elements in the array? Thanks ... ...

What´s your favorite definition/citation of an Object (in general) in OOD? (from a book, a person (Meyer, Booch, Reenskaug, Wirfs-Brock etc..))

There are quite some interesting definitions of what an object in OO is? Please post your favorite definitions and quotes! One of my favorites comes from Trygve Reenskaug: "The object has three properties which makes it a simple, yet powerful module building block: It has state so it can model memory. It has behaviour, so it ...

Java: Save objects in a textfile? Are there readymade solutions?

Hello, I want to save the objects I generated in a program. After restart the App should load automaticly all Objects in an Array. I want to write them in a file and parse them after restart. Are the other smarter possibilities than do it by hand? Thank you ...

Interface Contract, Class Object?

Is contract to interface as object is to class? What is the need to differentiate identical things like this, from the code to the executing code? I sort of get the idea behind naming a class a class and the instantiated executing class an object, but overall, is that the only reason for these semi-redundant terms? ...

Most efficient way to convert an HTMLCollection to an Array

Is there a more efficient way to convert an HTMLCollection to an Array, other than iterating through the contents of said collection and manually pushing each item into an array? ...

When should I use primitives instead of wrapping objects?

Actually here is a similar topic with little practical value. As far as I understand, primitives perform better and should be used everywhere except for the cases where Object-related features (e.g. null check) are needed. Right? ...

Java object to XML schema

Hi, If you have a Java object and an XML schema (XSD), what is the best way to take that object and convert it into an xml file in line with the schema. The object and the schema do not know about each other (in that the java classes weren't created from the schema). For example, in the class, there may be an integer field 'totalCountV...

Design Questions

Hi Im building a windows app in c# and I have the following design question : I have the following object structure : Parent -> Child Collection - > Child - > Grandchild collection -> Grandchild. The use case requires that I use my Parent object in stages. Eg. Make a new instance of parent. Populate parent and save. At a later stage I...

Using C++ from Objective C : how to allocate/deallocate?

Currently, my Objective C classes use C++ objects by doing a new when the owner is created, and calling delete when it is destroyed. But is there another way? I'd like to be able to declare, say, an auto_ptr whose scope lasts the duration of the Objective C class' lifetime. ...

Variable variable class extensions in PHP--is it possible?

Is something like the following possible in PHP? $blah = 'foo1'; class foo2 extends $blah { //... } class foo1 { //... } This gives an error. I want to dynamically set $blah so I can extend whatever class I want. Edit: The reason for wanting to do this because I wanted to use a function out of another class in a related cl...

how to object initialize in PHP and then what function do I make within the class which runs automatically ?

hi i forgot the code which in a sample class you have to add so that it runs automatically? is it wakeup or something? like so: class something { function automaticxxx_something_which_runs when class is created() { } } $s = new something(); -what do i create in the class file so that something runs already after the class is ini...

Do C# objects know the type of the more specific class?

Suppose you create a generic Object variable and assign it to a specific instance. If you do GetType(), will it get type Object or the type of the original class? ...

Vectors in Java, how to return multiple vectors in an object...

I'm working on a java program, and I have several vectors defined and filled (from a file) inside a method. I need to return the contents of all the vectors from the method. I have heard you can put them all in one object to return them. Is that possible, and if so, how? If not, do you have any possible solutions for me? Thanks in a...

Visual Basic6.0 object cannot drag to move

i am a newbie for visual project,i have downloaded some of the totorial to testing,however i found the object in those project are not able to drag to move or editing, anybody know is it have a object lock function in VB,if got how can i unlock it ...

How the basic link process works for ELF and PE

I've always been confused about how the linker works, and it's a difficult subject to search for. To demonstrate my question and to provide a framework for an answer, I'll put down what I know (or think I know) so far. I may be very wrong. :) First, each .cpp file is built into an intermediate file (.o for Posix/ELF and .obj for Win/PE...

Variable/Ram viewer for .NET?

I'm using Office Automation in .NET. It is leaving behind the excel.exe program. I know the fix - it is all about explicitely defining the variables. Once defined, I can properly de-allocate the ram and the GC will clean them up. The problem is, I have literally thousands of lines of code to go through. So I'm wondering: Is there some s...