An instance is a specific realization of any object.
Questions tagged [instances]
516 questions
3
votes
2 answers
How to find the total tablespace usage in SQL Server 2008?
In SQL-server 2008, How would I find (through an SQL query), the percentage of tablespace usage for a particular instance(or all instances) of a SQL Server(2008 R2)?
Also, what is the best way (query) to get the list of all the Named Instances of a…

LittleLebowski
- 7,691
- 13
- 47
- 72
3
votes
1 answer
Connecting to a multiple instance SQL server without specifying instance
I have an SQL server with 3 instances on it.
If I connect to it with Management Studio i automatically connect to one of the instances. the same each time.
It looks like there is a default named instance between the instances.... is that true? and…

NicolajB
- 275
- 1
- 6
- 16
3
votes
1 answer
How to load a model once and reuse it in OpenGL
I've loaded a wavefront model file (.OBJ and .MTL) and stored the vertices/indices in a VBO for rendering. Now I only populate the VBO once when the model is loaded. My question is... What is the best way to reuse this vertex data to redraw multiple…

Sonoman
- 3,379
- 9
- 45
- 61
3
votes
2 answers
Two SQL Server instances with the same name?
I'm not sure how I ended up with this situation: I seem to have two SQL Server instances with the same name, in one machine.
Screenshot here
When I connect through SQL Management Studio I have access to the database of my application, but it is…

Alexis
- 43
- 2
- 6
3
votes
1 answer
Python - cannot access instances of a class
I am stuck with a problem that is probably quite simple, yet I cannot figure it out. I am trying to develop a desktop application for creating timetables. I am using Tkinter and Python 3.6. I have a Teacher class, so the user can create new…

A.T.
- 31
- 3
3
votes
2 answers
PEP 333 Application Instances and Objects
I have recently been trying to learning about WSGI and moreover, how the web works in regards to Python. So I've been reading through Werkzeug and PEP333 to learn.
However I've run up against a small question, that I think I understand but probably…

John Von Neumann
- 617
- 4
- 15
3
votes
2 answers
How to avoid too many IBM MQ channel instances?
I've built a small Java program that uses the MQ client classes to talk to a Websphere MQ server and a queue thereon. What I want is to query the size, err depth, of a certain queue at regular intervals, e.g. every 10 seconds.
What I do,…

Carl Smotricz
- 66,391
- 18
- 125
- 167
3
votes
4 answers
Usefulness of loading instances in OO PHP?
I was asked to do a project in PHP and to make sure it was object oriented. I've done OO and I've done PHP, but never both.
The main benefit of OO PHP (outside of inheritance/polymorphism) seems to be code organization. That's fine; I'm doing that.…

Jere
- 3,377
- 1
- 21
- 28
3
votes
1 answer
How to refer to the T (Generic type) of the class
I have a class of a generic type as follows:
SomeGenericClass{
constructor(){
}
}
within some of its' functions i log some messages and would like to refer to the current type T of the generic class in my log.
I've tried…

Kesem David
- 2,135
- 3
- 27
- 46
3
votes
2 answers
django auto-create intermediate model instances for new instance created in foreignkey field model
There are two parts of this question for following situation:
I will use example to describe the question:
These are my django models:
class Zone(models.Model):
zone_name = models.CharField(max_length = 10)
zone_number =…

Dariusz Krynicki
- 2,544
- 1
- 22
- 47
3
votes
3 answers
Creating instances of the main class
I have been told that if I want to use an instance of my main class, I should do it with a constructor:
private plugin;
public ( plugin) {
this.plugin = plugin;
}
Why is this better (or how does it…

Leo H.
- 53
- 7
3
votes
2 answers
Python: Append to list owned by an instance stored in shelved dictionary
So I'm writing a script to keep track of my correspondence.
It takes the name of someone who emailed me, looks for its associated 'Friend object' in a shelved dictionary of Friend instances (or creates itself a new instance and stores it in the…

Pez Picacious
- 67
- 6
3
votes
0 answers
Lua setfenv/metatable sandbox won't work with ROBLOX methods
In ROBLOX Lua, I'm writing a game that involves users creating and running Lua scripts. Obviously, I need to prevent the use of certain services and functions, such as the Kick function on the Player class, or anything related to DataStore or…

NotAshley
- 142
- 2
- 11
3
votes
2 answers
Count class instances in a Python list
I wonder what´s the best and fastest way to count the number of occurrences of a particular object (user-defined class instance) in a Python list?
For instance if we have a class called MyClass
class MyClass:
"""A simple example class"""
i =…

elegent
- 3,857
- 3
- 23
- 36
3
votes
1 answer
Count type objects in a list
Have you a great method to count number of Sugar in my goblet?
class Sugar:pass
class Milk:pass
class Coffee:pass
goblet = [Sugar(), Sugar(), Milk(), Coffee()]
sugar_dosage = goblet.count(Sugar) #Doesn't work

nestarz
- 99
- 1
- 10