object

Class Loading vs. Object creation in Java

Hi all ! I am very confused over the time at which memory is allocated to Java programs. Is it "partially done" when the class is loaded ? I have read class lifecycle to be loading-> linking-> initialization->unloading. Wouldn't some memory be consumed in these processes, even though we are NOT creating object of that class ? I am also...

Iterating over json object for drawing a column chart?

I use, google.load('visualization', '1', {'packages': ['columnchart']}); //google.setOnLoadCallback(drawChart); function drawChart(response) { alert(response.customerlist); var data = new google.visualization.DataTable(); data.addColumn('string', 'dbZipcode'); data.addColumn('string', 'countusers'); data.addRows(resp...

Fastest way to get an Objects values in as3.

Ok, so I swear this question should be all over the place, but its not. I have a value object, inside are lots of getters/setters. It is not a dynamic class. And I desperately need to search an ArrayCollection filled with them. The search spans all fields, so and there are about 13 different types of VOs I'll be doing this with. I've t...

Reference Counted Objects and multiple Allocators

Hi Guys. This is a design question, assuming C++ and a reference counted object hierarchy. A lot of classes in my codebase derive from a common base class (ObjectBase), which implements retain() and release() methods to increase and decrease the reference count of an object instance. Every instance of an object may be created on the st...

Specify embeded flash object directory?

How should I change the following code if I want to put my flash object into a directory named "flash/", I tried changing the value to "flash/photo.swf" but it didn't work. <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="...

How to add an object into another Object set.

I have two classes. One(Person) for getters and setters, and another(People) for compute the data. What is my situation is, I get the data from the DB using ResultSet, then created a person Object to store the row data. Then i created people Object to store all persons. Each Object created as SET. while(rs.next()) { Set<People> p...

python: changing dictionary returned by groupdict()

Is it safe to modify a mutable object returned by a method of a standard library object? Here's one specific example; but I'm looking for a general answer if possible. #m is a MatchObject #I know there's only one named group in the regex #I want to retrieve the name and the value g, v = m.groupdict().popitem() #do something else with m...

CORBA: Can a CORBA IDL type be an attribute of another?

Before I start using CORBA I want to know something. It would seem intuitive to me that you could use an IDL type as an attribute of another, which would then expose that attribute's methods to the client application (using ".") as well. But is this possible? For example (excuse my bad IDL): interface Car{ attribute BrakePeda...

I am trying to create an array of objects inside a header file which is failing (Starting C++ Programmer)

EDITED BELOW FOR UPDATES!!! Thank you for the help, please by all means point out ALL mistakes , I don't care if it sounds rude or mean or whatever, emo junk. Just give it to me straight so I can understand what is going wrong. Hi everyone! I am a rookie C++ programmer trying to learn and gain some IRL exp for C++. I am attempting the...

c# readonly object

Is there any way to return a readonly instance of an object? public class Person { public String FirstName { get; set; } public String LastName { get; set; } } public class SomeClass { public SomeClass(Person manager) { if (manager == null) throw new ArgumentNullException("manager"); _manage...

Django / Python, using variablized object names

I'm confused on how to do this, I'm passing in a dictionary with different values, such as "app" which is the name of the app (so that I can better decouple code for easier modularization).. so this is just a simplified example and its not working so I'm wondering how to use the variable "app" within the string that is calling the models...

Keep two-way binding when whole object has changed

I have a class: Public Class TestClass Implements INotifyPropertyChanged Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged Public Sub OnNotifyChanged(ByVal pName As String) RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(pName)) End Sub P...

C# typed Object input/output property connection graph - Quartz Composer style implementation

The first part of the problem is that I don't know if there's a specific name for a system like this :) In my app I need a system to give the user the ability to interconnect object-properties; objects can have inputs and outputs, and inputs of one object can be connected to outputs of other objects. Optionally type-converters can be us...

Renaming object keys(variables) in javascript

Hello, I am having an object with variables named [0...10] and few variables with normal names. I delete one of them with delete obj[3]. Then there is a gap in this sequence. I want to arrange them now from [0...10]. My first though is to loop through and rename keys(variables). How I can do it? P.S. - Object cannot change its structu...

Use RecursiveDirectoryIterator to list directories and files into array?

I'm having a directory with this structure : main/ |- images/ |-- file1.jpg |-- file2.jpg |-- file3.jpg |- documents/ |-- private/ |--- blahblahblah.docx |-- test.doc |-- test.xls |-- test.txt I can create a function to complete the work but the RecursiveDirectoryIterator class is much faster and less memory usage this time. How ...

Objects passed by reference?

If I have an object 'Hotel' which has a few set properties and I pass it to another object which populates more of its properties and then releases it will the first class see these values? ...

How to apply __str__ function when printing a list of objects in python

Well this interactive python console snippet will tell everything: >>> class Test: ... def __str__(self): ... return 'asd' ... >>> t = Test() >>> print t asd >>> l = [Test(), Test(), Test()] >>> print l [__main__.Test instance at 0x00CBC1E8, __main__.Test instance at 0x00CBC260, __main__.Test instance at 0x00CBC238] ...

Native JSON support in iOS?

Is there a class to parse JSON from a server in the iOS SDK? (similar to NSXML for XML and by extension RSS.) ...

Multidimensional array of object in C++ , I can not initialize it!

Hi everyone! Rookie C++ Programmer here again I'm using VC++ VS2008 and making an attempt at creating an array of arrays. All objects I wish to store I want to put on the heap. In the arrays it's all just pointers. Here's some code: Grid.h #include "Tile.h" class Grid { public: Tile* grid_ptr[8][8]; ... ... }; Grid.c...

getting null value for particular column, while loading the object.

I have an entity bean which is made using Hibernate annotation. @Entity @org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true) @Table(name="[tbDDE]") public class DElement implements Serializable{ @Column(name = "[ID]", nullable = false, unique=true, updatable=false, insertable=false) @GeneratedValue(strateg...