w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Magento: set visibility of product attribute on frontend per shop
you set attribute property as per shop here i am giving your link to set attribute visibility per shop Please refer detail Document LINK And let me know if you need more help from my side.

Categories : Magento

How to install clang checker-275 and give me some example to configure Clang Scan-Build Plugin?
Please check this. I am also facing the same issue the i came to know that not only I but also many people facing the same issue. http://www.mail-archive.com/llvmbugs@cs.uiuc.edu/msg23874.html

Categories : Misc

clang error: non-type template argument refers to function that does not have linkage -- bug?
By definition of no linkage in C++.11 §3.5 Program and linkage ¶2, I originally believed foo<Bar> has no linkage since it cannot be referred to by name by any other scope except that which defined the type Bar (ie, main()). However, this is not correct. This is because the definition of a name with external linkage is described as: When a name has external linkage, the entity it denotes can be referred to by names from scopes of other translation units or from other scopes of the same translation unit. And for a template function, this will always be the case. This is because there is one other scope from which the name can be referred. Namely, the template function can refer to itself. Therefore, foo<Bar> has external linkage. zneak's answer, EDIT 2, has an e-m

Categories : C++

What is the actual reason why XAML controls are using 'Visibility' type instead of plain 'bool'?
instead of just having plain IsVisible property of type bool? Because there are multiple values in WPF, not just two. There are: Visibile Collapsed Hidden Visibility Enumeration - MSDN WPF has a Visibility state of Hidden. Silverlight does not support the Hidden Visibility state. If you are migrating XAML UI definitions from WPF XAML, you will have to edit any cases that attempt to set a Visibility to Hidden.

Categories : C#

An item of type 'Attribute' cannot be constructed within a node of type 'Root
<xsl:template match="Inspection[not(@lossFormsVersion)]"> <xsl:copy> <xsl:attribute name="lossFormsVersion">07-25-2013-1-54</xsl:attribute> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> For 2nd xml, your template matches the element where you write the attribute to output. xsl:copy copies the Ïnspection node and the attribute writes to that.

Categories : Xml

How to feed Visual Studio Clang-Format plugin with clang-format file?
Go to Tools->Options->LLVM/Clang->ClangFormat and put file in the Style option field. Then place you style file named .clang-format (this is the full filename, not an extension) either in the source file's directory or one of its parent directories. Windows Explorer won't let you create filenames with leading . so you need to go to the console for this.

Categories : C++

Unacceptable type of value for attribute - Desired type NSstring
The error is telling you exactly the problem. The type of object that your Core Data model is expecting for the key "routinename" is a string. Based on the code you have posted, extTitle is an array. Either fix the data model or, if you need to, you could write a method to convert the array into a string (although you probably should convert to/from an NSData object)

Categories : IOS

StackPanel visibility VS Grid Visibility
The DataContext of the Grid is CurrentMonitorAlert. The DataContext of the StackPanel is MonitorAlertViewModel. Thus, the binding to NoMonitorsMessageVisibility is resolving against the wrong thing in your Grid case. Setting the DataContext like that all over your view is somewhat unorthodox. Normally when doing MVVM you let WPF handle setting the DataContext (except possibly at the root level) and use deeper paths in your bindings if necessary. You might want to consider taking that approach.

Categories : Wpf

IE10: 'visibility:visible' on before pseudo-element of 'visibility:hidden' element
Filters don't work on pseudo elements in IE. Read: msdn Other specified styling properties apply to the appearance of the inserted content, not to the element's content. IE sucks, deal with it. I think the only way is to change the "hidden text" color to your background color, and you know the rest...

Categories : HTML

Get rid of xs:type attribute
The simplest thing for writing XSD (and the simplest thing for users, it says here) is to follow the principle that if one Awesome element is required to contain an a and a b, and another is required to contain some sequence of c, d, e, and f, then they are not the same kind of thing and should have different names. If you call them Awesome-ab and Awesome-cdef, the schema is trivial and it's easy for users to understand when they are allowed to use a and b as children and when they use the other elements. The xsi:type mechanism was added precisely for cases where the vocabulary designer wants to call different things by the same name but still validate them against different types. If you don't want to use different names for the elements of different type, and you don't want to use xsi

