I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use stencil buffer, to eliminate this problem, but I got sth like this(contour is green):
http://goo.gl/OI5uc (sorry I can't post images, due to my…
I have a class SuperClass with two subclasses SubClassA and SubClassB. I have a method in a different class which takes a SuperClass parameter.
The method should do different things depending on the type of the object it receives. To illustrate:
public void doStuff(SuperClass object){
// if the object is of type SubClassA, do…
Deanna Dicken examines an SQL Server Profiler event to determine object access...who is using the object, when, and how. This gives the SQL developer or database administrator much needed information for impact analysis prior to a change or the decommissioning of a SQL Server object.
I have a general coding standard question. Is it bad practice to initialize and create an object in multiple methods depending on the outcome of a users choice. So for example if the user quits a poker game, create the poker hand with the cards the user has received, even if < 5, and if the user played till the end create object…
I have a switch statement
switch ( $id ) {
case 'abc': return 'Animal';
case 'xyz': return 'Human';
//many more
}
I am returning class names,and use them to call some of their static functions using call_user_func().
Instead I can also create a object of that…
I have a software that has a car model that will be used in different views (listing, ads, detail page, carousel, up sell widget,etc).
class CarModel extends DbModel{
}
I look for a "nice way" (a combination of flexible, easy to maintain,etc) to have this used in views.
I'm thinking at two different ways
Having object…
I've gotten quite sick of XML configuration files in .NET and want to replace them with a format that is more sane. Therefore, I'm writing a config file parser for C# applications that will take a custom config file format, parse it, and create a Python source string that I can then execute in C# and use as a static object…
I'm getting the error:
Exception Value: (1110, "Column 'about' specified twice")
As I was reviewing the Django error page, I noticed that the customizations the model User, seem to be appended to the List twice.
This seems to be happening here in django/db/model/base.py in base_save():
values = [(f,…
Dear all
I want to know why cant we create object if the constructor is in private section. I know that if i make a method static i can call that method using
<classname> :: <methodname(...)>;
But why cant we create object is my doubt...
I also know if my method is not static…
How can I get a specific value from an object?
I'm trying to get a value of an instance
for eg.
ListOfPpl newListOfPpl = new ListOfPpl(id, name, age);
Object item = newListOfPpl;
How can I get a value of name from an Object item??
Even if it is easy or does not interest you can anyone help me??
Edited:…
Lets say I have an object of functions/values. I'm interested in overloading based on calling behavior.
For example, this block of code below demonstrates what I wish to do.
var main_thing = {
initalized: false,
something: "Hallo, welt!",
something_else: [123,456,789],
load: {
sub1…
I need to write a notification system manager.
Here is my requirements:
I need to be able to send a Notification on different platforms, which may be totally different (for exemple, I need to be able to send either an SMS or an E-mail).
Sometimes the notification may be the same for all recipients for a…
I have been studying the conpects of Object oriented programming. Still I am not able to distinguish between the following concepts of object oriented programming..
a) Data Binding
b) Data Hiding
c) Data Wrapping
d) encapsulation
e) Data Abstraction
I have gone through a lot of books ,and I also…
I have been wanting to have a play with Object Databases for a while now, and today I have done just that. One of the obvious choices I had to make was which one to use. My criteria for choosing one today was simple, I wanted one which I could literally wack in and start using, which means…
I'm working on a game project.
I've created an object, Star(Object).
I want to assign the name of the variables, dynamically, from a text file.
If I have a text file with:
Sol
Centauri
Vega
I want the program to create the Star(Object) with variable names from the text file. I want the process…
I have to add either an embed tag for Firefox or an object tag for Internet Explorer with JavaScript to address the appropriate ActiveX / Plugin depending on the browser. The plugin could be missing and needs to get downloaded in this case. The dynamically added embed tag for Firefox works as…
I am returning some data (example below) and saving it to a jQuery object (or is this an array and I am confusing the two?) when I log the variable that is the object it has the values I am looking for but how do I access the data inside this object?
code
$itemPosition = {
'top':…
I created an enum where I stored some table names. I want it to be used to get the name of the table like ds.Tables[BGuestInfo.TableName.L_GUEST_TYPE.ToString()].
public enum TableName : byte
{
L_GUEST_TYPE = 0
,L_AGE_GROUP = 1
,M_COMPANY…
Note: This question uses jQuery but the question has nothing to do with jQuery!
Okay so I have this object:
var box = new BigBox();
This object has a method named Serialize():
box.AddToPage();
Here is the method AddToPage():
function AddToPage()
{
…
Hi,
I am developing a Graph-class, based on boost-graph-library.
A Graph-object contains a boost-graph, so to say an adjacency_list, and a map.
When monitoring the total memory usage of my program, it consumes quite a lot (checked with pmap).
Now, I would…
The technical difference between Composition and Aggregation in UML (and sometimes in programming too) is that with Composition, the lifetime of the objects composing the composite (e.g. an engine and a steering wheel in a car) is dependent on the…
I can't think of a better place among SO siblings to pose such a question. Originally I wanted to ask "Is python a pure OO language?" but considering troubles and some sort of discomfort people experience while trying to define the term I decided…