attributes

read attribute using XDocument and LINQ

Hi, I'm trying to parse a rss feed. I can get the elements out, but whatever i try, i cant get the attributes! This is how the rss feed (xml) looks like: <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <title>nu.nl - Algemeen</title> <copyright>Copyright (c) 2010, nu.nl</copyright> <link>http://www....

In .Net, how do I decorate a class with an intellisense tip?

I want to be able to decorate classes and methods with the text that intellisense shows when you are instantiating the class or accessing a field. For example, I want to give usage instructions. I can't find the appropriate decoration for this. How do I do it? ...

Defer Attribute (Chrome)

Hi guys :) Chrome for me has always been a reference on web standards, unfortunately the defer isn't supported and IE supports it since version 5.5. Why ? <!-- js.js document.getElementById ("hi").innerHTML = "Hi :)"; --> <!DOCTYPE html> <html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en"> <head> <meta http...

How can I reduce boilerplate in my properties using attributes?

I'm playing around with Sqlite and Attributes, and I have properties throughout my code that look like this: const string FooKey = "foo"; ... string m_foo; [DatabaseColumn (FooKey)] public string Foo { get { return m_foo; } set { if (m_foo == value) return; m_foo = value; OnFooChanged (); /...

PHP wants Shibboleth attributes in $_SERVER but they are only in Provider's HTTP response headers

As far as I understand there are two ways to get Shibboleth attributes: they are either available on $_SERVER or inside the HTTP header response (of the provider) In the later case, how can I make them available to the application? Even if I catch them once and try to inject them in the server environment with putenv(), it will onl...

What does `DeploymentItem` attribute mean?

Let's say we have a short program: namespace ConsoleTryIt { static class Program { static void Main(string[] args) { var sum = Add(1, 2); } private static int Add(int p, int p2) { return p + p2; } } } When create the unit test class for this class, Vi...

How can I make Python/Sphinx document object attributes only declared in __init__?

I have Python classes with object attributes which are only declared as part of running the constructor, like so: class Foo(object): def __init__(self, base): self.basepath = base temp = [] for run in os.listdir(self.basepath): if self.foo(run): temp.append(run) self.avail...

F# type functions and a [<GeneralizableValue>] attribute

What is the difference between this two F# type functions: let defaultInstance1<'a when 'a:(new: unit->'a)> = new 'a() [<GeneralizableValue>] let defaultInstance2<'a when 'a:(new: unit->'a)> = new 'a() ...

Custom Data Validation Annotations - ASP.NET MVC2 C#

I have a viewmodel that partially looks like this... [Required] public int Year { get; set; } [Required] [Range(1, 5000000)] public int ModelID { get; set; } [Required] public int ZipCode{ get; set;} I want to add a custom validator attribute that checks a database to make sure...

Track calls to auto implemented properties

Is there a way that I can track and intercept calls to values in properties that are auto implemented? I'd like to have code that looks a bit like this: [Tracked] public int SomeProperty { get; set; } Ideally the attribute would be able to intercept changes to the property values. Is this possible? What I don't want it to have a sec...

how to read attributes of an element in xml file using objective c

hello everyone.In my application am getting an xml file from server and in that i have some attributes for the element.i donno how to read the attributes can anyone help me please.. ...

Extending jquery Attribute selectors

Hello, i have an inline popup that shows a list of checkboxes and associated labels each in seperate span element. i want to add a text box where user can type to filter the values (user names) in the popup. i have following code $("#toEmpFilter").live("change", function () { var FilterVal = $(this).val(); $("i...

changing href attr in jQuery UI datepicker

Hi, I'm playing around with the UI datepicker widget and I noticed that when the calender is generated, all the dates are inside an anchor tag with href="#". is it possible to change the href to the dateText, or whatever i set the dateFormat to? ex: <a class="ui-state-default" href="#October-27-2010">27</a> Thanks in advance //update...

how to read attributes of an element in xml file using objective c?

hello everyone.In my application am getting an xml file from server and in that i have some attributes for the element.i donno how to read the attributes .The following is my XML file <History> <Result ImageId="4507" Description="" Date="10/19/2010 12:49:22 AM" /> <Result ImageId="4505" Description="" Date="10/18/2010 8:01:28 ...

Use C# attribute to track function call, variables, and return value?

In Python, I can use decorators to trace the function call, its variables and return values. It is very easy to use. I just wonder can C# do the same thing? I find out there is a sample code of CallTracing Attribute online. However, it didn't show the result I expected. Does C# attributes have similar concepts as python's decorator? T...

NetworkX node attribute drawing

Im using networkx for visualization. I see when I use the function draw_networkx_edge_labels I can retrieve the labels for edges. I want to print the attribute on node ( instead of the label).. try everything almost . still stuck. If i have 5 attributes per node, is there anyway I can print a specific attribute on each node ? For exam...

XSL Match Element based on a Value

Hello...I am transforming an XML where I am supposed to locate a particular Element (based on the attribute value) and update the Element and its child attributes. The sample XML file is as below. <?xml version="1.0" encoding="utf-8"?> <Configuration> <Environments> <Environment id="Master"/> <Environment id="Deve...

HTML::TableExtract: applying the right attribs to specify the attributes of interest

I tried to run the following Perl script on the HTML further below. My problem is how to define the correct hash reference, with attribs that specify attributes of interest within my HTML <table> tag itself. #!/usr/bin/perl use strict; use warnings; use HTML::TableExtract; use YAML; my $table = HTML::TableExtract->new(keep_html=>0, d...

How to add a class to a GridView using attributes..

Hi, i want to add items to a gridview in asp.net from a custom class. The class has Properties X and Y. Does anyone know if im able to add special attributes to these properties so i can just add the class and not have to muck around? eg.. [Column("Name")] public string Name { get; set; } Ideally i can then write something like.. th...

Get a list of attribute options from Magento

I've been grabbing attribute options from Magento like so: <?php if ($attribute->usesSource()) { $options = $attribute->getSource()->getAllOptions(false); } ?> It's been working fine until I tried to get the options for the built in 'color' attribute -- I got the following error: PHP Fatal error: Call to a member function setA...