new

Creating two separate instances from the same class causes them to be linked together?

The problem I am having is I create two different menus from a single class. When I finish the first one, everything is fine. However when I create the second one and set it's region, it modifies the previous one as well. When I call Display() which just flips a boolean variable, it flips it for both instead of just the one I'm calling t...

"new" operator in multiple threads causes Segmentation Fault

This is related to an issue I have been discussing here and here, but as my investigations have led me away from the STL as the potential issue, and towards "new" as my nemisis, I thought it best to start a new thread. To reiterate, I am using an arm-linux cross compiler (version 2.95.2) supplied by the embedded platform vendor. When ...

Subsonic help, how to list only the first record

Hi I'm doing a little report using subsonic I'm pretty noob And I can't figure how to list only the first record in my report I'm doing something like: new Select("id,Name,place,group").From(User.Schema) .InnerJoin(Profile.Schema) .InnerJoin(userGroup.Schema) ...

Why do I need the `new` keyword for an instance of `Date` in JavaScript?

I understand the difference in behavior. Date() returns a String representing the current date, and new Date() returns an instance of the Date object whose methods I can call. But I don't know why. JavaScript is prototyped, so Date is a function and an object which has member functions (methods) which are also objects. But I haven't wri...

Using my weka classifier in MOA

Hi, I have created my own classifier in weka and it works fine with the weka gui. I am trying to use it in MOA by choosing weka classifier and then my classifier. My classifier appears in the MOA gui under weka classifiers but if i choose it i get a "Problems with option: baseLearner" error. Is it not possible to use my new weka classifi...

What does the new keyword do under the hood?

I am curious as what else the new keyword does in the background apart from changing what the this scope refers too. For example if we compare using the new keyword to make a function set properties and methods on an object to just making a function return a new object is there anything extra that the new object does? And which is pref...

make sure object only created by factory (C#)

How do I make sure that a certain class is only instantiated by a factory and not by calling new directly? EDIT: I need the factory to be a separate class (for dependency injection purposes) so I can't make it a static method of the class to be instantiated, and so I can't make new private. ...

Java: newInstance of class thas has no default constructor

I'm trying to build an automatic testing framework (based on jUnit, but that's no important) for my student's homework. They will have to create constructors of some classes, and add them methods. Then, with the testing functions I provide, they will check if they went allright. What I want to do is, by reflection, create a new instanc...

What is difference between instantiating an object using new vs. without

In C++, Aside from dynamic memory allocation, is there a functional difference between the following two lines of code: Time t (12, 0, 0); //t is a Time object Time* t = new Time(12, 0, 0);//t is a pointer to a dynamically allocated Time object I am assuming of course that a Time(int, int, int) ctor has been defined. I also realize ...

How to be downward compatible to a customers old local database when the application is brandnew?

Hello, I want that my users can read my sqlite database still in 10 years, because there could be data in it they want to browse. Well the database file is 10 years old. In the meantime I have upgraded my database structure (additional fields is best example) and my latest version of the application makes use of that new fields. Now t...

WPF datagrid start editing new item

Hi, I have a datagrid with editable items in it and I have a button to create a new instance of such an item. The datagrid is updated with the new item but I can't select the recently added item and start editing on it. Below is my code: private void btnNewKenmerk_Click( object sender, RoutedEventArgs e ) { Kenmerk newKenmerk =...

SharePoint Designer DataView New Upload bound to Document Library - where did file go and can I set to a folder?

I have a Dataview bound to Document Library with the New Document button enabled. It apears to upload but can't find the files anywhere. I don't have a Shared Document folder. How and where do you set where to upload the file? A specific folder would be nice and If I could make it dynamic tied to QueryString that would be ideal. Going...

creating objects in c++ not using "new"

hey, i want to make a program that lets say represents a matrix now the matrix will be represented by a vector that each object in the vector will represent a cell example: vector now when constructing the matrix the constructor recives a list of cells to insert in the matrix. the size of the list is unknown in compilation time i am ...

How best to store VERY large 2D list of floats in c++? Error-handling?

I'm migrating some code from c to c++. I've changed some malloc calls for structure memory allocation to new calls. Basically before the code I'm porting was malloc'ing arrays that contain multiple sets of frame coords, each a couple hundred thousand floats in length -- so the total array length could be in the tens of millions of co...

What's a good book for learning PHP?

Possible Duplicate: What is the best PHP programming book? Let me start off with saying, I know this question has been asked multiple times. I ,however, could not find any up-to-date answers. Anyways, I'm fairly experienced with HTML/CSS. I would like to get into server side programming. I don't have that much programming expe...

new/delete "override" vs. "overload"

I always thought... overriding means reimplementing a function (same signature) in a base class whereas overloading means implementing a function with same name but different signature ... and got confused because sometimes people just don't care about the difference. Concerning new/delete: Are they overloaded or overridden? An ide...

Decode HTML from XML with NewLine

Hi! First I parse XML and retrieve this: &#60;p&#62;&#60;strong&#62;Berns Salonger &#45; the City&#39;s The I decode it with MWFeedParser (stringByDecodingHTMLEntities) and retrieve this: <p><strong>Berns Salonger - the City's Ideal Meeting Place Note that this is only one line of many many lines which includes alot of tags. Th...

SystemState.MessagingSmsUnread Not change?

Hi at all, i'm trying to intercept new sms unread in a winMo application (C#) I saw that MessageInterceptor not working in some HTC phone, so i thing that this value is a good chance, but this don't work too :( On my HTC Hd2, when new sms arrived, SystemState.MessagingSmsUnread is set to 1. In the cellular emulator, with WM6.5, when ne...

Accurev: How can I see new folders created in a parent stream inside a workspace?

Hi all, I've created a new folder (with files and sub-folders) in a workspace. I then promoted them all into a parent stream (and even to the grandparent one). However I cannot see them in another workspace stemming from that parent stream. It does not appear in Exclude/Include mode either. What am I doing wrong? Thanks, Michael ...

Is it ok to return None from __new__?

In general, is it reasonable to return None from a __new__ method if the user of the class knows that sometimes the constructor will evaluate to None? The documentation doesn't imply it's illegal, and I don't see any immediate problems (since __init__ is not going to be called, None not being an instance of the custom class in question...