Questions tagged [instances]

An instance is a specific realization of any object.

516 questions
0
votes
2 answers

Actionscript 3.0 - Sort an array of instances by their properties?

I have an Array which has Class instances in it. These class instances have several properties. Let's say I want to sort this array by the name property of each instance. public class Thing { public var name:String; public function…
0
votes
1 answer

Cocoa:Testing for the same object with ifs/switches

Ok so here's my code, it works great: - (void)textViewDidChange:(UITextView *)textView{ if (textView==someObject) { [detailItem setValue:textView.text forKey:@"someObjectAttribute"]; } The problem is that I have lots of textviews instances to…
0
votes
1 answer

Access two instances

I want to program a small game in C++. I want to write a method "attack" that sets the states of the figure after an attack. I have two instances the player and the enemy. The class looks like: class figure { private: string name; …
E1M1
  • 1
0
votes
1 answer

How can I add event listener only for THIS object instance

I've got a basic jQuery plugin. This plugin can have multiple instances. The problem: every time new instance is created, a click event will fire in all instances. I just want to limit the event to one particular instance. Your answer would be much…
0
votes
0 answers

Docker - Multiple MySQL instances/containers running at the same time

Is there a way to allow multiple MySQL instances/containers to run at the same time?
Hans
  • 451
  • 1
  • 6
  • 20
0
votes
1 answer

Google compute engine list / instances delete fails regexp

I created a private image of a Google compute engine persistent disk, called primecoin01. Later on, I'm trying to create a new image. It fails by saying the regexp is invalid both in listing the images and during gcloud.compute.instances.delete -…
0
votes
1 answer

It is related to core java enums

what is singleton instances of the enumeration class in java?
0
votes
3 answers

How to determine current class type?

I had 2 classes, B and C, who needed to keep track of their instances, so each of them has an ArrayList of their respective types to which instances were added in the constructor. Since this seemed like common behaviour, I tried to find some sort of…
0
votes
3 answers

Can an instance complete its arguments later?

I wonder if there is any way that I can declare a new instance with parameters, do not fill them, and just set them later. Here is an example: private Example example = new Example() // Need 1 parameter. public void foo(Object arg1) { example =…
Thanos Paravantis
  • 7,393
  • 3
  • 17
  • 24
0
votes
0 answers

PHP OOP: How to avoid exended classes inheriting class instance variables?

I am converting an existing web site from procedural PHP code to OOP. I'd like to set a Permissions class that contains information, such as $USER data, relevant to multiple extended classes (i.e. Database, Login, Validation, etc). Am I able to set…
0
votes
2 answers

GoLang- PostForm request for updating one of the resources of Cloudfoundry App

I'm writing go code to access cloudfoundry platform and extract summary of data for all the apps that have been pushed on the cloud. I can access every app individually and display the data related to each through an http.GET request but I want to…
Anupma Raj
  • 9
  • 2
  • 5
0
votes
3 answers

how to get PID of my app at runtime using C#

My app checks at startup if any other instance of the same is running already, if yes then it will close all other instances. For this I tried using Process.GetProcessByName("AppName") function and store all the process with AppName in processes[]…
Sanyam
  • 3
  • 1
0
votes
1 answer

Run batch file in independent environment

I'm trying to run multiple instances of the same .bat file. The batch file opens up other programs which when running multiple instances causes connection errors. Is it possible for me to run these batch files in separate "environments" where all…
Coyney
  • 107
  • 1
  • 2
  • 6
0
votes
2 answers

Multiple Instances of Ajax Uploader on the Same Page

I developed an ajax file uploader and it works great if the one instance is on the page. I'm trying to convert it to allow multiple instances, and it almost works, EXCEPT, when I'm uploading multiple files in one form, it uploads the first file…
0
votes
0 answers

Changing instance name for multiple text input boxes

HI i am new to flash scripting and i find it annoying when i have to type instance for a number of text input boxes. Is there any extension where i can change the instance name for all the boxes in 1 shot?
Arun
  • 1