Categories : Xml

Unacceptable type of value for attribute with int value
The Property idMember is a NSNumber, but for some reason the value for your key @"id" seems to be an array (looks like there where all ids in it?) edit: responseMembers is a NSMutableArray, you should not be able to ask for a valueForKey. Try something like this instead: foreach (NSDictionary *member in responseMembers) { NSNumber *v = [member valueForKey:@"id"]; //do something with this id } the json you are reading looks like an array with many dictionaries, and your ids are one layer deeper: [ //first member { "content": "some entry", "id": 5, // some more attributes }, //second member { "content": "some entry", "id": 5, // some more attributes }, //and so on ]

Categories : Iphone

defining attribute type in UML if using PHP
A class diagram in UML is not completely independent of the language used. You can have multiple inheritance in some programming languages and not in others for instance. Some languages provide function overloading, some languages provide operator overloading. That will have its influence how you will develop your classes. In the UML diagram you should describe what you have made or will use. Not what you might have used if you would have used it. If you are using loosely typed attributes, then should that return in the design of your classes. Otherwise will people see a discrepancy between what you said you have designed and what is used. That makes it much more difficult to maintain the application. Always have in mind that you make the UML not only for yourself, but for that other prog

Categories : PHP

Perl regex to match alt attribute as mandatory but sometimes alt attribute comes before src attribute and sometimes after src attribute
Does it have to be just one regex only? use Data::Dumper; my $s = q{<img rel="relfoo" src="srcfoo">}; my @m; $s =~ m{ <img s+ ( ((w+)(?{push @m, $^N})) = "( ([^"]*) (?{push @m, $^N}) )" s* )+ > }x; my %h = @m; print Dumper \%h; die "alt is mandatory.. " if !exists $h{alt}; output $VAR1 = { 'rel' => 'relfoo', 'src' => 'srcfoo' }; alt is mandatory..

Categories : Regex

