attributes

[IMAGE] Magento Description/Attributes Replace?

I'm having trouble swapping Short Description (Quick Overview) with Additional Information (Attributes) Here's an image better explaining what I'm trying to accomplish: I posted links to CodePaste.net Here is my View.PHTML Here is my Attributes.PHTML Here is my Tabs.PHTML Here is my Catalog.XML I know most files posted are ...

Does MVC SiteMap 2.0 support custom attributes?

I'm using v2.0 of the MVC SiteMap project. With the System.Web.XmlSiteMapProvider in webforms, I often stored custom attributes on nodes, and accessed them through the Attributes[] collection. This is very useful for building non-standard collections of nodes, that all share an attribute. The MVC SiteMap doesn't seem to support custom...

Python: How to override data attributes in method calls?

My question is how to use data attributes in a method but allow them to be overridden individually when calling the method. This example demonstrates how I tried to do it: class Class: def __init__(self): self.red = 1 self.blue = 2 self.yellow = 3 def calculate(self, red=self.red, blue=self.blue, yello...

How do I send parameters to advanced search in Magento?

Hi, I have the following search form in Magento: <form action="catalogsearch/advanced/result/" method="get" id="form-validate"> <input name="name" type="text" id="textfield" value="" /> <select name="platform" id="select"> <option value='6'>XBox</option> <option value='5'>XBox 360</option> </select> <input type="submi...

How to loop over a Class attributes in Java?

Hello everybody, How can I loop over a class attributes in java dynamically. For eg : public class MyClass { private type1 att1; private type2 att2; ... public void function() { for(var in MyClass.Attributes) { System.out.println(var.class); } } } is this possible in Java? ...

How to determine whether an interface type implements a custom attibute

Hi, How to determine whether an interface type implements a custom attibute? ...

How does one have the C# designer know the default property for a Padding or other object/struct in C#

How does one tell the designer the default value of a Property when it is not one of the types supported by DefaultValue()? For instance, a Padding, or a Font. Normally, when you use a Windows Forms control, the default values will be in a normal font in the Properties window, and changed (non-default) values will be in bold. E.g. In...

Compiler error when changing deprecated void _init() to use __attribute((constructor))

I decided it would be a fun side project to do some work on tsocks, since it hasn't seen any updates in 8 years. It's hosted here on GitHub. I only made cosmetic changes to the code so far, but now I've run into a compiler error. According to dlopen(3): The obsolete symbols _init() and _fini() [...] Using these routines [...] is not r...

i want to adding "xmlns" attribute in xml file using xslt

I want to following xml file output: <?xml version="1.0" encoding="ISO-8859-1" ?> - <T0020 xsi:schemaLocation="http://www.safersys.org/namespaces/T0020V1 T0020V1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.safersys.org/namespaces/T0020V1"&gt; - <INTERFACE> <NAME>SAFER</NAME> <VERSION>04.02</VERSION...

A strongly typed, localizable DisplayNameAttribute

I'm trying to write a strongly typed, localizable DisplayNameAttribute, but I can't get it to even compile. What I'd like to do on my viewmodel properties is something like [LocalizedDisplayName<HomeResources>(r => r.WelcomeMessage)] which would basically do the same thing as [DisplayName("Welcome to my site!")] except the message ...

Jquery disable input with attr()

Hi, I have a wired behaviour when I try to disable or readonly a input field using the attr(). removeAttr('disabled') is working ok. attr('name', 'somthing') is working attr('id', 'something else') is working attr('disabled','disabled') not working -> it writes only disabled="" in the DOM and it does not disable the input field at...

which scope (application, servletContext, httpSession) will EL use for interpreting attributes

Hi all, when I use <c:out value="${track}"> in a jsp, where should the attribute track be located in (servletContext, httpSession and request)? I tried to have a controller to set the attribute track to the httpSession, but then ${track} doesn't give me anything in the .jsp. On the other hand, if I set it to the servletContext, ${track}...

Cookies, updating the expiration date on each request in mvc

I have a fairly simple web app that uses cookies to store some information about the user and to authorize them on each request. When the user first logs into the site a cookie is created and some encrypted information is stored in there, the expiration is set for the current time plus 24 hrs. What I want to achieve is that whilst a user...

How to save an XML file on the web server using PHP?

I am a beginner in PHP and I know nothing about XML manipulation. I am working on a Google CSE annotation XML shown below: <?xml version="1.0" encoding="UTF-8" ?> - <Annotations> - <Annotation about="http://sanspace.in/"&gt; <Label name="_cse_byxamvbyjpc" /> </Annotation> - <Annotation about="http://blog.sanspace.in/"&gt; <Lab...

Magento adding install object

I'm creating a module that let's you define some extra options for categorys in Magento, following this tuturial to get started: http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/installing_custom_attributes_with_your_module I built on a skeleton module created with ModuleCreator. I have ...

How can I manipulate the parent attribute using artifact:pom?

I've been experimenting with generating pom.xml files using ant and maven-ant-tasks. So far everything has been working splendidly, but I have a problem with the parent attribute. artifact:pom doesn't support the nested "parent" element. This was my attempt at using the parent attribute: <artifact:pom id="maven-pom-test-s...

In Core Data, how do I access a specific attribute of every managed object (instance) of a given entity?

This is the Core Data object model I am working with (I am a new user, so I can't post pictures directly): http://i965.photobucket.com/albums/ae134/spindler77/Screenshot2010-07-26at112231AM.png All I am trying to do right now is to populate a UITableView with the "className" of every myClass instance the user has created and saved. My...

Is there any way to get the instance class inside the attribute code?

Is there any way to get the instance class inside the attribute codein C#? public class MyAttirbute : Attribute { public someMethod(){ this.InstanceClass???? } } ...

What's the simplest most elegant way to utilize a custom attribute

So a little confession, I've never written an attribute class. I understand they serve the purpose of decorating classes with flags or extra functionality possibly. Can someone give me a quick example of not just creating and applying an attribute to a class, but rather utilizing the attribute from another block of code. The only code s...

Passing Func as an attribute parameter to secure MVC routes

I'm trying to secure my MVC routes from a set of users that meet a set of criteria. Since MVC seems to use attributes quite a bit and Steven Sanderson uses one for security extensibility in his pro MVC book I started heading down this route, but I'd like to define the rule contextually based on the action I am applying it to. Some acti...