Questions tagged [custom-object]
202 questions
120
votes
2 answers
Getting a Custom Objects properties by string var
Possible Duplicate:
javascript object, access variable property name?
Trying to get more advanced in my JS...
I have a custom object:
Object myObject = new Object();
myObject.thing = anythingHere;
I would like to be able to retrieve a custom…

Jay-Nicolas Hackleman
- 1,355
- 2
- 9
- 7
70
votes
9 answers
Searching in a ArrayList with custom objects for certain strings
I have a ArrayList with custom objects. I want to search inside this ArrayList for Strings.
The class for the objects look like this:
public class Datapoint implements Serializable {
private String stateBased;
private String name;
private…

Mokkapps
- 2,028
- 9
- 42
- 67
28
votes
4 answers
Type safety: Unchecked cast from Object to List
I have a ListView listing a custom object (let's say MyObject).
I want to filter it dynamically through an EditText so I had to implement a getFilter() with a publishResults method:
@Override
protected void publishResults(CharSequence constraint,…

Eloi Navarro
- 1,435
- 1
- 14
- 26
14
votes
5 answers
how to send a custom object as Job Parameter in Spring Batch?
I have a requirement of sending a Custom Object to the Spring Batch Job , where this Object is used continuously used by the Item Processor for the business requirement.
How can we send custom object from outside to the Job Context. This Object…

ravinder reddy
- 309
- 1
- 4
- 17
9
votes
2 answers
Rendering a JSON object of a join-model and its associated models
In a Rails ( 4.1.5 / ruby 2.0.0p481 / win64 ) application I have a many-to-many relationship between Student and Course and a join model StudentCourse which represents the association, and has an additional attribute called started (set by default…

Redoman
- 3,059
- 3
- 34
- 62
7
votes
1 answer
Swift: Store arrays of custom classes in Core Data
I'm new to Core Data but for a new project of mine, I would like to save my data to Core Data.
I want to create a Reptile-class which contains a couple of custom class arrays. Without Core Data I would have something like this:
import…

Kevin De Koninck
- 144
- 1
- 12
7
votes
4 answers
Passing custom List of data using Bundle
I'm developing a simple app, that contains tabview with fragment. I am stuck at the place, where i have to pass data to my newly created fragment on tabselect.
I have a List of lists of my custom class objects:
List
- >…

xenuit
- 97
- 1
- 1
- 9
7
votes
3 answers
Implementing hashcode and equals for custom classes
So I have many custom classes are also have custom clases inside of them using composition.
My custom classes have variables that change very frequently and I add them to HashSets. So my question is when I implement hashCode
- what should I do for…

letter Q
- 14,735
- 33
- 79
- 118
6
votes
1 answer
Powershell Custom Objects: How To Acess NoteProperty of collected result
Reading through an Article about custom Objects:
http://technet.microsoft.com/en-us/library/ff730946.aspx
I wonder why i get a result for the individual entry: e.g $objAverage.Name
while by $colAverages.Name nothing is returened.
Although with…

icnivad
- 2,231
- 8
- 29
- 35
6
votes
2 answers
iOS custom object initialization Error
I have a custom object ProductCategory.
.h file:
#import
@interface ProductCategory : NSObject
@property int productCategoryId;
@property NSString *name;
@property NSArray *children;
@property int parentCategoryId;
-…

Ale
- 2,282
- 5
- 38
- 67
5
votes
3 answers
What is the best way to save an NSMutableArray to NSUserDefaults?
I have a custom object called Occasion defined as follows:
#import
@interface Occasion : NSObject {
NSString *_title;
NSDate *_date;
NSString *_imagePath;
}
@property (nonatomic, retain) NSString *title;
@property…

Ali
- 4,205
- 4
- 25
- 40
5
votes
1 answer
ValueError: Unknown layer: Custom>CTCLayer. Please ensure this object is passed to the `custom_objects` argument
I would like to use the trained model described in Keras's Handwriting recognition Example, in another application and tried to load the model with the following;
from keras.models import load_model
from tensorflow import keras
model =…

Hiroji
- 51
- 2
5
votes
3 answers
How to get the unique id's of objects in an array swift
I have a custom class like this -
class Event: NSObject
{
var eventID: String?
var name:String?
}
Now i have an array of Event object's like
var events = [Event]()
var event1 = Event()
event1.eventID = "1"
event1.name = "Anu"
var…

Anupam Mishra
- 3,408
- 5
- 35
- 63
5
votes
6 answers
Set custom class object's value with '=' operator in Java
I have a custom object that has a single value of type int that I wanting to do processing on to keep this value in a set range. My question is this: Given the following class, can I set it's value with myObject = 0;
public class foo{
private…

Xandor
- 440
- 1
- 9
- 22
4
votes
1 answer
iCloud - How to save archive containing array of custom objects
I have developed a small app that stores locally in iOS through archiving an array of custom objects containing:
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *dateCreated;
@property (nonatomic, copy)…

Will
- 303
- 3
- 9