Questions tagged [instances]

An instance is a specific realization of any object.

516 questions
2
votes
3 answers

Problem opening excel 2007 in new instance using VBA (using OLE and bound object frame)

I have problem creating new instance of excel 2007 using VBA (from Access 2002). At first I misunderstood the problem and it is more complicated than I thought. Set myXL = CreateObject("Excel.Application") Creates new processes (I thought it…
Pawel
  • 637
  • 8
  • 14
2
votes
0 answers

Django - processing objects after .filter(...) or .all(...)

Still learning Django, so not sure if there's a nice way to do this. I have a few models with specific attributes (all use Item as base class), and a metadata table (id, language, type, value) used to store any extra attributes that could be…
btk
  • 3,158
  • 2
  • 29
  • 30
2
votes
4 answers

Python: Summing class instances inside a list

I am familiar with the built-in sum() function for lists and have used it before, eg: sum(list1[0:41]) when the list contains integers, but I'm in a situation where I have instances from a Class and I need them summed. I have this Class: class…
indigo
  • 1,067
  • 4
  • 15
  • 26
2
votes
2 answers

When chaining .NET delegates, how are the original instances (re)used?

Say I have the following C# code: Action a = TestMethod; Action b = TestMethod; Action c = b; b += a; Tests indicates that b is not the same instance as c, so clearly the + operator seems to create a new instance of the delegate. Is this a correct…
Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825
2
votes
2 answers

AS3 get an array of all instances of a class on a stage?

Assume I have the myCircle class all defined and all that. If my code is as follows: var circle1:myCircle = new myCircle() var circle2:myCircle = new myCircle() var circle3:myCircle = new myCircle() var circle4:myCircle = new…
Electriczap4
  • 47
  • 1
  • 6
2
votes
2 answers

Multiple instances of views with Prism and MEF

I need to instanciate many instances of the same View of a Prism module. I am using MEF: The Codeplex version has the ExportFactory attribute that allows multiple instance creation but Prism uses the .Net desktop version that has not this…
2
votes
6 answers

Python get instance from list based on instance variable

Given a list of instances, say clients I'm trying to pluck an item from the list based on the value of a single instance variable screenName. I know I can do this: for client in clients: if client.screenName = search: return client But is…
Fred
  • 1,021
  • 5
  • 13
  • 29
2
votes
6 answers

Question about Javascript properties and instances

I can't figure out myself why foo.bar in the example is undefined, could you explain? var foo = "foo"; foo.bar = "baz"; console.log(foo.bar); // undefined Q2: How do I add references to properties and methods to the String instance foo? Help is…
Paolo
  • 20,112
  • 21
  • 72
  • 113
2
votes
0 answers

Which security rule should be used to restrict communication between two instances in the same network in Openstack?

I've installed Openstack Queens v. in my CentOS VM. I'm trying to restrict the communication between two instances in the same network. I know that a security rule can do it. Can any one tell me which rule should be used or we need to create a new…
Vamsee Bond
  • 163
  • 1
  • 11
2
votes
4 answers

Base class instance in inheritance

Hope I'm not asking something that has been already answered in here. If my class B inherits from class A, does new B() create two instances in heap where B instance contains pointer to A instance, or there will be created only one instance of B…
cembo
  • 1,039
  • 2
  • 9
  • 18
2
votes
1 answer

Cron job set up on multiple instances of magento

Does anybody have any experience with Magento module level cron jobs across multiple instances of the application? I know Magento adds the cron records to the cron_schedule table - would each instance of the Magento application add it's own call to…
dbcn
  • 641
  • 1
  • 9
  • 20
2
votes
2 answers

Vertx - Stop a verticle instance

I have this vertx code : DeploymentOptions deploymentOptions=new DeploymentOptions(); deploymentOptions.setInstances(2); I want to know how to stop or kill one instance of the set instances. Thanks.
ZAID SAHIL
  • 31
  • 5
2
votes
0 answers

Connecting randomly selected questions from a list to their answers in another corresponding list (trivia game)

Here is my code for a trivia game that is supposed to present 5 questions and then have 4 multiple choice answers where one is correct. The user is supposed to guess and then the amount correct at the end is displayed. My issue is randomly gathering…
tm13
  • 21
  • 2
2
votes
1 answer

Oracle DB Multiple Instances configuration

I am using Oracle database in my local PC. I have 3 instances database running. My question is, Do i need to specify different listener for each SID in my machine? or I can just have 1 listener on port 1521 for every SID? If I need to create each…
Raspi Surya
  • 315
  • 2
  • 11
  • 28
2
votes
1 answer

cannot show result from an instance function in haskell

class (Eq k, Ord k, Show k) => KEY k where keyBuild :: NumId -> NumId -> NumId -> k keyDummy :: k keyFromList :: [NumId] -> k -- keyGenerate :: (DATAPOOL p) => p -> Int -> [k] -- p = Pool k e s newtype PrimaryKey = PK (NumId,…
EntroKay
  • 23
  • 3