attributes

common problems with images html

Are there any common problems why alt attributes on images wont work. Tested for IE8 Standards mode. Thanks in adv. ...

Ldap Removing Property attribut

I am trying to remove a property from ldap. I know that if I do entry.Properties["myProperty"].Remove(entry.Properties["myProperty"].Value); it keeps the attribut and sets the Value to null the question is how do I remove the entire attribute from LDAP coul someone help..? ...

How to retreive Active Directory environment and session information with VB.Net

I'd like to be able to get and set the different information for a user in Active Directory on Windows Server 2003 under Environment and Session tabs through a VB.Net application. I am familiar with System.DirectoryService but I can not find the correct attributes for these particular tabs. For example, I'd like to check "Connect Printer...

Are accessors in Python ever justified?

I realize that in most cases, it's preferred in Python to just access attributes directly, since there's no real concept of encapsulation like there is in Java and the like. However, I'm wondering if there aren't any exceptions, particularly with abstract classes that have disparate implementations. Let's say I'm writing a bunch of abst...

How to make an MVC AttributeFilter to verify posted file extension

I have a controller that handles file uploads. Ultimately I would like to be able to create attribute to decorate my controller actions like [HttpPostedFileType("zip")] or something similar. Currently I created this extension method which I use in the action. public static string GetFileExtension(this HttpPostedFileBase file) { ...

asp.net: add attribute to headers th

Hello, I changed a gridview's header to ... with Sub MakeAccessible(ByVal grid As GridView) If grid.Rows.Count > 0 Then grid.UseAccessibleHeader = True grid.HeaderRow.TableSection = TableRowSection.TableHeader grid.HeaderRow.CssClass = "" 'grid.FooterRow.TableSection = TableRowSection.TableFoote...

Validation Attributes MVC 2 - checking one of two values

Hi guys/gals, Could someone help me with this issue. I'm trying to figure out how to check two values on a form, one of the two items has to be filled in. How do I do a check to ensure one or both of the items have been entered? I'm using viewmodels in ASP.NET MVC 2. Here's a little snip of code: The view: Email: <%=Html.TextBoxFor...

Extract ns:version from wsdl file using php?

Hello, I have attempted to extract an attribute from the paypal soap wsdl file using SimpleXml and DOM in php5 but they all skip over the root tag where the namespace declarations are. It is not clear to me yet how to get a node referencing the root tag so that I can retrieve the value of ns:version using the current attributes functi...

Attribute Inheritence and Reflection

Hello All, I have created a custom Attribute to decorate a number of classes that I want to query for at runtime: [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=true)] public class ExampleAttribute : Attribute { public ExampleAttribute(string name) { this.Name = name; } public string N...

Ada: attribute 'last and 'safe_large

Hi, it's very common in Ada to create a derived type say a new Float type with the last element being Float'Last. I have not yet seen someone using Float'Safe_Large instead of the attribute Float'Last when defining a new Float type. On my 32-bit machine, both Put( Float'Image( Float'Last )); and Put( Float'Image( Float'Safe_large ))...

jQuery.attr() guarantee lowercase?

Does $(selector).attr(name) guarantee that the result is lowercase if the attribute is found? ...

Magento; include price attributes in (product) subtotal

Hi all, Hope someone can help me with this.. I have a magento store up&running, via the attribute management ive created a price attribute (type: price, label: "Extra costs") and added it to the right attribute-set. Now "Product A" has a price of $1 and "Extra costs" set to $2 When i order the product i kinda expect a subtotal of $3 ...

Rails: How to name a attribute of a model in a specific way?

Hey Guys, i am searching for a solution of my little problem - maybe you wanna help ^^ I have in Ruby on Rails modeled to classes "Person" and "Contact". A Person can have many contacts and a Contact can have one specific person and describes this relation with a value class Person < ActiveRecord::Base has_many :contacts end class C...

Difference in using Attributes/Interfaces in C#

This is not properly a question but something more like a thought I had recently. I'm taking XmlAttribute to XmlSerialize a class as an example: you can set attributes to a class to choose which properties should be serialized, but the same thing can be done quite easy by implementing a teorical interface IXmlSerializable (it does exist ...

Anyone got a Date of Birth Validation Attribute for C# MVC?

Someone must have written this before :-) I need a validation attribute for date of birth that checks if the date is within a specific range - i.e. the user hasn't inputted a date that hasn't yet happened or is 150 years in the past. Thanks for any pointers! ...

Good way to assign protected attributes

Easy part: I have model with protected attribute and I have action which can be accessed only by admin, how to force assigning all attributes, so I don't need to do something like this: @post = Post.find(params[:id]) if params[:post].is_a?(Hash) && params[:post][:published] @post.published = params[:post].delete(:published) # delete ...

XML Default namespaces for unqualified attribute names?

I'm trying to understand the correct interpretation of the "Namespaces in XML 1.0 (Third Edition)" definition for unqualified attribute namespaces. "The namespace name for an unprefixed attribute name always has no value." And later in the same section: "The attribute value in a default namespace declaration MAY be empty. This ...

Serialize Datetime without GMT in C#

Hello, I have generated classes from xsd and want to serialize the DateTime. My class looks like private System.DateTime timeGMT; [System.Xml.Serialization.XmlElementAttribute(DataType="time")] public System.DateTime TimeGMT { get { return this.timeGMT; } set { this.timeGMT= value; } }...

Generate xml or rss from entity dynamically

I want to generate xml and rss from entity dynamically in asp.net webforms. I think the best way is attribute based definition: by default, all properties should be included in xml and if we want to exclude some, we should define in the properties attributes. In rss it is reversed... ...

how to add xsl attribute

I have an xml with img tag <img> source </img> I want to generate: <img src="source.jpg"> I tried something like that: <img> <xsl:attribute name="src"> <xsl:text> <xsl:value-of select="node()" />.jpg </xsl:text> </xsl:attribute> </img> but it doesng work ...