properties

Property get/set Delegates for runtime reflected class.

I understand that Delegates offer high performance reflection maybe just 15% slower than regular explicit c# code. However all the examples I can find on stackoverflow are based on prior knowledge of the type of a method/property being accessed via a delegate. Given such prior knowledge of a class, why resort to reflected Delegate acces...

Java properties file editor for multiple lang.properties files?

I have an application that reads a .properties file at start up containing key/values where the key is bound to an item in a file and the value is some text in the correct language (also determined at start up): http://www.linuxtopia.org/online_books/eclipse_documentation/eclipse_birt_report_guide/topic/org.eclipse.birt.doc/birt/eclipse...

fileNotfound exception of my properties file

Hi, i am trying to use a custom .properties file i created to host some properties about a SQL database but the issue is that my spring app cant find it. i get the following error Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.properties] i have tried to put this file in the root of my project...

How to intercept NotifyPropertyChange event

Hi I just recently discovered an INotifyPropertyChange interface. I managed to implement this interface in my clss and everything works fine. However I was wondering if it is possible to intercept this event in code and fire a function Let's say that I have a function DoStuff() and I wan't to fire this function everytime property1, p...

Handling property dependencies

When developing a class (in C# but I suppose this question is somewhat language independent) what is the correct way to deal with dependencies between properties? For example where I want to create a property B whose value is derived in some way from the value of property A. Property B is undefined and should not be called if property A...

Can I get a reference to a Python property?

If I have this: class foo(object): @property def bar(self): return 0 f = foo() How do I get a reference to f.bar without actually invoking the method, if this is even possible? Edited to add: What I want to do is write a function that iterates over the members of f and does something with them (what is not important)...

xml-like properties in a user control declaration

Hello I've created a user control that takes content from an XML file and renders the content on the page. Fairly straight-forward stuff. However it's come up that I may need to replace portions of the content based on id with other manual content. My idea is to expose a repeatable property within the user control's declaration like t...

Passing a propel criteria to the symfony routing function that retrieves the object

Hi guys, quick symfony / propel question. I have the following propel collection route: api_offer: class: sfPropelRouteCollection options: prefix_path: /api/offer model: Offer plural: offers singluar: offer actions: [ list ] module: apiOffer requirements: sf_format: (?:html|json) My question is, does ...

Maven: property substitution not done for /project/version tag of pom?

http://maven.apache.org/pom.html#Properties says property "values are accessible anywhere within a POM". Should this read "are accessible in most places within a POM"? I can specify the version of a dependency no problem like so: <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}...

How to share properties between multiple Visual Studio projects? (especially C# projects)

Keeping properties of multiple Visual Studio projects manually in sync is annoying. So, how can you share properties between multiple projects? Edit: I refer to properties like conditional compilation symbols, treatment of warnings and errors etc., i.e., things you can configure in Project->Properties tabs or by editing the project XML...

EXC_BAD_ACCESS when setting ivars directly (without using accessors) inside -init method, why?

I've spent about 10 hours trying to find this bug that was causing my app to crash, and it was in the last place I looked (well it would have been, but last place I ever expected it to be). Originally I thought I had memory management issues (unbalanced retain/release) because the crash would happen every time I sent -removeAllObjects t...

using character entities in java properties file

I'm trying to add some text to a web app via a java .properties file. I want the text to have an en-dash in it. If I add the character entity, thus: myProp=Foo &ndash; Bar or myProp=Foo &#8211; Bar I get the code in my output. If I add the literal character to the properties file (and save as UTF-8): mProp=Foo – Bar I get the li...

xml properties file location in web java app

Hi, I have a web app in java, and in a servlet I need to load properties from a xml file. The code is XMLReader reader = XMLReaderFactory.createXMLReader(); ... FileInputStream fis = new FileInputStream("myconf.xml"); reader.parse(new InputSource(fis)); My question is: where should the myconf.xml file be placed in the war file...

Is there any Java Web Application that dynamically allows to publish the contents of a .properties File and let me modify it?

Hi, As part of all the development of some use cases, I've used a properties file approach to handle almost all the configuration parameters in the project. Even when this approach is a security safe approach, I need to be able to change this parameters on the application, so I need an admin web module to be able to change at runtime a...

Calling a property or method using an attribute name

Let's say I have a class that looks like this: public class CallByAttribute { [CodeName("Foo")] public string MyProperty { get; set; } [CodeName("Bar")] public string MyMethod(int someParameter) { return myDictionary[someParameter]; } } How would I call these two properties or methods, using CodeName ...

Haskell Parsec and Unordered Properties

I am trying to use Parsec to parse something like this: property :: CharParser SomeObject property = do name parameters value return SomeObjectInstance { fill in records here } I am implementing the iCalendar spec and on every like there is a name:parameters:value triplet, very much like the way that XML has a name:att...

Is it possible to have a property that spans multiple lines in messages.properties?

Hi, is it possible to have a property that has multiple lines in messages.properties? e.g. (my.property below) my.property=This property will be in two lines my.property.two=Another property I need this for help texts which I'll be putting in the properties file... and I don't want to do appends. Any help would be appreciated. Than...

Elegant solution for managing .properties files in glassfish/tomcat/etc

Does anybody have a good solution for managing .properties files in a web application? Currently I have to pull apart my .war file before deploying, change the entries in my .properties file, and then redeploy to change settings. Alternatively I can ssh into the server, change the .properties file in the deploy directory and restart ...

Create new object within a for-in-loop

I want to create a new object and assign some properties for each array stored within some json. I have this mostly working except... for (var i in json) { a = 0; a++; a = new Object(); for (var key in json[i]) { var Key = key; var Value = json[i][key]; ...

Passing argument 4 of 'objc_setProperty' from incompatible pointer type

I am getting this warning on the following line: @synthesize labels; Now, the rest of my declaration (in the .h file) is as follows: @interface Menus:SuperClass<Protocols> { ... UILabel **labels; } @property (nonatomic, retain) UILabel **labels; Does anyone know why this is happening? ...