objects

StreamCorruptedException: invalid type code: AC

my problem is when it tries to read the object the second time, it throws the exception java.io.StreamCorruptedException: invalid type code: AC at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1356) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at Client.run(BaseStaInstance.java:313) ja...

How do i free objects in C#

Hi, Can anyone please tell me how I can free objects in C#? For example, I have an object: Object obj1 = new Object(); //Some code using obj1 /* Here I would like to free obj1, after it is no longer required and also more importantly its scope is the full run time of the program. */ Thanks for all your help ...

Auto Generate Objects in DBIx::Class ORM in Perl

Hello, I started learning DBIx::class and I reach the point where you have to create the Objects that represents tables. Should this classes be created manually ( hard coding all the fields and relationships.....) or there is a way to generate them automatically using the database schema. I read something about loaders, but i did not kn...

session_start() is causing an object to become non-object

Hi, I have this class that have a function to load other classes and create instances. if you used this class like this: $test = new test(); $test->load("email"); it works perfectly as expected but when using session_start(); $test = new test(); session_start(); $test->load("email"); an error is created and nothing else is ...

C#: how do you refer to content in Program.cs in a form.cs?

I am trying to place a value (from an object) in a variable and place it in a textbox in a form. Here is the form code: public Form1(Deck mainDeck) { InitializeComponent(); int Val = mainDeck.ReturnCard(10); textBox1.Text = Val.ToString(); } mainDeck is an object in my Program.cs file The problem line...

Get the "key" of an object in Actionscript-3

Given an Object: myObj = {key : 'value'} How do I get the key? ...

JavaScript Object Question

What I want to do with the fs object is to add multiple "items" to the fs.items property. How can I do this? You can see my attempt below, obviously this does not work. I am a beginner, go easy on me :) Thanks... var fs = { name:'test', items:[] }; fs.items = { name:'item1', value:1 }; fs.items = { name:'item2', ...

How can I view my BO report SQL in database (I mean in any of the BO table)

I need to view my "BO report SQL" in database rather from web through edit query. How can I achieve this? Please help me out and provide me the steps. It may be in BO repositry OR ...

remove json attribute where attribute is a variable

I have a news feed where items in the feed are created from JSON returned from a server. When the user takes an action on an item, I want to remove it from the object via javascript. The feed looks like this: {"newsFeed":[{"feedId":"1", "title":"item1 title", "desc":"description of the item"}, {...

Referencing to objects from anywhere in Cocoa

What's the best way to reference to a dynamically allocated object (particularly interface elements) so I can access them from everywhere in the current class? @synthesize? declaring the object in the interface section? anything else? ...

How to create a dynamic key to be added to a javascript object variable.

I'm trying something like this, but this example does not work. jsObj = {}; for (var i = 1; i <= 10; i++) { jsObj{'key' + i} = 'example ' + 1; } What can I do to make a dynamic key like this? Thanks, Ryan ...

Python: override __init__ args in __new__

I have a __new__ method as follows: class MyClass(object): def __new__(cls, *args): new_args = [] args.sort() prev = args.pop(0) while args: next = args.pop(0) if prev.compare(next): prev = prev.combine(next) else: new_args.append(prev) prev = next...

Microsoft office 11.0 (Word & Excel) Object Library work with Office 12 (Word & Excel) for VB6

Hi all friend; I have an application using VB6 and I use Microsoft Word 11.0 object library and Microsoft Excel 11.0 object library to use for the report purpose. But there are some computer in my work place using Microsoft Office 2007, so they cannot generate the report (with excel chart) from my application. I try to use late bindin...

PHP - warning - Undefined property: stdClass - fix?

I get this warning in my error logs and wanted to know how to correct this issues in my code. Warning: PHP Notice: Undefined property: stdClass::$records in script.php on line 440 Some Code: // Parse object to get account id's // The response doesn't have the records attribute sometimes. $role_arr = getRole($response->records); // ...

Flex - Use Variables for Object Attribute Names

How do you use variables to access Object attributes? Suppose I have an Object declared as follows, var obj:Object = new Object; obj.Name = "MyName"; obj.Age = "10"; How would i do something like this, var fieldName:String = "Name"; var fieldAge:String = "Age"; var Name_Age:String = obj.fieldName + " ," + obj.fieldAge; The code ...

C++ Switch Statement Case Error

I'm programming a simple text-based RPG using a switch statement for a game loop. The program works fine until I attempt to add another case statement, at which point it gives me the following three errors: "jump to case label" (error occurs at the line of the newly added case), and two "crosses initialization of 'ClassName *objectName'"...

Cleaning up a dynamic array of Objects in C++

I'm a bit confused about handling an array of objects in C++, as I can't seem to find information about how they are passed around (reference or value) and how they are stored in an array. I would expect an array of objects to be an array of pointers to that object type, but I haven't found this written anywhere. Would they be pointers,...

Creating New Object of Other Class dynamicly ?

I am tryıng to create new object of other class ın a for loop. like for(int i =0;i<10;i++){ Computer p1=new Computer(10,20); } and when I try anywhere to reach p1.someAction(); it say you must declare p1. But if I declare it on top of program how can I create again in loop? I also try only Computer p1; but it gave exeption .. ...

Managing many objects at once.

Hi, I want to find a way to efficiently keep track of a lot of objects at once. One practical example I can think of would be a particle system. How are hundreds of particles kept track of? I think I'm on the right track, I found the term 'instancing' and I also learned about flyweights. Hopefully somebody can shed some light on this and...

Most efficient way to combine two objects in C#

I have two objects that can be represented as an int, float, bool, or string. I need to perform an addition on these two objects with the results being the same thing c# would produce as a result. For instance 1+"Foo" would equal the string "1Foo", 2+2.5 would equal the float 5.5, and 3+3 would equal the int 6 . Currently I am using th...