class

Add Web application to Moss

If I add an application from vs 2005 to Moss and I have a class in a separated file (but inside the application) everything works but not the class. How can I make it work? I am not refering to an separated DLL. ...

One line class definition?

I'm updating some code and while I was working in a header, I came across the following line. . . . class HereIsMyClass; . . . That's it. It's just one line that precedes another, longer class definition. HereIsMyClass is in fact another class somewhere else, but I don't understand why this line is written here. What does it do? ...

constructor problem in java

public class StateQueryFilter extends FieldQueryFilter { // private static final Log LOG = LogFactory.getLog(RecommendedParser.class.getName()); public StateQueryFilter() { super("state", 5f); super("city", 5f); super("notdirectory", 5f); //LOG.info("Added a state query"); } } And it reports: Con...

VWD 2008 Adding reference to a public class

Problems started after upgrading from VWD2005 to VWD2008. In VWD2008 the App_Code does not exist any more. How can i add a reference to a class that existed in the App_Code directory of VWD2005? ...

Calling static method on a class?

Say, I have a reference to a Class object with SomeType having a static method. Is there a way to call that method w/o instantiating SomeType first? Preferably not escaping strong typing. EDIT: OK, I've screwed up. interface Int{ void someMethod(); } class ImplOne implements Int{ public void someMethod() { // do something } } Cl...

Do you prefer to return the modified object or not?

Class c = new Class( { Prop = "Initial" } ); I have the class above. How would you create a method to modify it? public Class ModifyIt(Class c) { c.Prop = "changed"; return c; } or public void ModifyIt(Class c) { c.Prop = "changed"; } Then called like this... Class c = ModifyIt(c); Console.WriteLine(c.Prop); // chang...

Accessing a class that is related to two other classes

Given the following tables: User, Trial, UserTrial. Where A user has multiple trials, a Trial does not internally map to any Users and contains details about the trial (name, description, settings), and a UserTrial contains information specific to an instance of a User's trial (expiration date, for example). What would be the proper way ...

What characters are allowed in C# class name?

What characters are allowed and what is not allowed in a C# class name. Could you please help? EDIT: To specify. What special characters are allowed. Please be specific, because links to 50 pages specs in high-technical language is not a answer that will help me a lot. EXPLANATION: What I try to acomplish is to divide class name into d...

objective-c saving values in memory between classes

Greetings - I am trying to set and store values in memory... and be able to share them between classes. I've tried two different methods with not too much luck -- one with 'dot' syntax and one with []. Generally: In class1 I have something like this: #import <Foundation/Foundation.h> @class Class1; @interface Class1 : NSObject { ...

Class problem

Hi all. i have a class library and it has a folder. My project's classes are in that folder. I can use the class which is without that folder. But i can't use classes which is in that folder. For example: without that folder: Example exmp = new Example(); i can use exmp normaly. in the folder: User user = new User(); i m using asp...

Enforce static method overloading in child class in C++

I have something like this: class Base { public: static int Lolz() { return 0; } }; class Child : public Base { public: int nothing; }; template <typename T> int Produce() { return T::Lolz(); } and Produce<Base>(); Produce<Child>(); both return 0, which is of course correct, but unwanted. Is there anyw...

How widely visible are various objects (shared class, module, etc) in VB.NET

I have a VB.NET application where various objects are going to access some common code, and I have some counters and values shared between all the calls, so I'm currently using a "Shared Class" (I'm aware classes can't be shared, per se, but all the variables and methods are marked "Shared"). My concern is for the visibility of this obj...

It looks like I'm instantiating this SpeechAPI interface. How is that possible?

Hi, I am using Microsoft Text-to-Text Speech feature in my project. But I have a question about that, actually not directly about that. So : Normally programmers when creating Interface, they put I as a prefix of the interface name like IReadable,IEnumerator etc. But I've come across something that actually shocked me. in Microsoft Te...

Rails cannot find model with same name as Ruby class

I'm fairly new to Ruby on Rails, and I have a project with a "Set" model. This is in Rails 2.3.2. Now the problem is that it can't find any methods on that model's class at all. For example: "undefined method find' for Set:Class" or "undefined method errors' for #". It seems to be trying to find those methods on the Ruby "Set" class inst...

Patching classes in Python

Suppose I have a Python class that I want to add an extra property to. Is there any difference between import path.MyClass MyClass.foo = bar and using something like : import path.MyClass setattr(MyClass, 'foo', bar) ? If not, why do people seem to do the second rather than the first? (Eg. here http://concisionandconcinnity.blog...

Why is PERSON not a ref class???

I don't understand why compiler thinks PERSON is NOT a ref class: : error C2811: 'Runner' : cannot inherit from 'Person', a ref class can only inherit from a ref class or interface class I tried.... adding mscorlib.dll to the header files: #using..etc...<> - didn't work. making Person an abstract class - didn't work (Im gla...

while extending any class, which class (child or parent) size get larger logically.

hi all, i m in a confusion that while extending any class, which class (child or parent) size get larger logically. thanks in advance ...

Does Mediator Pattern work in this situation?

So for my current project, there are basically three main Java classes: GUI Instant Messaging Computation Essentially, there needs to be full communication, so we've decided to use the mediator approach rather than than allow the GUI to run the entire project. Basically, the mediator is going to encapsulate the communication. The pr...

Load PHP code in PHP for delayed + parametered execution?

Hi, i have two PHP files: template.php template.html.php The first is the class definition for Template. The second contains an actual HTML-based template, however with PHP constructs (hence the .PHP extension). I'd call this a hybrid html/php file. Is it possible to create some function in the Template-class (special_in...

Can a java file have more than one class?

What is the purpose of having more than one class in a java file.I am new to java. Edited: That can again be achieved by creating a inner class inside public class right? ...