Menu
  • HOME
  • TAGS

Spring 4 PropertySourcesPlaceholderConfigurer doesn't resolve ${..} placeholders across modules

java,spring,properties,configuration,placeholder

I believe this has to do with how spring works with pre/post processors. Basically you can have duplicated definition or use a different mechanism for loading properties. As much as I know before spring 3.1 duplication is the only way. More on http://www.baeldung.com/2012/02/06/properties-with-spring/#parent-child...

Excel VB Listbox losing Value and Text Property

excel,excel-vba,properties,listbox

I saw that one of the listboxes was filled with a named range, I just removed the named range and filled the listbox manually, this seems to work fine and didn't give me more problems.

Java - Check properties file at compile time

java,maven,ant,properties

It's certainly possible to do all sorts of things at compile time with custom compiler tasks etc, but I don't think it's very practical. Personally, I'd have an enum of property keys and property files for their value configurations - something like: public enum { CONST_NAME } and MyConstants.get(CONST_NAME) and...

Readonly version of a class only for non inherent classes

c#,inheritance,properties

Use protected fields to enable writing from base and inherited classes, expose a public read-only property: public class A { protected string FooField; public string Foo { get { return FooField; } } public A() { FooField = "A"; } } public class B : A { public B() :...

iOS: do something on each property change

ios,objective-c,properties

You can register as observer to the properties you want monitored. Cocoa's KVO functionality will help you here. Basically you need to call addObserver:forKeyPath:options:context: and register to be notified when the properties change. When this happens, the runtime calls the observeValueForKeyPath:ofObject:change:context: method on the object registered as observer. You can...

Passing keys to children in React.js

javascript,properties,reactjs

The key prop has a special meaning in React. It it is not passed to the component as prop but is used by React to aid the reconciliation of collections. If you know d3, it works similar like the key function for selection.data(). It allows React to associate the elements...

User defined properties in C# cause StackOverflowException on construction

c#,properties

You need a backing field. When you set that property, it will set itself, which will set itself, which will set itself, which will set itself, which will ... you get the gist. Either: private int _Property; public int Property { get { return _Property; } set { _Property =...

How to add Copyright and Authors info to Images created in PHP?

php,image,file,properties,file-attributes

I don't believe that PHP natively contains a function to edit the EXIF data in a JPEG file, however there is a PEAR extension that can read and write EXIF data. pear channel-discover pearhub.org pear install pearhub/PEL Website for the module is at http://lsolesen.github.io/pel/ and an example for setting the...

Setting controller property from inside a component

javascript,ember.js,properties,components

Get rid of the controller references, just set it on the component, it's what is in scope in the view anyway. Template {{#if image}} <img src="{{image}}" width="300"> <br> {{/if}} {{ file-input fileChanged="fileSelectionChanged"}} JS export default Ember.Component.extend({ actions: { fileSelectionChanged: function(file) { this.set('image',file.dataUrl); }, }, }); ...

Accessing Javascript/Google Apps Script properties via Object.keys TypeError

javascript,properties,google-apps-script,typeerror

When trying to extract the value of an object's property using a variable to reference the property's key, the variable representing the key should be enclosed in square brackets without the dot Logger.log(films[0][headers[0]]); https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors...

Exception in thread “main” java.lang.ExceptionInInitializerError Caused by: java.lang.NullPointerException

java,properties

It looks like your code is in a maven project. As such, place your properties file in src/main/resources/config.properties use getResourceAsStream("/config.properties") When doing a maven build, maven will package your jar and make the resources part of the classpath. Anything in resources/ will be part of the classpath root, since I...

The method getProperty(String) is undefined for the type Properties

java,jsp,servlets,properties

You need to import java.util.Properties; and you have imported the wrong class - com.sun.xml.fastinfoset.sax.Properties The classes are called the same but they are in different package. You probably use some IDE that automatically does your imports and it has imported the wrong type....

Wrong keys are printed using for..in on Object.keys()

javascript,object,for-loop,properties

In your specific example, this is because Object.keys returns an array. for ... in and Object.keys do very similar things, so you're iterating over the keys of the array of keys, hence your problem. You can see this by running: var obj = {10: 0, 11: 1, 12: 2}; var...

How to set a lot a class properties from an object with the same property names?

javascript,class,properties

Check if this has property and then assign from foo for(var property in foo) { if(this.hasOwnProperty(property)) { this[property] = foo[property]; } } or a better way is to loop all keys in this and you do not need if statement....

Execute a method when a variable value changes in Swift

ios,swift,properties,singleton

You can simply use a property observer for the variable, labelChange, and call the function that you want to call inside didSet (or willSet if you want to call it before it has been set): class SharingManager { var labelChange: String = Model().callElements() { didSet { updateLable() } } static...

Javascript Iterate on Dynamic Object Created

javascript,jquery,object,properties

The problem is your use of Object.defineProperty. By default it will create non-enumerable properties which, as the name suggests, cannot be enumerated by your loops. Just add the enumerable property to the definition: Object.defineProperty(k, names[i], { value : true, writable : true, enumerable : true }); Here's a working version....

PHP magic method __get and [] make value disappear

php,arrays,properties,get

$testObj->testArr[] = 1; Gives you a notice: Notice: Indirect modification of overloaded property T::$testArr has no effect in test.php on line 24 Make sure you've got your error reporting turned on....

How to create an variable property based on the other property in the class

swift,variables,properties

Declare restaurantIsVisited with the lazy keyword. This will insure that it isn't created until it is accessed the first time, and by that time you will be able to ask restaurantNames for its count: class someClass { // This is a list of restaurant names var restaurantNames = ["Cafe Deadend",...

Using value of propertie in his own custom attribute

c#,.net,properties,attributes

Attributes are just metadata, not code. So change it to something like: [Printable(FormatStyle = FormatStyles.XY)] public int MyProperty{ get; set; } Then the printer code can check for a FormatStyle parameter to the attribute and apply the requested format to the property. ...

How can I change the GUI controls' properties programatically in Matlab?

matlab,user-interface,properties,matlab-guide

Here's a small example: h = uicontrol('style', 'edit', 'string', 'initial string'); %// create object set(h, 'string', 'changed string'); %// change object property (The second line could be part of the another object's callback function, which causes the first object's string to change.) As an alternative, if you don't have a...

How can I override an inherited object's property in the constructor in javascript?

javascript,object,inheritance,properties,pixi

The code for PIXI.Container uses a setter for the height property. Therefore, you can't set it directly. See https://github.com/GoodBoyDigital/pixi.js/blob/master/src/core/display/Container.js#L78 Object.defineProperties(Container.prototype, { /** * The height of the Container, setting this will actually modify the scale to achieve the value set * * @member {number} * @memberof PIXI.Container# */ height: {...

Configure local variable in Spring PropertyPlaceholderConfigurer

java,spring,properties

Turns out that the solution was already in place and I didn't know. ${environment} was set as a system property in the production machine to which I had no access. Even so, the solution was just to add that property to my local development environment.

Using EF6 code-first, reference same property name

c#,entity-framework,properties,mapping

public class Customer { public int CustomerId { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } public virtual Address ShippingAddress { get; set; } public int ShippingAddressId { get; set; } public virtual Address...

How to show Data in JLabel and Jext Boxes java swing dynamically from properties file Without knowing data in properties file

java,swing,properties,core

Okay, so you have a Properties in key/value pairs, assuming that the key represents the label and the value the text, you can use propertyNames to get an Enumeration and iterate over the list ... that will allow you to create the labels/fields. GridBagConstraints constraints = new GridBagConstraints(); constraints.gridx =...

What's wrong with Property without set?

c#,wcf,serialization,properties,datacontract

Readonly properties are not serialized. Because when they will be deserialized they will not have setter. To avoid that issue, read-only properties are not serialized in the first place. Same case when set is private like public List<Foo> Bar {get; private set;}`. Read Why are properties without a setter not...

Read-only attributes via properties versus via documentation

python,properties,attributes,private,readonly

First note that there's almost no technical way to prevent someone to access your object's implementation and modify it if he really wants to. Now wrt/ your question / example: using an implementation attribute (_x) and readonly property makes the intent quite clear if your list is really supposed to...

Assigning methods to object at run-time - Design Pattern

c#,.net,design-patterns,properties,lazy-loading

One of the ways in which you could achieve your desired behavior, is to use something that resembles a miniature IoC framework for field injection, tuned to your specific use case. To make things easier, allow less typing in your concrete classes and make things type-safe, we introduce the LazyField...

Objective-c readonly copy properties and ivars

objective-c,properties,automatic-ref-counting

A @property declaration is merely shorthand for some accessor/mutator method declarations, and (in some cases) synthesized implementations for said accessor/mutator methods. In your case, the @property(nonatomic, copy, readonly) NSData *test declaration expands to this equivalent code: @interface A : NSObject { NSData* _test; } - (NSData*)test; @end @implementation A -...

Grails , domain properties .. How can i get at the value?

grails,properties

Groovy automatically generates gets and sets: class Domain { String someValue } Domain domain = new Domain(somevalue:"somevalue") //or domain.setSomeValue("someValue) println domain.getSomeValue if you want to access directly just do: [email protected] ...

Property not storing between pages:

vb.net,properties

In your code you are accessing a class declared locally as c. To get the values to persist across pages, you are likely storing that class in a Base Page or in Session. If you are storing it and retrieving it from Session, make sure after you set it's Properties...

if a property sample work

python,properties,descriptor

This would make sence: class Hidex(object): def __init__(self, x): self.__x = x @property def x(self): return ~self.__x @x.setter def x(self, x): assert isinstance(x, int), 'val must be int' self.__x = ~x Looks like @property in the code of your question is not the builtin but a different version. This is...

EF 6 database first make all properties virtual in generated entity classes

c#,entity-framework,properties,virtual

There is a simple solution. Inside the file, find the CodeStringGenerator class, lookup this method: public string Property(EdmProperty edmProperty) { return string.Format( CultureInfo.InvariantCulture, "{0} {1} {2} {{ {3}get; {4}set; }}", Accessibility.ForProperty(edmProperty), _typeMapper.GetTypeName(edmProperty.TypeUsage), _code.Escape(edmProperty), _code.SpaceAfter(Accessibility.ForGetter(edmProperty)), _code.SpaceAfter(Accessibility.ForSetter(edmProperty))); } One simple edit will be enough: public string Property(EdmProperty...

Get List of Elements in Tree with specific Field Value

vb.net,linq,properties,interface

If i have understood it correctly you want to get all selected parents and all selected children. You could use a recursive method: Public ReadOnly Property checkedList As List(Of TreeSelectorAttributes) Get Return rootList.Where(Function(t) t.SelectedInTreeSelector). SelectMany(Function(root) GetSelectedChildren(root)). ToList() End Get End Property Function GetSelectedChildren(root As TreeSelectorAttributes, Optional includeRoot As Boolean =...

Overriding properties to make them readonly - what about the setter?

c#,inheritance,properties,polymorphism,setter

You can't, or really shouldn't, have a design where the sub types "hide" functionality of the base type. You can: In your setters throw a NotSupportedException, or similar. This is how the Stream class behaves when you try to set the length of a stream that cannot be set. Change...

VB.NET - Extend property in child class

vb.net,inheritance,properties,expand

I recommend doing the work in an overridable function. This way you can have the child class do its work then call MyBase.overriddenFunction(). For example: Base Class Public MustInherit Class Base Private pHello as String = "" Public Property Hello As String Get Return pHello End Get Set(ByVal value As...

Java Arraylist want to merge the objects if they have the same property value

java,object,arraylist,properties,merge

First create a class to handle this datas. There's two important points to note. The equals and hashcode method are only based with the isbn and palletNumber values and there is a merge method that returns a new instance of PackingListRow with the quantities between this and an other instance...

How to load properties files dynamically when using servlet with war file?

java,properties,jboss,resources,war

I finally did it by making a module :). Credits to: https://developer.jboss.org/thread/219956?tstart=0...

Get @CucumberOptions tag property using System.getProperty()

java,eclipse,properties,cucumber-jvm,test-runner

You can use the cucumber.options environmental variable to specify the tags at runtime mvn -D"cucumber.options=--tags @Other,@Now" test This supercedes the tags already contained in the test code....

spring 4 @PropertySource relative path

java,spring,properties

So the solution is based on fact that we may extend classpath by specifying items in manifest file. So we need to 1) Leave properties file in /src/main/resources 2) Exclude it from a final jar <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <configuration> <excludes> <exclude>**/*.properties</exclude> </excludes> <archive> <manifest>...

Itcl What is the read property?

properties,tcl,itcl

All Itcl variables are mapped to Tcl variables in a namespace whose name is difficult to guess. This means that you can get a callback whenever you read a variable (it happens immediately before the variable is actually read) via Tcl's standard tracing mechanism; all you need to do is...

Getting runtime properties with ReflectionClass

php,class,object,properties,access-modifiers

ReflectionClass::getProperties() gets only properties explicitly defined by a class. To reflect all properties you set on an object including dynamic properties, use ReflectionObject which inherits from ReflectionClass and works on runtime instances: $reflect = new ReflectionObject($this); ...

How to left pad zeroes to number between 1 to 1000 while reading it from file?

java,file,properties

When you specify "d" in string format as here: String R= String.format("%02d", RegisId); You have to provide integer as an argument and error message is saying you that: "d != java.lang.String". The correct version should be: String R = String.format("%02d", Integer.parseInt(RegisId)); ...

How pass BeanShell param from one Thread Group to a Counter in another Thread Group

multithreading,variables,properties,jmeter,beanshell

Properties can only be strings. Try something like this: props.put("start", Long.toString(passed)); On the receiving side you will have to convert back to a long. For sharing data that is not a string, you can use the BeanShell shared namespace, bsh.shared. See http://jmeter.apache.org/usermanual/best-practices.html...

Read a specific word properties value in java

java,file,properties

To get the values for [D-1], [D-2], and so on you will first need to read the lines from the file. If the line starts with using string.startsWith(""transmit"); then you split the string using string.split("="). Split it by the equal sign because that is what splits the values and the...

Referencing properties in mongoose

node.js,mongodb,properties,reference,family-tree

This should work: var gran1 = new Grand ({ name: "Paul", childs: dad1._id, grandchilds: dad1.child }) ...

Java - Running JAR refuses to load file in the same directory

java,file,file-io,properties

You read your file as a resource (getResourceAsStream("properties");). So it must be in the classpath. Perhaps in the jar directly or in a directory which you add to the classpath. A jar is a zip file so you can open it with 7zip for example add your properties file to...

Updating a PFObject from a different view controller

ios,properties,parse.com,pfobject

In the second controller, you're setting its reference of the PFObject to nil. This does not affect the object itself or the first view controller as it still has a reference to the object. It would be better to define a data model that is accessible by any view controller,...

How can I access an array/object?

php,arrays,class,object,properties

From the question we can't see the structure of input array. It maybe array ('id' => 10499478683521864, 'date' => '07/22/1983'). So when you ask $demo[0] you use undefind index. Array_values lost keys and return array with numerous keys making array as array(10499478683521864, '07/22/1983'...). This result we see in the question....

How to loop through the properties of a Class? [duplicate]

c#,class,reflection,properties

Something like: object obj = new object(); PropertyInfo[] properties = obj.GetType().GetProperties(); foreach (var p in properties) { var myVal = p.GetValue(obj); } Note you need to allocate the object and pass it into the PropertyInfo. ...

What CSS prefixes for properties I should use? [closed]

css,properties,prefix,use

Welcome to vendor prefix hell! If this is a one off According to Can I Use -moz- and -webkit- will cover you for early versions of Firefox, Chrome, Safari, Android and Blackbury and all other major user agents either don't need a prefix or simply don't support it no matter...

How to get value of unknown properties (part solved already with reflection)

c#,reflection,properties

this is how you can do it. (by the way, your code might error out on "dictionary key not being unique" since the second userItem will try to add the same property name to the dictionary. you might need a List<KeyValuePair<string, string>>) foreach (var property in theProperties) { // gets...

Properties and auto-implementations

c#,properties,field

First, is there any reason to use a private property? Usually, no. Properties are great for encapsulation. One advantage (there are many more) of using a property is that it can do validations before assignment. When you have something private, you usually don't need to protect things from yourself....

How to expose internal control's property to its parent UserControl in WPF

wpf,xaml,properties,user-controls

I would create two DependencyProperties, one for the Text and one for the Image Source. The Image Source DependencyProperty will automatically set the inner Image control's source whenever it is updated. Similarly, the Text DependencyProperty will be setting the Text of the inner TextBlock control as well. Here is the...

C#: How can I expose a class property to one class but not to another?

c#,properties,hide,visibility

public class BasicStudentInformation { public int StudentId { get; set; } } public class StudentInformation : BasicStudentinformation { public bool CanChangeBus { get; set; } public List<int> AvailableBuses { get; set; } } public class BusChangeRequestModel { public BasicStudentInformation StudentInfo { get; set; } ... ... } public class BusChangeResponseModel...

Creating a custom property class for multiple re-use within a class

c#,properties

You're close. You can do something along the lines of this: public class Dirty<T> { public Dirty(Func<T> valueFactory) { this.valueFactory = valueFactory; dirty = true; } private Func<T> valueFactory; private bool dirty; private T value; public T Value { get { if (dirty) { value = valueFactory(); dirty = false;...

Get properties of runtime created list item in Unity

list,unity3d,properties

Because I already created the prefab for the list item, along with its properties so I figured out a way to access its grandparent's properties by using this code GameObject parent = this.transform.parent.transform.parent.gameObject; PostItem item = parent.GetComponent<PostItem>(); postID = item.PostID; ...

Not allowed to use property observer

swift,properties,sprite-kit

To make sure the sprites have the same position, set the position after physics and SKActions have been simulated. Do this in the didFinishUpdate() method of SKScene: override func didFinishUpdate() { sprite1.position = sprite2.position } ...

Extracting a property several levels deep from JSON

javascript,json,properties

I noticed that your result is an array. You will need to access the first element of that array: jsonReturn["results"][0]["formatted_address"].Value Resource: http://wiki.unity3d.com/index.php/SimpleJSON...

OrientDB import CSV is modifying my property name

csv,properties,import,character,orient-db

I got it. When I looked at that weird character in the raw JSON format through the web browser, it had a title of "\ufeff". The property with the weird character was the first property in the .csv header. Since my text editor was set to "UTF-8" instead of "UTF-8...

Variable value assign and retrieve

c#,variables,properties

You can look at the IL if you want. Here's a simple sample using linqpad: void Main() { int i ; i=5 ; i.Dump(); i_p = 6; i.Dump(); } // Define other methods and classes here public int i_p {get; set;} and here's the IL for it: IL_0000: nop IL_0001:...

SoapUI correlation (property transfer)

properties,soapui,correlation

If you've problems using transfer properties step to get the JSON value from your response, you can use a groovy test step to achieve your goal. So create a groovy test step to parse your response, get your value and set it as a property (for example at testCase level)...

Localization in the hmc structure

xml,properties,localization,structure,hybris

In your hmc.xml you reference original_totals this should be section.original_totals leading to: name="section.original_totals". If you overwrite/extend existing functionality and you are not sure how to declare your code it is always a good habit to look for the original files, in this case the hmc.xml in the hmc extension.

access the user control property at clinet side

asp.net,properties,user-controls

Try somthing like this. public SearchResultsGridUpdateMode Mode { set { this.txtdxKeyword.ClientSideEvents.GotFocus = "function(s,e) { CheckMode('" + value.ToString() + "'); }"; Header = value.ToString; hfMode.Value = value.ToString; } get; } ...

Python 2.7 @property usage results in error “global name '_c__pro' is not defined”

python,python-2.7,oop,properties,encapsulation

You need to use self. when accessing member variables: def __init__(self): self.__pro = 1 @property def pro(self): return self.__pro *10 ...

Why does binding image path to Image.Source does not work this way

wpf,image,xaml,binding,properties

<Image Source="pack://application:,,,/Resources/Images/Icons/32/edit-vector2-32.png"/> This works because ImageSource has a value converter (ImageSourceConverter) attached to it, which automatically converts strings to image sources. The first case should work too (and does in my test project). ...

Best way to include relative path with file array

c#,arrays,class,properties

I think I'd just create a new object with a FileInfo member and a string for relativepath member. I wouldn't try to derive that class from anything though, it doesn't really give you any benefits and just increases complexity.

How to get enabled property of a control?

delphi,properties

If you have the window handle for a control, then the IsWindowEnabled function will tell you whether it is enabled. Keep in mind that that is acting on the window at the API level, not the Delphi VCL level. In Delphi, there can be controls that do not have window...

How to prohibit making a copy of a public field or property in C#

c#,properties,field,wrapper

All you're doing by writing foo.Bar is exposing a reference to that object. What they do with the object at that point is up to them. They can store it for later use (as var bar = foo.Bar) or operate on it directly (as foo.Bar.DoSomething()). The only way to keep...

TypeBuilder - Adding attributes

c#,dynamic,properties,custom-attributes,typebuilder

An instance of an attribute isn't helpful here you need to define the constructor and the values that should be called. A simple solution might be to change the AddProperty Signature and exchange the params Attribute Parameter with a params CustomAttributeBuilder Parameter and construct Builder instances instead of attributes. var...

Spring: @NestedConfigurationProperty List in @ConfigurationProperties

spring,properties,configuration,spring-boot

You need to add setters and getters to ServerConfiguration You don't need to annotate class with nested properties with @ConfigurationProperties There is a mismatch in names between ServerConfiguration.description and property my.servers[X].server.name=test ...

Error message in a property

wpf,vb.net,data-binding,properties

Your Time_HH property is an Integer, there's no way it's gonna contain a non-numeric character. At most, what will happen is that your Binding will fail due to the type mismatch (is your TextBox showing a red outline?) If you wanna check if your user enters non-numeric characters, you have...

Passing a condition into Func of a Tuple>

c#,properties,tuples

Like this (using a lambda expression): List<Tuple<string, string, Func<bool>>> properties = new List<Tuple<string, string, Func<bool>>> { Tuple.Create<string, string, Func<bool>>( FirstName, "User first name is required", () => FirstName == null), }; ...

How to declare in Swift a function parameter that is a property name

swift,properties,closures

You just need a Thing->CGPoint. A function literal is as good as a function there: let x = X(pointFunction: {$0.whereAmI}) If you could promise that whereAmI were a method rather than a property, then you could do some other tricks (see http://oleb.net/blog/2014/07/swift-instance-methods-curried-functions/), but it only works with methods. Inexplicably IMO...

Why is happened property write error?

properties,borland-c++

never heard of TRevStrings before so it is either BCB 3 discontinued stuff (my BDS2006 does not have it at disposal) or you have some 3th party custom package installed but the header file suggest it is based on String grid so if below text does not work for it...

Share array or list between C++ and QML via property

c++,list,properties,qml

The need for NOTIFY signal is optional. I guess it is for when we need to deliberately let QML know that the data is ready but the data will be consumed when it READs data. Aside from this we can almost always avoid programming NOTIFY. I even do rootItem->setProperty("propertyName", value)...

can es6 class have public properties as well as functions?

javascript,class,properties,public,ecmascript-6

You'd need to put it inside your constructor: class myClass{ constructor(){ this.someObject = { myvalue:value }; } } var obj = new myClass(); console.log(obj.someObject.myvalue); // value If required, you can add the object onto the prototype chain the same as you would in ES5: class myClass{ constructor(){ } } myClass.prototype.someObject...

getting property of circular socket object nodejs

javascript,jquery,node.js,sockets,properties

The problem is that you're printing it out too early. It's not connected yet. Therefore what you printed out is correct - it's not connected. The reason it works form the console is because by the time you type in the console it's already connected. To prove this, print it...

How can I POST JSON values without property expansion in soapUI?

json,post,properties,parameters,soapui

To prevent the property expansion from replacing ${MY_VALUE} you can add an extra $ like this: { "myNode":{ "myOtherNode":"$${MY_VALUE}" } } Doing that your original json will be sent like this: { "myNode":{ "myOtherNode":"${MY_VALUE}" } } ...

How comes properties act like functions?

javascript,properties,getter

JavaScript allows you to define getters for setters and properties (even on prototypes): Object.defineProperty(Array.prototype, 'count', { get: function () { return this.length; } }); console.log([1, 2, 3].count); Use sparingly. colors, specifically, uses the non-standard __defineGetter__ function instead, but to the same effect....

How to Change Properties in SimpleCV's SVMClassifier

python,properties,classification,svm,simplecv

Did you try to include nu in the parameter list?: classifier = SVMClassifier(feature_extractors,{'KernelType':'Linear','SVMType':'C','nu':None})? ...

Passing a class instance as a parameter to one of its own functions

objective-c,function,class,methods,properties

To have some naming conventions: "class instances" is akin of ambiguous. There are instances (or instance objects) having a class. classes, akin of type for an instance object. class objects So I assume that you want to use "instance objects of class X", when you write "class instances". To your...

Xcode Property Not Retaining Value

ios,objective-c,xcode,properties,nsstring

When you import classes you do not actually import any values. When you set the value of a property it is only set on that instance of the class. You will need to explicitly reference the property of your current instance to get the value you have set. One note:...

Objective C: Accessing properties of an object instance that's in an array that's a property of an object

ios,objective-c,osx,properties,casting

((Company*)myObject.companies[0]).myId Should do the trick...

unwanted object property changed when changing another object property c#

c#,object,properties,copy,instance

The reason why it is not working is because you are doing shallow copy by just adding the pointer of product object into the list, not all properties. So if you change one, another will be affected accordingly. You can use deep copy following this answer, but this way you...

Get and add all properties of type Mname from a list of objects and add them dynamically too a drop down

c#,linq,list,object,properties

In a foreach loop the type of your loop variable is the type of the items in the collection, so you want: foreach (Monster m in monsterObjectList) ddlMonsters.Items.Add(new ListItem(m.MonsterName)); You could also bind the list as the data source: ddlMonsters.DataSource = monsterObjectList; ddlMonsters.DataTextField = "MonsterName"; ddlMonsters.DataBind(); ...

unknown behaviour in C# windows form application

c#,class,properties,set

For every time adding an object into a List, you should "new" (create new instance of) that object before calling the Add() method. Product product = new Product(); product._id="original value"; productList1.Add(product); productList2.Add(product); product._id="new value"; // this will change both object instances that you have added to the 2 lists above....

wrong number of template arguments (3, should be 4)

c++,templates,properties,arguments,getter-setter

There are three mistakes in your code: Firstly, to get the address of a member function, you need to include the class name: RWProperty<uint, OptionSet , &OptionSet::getNumberOfVbo // ~~~~~~~~~~~^ , &OptionSet::setNumberOfVbo> uNumberOfVbo; // ~~~~~~~~~~~^ Secondly, to form a pointer to const qualified member function, you need to append const keyword...

Where is the source code for maven-properties-plugin?

maven,properties

The codehaus project has ended. Or the hosting there. The new location is http://www.mojohaus.org - they have a github home as well: https://github.com/mojohaus/ The sources your are looking for is at https://github.com/mojohaus/properties-maven-plugin I think not all redirects or sites work. But that will come :)...

How can I find the value of a property in Javascript?

javascript,properties,value

You can o.x o.['x'] // or You can declare it before use var prop = 'x'; o.[prop]; If you have objects array you can arr = [{ x:'abcd' },{ x:'lkjh' }] for(var i=0;i<arr.length;i++){ var val = arr[i].x; var val2 = arr[i]['x']; //or //console.log(val+" "+val2) alert(val+" "+val2) } If you need...

Guice Names.bindProperties(binder(), properties) on output of a module?

properties,guice

Thanks to durron597 for the pointer to the related question which gave me enough to figure out. The answer is to use a child injector to take action on the previous injectors output. Example below: Injector propInjector = Guice.createInjector(new PropertiesModule()); PropertiesService propService = propInjector.getInstance(PropertiesService.class); Injector injector = propInjector.createChildInjector(new MyModule(Objects.firstNonNull(propService.getProperties(), new...

Changing Font-Family Property of a Label via Nativescript on Android

android,fonts,properties,nativescript

Courier New is remapped to another font. See here for a list of fonts and their aliases that are built-in. To understand the difference you might try something like the following code (any valid font can be used in place of sans-serif-light here): var heading = view.getViewById(page, "blogHead"); heading.android.setTypeface(android.graphics.Typeface.create("sans-serif-light", android.graphics.Typeface.NORMAL));...

Objective-C public get set method for private property

objective-c,properties,private,synthesize

If you want a public property to mirror a private one, just override the public property's getter and setter and return the private one. @interface Test : NSObject @property NSObject *publicObject; @end Then, in the implementation: @interface Test () @property NSObject *privateObject; @end @implementation Test - (NSObject *)publicObject { return...