properties

async calls inside get accessor - is it good practice?

Hi! I have a window that shows customer infomation. when the window loads, I call LoadCustomer() method from the constructor which loads the customer information from the database asynchorously, which sets the CurrentCustomer property. and then the UI is updated because it is bound to the CurrentCustomer. private void LoadCustomer(...

How can i disable the excution of maven-war plugin by using variable in properties file

In my pom.xml, i used maven-war plugin to package different war files and properties-maven-plugin to read the properties file. <plugin> <artifactId>maven-war-plugin</artifactId> <executions> <execution> <id>package-war1</id> <phase>package</phase> <goals> <goal>war</goal> </goals> <configuration> ......... ...

Does Maven support properties inheritance?

Let's say I have a property foo defined in my parent POM. Is it possible to access the "foo" propery in any of the children? To give you a bit of context, I am working on a multi-module maven project with inheritance. I did search the web and some forums for a while and could not find the answer. Many thanks in advance. ...

How can I change a .properties file in maven depending on my profile?

How can I change a .properties file in maven depending on my profile? Depending on whether the application is built to run on a workstation or the datacenter parts of the file my_config.properties change (but not all). Currently I manually change the .properties file within the .war file after hudson builds each version. ...

Reference HTML node from another element

I have this script, which I thought was relatively simple. It basically makes a tree-layout of an iframe's contents. When parts of the tree are hovered, their corresponding iframe elements are 'selected'. But it isn't working, for the life of me. Here is some quick half-pseudo code: function traverseTree(c,o){ //c = the tree subset ...

Short cut to create properties in Visual Studio?

I have seen some people creating properties in C# really fast but I don't know how they did it. Does anyone know what short cut are available in Visual Studio (currently using 2010) to create properties? I am using C#. ex. public string myString {get;set;} Thanks. ...

properties file not working inside jar

I am having issues with properties file when I try to make my standalone Java aplication a runnable jar. I have 2 properties file, depending upon the machine where its running one gets initialized. Inside eclipse it was working fine. I was using: Properties configProps = new Properties(); .... if(machine1) .... configProps.load(Config.c...

How do I ensure the value of property for others that are dependent upon it?

I have a property like so: private Decimal _payout; public Decimal PayoutValue { get { return _payout; } set { _payout = value; //second part of following conditional is an enum if (Math.Abs(value) > 1 && this.PayoutType == CutType.Percent) { _...

Core Data question

Hi, the problem I am trying to solve in an application that is using Core Data is to be able to hold a calculated value in a NSManagedObject custom ivar. The calculated value that I want to store is in fact an image. I do not want to persist these images; I build them and destroy them throughout the lifetime of the application. I tried a...

Json.NET (Newtonsoft.Json) - Two 'properties' with same name?

Hi all I'm coding in C# for the .NET Framework 3.5. I am trying to parse some Json to a JObject. The Json is as follows: { "TBox": { "Name": "SmallBox", "Length": 1, "Width": 1, "Height": 2 }, "TBox": { "Name": "MedBox", "Length": 5, "Width": 10, "Height": 10 }, ...

Visual Studio 2010 Property Help

In Visual Studios 2005 and 2008 one can see a short sentence or two describing each property in the Forms Designer. This doesn't seem to be there with Visual Studio 2010. Is this an option that I have yet to turn on? Or is there something I just don't understand about the Help system? I would like quick access to information about th...

How do I get a WPF element to respond to changes in a VB Module?

Hi, Objects whose Properties are observed for changes must implement the System.ComponentModel.INotifyPropertyChanged event to alert their WPF-element observers that a change has occurred. If I have a Visual Basic Module whose Properties I wish to have observed by a WPF element, how should I go about routing the Properties of that Modu...

How to create a Class with List<> properties

The problem: - I want to read filename into a List<> inside a class. How to I read the filename into List<> in foreach Statement? How to set up the get and set statement in List<> properties in the class. For this operation, which type to use: static class or normal class? ------revise------------- This is the problem : sorry for th...

Explicitly defined setter not found in assignment expression

I have a small conundrum when it comes to Scala properties. Various blogs and tutorials tell me that this: class Something { var foo = 1 } ...can be specified as... class Something { private var _field = 1 def foo = _field def foo_(foo: Int) = _field = foo } This makes perfect sense to me, when doing assignment th...

How do you iterate through current class properties (not inherited from a parent or abstract class)?

I know that PHP5 will let you iterate through a class's properties. However, if the class extends another class, then it will include all of those properties declared in the parent class as well. That's fine and all, no complaints. However, I always understood SELF as a pointer to the current class, while $this also points to the curr...

How to define properties

I noticed that some developers use this syntax for properties : private int someVar; public int SomeVar { get { return someVar; } set { someVar= value; } } while some developers use this: public int SomeVar { get; set; } i am guessing both will be same ...

How to use a dictionary property in C# using LINQ

While I userstand how get; & set; with simple types such as strings now can more properties like Dictionary be get or set or can they? I have a small dos programe trying to do this. snippet below. # User.cs namespace LDIFMod { public class User { public string UserHash { get; set; } public string UserID { get; ...

Make Spring replace placeholders in different file type (other than Spring's configs)

is there a way to make spring (v.3.0) parse placeholders in file that are not .properties? I know I can write my own PropertyPlaceholderConfigurer but I was looking for a "cleaner" way to do it. Thank you :) EDIT : To be realy clear, what I want to do is to replace placeholders that are in .sql files. So the values of the placeholders ...

Illegal declaration of a property and a static function. why?

Can somone explain why I get this error on this code? Error 1 The type 'ConsoleApplication1.TestClass' already contains a definition for 'IsThisOK' class TestClass { public bool IsThisOK { get; set; } public static bool IsThisOK(string str) { return true; } public st...

wpf binding 2 properties of 2 classes

Hello, I have a XAML-object (window-control) having his own-properties in the code-behind (in my case it has a property called 'FirstEditableDate' without any UI-binding). I also have another XAML-object (user-control) with a property (also without UI) and I want to bind the other property to this property. So, if the property of the ...