How to restrict an attribute of an extended type
You can certainly add elements to the type Entity when extending the type; you can certainly restrict the id attribute when restricting the type. The only things you cannot do, of what you describe, are (1) extend and restrict a type at the same time, and (2) 'restrict' an id attribute which accepts only uppercase alphabetic strings by allowing it to accept strings containing decimal digits as well. (Those may be what MiMo had in mind when he said you couldn't do what you want to do.) So the way to do what you want is: Define the complex type Entity, with an id attribute that allows all the forms of id you want to allow on derived types. For each derived type (in your example, someEntity and otherEntity), derive first a restriction of Entity, and then an extension of that restriction

Categories : Xml

Inheritance XML Deserialization by Type Attribute
This is a very basic way of doing it, but I think it works. I think if the class type was an element instead of an attribute then you should be able to parse it declaratively. The code basically switches on the type attribute top determine what subclass to create and then manually populates the concrete properties and the common property. [System.Xml.Serialization.XmlType("base")] public class Base { [System.Xml.Serialization.XmlElement("common")] public int Common { get; set; } } public class A : Base { public string ConcreteA { get; set; } } public class B : Base { public string ConcreteB { get; set; } } [System.Xml.Serialization.XmlRootAttribute("root")] public class Root : System.Xml.Serialization.IXmlSerializable { [System.Xml.Serialization.XmlElement("base")

Categories : C#

Detect type of JSON attribute
(I'm assuming that the Android for the org.json package is that same as you can find on the json.org site ... here.) The only method on a JSONObject that will give you the underlying value ... without coercing it ... is JSONObject.get(name). If name is known, the result is the object that represents the value internally. I haven't done a comprehensive trawl of the code, but I think it can only be one of the following types: Boolean, Long, Double, String, JSONArray, JSONObject You should be able to discriminate these using instanceof. But should be asking yourself if this is the right thing to do. The normal way to deal with JSON object attributes via the JSONObject API is to use the methods that coerce them into the type that you expect. In most cases, it doesn't matter if a

Categories : Java

What attribute type should I use to keep day and month, NOT year?
Two options: You can split your data in two fields: dayNumber and monthNumber, and store them in your MySQL database as two tinyInt fields. You can store the data as a char array (4 entries) in Java, and store the value in a Char(4) field in MySQL I would personally go with option 1

Categories : Java

Generic type attribute with OR constraint
There is no or. What you probably want to do is this: interface IKeyValue<TKey, TValue> { public TKey Key {get;set;} public TValue Value {get;set;} } public class Attribute : IKeyValue<string, string> { public override string ToString() { return String.Format("{0}={1}:{2}", Constants.ATTRIBUTE_CHAR, Key, Value); } } public class BoolAttribute : IKeyValue<string, bool> { public override string ToString() { return Value ? String.Format("{0}={1}", Constants.ATTRIBUTE_CHAR, Key) : String.Empty; } }

Categories : C#

Cant add value attribute to input type="submit"
i guess the code is as such Button.Attributes.Add("onclick", "javascript:return alert(value);"); You are missing javascript:return alert in your code..!!

Categories : Asp Net

Element type "application" must be followed by either attribute specifications, ">" or "/>"
You can't have spaces afaik in string resources. I would change @string/Your total is 0 to @string/total_is_zero and then create that string resource in strings.xml: res/values/strings.xml create this: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="total_is_zero">Your total is 0</string> </resources>

Categories : Android

How do I get the `.class` attribute from a generic type parameter?
Using .class on a type parameter isn't allowed - because of type erasure, W will have been erased to Component at runtime. InputField will need to also take a Class<W> from the caller, like InputFieldArray: public InputField(String labelText, Class<W> clazz) { super(new String[] {labelText}, clazz); }

Categories : Java

Magento get attribute type (e.g. dropdown or text)
There's a simple magic method to get the value of the object: $attribute = Mage::getModel('eav/entity_attribute')->load( $your_attribute_id ); $attribute->getFrontendInput(); The result is a short string, for example "text" or "select". Here's a short list of all types in Magento 1.7 (german translation): text: Einzeiliges Textfeld textarea: Mehrzeiliger Textbereich date: Datum boolean: Ja/Nein multiselect: Mehrfach Auswahl select: selected="selected: Drop-Down price: Preis media_image: Bild weee: Feste Produktsteuer (FPT) If you need a list of all options from a single attribute, do this: Mage::getModel( 'eav/config' )->getAttribute( 'catalog_product' , 'code_of_attribute' ) So you've load the attribute object. Other methods for loading an object doesn't work for me (e.

Categories : PHP

Element type "application" must be followed by either attribute specifications, ">" or "/>" #2
This is the right form, see if you didn't close some tags. <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" ...> <activity ...> <intent-filter> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>

Categories : Android

Does the value attribute in input type = "number" accept php
Is this error being shown when you run the application, or just in the Netbeans IDE? I suspect what is happening is that Netbeans is attempting to make sure that your HTML is valid, and so its checking that the value of your input field is actually a number, but its just running in the IDE and so $loggedInUser->user_id doesn't have any value and so its giving this validation error - if this is the case then it might well work at runtime. If you see this error at runtime then the problem is probably that $loggedInUser->user_id is empty when it should in fact be a number - you need to look at what should be populating that user id and figure out why its not working as you expect it to.

Categories : PHP

Element type "Button" must be followed by either attribute specifications, ">" or "/>"
Try cleaning your project Project --> Clean... then choose your project Sometimes Eclipse doesn't pick up changes to your xml. When you get goofy errors like this always try cleaning first. Sometimes you will get ClassCastException in Java code when running right after changing something in xml like cannot cast Button to EditText or something similar that won't make sense. This is also a good time to clean your project. I would also recommend getting rid of whitespace within elements because I have had trouble with that as well (especially on older versions of Eclipse) plus I think it looks cleaner. So I would change your <Button... to <Button android:id="@+id/btn2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/PNR"/>

Categories : Android

using oracle object type with number attribute on odp.net
I found the answer, after execute your parameter cmd.ExecuteNonQuery(); it caused ToCustomObject function from your type class that has been generated by odp.net in VS and in that function for all the Data and Number you have a parameter with same name of your numeric or data parameter as bool type. this varriable started with you column name and ended with IsNull OD_SUBMITTEDIsNull after you set value of your DATA or Number variable you should set this parameter as true. That's all :) OD_SUBMITTEDIsNull = true;

Categories : C#

How to branch based on attribute type in Rapidminer?
I don't understand what your process is trying to achieve. Do you mean you have many attributes that you want to aggregate based on their type. So you might have 300 attributes in total of which 100 are numeric, 100 are binominal and 100 are polynominal. Do you then want to aggregate the 100 numerical attributes into an average for each example, count the 100 binominals and perhaps find the mode of the polynominals? The end result would be three attributes summarizing each example.

Categories : Misc

AttributeError: 'HTTPResponse' object has no attribute 'type'
The problem is that you're trying to call urlopen on the result of urlopen. Just call it once, like this: nhl_site = urlopen('http://sports.yahoo.com/nhl/rss') tree = ET.parse(nhl_site) The error message probably could be nicer. If you look at the docs for urlopen: Open the URL url, which can be either a string or a Request object. Clearly the http.client.HTTPResponse object that it returns is neither a string nor a Request object. What's happened here is that urlopen sees that it's not a string, and therefore assumes it's a Request, and starts trying to access methods and attributes that Request objects have. This kind of design is generally a good thing, because it lets you pass things that act just like a Request and they'll just work… but it does mean that if you pass somet

Categories : Python

Rails 4 JSON attribute type not working with Postgres
OK, so it turns out at one point I had installed postgres via homebrew, and had also done so with Postgres.app at a different time. I began to realize this by checking the version of 'psql' and 'postgres' and noticed the distinction. psql --version psql (PostgreSQL) 9.0.4 postgres --version postgres (PostgreSQL) 9.2.4 I uninstalled Postgres.app using their documentation here and then using homebrew ensured I was using the most recent version of postgres.

Categories : Ruby On Rails

Python: Get attribute from a list of objects of the same type in the most efficient way
You could use a list-comp: C = [obj.Bar for obj in (A, B)] Or alternatively: from operator import attrgetter C = map(attrgetter('Bar'), (A, B)) Note: It's not strictly "at the same time" but looping over the objects one-by-one is as good as it gets. Also note, the objects don't even need to be of the same type - they just need to have an attribute Bar. You can use getattr to return default values if the attribute doesn't exist: C = [getattr(obj, 'Bar', None) for obj in (A, B)] Or, if you wanted to discard items that don't have that attribute instead of a default value: C = [obj.Bar for obj in (A, B) if hasattr(obj, 'Bar')]

Categories : Python

How to change attribute type to String (WEKA - CSV to ARFF)
This did the trick. It changed the text attribute type, but not the label attribute type (though I'm not sure why it did one but not the other). NominalToString filter1 = new NominalToString(); filter1.setInputFormat(data); data = Filter.useFilter(data, filter1); There's a small tip here By default, non-numerical attributes get imported as NOMINAL attributes, which is not necessarily desired for textual data, especially if one wants to use the StringToWordVector filter. In order to change the attribute to STRING, one can run the NominalToString filter (package weka.filters.unsupervised.attribute) on the data, specifying the attribute index or range of indices that should be converted (NB: this filter does not exclude the class attribute from conversion!).

Categories : Java

need to change attribute type from integer to decimal in rails
it looks right, i will post what i would so though soon. self.up and down is how your migration interacts with your database, when you run a rake db:migrate each migration will run the self.up in your database, and when you use rollback methods like rake db:rollback it will use the self.down method yeah you can update multiple lines. Here i posted an example of what i would do: https://gist.github.com/kazpsp/6226710 class Fixtables < ActiveRecord::Migration def self.up change_column :table_name, :column_name, :newtype change_column :table_name, :column_name2, :newtype change_column :table_name2, :column_name, :newtype end def self.down change_column :table_name, :column_name, :oldtype change_column :table_name, :column_name2, :oldtype change_column :table_nam

Categories : Ruby On Rails

AttributeError: type object 'challee' has no attribute 'display'
You indented the display and say methods too far; they are nested functions inside of the challee class. Note that you are never making instances; you are instead creating multiple references to the class. Call* the class to produce an instance: first = challee() second = challee() and then you don't have to pass in an explicit argument for self either: first.cname('becky')

Categories : Python

How to create an object attribute from polymorphic type in scala
Your problem is in that you are returning loaded(className) which is of type Bar, not T as is required by your function type signature. Unfortunately, you cannot encode such dependence between types of map keys and values, at least not with the standard map collection. You have to perform explicit cast. Here is a working example: import scala.reflect.ClassTag class Bar class FooBar extends Bar object Test { val classMap = scala.collection.mutable.Map[Class[_], Bar]() def getInstance[T <: Bar : ClassTag]: T = { val ct = implicitly[ClassTag[T]] classMap get ct.runtimeClass match { case Some(bar) => bar.asInstanceOf[T] case None => val instance = ct.runtimeClass.newInstance().asInstanceOf[T] classMap(ct.runtimeClass) = instance ins

Categories : Scala

Changing Attribute Type in Core Data with NSInferMappingModelAutomaticallyOption
Attribute type change is not supported by the lightweight migration: For Core Data to be able to generate an inferred mapping model, changes must fit an obvious migration pattern, for example: Simple addition of a new attribute Removal of an attribute A non-optional attribute becoming optional An optional attribute becoming non-optional, and defining a default value Renaming an entity or property Edit I assume you're using the lightweight migration. But as Scott pointed out, maybe you aren't. If you want to use automatic migration (which is not the same as the lightweight migration), you can still do this by providing the mapping model. In this case: Core Data will attempt to locate the source and mapping models in the application bundles, and perform a migrat

Categories : Objective C

How do I customize 'type' attribute to javascript_tag helper in Rails?
javascript_tag is for, um, JavaScript, it says so right in the name. If you want to use a <script> as a container for something that isn't JavaScript, just write it by hand: <script id="entry-template" type="text/x-handlebars-template"> alert('All is not good'); </script> or, if you must use a helper, use content_tag: <%= content_tag(:script, :id => 'entry-template', :type => 'text/x-handlebars-template') do %> ... <% end %> I don't see the point to using content_tag for this though, just seems to over-complicate things.

Categories : Ruby On Rails

The attribute lookup is undefined for the annotation type Resource
Try using the mappedName attribute as: @Resource(mappedName="jms/ConnectionFactory") Also if you still want to use lookup, then take a look at the javax.annotation.jar you are using. Lookup attribute was introduced in JavaEE 6. Probably you have an older version.

Categories : Eclipse

Change Attribute Display Type from Managed Bean in JSF
Yes! this is possible! put your h:inputText and h:outputLabel in a h:panelGroup and in the ajax event rerender the h:panelGroup. Put the condition of which one you want to render in the respective rendered attribute like bellow: <h:panelGroup id="changingPanel"> <h:outputLabel id="id1" rendered="#{managedBean.option == 'Yes'}" value="This is label"/> <h:inputText id="id2" value="#{managedBean.input}" rendered="#{managedBean.option == 'No'}" /> </h:panelGroup> <h:selectOneRadio value="#{managedBean.option}"> <f:selectItem itemValue="Yes" itemLabel="Yes" /> <f:sele

Categories : JSF

What type of attribute of core data choose for CGPathRef?
CGPath is a little tough to use here, because You can't save it directly into Core Data, since it's not a type that Core Data recognizes. It doesn't provide any API for converting it to a type that Core Data recognizes (e.g NSData). One way or another you're going to need to convert the CGPathRef (or its components) to a type that Core Data recognizes-- like NSData. It's most convenient to do this in a custom value transformer (look up NSValueTransformer). But the key is figuring out how to convert the data. You have a couple of possibilities: Don't save the path, save the data that you used to create the path. NSValue provides an API to convert instances to/from CGPoint, for example. And NSValue conforms to NSCoding. This would allow you to convert individual points to NSData, and

Categories : Objective C

xml error - Attribute name "mod_expires.c" associated with an element type "IfModule" must be followed by the ' = ' character
You missunderstood something that is no xml tag even it it looks like that is a so called directive. You cannot parse this as xml. See also the documentation about the if directive: http://httpd.apache.org/docs/current/mod/core.html#ifmodule

Categories : Xml



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.