remove extended attribute : fails
From a shell script, I'm trying to remove extended attribute setfattr -x security.selinux file.txt The file.txt has mode as 777 but im getting "permission denied error" How to fix this ...
From a shell script, I'm trying to remove extended attribute setfattr -x security.selinux file.txt The file.txt has mode as 777 but im getting "permission denied error" How to fix this ...
I have an object that needs to be serialized to an EDI format. For this example we'll say it's a car. A car might not be the best example b/c options change over time, but for the real object the Enums will never change. I have many Enums like the following with custom attributes applied. public enum RoofStyle { [DisplayText("Gl...
Currently, I'm trying to identify which "Controller" classes in my assembly have the [Authorize] attribute associated with them using Reflection and LINQ. const bool allInherited = true; var myAssembly = System.Reflection.Assembly.GetExecutingAssembly(); var controllerList = from type in myAssembly.GetTypes() where ...
When you add a label to the form from the toolbox, its text defaults to the item's name (label1, label2, etc). How can I make this happen with a custom control? So far, I have the following, which allows me to change the text through the property window: private string _text; [BrowsableAttribute(true)] public override string Text { ...
I have a class with attributes which have a reference to another attribute of this class. See class Device, value1 and value2 holding a reference to interface: class Interface(object): def __init__(self): self.port=None class Value(object): def __init__(self, interface, name): self.interface=interface se...
Hi To resolve a jQuery slideDown/Up problem, I had to change one line in the jQuery file. I changed line 5738 from this.elem.style.display = "block"; to this.elem.style.display = "inline-block"; The block attribute messed up my lists when using slideDown/Up/Toggle. slideDown changes my list from display:inline to display:block during ...
In the Web Content Accessibility Guidelines is states that you should supply a "skip" link that jumps you (for example) over a navigation block and straight into the content. This is particularly useful for impaired users who use a screen-reader to describe a page audibly. 6.2 Grouping and bypassing links WCAG Guidelines However, this ...
I have a form with two halves, one for attaching a wide thumbnail to an asset and one for a standard-size thumbnail. The jsp file generating the page calls thumbnail.tag, which calls thumb.tag twice: <thumbnail:thumb label="75px Thumbnail" /> <thumbnail:thumb label="Wide Thumbnail" /> thumb.tag in turn has the following: <s:if test="...
Is the order of attributes in a certain tag releveant. Specific case: This is from a selenium testfile. Given a testcasse <?xml version="1.0" encoding="UTF-8" standalone="no"?><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head profile="http://selenium-ide.openqa.org/profiles/test-case"> <meta content="text/htm...
You can create custom profile properties in Web.config like so: <configuration> <system.web> <profile> <providers>...</providers> <properties> <add name="MyCustomProperty" allowAnonymous="false" type="MyCustomType" serializeAs="String" defaultValue="MyCustomType.Empt...
When using Windows Explorer to view files, I'm given the option to set a "tag", "category", or other attributes. For a JPEG a different set of attributes (including "tag") are options. I'd like to be able to set these programmatically. How do I programmatically set a file tag and other file attributes using Delphi (I have Delphi 2010 ...
I'm not even sure if this is possible, but I've exhausted all of my ideas trying to figure this out, so I figured I'd send this out to the community and see what you thought. And, if it's not possible, maybe you'd have some ideas as well. I'm trying to make an Attribute class that I can add to a method that would allow me to use a lambd...
Hi there, I was just wondering if an attribute can be applied to a static class, method or property in c#? Like, [MyAttribute] public static MyMethods(string str) ... Thanks Ray. ...
Suppose I have this XML: <x> <e s="1" t="A"/> <e s="2" t="A"/> <e s="1" t="B"/> </x> Is there any way to write an xpath to find whether there are two distinct nodes named "e" which have the same value for @s but different values of @t. The first part is easy: //e[@s = //e/@s] as is the second part: //e[@t != //e[@t]] But I don'...
Say I have the folowing code: class Class1(object): def __init__(self): self.my_attr = 1 self.my_other_attr = 2 class Class2(Class1): def __init__(self): super(Class1,self).__init__() Why does Class2 not inherit the attributes of Class1? ...
Hi. I am currently trying to add a custom "column name" to a property in a web service. Here is my class. public class OrderCost { public int OrderNum { get; set; } public int OrderLine { get; set; } public int OrderRel { get; set; } public DateTime OrderDate { get; set; } public string PartNum { get; s...
I know the elements versus attributes debate has come up many times here and elsewhere (e.g. here, here, here, here, and here) but I haven't seen much discussion of elements versus attributes for simple property values. So which of the following approaches do you think is better for storing a simple value? A: Value in Element Content: ...
Here is html: <a href="http://site.com/any/different/folders/picture_name.jpg">Go and win</a> <a href="http://site.com/not/similar/links/some_other_name.png">Go and win</a> How to add some text after last "/" in href attribute (before picture_name.jpg) of each link? The script should give something like: <a href="http://site.c...
Let's say I run an ActiveRecord query and it returns 3 results, with a bunch of attributes. I want to add 3 attributes to each record in the Array so I can do sorting at a code-level. These 3 include: num_comments, num_views, last_view. How do I add these attributes? How do I then sort the records, in order of precendence, by num_comm...
Clients have many Invoices. Invoices have a number attribute that I want to initialize by incrementing the client's previous invoice number. For example: @client = Client.find(1) @client.last_invoice_number > 14 @invoice = @client.invoices.build @invoice.number > 15 I want to get this functionality into my Invoice model, but I'm not ...