Is there a way to access the super object when extending objects using $.extend?
I would like to extend an object, override a method, but call the overridden superclass method in the subclass method.
I wonder if anyone could point me in the direction where I can read about the nuts and bolts of C#. What I'm interested in learning are method call costs, what it costs to create objects and such.
My aim of learning this is to get a better understanding of how increase the performance of an application and get a better understanding of how the C# language works.
The reference should preferable be a book, a book that I can read cover to cover.
Hi,
I have a NSMutableArray with a few NSString objects in , how can i test if
it contains a particular string literal
i tried [array containsObject:@"teststring"] but it doesn't work.
Thanks
I have gone through Head First Java and some other sites but I couldn't find complete stuff related to Threads and additional concurrency packages at one place.
Please suggest a book/website which covers complete Threads with more details like
Synchronize and locking of objects
More detailed about volatile
Visibility issues in Threads
java.util.concurrent package
java.util.concurrent.atomic package
I have two pieces of text. I would like to make a word-based diff between them (like whe unix utility wdiff does) but with more information in the output (I mean, the character's posizion where the added/delited word starts).
I need to do this in Java, so a simple output of the differences (like wdiff) doesn't suite for me: I would like to manipulate objects representing differences.
I know I learnt this on the SCJP syllabus, but it escapes me.
What's the term for a set of objects that refer to each other but are no longer accessible from your program (and are thus eligible for garbage collection)?
Have I any chance to serialize meta (any format, so I can store it in DB)?
var obj1 = {};
var obj2 = {};
obj1.link = obj2;
obj2.link = obj1;
var meta = [obj1, obj2];
As I understand the problem is that JSON serialize object`s links to objects.
Hi
I have a C++ program running under linux. Is it possible to track its memory usage from the code? I am allocating new objects and running out of memory, so I want to keep track of how quickly I am using memory.
Thanks
I have a STL container full of billions of the following objects
pair
I need some function of the following form
/*returns items sorted biggest first */
bool sortPredicate (SomeClass *two, SomeClass *one)
{
return ???;
}
Is there some trick I can use to very quickly compare pairs of pointers?
I want to create a variable of same type of a type-unknown variable.How can I do that?
I actually wants to create a variable of same type of cout/cin (as they are objects).
I used typedef,but it ERR.
I need to get some children elements and loop over them using inline javascript for a onmouseover event. When I try to use this.getElementsByName I'm getting an error that the object does not support this property. I was under the impression that getElementsByName work for element objects which I thought 'this' would be considered. Anyone have any other ideas on how I can achieve this?
This is something I encounter frequently, but I don't know the elegant way of doing. I have a collection of Foo objects. Foo has a method bar() that may return null or a Bar object. I want to scan the collection, calling each object's bar() method and stop on the first one returning an actual reference and return that reference from the scan.
Obviously:
foos.find(_.bar != null).bar
does the trick, but calls #bar twice.
In my application I need to keep track of a list of objects that are being displayed. Right now I have an NSArray with all of the NSManagedObjects. Would I be better off to store the ObjectIDs and then only request the object when I need it?
I am mainly concerned about memory at this point.
I'm creating a game and I create sprites(enemies). I keep creating and destroying sprites. Flash/Flex has a garbage collector which handles the destruction of unused resources. Should I create an object pool to reuse them, or should I leave flash/flex to handle the creation/destruction of objects?
Which option is better from the performance point of view?
I have an InputStreamReader object. I want to read multiple lines into a buffer/array using one function call (without crating a mass of string objects). Is there a simple way to do so?
w3schools says that exceptions can be strings, integers, booleans, or objects, but the example given doesn't strike me as good practice, since exception type checking is done through string comparison. Is this the preferred method of exception handling in JavaScript? Are there built-in exception types (like NullPointerException)? (if so, what are they, what kind of inheritance do they use, and are they preferred over other options?)
Hello,
I'm trying to get the dojo tree widget working. It works with a small json object, but when i try it with a large json object it goes wrong. There is no error, just the root node. Is this a normal behavior? Is there a maximum of objects you can load? My json object contains around 800 entries.
Thanks,
Ewout
Hello there,
I'd like to change the minimum for the id of created objects from 1 to 1000.
So when I create in rails my first model object it gets the ID 1000 and not 1.
Is there a way to set this in the schema/migration files?
I have a class for message, and the objects are being displayed in a ListBox and there's a property for the message based on whether it's sent to or from the user. Is there a way to create two different styles and change them depending on this property?
Hi All,
I have a basic doubt. Internally how are events represented as methods or as (fields)objects. If event is a field then how one can still contain events in the interface definition.
Thanks
JeeZ
In sql server how difficult would it be to determine what procedures/functions no longer compile? In other words, if I scripted out alter statements for all procedures and functions in a database, I'd like to know which of these statements are going to fail?
I've been working on cleaning up a database I've inherited which has gone through years of changes and I'd like to what objects are going to raise errors when something tries to execute it.
I'm making a game where each Actor is represented by a GameObjectController. Game Objects that can partake in combat implement ICombatant. How can I specify that arguments to a combat function must inherit from GameObjectController and implement ICombatant? Or does this indicate that my code is structured poorly?
public void ComputeAttackUpdate(ICombatant attacker, AttackType attackType, ICombatant victim)
In the above code, I want attacker and victim to inherit from GameObjectController and implement ICombatant. Is this syntactically possible?
I have seen code where every class has an interface that it implements.
Sometimes there is no common interface for them all.
They are just there and they are used instead of concreate objects.
They do not offer a generic interface for two classes and are specific to the domain of the problem that the class solves.
Is there any reason to do that?
In java, when you pass an object to a method as a parameter, it is actually passing a reference, or a pointer, to that object because objects in Java are references.
Inside the function, it has a pointer to that object which is a location in memory. I am wondering where this pointer lives in memory? Is a new memory location created once inside the function to hold this reference?