What is really the difference between the algorithms remove and remove_if and the member function erase?
Does both of them result in a call to the removed objects destructor?
So I came from a Flash background where I can animate in timeline. I've completed the Beginning iPhone Development book and just realized that I still don't know how to get an animation in. I'm guessing I need to import png sequences?
Can anyone point me to an appropriate place to learn more about this topic? I want to make a game and my game objects need to animate.
Thanks in advance!!
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 would like to register a marker interface so I can add it to objects in the ZMI. My product's configure.zcml contains:
<interface interface=".interfaces.IMarkerInterface" />
and, after reinstalling, the interface shows up in the list of available interfaces. But if I try to add it to an object in the ZMI I get a ComponentLookupError. What's missing?
High,
I need to do some image manipulations on CT volume images. Mainly segmentations.
Which open-source library supports 3D algorithms - Filtering, edge detection, deformable objects and so ?
Language is not an issue at the moment.
10x
Is it possible to execute raw commands as javascript through the Java driver for MongoDB?
I'm tired of wrapping everything in Java objects using Rhino, and would happily sacrifice performance for the convenience of passing javascript directly through to the DB.
If not, I can always use sleepymongoose or something, but I don't really want to add yet another language (python) to the stack at this point.
Any insights are appreciated.
I have a question. What is wrong with regards to the below code:
ArrayList tempList2 = new ArrayList();
tempList2 = getXYZ(tempList1, tempList2);
//method getXYZ
getXYZ(ArrayList tempList1, ArrayList tempList2) {
//does some logic and adds objects into tempList2
return tempList2;
}
The code will get executed but it seems by passing tempList2 to the getXYZ method argument, it is doing object recycling.
My question is, Is recycling the tempList2 arraylist object correct?
The following function accepts 2 strings, the 2nd (not 1st) possibly containing *'s (asterisks).
An * is a replacement for a string (empty, 1 char or more), it can appear appear (only in s2) once, twice, more or not at all, it cannot be adjacent to another * (ab**c), no need to check that.
public static boolean samePattern(String s1, String s2)
It returns true if strings are of the same pattern.
It must be recursive, not use any loops, static & global variables. Also it's PROHIBITED to use the method equals in the String class. Can use local variables & method overloading.
Can use only these methods: charAt(i), substring(i), substring(i, j), length().
Examples:
1: TheExamIsEasy; 2: "The*xamIs*y" --- true
1: TheExamIsEasy; 2: "Th*mIsEasy*" --- true
1: TheExamIsEasy; 2: "*" --- true
1: TheExamIsEasy; 2: "TheExamIsEasy" --- true
1: TheExamIsEasy; 2: "The*IsHard" --- FALSE
I am stucked on this question for many hours now! I need the solution in Java please kindly help me.
hello
Is there library/header already written to manage C++ objects from C using opaque pointers/handles?
I can write one myself, but I would rather use already made solution, especially if it has fortran bindings.
Thanks
I'm a beginner and I want to write Java code in eclipse. This program takes two LinkedLists of integers (for example, a and b) and makes a LinkedList (for example d) in which every element is the sum of elements from a and b. However, I can't add these two elements from a and b because they are Objects
Example:
a=[3,4,6,7,8]
b=[4,3,7,5,3,2,1]
------
d=[7,7,13,12,11,2,1]
I've got a project that I'm using Doxygen to generate documentation to. The documentation of the classes is fine, but I've also got some functions that I use in main() to create objects etc. I'd also like to have these into my documentation, but I have not figured how to do that. Any suggestions?
my appdelegate is having the array book, this array is storing the many object. this object are containing the many latitude and longitude values coming from server.
and later i want to assing that values to the coordinate of the cllocationcoordinate2d object.
how can i read that values of latitude and longitude store in the object and that objects are store in the array.
For some odd reason the part where objects are shown and hidden in my script doesn't seem to be working. I'm not sure if its the fact firefox doesn't like that or whether its the function-based code I have (to save duplicating lines of code)?
There is a working example here and the javascript is here
All help appreciated
Imagine I have a class that allocates memory (forget about smart pointers for now):
class Foo
{
public:
Foo() : bar(new Bar)
{
}
~Foo()
{
delete bar;
}
void doSomething()
{
bar->doSomething();
}
private:
Bar* bar;
};
As well as deleting the objects in the destructor is it also worth setting them to NULL?
I'm assuming that setting the pointer to NULL in the destructor of the example above is a waste of time.
Hello,
why does
List<Object> objectList; = some objects
List<Object> getList()
{
return objectList; //or return new List<Object>(objectList);
}
return a list with all items referenced to the original list's items?
Thanks.
I have a program executing in c# that is sometimes updated while it is running by swapping the exe to a new one. I want the program to routinely check if it has been updated and if so, restart. I use the following function to do this.
public static bool DoINeedToRestart(string exe_name)
{
Version cur_version = new Version(MainProgram.StartVersion);
Version file_version = new Version(GetProductVersion(exe_name));
MessageBox.Show("Comparing cur_version " + cur_version.ToString() + " with " + file_version.ToString());
if (file_version > cur_version)
{
return true;
}
return false;
}
public static string GetProductVersion(string path_name)
{
FileVersionInfo myFI = FileVersionInfo.GetVersionInfo(path_name);
return myFI.FileVersion;
}
StartVersion is set when the program is started to be the current version using the GetProductVersion(exe_name). exe_name is set to be the name of the executable that is being updated.
The problem I have is once the MainProgram.exe file has been updated (I verify this manually by looking at the file properties and checking the file version), the GetProductVersion still returns the old file version and I have no idea why! Any help is greatly appreciated.
I know it is not possible to know when a gc occurs, but there are factors that will tell you how often/when it may occur. What factors are these? One is how many objects are created, etc.
Thanks
Based on the documentation, predict is a polymorphic function in R and a different function is actually called depending on what is passed as the first argument.
However, the documentation does not give any information about the names of the functions that predict actually invokes for any particular class.
Normally, one could type the name of a function to get its source, but this does not work with predict.
If I want to view the source code for the predict function when invoked on objects of the type glmnet, what is the easiest way?
Hello. I'm building a mechanism to take XML data from a queue and call stored procs to save the data from the XML document directly to the database. This seems like something that NHibernate could address, but of course most of the information I find discusses going from objects to database instead of another data format (XML, in this case). Is there a way to use NHibernate in this fashion or am I barking up the wrong tree?
Thanks.
I have a business object structured like this:
Country has States, State has Cities
So Country[2].States[7].Cities[5].Name would be New York
Ok, I need to get a list of all the Country objects which have at least 1 City.IsNice == true
How do I get that?
is it possible to return findOne result as object ..or it always return an array?
i found something about mongo.objects = 1 adding to php.ini ..but did not work for me.
can some one tell me more about this?
What allocators are available out there for use with STL when dealing with small objects. I have already tried playing with pool allocators from Boost, but got no performance improvement (actually, in some cases there was considerable degradation).
I notice that InterfaceBuilder has UITableViewCell in its library of objects I can drag onto a view. I wonder if it ever makes sense to use one outside of a UITableView.
I have a function
function callback(obj){...}
Is it okay to pass in more objects than were declared in the function signature? Eg, call it like this:
callback(theObject, extraParam);
I tried it out on firefox and it didn't seem to have a problem, but is it bad to do this?
Is there a complete list of the objects you can tap into with <%$ % tags in ASP.NET
I know you can do things like <%$ ConnectionStrings:northwind % in the ConnectionString attribute of the
Can you also do this with Cookies and Session? Is there a <%$ % reference page out there?