An instance is a specific realization of any object.
Questions tagged [instances]
516 questions
3
votes
1 answer
How to create instances of a base character class
In order for a class to be attached to a GameObject it needs to inherit from MonoBehaviour. If I create a base character class that contains all the attributes shared by both NPCs and PCs, how do I create instances of that class and attach it to…

OwenAlexander
- 155
- 1
- 6
3
votes
1 answer
What makes fmap work here without an explicit method declaration?
One of the exercises in Real World Haskell, ch. 24, asks to implement a strictness wrapper around Control.Concurrent.MVar. I am doing this, as suggested in the book, by using a newtype MVarS wrapper to ensure that evaluate is applied to whatever…

Pablo
- 819
- 8
- 15
3
votes
1 answer
Programming Associativity in haskell
So this is my assignment here in which i have to program the associativity of some expressions, I worked on this a few hours and I'm just missing something obvious.
Here are my final two ideas that both somewhat work yet cannot evaluate truly equal…

Fatalgoddess
- 119
- 1
- 8
3
votes
3 answers
Multiple instances of a class
I have a class called Points and I need to create 100 points.
I need to do something like:
class Point(object)
...
for i in range(1,100):
pi = Point()
the points should be named p1, p2, ... p100
The lines above do not work, obviously.
The…

zplot
- 31
- 1
3
votes
1 answer
Managing Google App Engine java instances with quite heavy load to avoid 500 errors
We have a Google App Engine Java app with 50 - 120 req/s depending on the hour of the day.
Our frontend appengine-web.xml is like that :
F1
3
…

Etienne
- 226
- 1
- 12
3
votes
1 answer
How to create an `Instances` in Weka from a `List`?
I am using Weka as a part of a much longer pipeline, and as a result, I can't afford to write all the data to a file or database just to create an Instances object. What I can do on-the-fly is to create a list of Instance objects.
From this page of…

Chthonic Project
- 8,216
- 1
- 43
- 92
3
votes
2 answers
What determines how fast an instance can be started/stopped on GCE?
What determines how fast an instance goes into the running state from the time the api call is made to start an instance?
Are any of the following factors is startup and shutdown times:
- instance type
- image type
- whether a disk is attached or…

aloo
- 5,331
- 7
- 55
- 94
3
votes
1 answer
Assigning values to a referenced instance
I am an intermediate Java beginner and also completely new to stack overflow. (This is my first post.)
I have a question about the following code and the assignment of values to a reference.
First, the code:
import java.awt.Point;
public class…

ichhöre
- 45
- 3
3
votes
1 answer
Appfog instances vs memory
I'm developing an API on Appfog and want to know what to focus on (more memory with one instances or more instances with lower memory).
Appfog gives you free 2GB of RAM and up to 16 instances if each instances get 128 MB RAM.
My application uses…

Johnny Ha
- 633
- 5
- 21
3
votes
0 answers
Cannot login to several TeamCity instances on the same host at the same time
I am new to TeamCity and need to complete the following task: Install and run two TeamCity instances on single Windows machine. Build agents are installed on other machine.
I got both instances running (installed using instructions from the bottom…

Konstantin Senko
- 31
- 1
3
votes
1 answer
Accessing the .name property in a click handler
I am trying to make a simple card matching game via flash + actionscript, and am having major trouble with assigning event listeners and name. I have got all the card generation statements in place, and they all draw onto my stage, but even though…

user1801301
- 33
- 4
3
votes
5 answers
Given a Singleton: need for static methods and vars?
In the quest for more opinions I rewrite the question (I´m learning how to ask and English is not my mother tongue)...
Is it redundant or best practice to keep all the methods and global vars as static? (I mean there´s only one instance already per…

Whimusical
- 6,401
- 11
- 62
- 105
2
votes
1 answer
Object instance is overwriting the other instance but I cant see why
I was wondering if you could look at my code and see where I have gone wrong. Basically, I have created an object of type "UserFile"(my own object type) and am creating 2 instances of it and within the constructor of that object, I am calling a…

user1290653
- 775
- 3
- 11
- 23
2
votes
4 answers
memory error when extending from class
I am getting the following error when using the code below the error.
can you tell me what i am doing wrong?
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in D:\dev\TESTCASE_classes_layout\main.class.php…

Controvi
- 487
- 1
- 6
- 16
2
votes
1 answer
Readline feature in Directory Lister class
The below class is a dynamic attribute generating directory walker by Anurag.
import os
class DirLister(object):
def __init__(self, root):
self.root = root
self._list = None
def __getattr__(self, name):
try:
…

Neeran
- 1,753
- 3
- 21
- 26