Questions tagged [instances]

An instance is a specific realization of any object.

516 questions
6
votes
1 answer

proper way to store class instances in python app

I am trying to understand what's the best way to store class instances in an app, so that I access the attributes right and invoke each class method right. I would like the solution to work with ORM i.e. SqlAlchemy and add GUI in the end. Let's say…
simplynail
  • 313
  • 1
  • 4
  • 13
6
votes
1 answer

Python- creating object instances in a loop with independent handling

I have a simple election program. The following are the requirements: class Politician Randomized votes. Taking number of politicians as input from user. num_politicians = input("The number of politicians: ") Looping and creating instances names…
AkaiShuichi
  • 144
  • 1
  • 1
  • 9
6
votes
1 answer

Is there a Haskell (GHC) extension for partial type synonym instances?

Using the extension TypeSynonymInstances it is possible to write an instance like that: instances MyClass String where ... Using newtype it is possible to declare an instance like that: newtype Kleisli m a b = Kleisli (a -> m b) instance MyClass…
scravy
  • 11,904
  • 14
  • 72
  • 127
6
votes
1 answer

Programmatically spawn new instances of a worker role

Is it possible to programmatically spawn new instances of a worker role? I have a worker role that's dependent on some Service Bus queue(s) where it grabs the messages and puts the data into Table Storage, SQL Database and sends out notifications. I…
user2413912
  • 579
  • 6
  • 19
6
votes
1 answer

jQuery Isotope - Multiple Instances on the same page

I've been working with the Isotope plugin for jQuery, and I've run into some problems with our homepage which requires two isotope instances. Both of them have different types of items and they are kept in their own containers, but when I click a…
Ben Wilson
  • 63
  • 1
  • 4
5
votes
3 answers

Azure inter-role synchronization

I was wondering about the best practices in synchronizing multiple azure instances that run the same role. More precisely, I want to prevent several worker roles to work on the same work-unit. Azure queues do not seem to help on this matter. One…
Flavius
  • 111
  • 1
  • 12
5
votes
2 answers

Tomcat 6.0 and Eclipse. Multiple instances of the server behave differently

I have Tomcat 6.0 installation on my Win7 PC. I used 64/32bit windows installation. In Eclipse I was able to set paths and set server to use my Tomcat installation. Everything seems working fine until I run server from inside Eclipse. I noticed that…
bobetko
  • 5,019
  • 14
  • 58
  • 85
5
votes
3 answers

AWS Spot/OnDemand Instance Management

Is there a way to elegantly Script/Configure Spot instances request, if Spot not available in some specified duration, just use OnDemand. And if Spot instance gets terminated just shift to OnDemand. Spot Fleet does not do this (it just manages only…
Sam-T
  • 1,877
  • 6
  • 23
  • 51
5
votes
1 answer

find instances of a form in vb 2008

Dim f as new frmNameHere f.show() How do I find all instances of frmNameHere created using the above code?
5
votes
3 answers

Number of instances needed for windows azure application

I'm fairly new to Windows Azure and want to host a survey application that will be filled out by appr. 30.000 users simultaniously. The application consists of 1 .aspx page that will be sent to the client once, asks 25 questions and will give a…
5
votes
1 answer

@Autowire combined with @InjectMocks

I have a Spring boot project which has a suite of unit tests which use mockito's @InjectMocks to both instantiate the class being tested and inject any mocks which may be present into it. In other words if I have this @InjectMocks MyClass…
megaman
  • 1,035
  • 1
  • 14
  • 21
5
votes
2 answers

AWS Spot Instances: Does the capacity-not-available Spot Bid Status Code mean no instances are available?

I am writing code to track spot requests using the the documentation from this page: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-bid-status.html. Is there any guarantee that if the capacity-not-available status code is…
jeremiah
  • 61
  • 1
  • 1
  • 5
5
votes
2 answers

How PHP's instance numbering system works

I have been using PHP for ages, but there is one part that I have never really learnt about, and have been wondering recently. When I perform the following: var_dump(new test()); var_dump(new test()); var_dump(new test()); var_dump(new test()); I…
topherg
  • 4,203
  • 4
  • 37
  • 72
5
votes
2 answers

Multiple webRole instances at Azure and session state

I have webRole with some data stored in Session. The data is some tens of small variables (strings), and one-two big objects (some megabytes). I need to run this webRole in multiple instances. Since two requests from the single user can go to…
user224564
  • 1,313
  • 1
  • 10
  • 14
5
votes
2 answers

Can a class in ruby store the number of instantiated objects using a @class_instance_variable and not a @@class_variable?

I am trying to keep count of instances of objects of a given class, inside the class that defines those objects. First of all I am aware of code reflection and ObjectSpace.each_object, but I'd prefer not to use reflection and let the class itself be…
Redoman
  • 3,059
  • 3
  • 34
  • 62
1 2
3
34 35