Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

Page 94/433 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • How to select font with its style attribute value.

    - by Wazdesign
    I have the following html mark up. <p> lorem ipsum lorem ipsum <font style="background-color:yellow"> ipsum </font> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam id enim in tellus sollicitudin viverra. Morbi nec ipsum ligula, non volutpat enim. In quis metus <font style="color:red"> Tincidunt lorem </font>blandit faucibus. Nam condimentum facilisis vestibulum. Nunc tristique est vel erat sagittis ac placerat orci varius.</p> I want to select only the font which has the "background-color:yellow" not any other <font> tag with any style

    Read the article

  • Django foreign keys cascade deleting and "related_name" parameter (bug?)

    - by Wiseman
    In this topic I found a good way to prevent cascade deleting of relating objects, when it's not neccessary. class Factures(models.Model): idFacture = models.IntegerField(primary_key=True) idLettrage = models.ForeignKey('Lettrage', db_column='idLettrage', null=True, blank=True) class Paiements(models.Model): idPaiement = models.IntegerField(primary_key=True) idLettrage = models.ForeignKey('Lettrage', db_column='idLettrage', null=True, blank=True) class Lettrage(models.Model): idLettrage = models.IntegerField(primary_key=True) def delete(self): """Dettaches factures and paiements from current lettre before deleting""" self.factures_set.clear() self.paiements_set.clear() super(Lettrage, self).delete() But this method seems to fail when we are using ForeignKey field with "related_name" parameter. As it seems to me, "clear()" method works fine and saves the instance of "deassociated" object. But then, while deleting, django uses another memorized copy of this very object and since it's still associated with object we are trying to delete - whooooosh! ...bye-bye to relatives :) Database was arcitectured before me, and in somewhat odd way, so I can't escape these "related_names" in reasonable amount of time. Anybody heard about workaround for such a trouble?

    Read the article

  • ff extension. how to pass parameters to a function in the oncommand attribute in menu

    - by encryptor
    I have a ff extension which creates a popup and shows dynamic data in it. basically when the popup opens a js function is run which then constructs the popup list by appending the items like this var myMenuPopup = document.getElementById("file-popup4"); newItem = document.createElement("menuitem"); newItem.setAttribute("label", namelist[m]); newItem.setAttribute("id", "item" + m); Now I need to have the click functionality too on these newly added menuitems. putting the atttribute and forming the function is easy. I can have a function to be run when they are clicked. But i need to pass namelist[i] to the function and it will act according to the namelist parameter.If i do: newItem.setAttribute("oncommand" , finalclick(namelist[m])); it runs the function everytime the popup opens runs the function without even clicking on it on the other hand if i use quotes i.i if i do newItem.setAttribute("oncommand" , "finalclick(namelist[m])"); it doesnot open even on clicking giving error : namelist is not defined.

    Read the article

  • jquery: why a selector returns me an array, but attribute doesnt?

    - by Shlomi.A.
    Hi. I'm trying to understand JQ better. I'm calling an JQ object $(".FamiliesList li li span[class!='']").prev().find('option:selected') this returns back to me an array of all the options that their span parent's brother has a classname. [option, option] Now- I want to return back an array of the option's values $(".FamiliesList li li span[class!='']").prev().find('option:selected').attr('value') this returns back to me only the first child value, and a full array of the values. Why? I would appreciate to receive help and understand jq better :) Thanks.

    Read the article

  • Using Yii framework, what would be a right way to process an attribute before displaying it using CH

    - by Karolis
    Say I have this line of code in the view. <?php echo CHtml::activeTextField($model,'start_time'); ?> start_time is a UNIX timestamp. When just displaying it in a view I can apply functions like date() on it. Where should I apply the formatting when I'm displaying it in a form, by using the above line of code? (This case of timestamps/dates might be special, but I'm also interested in how would one go about if it wasn't a date and I just want to work with "value in database" < "different representations of the value in different views. Thanks =)

    Read the article

  • How can I output data from an attribute in eZ Publish?

    - by Steven
    I'm noob and need some basic 101. I need to display content from my "home" page. The page has the following attributes: Name Billboard Left column Center column Right column Bottom column Tags Currently I use {$module_result.content} which outputs everything on that page. But I only want to output the content from Billboard and Center column. How can I do this?

    Read the article

  • Is there an easy way to compare if 2 XDocuments are equal ignoring element/attribute order?

    - by Davy8
    Unit testing my serialization code I found one failed because I had attributes listed in a different order (I'm just comparing the XDocument.ToString() values) and while I could fix that, it really doesn't matter to me in what order the elements or attributes appear as long as they're all there with the right name at the right level of hierarchy. I could probably write a method do this, but I'm wondering if there's an easy built in way I'm not aware of.

    Read the article

  • C#...... associating keys to buttons...

    - by user300484
    Hello everyone! I have to write a method on C# that associates a certain key ( from the keyboard) to a specific button.For example.... if I press "a"....... the button that I created on a form application should appear like if it is being pressed. I dont really know how to do that and I would appreciate your help! :)

    Read the article

  • Why can't the 'NonSerialized' attribute be used at the class level? How to prevent serialization of

    - by ck
    I have a data object that is deep-cloned using a binary serialization. This data object supports property changed events, for example, PriceChanged. Let's say I attached a handler to PriceChanged. When the code attempts to serialize PriceChanged, it throws an exception that the handler isn't marked as serializable. My alternatives: I can't easily remove all handlers from the event before serialization I don't want to mark the handler as serializable because I'd have to recursively mark all the handlers dependencies as well. I don't want to mark PriceChanged as NonSerialized - there are tens of events like this that could potentially have handlers. Ideally, I'd like .NET to just stop going down the object graph at that point and make that a 'leaf'. So why can't I just mark the handler class as 'NonSerialized'? -- I finally worked around this problem by making the handler implement ISerializable and doing nothing in the serialize constructor/ GetDataObject method. But, the handler still is serialized, just with all its dependencies set to null - so I had to account for that as well. Is there a better way to prevent serialization of an entire class?

    Read the article

  • How to generate a compiler error based on an attribute being missing in C#?

    - by RodH257
    I create a number of add-ins for the Revit Structure API. Each tool has to habe a class which implements the interface IExternalCommand. In the latest version of Revit, for your tool to work you need to have two attributes on the class that implements that interface: [Regeneration(RegenerationOption.Manual)] [Transaction(TransactionMode.Automatic)] The values in brackets can change, but there must be something there. Often I am finding myself forgetting to put the attributes on, then when it comes to runtime it crashes. Is there any way in Visual Studio 2010 to add a compiler warning or error saying that if your class implements that interface it must have those 2 attributes? I have resharper if that helps. Can anyone point me into the right direction?

    Read the article

  • How do I specify a keys password with MSBuild for the purpose of using Hudson?

    - by Brett Ryan
    We have just setup our hudson server to build .NET projects which seems to be working fine, however for projects that require a password when signing the assemblies I can not figure out how to tell hudson what the password is? For us the password is asked the first time a developer checks out the source code and they open with visual studio, how is this stored? Can we just place a secret file somewhere on the server?

    Read the article

  • How do I place another attribute to a MKAnnotation?

    - by kevin Mendoza
    for my app each annotation on a map corresponds to a mine locality. each mine has its own unique 7 digit integer identifier. I'm trying to add the property minesEntryNumber to the annotation so when the annotation is clicked on later I can bring up specific information on the selected annotation. This is part of my code: for (id mine in mines) { //NSLog(@"in the loop"); workingCoordinate.latitude = [[mine latitudeInitial] doubleValue]; workingCoordinate.longitude = [[mine longitudeInitial] doubleValue]; iProspectAnnotation *tempMine = [[iProspectAnnotation alloc] initWithCoordinate:workingCoordinate]; [tempMine setTitle:[mine mineName]]; tempMine.minesEntryNumber = [mine entryNumber]; //other code for dealing with mine types and adding the annotation to the mapview } the code works fine without the "tempMine.minesEntryNumber = [mine entryNumber];" part. It loads the map and shows the annotations. however when I try and put this in it brings up an error. So how do I add this property to each annotation and how do I access it later in a different .m file?

    Read the article

  • SO what RDF database do i use for product attribute situation initially i thought about using EAV?

    - by keisimone
    Hi, i have a similar issue as espoused in http://stackoverflow.com/questions/695752/product-table-many-kinds-of-product-each-product-has-many-parameters i am convinced to use RDF now. only because of one of the comments made by Bill Karwin in the answer to the above issue but i already have a database in mysql and the code is in php. 1) So what RDF database should I use? 2) do i combine the approach? meaning i have a class table inheritance in the mysql database and just the weird product attributes in the RDF? I dont think i should move everything to a RDF database since it is only just products and the wide array of possible attributes and value that is giving me the problem. 3) what php resources, articles should i look at that will help me better in the creation of this? 4) more articles or resources that helps me to better understand RDF in the context of the above challenge of building something that will better hold all sorts of products' attributes and values will be greatly appreciated. i tend to work better when i have a conceptual understanding of what is going on. Do bear in mind i am a complete novice to this and my knowledge of programming and database is average at best.

    Read the article

  • Is there an "extended" UIHint attribute to apply CSS styles for DisplayFor - EditorFor templates?

    - by AJ
    Intro: After reading Brad Wilson Metadata series and searching unsuccesfully on google, I was wondering: Question: Has any OS project / code been created that allows you to tag CSS styles in the Meta information, for example in my (buddy) Model, I want to be able to decorate a property with multiple CSS styles (a single style you can fake with UIHint, I want to set many possible styles - and be able to "cross-utilise") eg. public class MyModel { [DisplayCssHint("h5")] [DisplayCssHint("color:#777;")] [EditorCssHint(".myCoolTextClass")] [EditorCssHint(".myOtherCoolTextClass")] public string Title{ get;set; } [DisplayCssHint(".normaltext")] [EditorCssHint(".myCoolTextClass")] [EditorCssHint(".myOtherCoolTextClass")] public string Message {get;set;} } Thoughts: I know that this does not seem like a logical place to put styling information, however as it is metadata and is discriptive... besides it would be nice to do this while prototyping - (especially being able to apply class styles and extending it further - to generate .Less files would really be cool! more to the point I would hate to write it, if its already been done ;). Any links/pointers/idea's would be appreciated. Thanks,

    Read the article

  • Why does a checkbox's "checked" attribute return the opposite of it's actual value on click event?

    - by Kappers
    I've got the following HTML <li><input type="checkbox" /><label>This is the label!</label></li> I bound a click event to the li, and let the click event bubble up to the li before doing anything else. $('li').each(function(i){ var item = $(this); var checkbox = $("input[type='checkbox']", item); item.bind('click', function(e){ var isChecked = checkbox.is(':checked'); console.log(isChecked); e.stopPropagation(); }); }); Starting with an unchecked checkbox, when the click event fires, isChecked returns true when I click on the checkbox, but returns false when I click on the label or li. Does anyone know why?

    Read the article

  • How do I order by foreign attribute for belongs_to refernece where there are 2 keys to foreign table

    - by Will
    I have a Model which has a belongs_to association with another Model as follows class Article belongs_to :author, :class_name => "User" end If I wanted to find all articles for a particular genre ordered by author I would do something like the following articles = Article.all(:includes => [:author], :order => "users.name") However if Article happens to have two references to User how can I sort on :author? class Article belongs_to :editor, :class_name => "User" belongs_to :author, :class_name => "User" end I have tried articles = Article.all(:includes => [:author], :order => "users.name") #=> incorrect results articles = Article.all(:includes => [:author], :order => "authors.name") #=> Exception Thrown

    Read the article

  • Does Displaytag stash the "media type" in a page or request attribute?

    - by Pointy
    When you enable "export" from Displaytag, the tag code gives you links with special magic parameters that the tag recognizes as indicators that the table contents should be exported (as CSV, Excel, whatever). Well I'm interested in detecting the media type so that (for example) I can exclude columns that make no sense in an export (embedded action buttons, for one thing, or checkboxes for row selection). I suppose I could write a table decorator and use that to stick the media type on the request, but it'd be nice to avoid that if the tag already does it. The documentation is not clear on the subject; I guess I can start digging through the source code too.

    Read the article

  • How do I tell ReSharper that an attribute means that a method is used?

    - by Roger Lipscombe
    I'm playing with SpecFlow, and ReSharper thinks that my step definitions are unused (I guess because they're used via reflection): [Binding] public class StepDefinitions { // ... [When(@"I press add")] public void WhenIPressAdd() // R# thinks this is unused { _calculator.PressAdd(); } // ... } How can I tell ReSharper that methods with [Given], [When], [Then] attributes (etc.) are actually used? I don't want to use // ReSharper disable UnusedMember.Global comments.

    Read the article

  • How do you add a boolean attribute in asp.net mvc?

    - by bmavity
    I'm trying to output the following html using an html helper in asp.net mvc 2: <input type="text" id="Name" name="Name" value="" autofocus /> I'm using this code now: <%= Html.TextBoxFor(x => x.Name) %> and I've tried // results in <input ... autofocus="" /> <%= Html.TextBoxFor(x => x.Email, new { autofocus="" }) %> // does not compile <%= Html.TextBoxFor(x => x.Email, new { autofocus=null }) %> Is there any way to accomplish what I'm looking for using an html helper?

    Read the article

  • How to make Inno Setup ignore the hidden attribute while searching for files?

    - by andi
    I have to copy into the installer folders containing hidden files (in my case Desktop.ini). I use a line similar to this one in the [Files] section: Source: "folder\*desktop.ini"; DestDir: "{app}\folder"; Flags: recursesubdirs uninsneveruninstall; Attribs: hidden This line only works if I remove the hidden attributes. If all are hidden, it complains that it could not find any files. How can I configure Inno to search for hidden files using patterns?

    Read the article

  • How do I delete a [sub]hash based off of the keys/values of another hash?

    - by Zack
    Lets assume I have two hashes. One of them contains a set of data that only needs to keep things that show up in the other hash. e.g. my %hash1 = ( test1 => { inner1 => { more => "alpha", evenmore => "beta" } }, test2 => { inner2 => { more => "charlie", somethingelse => "delta" } }, test3 => { inner9999 => { ohlookmore => "golf", somethingelse => "foxtrot" } } ); my %hash2 = ( major=> { test2 => "inner2", test3 => "inner3" } ); What I would like to do, is to delete the whole subhash in hash1 if it does not exist as a key/value in hash2{major}, preferably without modules. The information contained in "innerX" does not matter, it merely must be left alone (unless the subhash is to be deleted then it can go away). In the example above after this operation is preformed hash1 would look like: my %hash1 = ( test2 => { inner2 => { more => "charlie", somethingelse => "delta" } }, ); It deletes hash1{test1} and hash1{test3} because they don't match anything in hash2. Here's what I've currently tried, but it doesn't work. Nor is it probably the safest thing to do since I'm looping over the hash while trying to delete from it. However I'm deleting at the each which should be okay? This was my attempt at doing this, however perl complains about: Can't use string ("inner1") as a HASH ref while "strict refs" in use at while(my ($test, $inner) = each %hash1) { if(exists $hash2{major}{$test}{$inner}) { print "$test($inner) is in exists.\n"; } else { print "Looks like $test($inner) does not exist, REMOVING.\n"; #not to sure if $inner is needed to remove the whole entry delete ($hash1{$test}{$inner}); } }

    Read the article

  • Ruby: How can I have a Hash take multiple keys?

    - by zxcvbnm
    I'm taking 5 strings (protocol, source IP and port, destination IP and port) and using them to store some values in a hash. The problem is that if the IPs or ports are switched between source and destination, the key is supposed to be the same. If I was doing this in C#/Java/whatever I'd have to create a new class and overwrite the hashcode()/equals() methods, but that seems error prone from the little I've read about it and I was wondering if there would be a better alternative here.

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >