attributes

finding links that are hyper-links in jQuery

Im trying to take a link either when clicked or hover over be able to grab the attribute href and tell if its a hyper-link or not. Also i want it to be able to tell me if its a hyper-link to my own site. Plus various other filters. The main purpose for this is so that when a internal link is clicked it will tell ajax to grab the conten...

C#: how to hide a method from the stack trace?

I have a dead simple one-liner method that I don't want to see in the stack trace: is that possible? maybe mark it with an attribute? Just to clarify, I'm not trying to print the trace, or rethrow, or have auto step-through in the debugger. I'd like the method to not show up in the trace in the first place, because the trace is then han...

How do you set the name attribute of a TextBox control in a .Net 3.5 project?

Self explanatory really ...

How to change an NSBox location (or position?) programmatically in objective c

I am learning objective c and am making some small programs. for my current project i am taking a NSBox and changing it's location based on a random number. How do I change the box's location? With C# it was a simple "box.location = anotherLocation" but I can't figure out how to do this in objective c. Any help would be greatly appreciat...

jQuery check if element have css attribute

I need to know when I click on an element if this element have a css option. I am thinking at something like this but it does not work: if ($('#element').attr("text-shadow")) { alert ('i Have') } else { alert ('i dont') } Any tips on this one? Thanx ...

mulitple attribute xml filter as3 e4x

I am trying to come up with the best xml schema to support tag filtering. And then a method to filter the xml on an arbritary amount of tags. So here is the xml: var videoXML:XML= <?xml version="1.0" encoding="UTF-8"?> <videos> <video> <tags label="dogs,brown,lawns" /> </video> <video> <tags label="dogs,cats" /> </v...

asp.net mvc IsAuthenticated attribute

is any solution to mark method like this [IsAuthenticated(true)] public ActionResult Profile() { return View(); } not call if (request.IsAuthenticated) ? ...

Attributes don't inherit?

I played with attributes and assumed that they are inherited but it doesn't seem so: type [MyAttribute] TClass1 = class end; TClass2 = class(TClass1) end; TClass2 doesn't have the Attribute "MyAttribute" although it inherits from Class1. Is there any possibility to make an attribute inheritable? Or do I have to go up the cl...

.NET WebService Custom Attribute

I would like to add a custom attribute to a asmx web service to determine if the request is valid based on the client IP address. This is a similar idea to the AuthorizeAttribute in ASP.NET MVC. Is there anywhere (e.g. a HTTP module) I can put the code to look at the attribute on the webservice and decide whether to allow the request or...

Java RegExp ViewState

I am porting some functionality from a C++ application to java. This involves reading non-modifiable data files that contain regular expressions. A lot of the data files contain regular expressions that look similar to the following: (?<=id="VIEWSTATE".*?value=").*?(?=") These regular expressions produce the following error: "Look-...

Change the value of an attribute in a derived class?

I have a property in a base class tagged with attributes, and I would like to change some of the attributes in each of my derived classes. What is the best way to do this? From what I can tell, I have to define the property as abstract in my base class and override the property in each of my base class, and redefine all of the attribut...

Why write <script type="text/javascript"> when the mime type is set by the server?

My understanding is that mime types are set by the web server. Why do we add the type="text/javascript or type="text/css" attribute? Isn't this a useless and ignored attribute? ...

Using Linq to SQL change events with attribute-based mapping

I'm writing a new ASP.NET MVC2 application using Linq to SQL. This application depends on an existing SQL database. I am using attribute-based mapping to map my database fields to my Linq to SQL entities. I also need to make use of Linq to SQL's On[Property]Changed methods so I can perform change-auditing of database tables within my a...

Python. Strange class attributes behavior

>>> class Abcd: ... a = '' ... menu = ['a', 'b', 'c'] ... >>> a = Abcd() >>> b = Abcd() >>> a.a = 'a' >>> b.a = 'b' >>> a.a 'a' >>> b.a 'b' It's all correct and each object has own 'a', but... >>> a.menu.pop() 'c' >>> a.menu ['a', 'b'] >>> b.menu ['a', 'b'] How could this happen? And how to use list as class attribute? ...

restricting the property type of a custom attribute

Does anyone knows if it is possible to define/declare on your own custom attribute a restriction to the field type it may apply on? There are a flags that do restrict the usage of the attribute: [AttributeUsage( AttributeTargets.Property, AllowMultiple = false)] Im looking for something like: UseOnlyOnType = typeof(string) A...

Using Xpath to retrieve nodes satisfying a certain criteria, based on attribute values

<AgoraServersConfig> <AgoraServers id="NYQ1"> <AgoraName>prod</AgoraName> <TableName>someTable</TableName> <Rule_ID>1</Rule_ID> <Rule_ID>3</Rule_ID> <Rule_ID>5</Rule_ID> </AgoraServers> <AgoraServers id ="QA03"> <AgoraName>dev</AgoraName> <TableName>someTable</TableName> <Rule_ID>1</Rule_ID> <Rul...

Using the "naked" attribute for functions in GCC

GCC documentation states in 6.30 Declaring Attributes of Functions: naked Use this attribute on the ARM, AVR, IP2K, RX and SPU ports to indicate that the specified function does not need prologue/epilogue sequences generated by the compiler. It is up to the programmer to provide these sequences. The only statements that can be s...

how to remove attribute of a etree Element ?

I've Element of etree having some attributes - how can we delete the attribute of perticular etree Element. ...

ASP MVC: Custom Validation Attribute

I'm trying to write my own Custom Validation attribute but i'm having some problems. The attribute i'm trying to write is that when a user logs in, the password will be compared against the confirmation password. namespace Data.Attributes { public class ComparePassword : ValidationAttribute { public string PasswordToCompareWith { g...

Why are only some of my attributes shown in the response xml of jaxws?

I created a jaxws webservice, but it returns only some of the attributes of my objects in the response xml. E.g. public class MyObject { private String attribute1; private String attribute2; //getter and setter } But the returned XML only contains <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt; ...