properties

EHCache Disable/Shutdown

Is there a way to disable ehache externally using a property file? CacheManager.shutdown() doesnt seem to work? Actually we have 2 app with the same source code i require ehcache in one and not the other. one where i dont need cache is a webapp! Unable to figure to out yet how to go about this? ...

C# Dynamic Attribute Arguments

Is there a way to do the following? I see that the Attribute Arguments must be a constant expression, so how would I work around this? If I dont want to load some properties into a datagridview using binding, whats the next best alternative? class TestObj { private bool isBrowsable = false; [Browsable(isBrowsable)] ...

Application configuration files for Glassfish/Java EE 5 web services...

I am trying to write some simple Java web services so we can call Java code from .NET. So far, I got a proof-of-concept working under Glassfish. Pretty straightforward when the IDE does all the work. Now I'm really bogging down on stuff in Java that should be really simple. For example, I want to externalize my configuration so I can...

How do I use the Java ClassLoader to load a file fromthe classpath?

I want to use the ClassLoader to load a properties file for the Properties class. I've simplified the below code to remove error handling for the purposes of this discussion: loader = this.getClass().getClassLoader(); in = loader.getResourceAsStream("theta.properties"); result = new Properties(); result.load(in); In the same directory...

Implement a function as []

I have an array which really is a function, however i would like to use it as an array. I know i can write these int var { get{return v2;} } public int this[int v] { get { return realArray[v]; } but how do i implement a function that like an array? i would like to do something like public int pal[int i] { get { return i*2; } } But ...

How to set Printer Settings while printing PDF

I'm trying to print a PDF file using Process object. And upto certain extent I could print it successfully. But now I want to set printer properties.. like no of copies, Paper size etc. But I don't see any property to set these values. I'm using following code to print PDFs string fileName = ""; string arguments = ""; ...

Struts 1.2.9 reload application.properties

Hi all, in my file "struts-config.xml" I've wrote: When my application start load successfully application.properties. How I can reload this properties (because I wanna change a lot of property wrote inside file) without restart application? Thanks a lot. T. ...

Entity Framework: Customising generated data object exception

Hey all, I am trying to add a property to one of the generated data classes the Entity Framework has created for me. I have done the exact same thing on another generated class without a problem and for some reason it won't work on this one. The only difference between the two generated objects is one is just a straight table mapping ...

Can I Create a Web Service that has Properties?

I'm trying to test code around a web service that is not available yet. I'm trying to dummy up my own version. According to the specs it will be called like this. var service = new Service(); service.SD = new ServiceData(); service.SD.ID = "ABC123"; service.SD.Auth = "00000"; string result = service.DoMyThing(); This is the closest ...

Unexpected result when comparing values retrieved with PropertyInfo.GetValue()

I've got some code which I use to loop through the properties of certain objects and compare the property values, which looks somewhat like this: public static bool AreObjectPropertyValuesEqual(object a, object b) { if (a.GetType() != b.GetType()) throw new ArgumentException("The objects must be of the same type."); Type type = a....

why wont it recognize the @properties from header file from main file?

UIView.h #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> @interface UIView : UIResponder { IBOutlet UILabel *endLabel; IBOutlet UIButton *goButton; IBOutlet UITextField *textBox1; IBOutlet UITextField *textBox2; @property(nonatomic, retain) UILabel *endLabel; @property(nonatomic, retain) UIButton *goB...

Setting textBox.Text doesn't update bound twoway property?

Does it make sense that if the Text on a TextBox is databound to a property using the twoway mode and I set the Text to something, it should update the property? My property gets updated when I type inside the control, but not when I set the value in code. ...

Pointers, primitives, and properties in Objective-C classes

I really need some clarification — I have a few questions and I'm all mixed up right now. Here is a simple class interface: #import <UIKit/UIKit.h> @interface Car : NSObject{ NSInteger carID; NSString *carName; } @property (nonatomic, assign) NSInteger carID; @property (nonatomic, copy) NSString * carName; @end Why is carI...

Converting an configuration file to HTML

I have a bunch of configuration files which are usually properties files which are opened from application and edited like notepad.Now the requirement is pick each property and find which HTML tag does it fit through and display the whole properties file as HTML page. For eg: Security.Properties file //This property checks if the user...

Is it okay to return a copy of property from getter?

I have following simple class: @interface Article: NSObject { NSString *title; } @property (copy, nonatomic) NSString *title; @end @implementation - (void)setTitle:(NSString *)aString { if ((!title && !aString) || (title && aString && [title isEqualToString:aString])) return; dirty = YES; [title release]; title = [...

SVN: set properties on directories only

In SVN is there any way to set (bugtraq) properties on all directories in a tree without checking out the whole tree? I can't set properties in the repository directly without setting hooks. Even if I could I'm not sure this would help - you can't set recursive properties with Tortoise, and I suspect it wouldn't be straightforward with ...

Are reads and writes to properties atomic in C#?

Reads and writes to certain primitive types in C# such as bool and int are atomic. (See section 5.5, "5.5 Atomicity of variable references", in the C# Language Spec.) But what about accessing such variables via properties? Is it reasonable to assume that they will also be atomic and thread-safe? E.g. Is a read of MyProperty below atom...

Does XML Serialization Require Properties to be Read/Write?

Hi I'm testing XML Serialization in my class, but i noticed that the ID number didn't get saved when i ran the program. So i was looking around and modifying a few things but nothing worked, then i saw that all fields except ID had both get and set properties. So i added a set; property to my ID number and poof it worked. The question ...

iPhone Simulator: build errors when using synthesized instance variables

There are two runtimes for Cocoa/Objective-C: the legacy runtime and the "modern" runtime (that's what Apple calls it). According to Apple's documentation, "iPhone applications and 64-bit programs on Mac OS X v10.5 and later use the modern version of the runtime". So far so good. Now, the "modern" runtime supports a feature called "sy...

How can I define properties dynamically and pass them to another target in msbuild?

I am trying to reuse a task in an Ant way: <Target Name="Release"> <Message Text="Env: $(Env)"/> </Target> <Target Name="ReleaseIntegration"> <CreateProperty Value="Development"> <Output TaskParameter="Value" PropertyName="Env" /> </CreateProperty> <Message Text="Env: $(Env)"/> <CallTarget Targets=...