For Maven2 how can I get the name of goal currently being executed in Mojo's execute method? Precisely I need value of @goal attribute inside Mojo's execute method.
I have two tables posts and comments. Table comments have post_id attribute. I need to get all posts with type "open", for which there are no comments with type "good" and created date MAY 1.
Is it optimal to use such SQL-query:
SELECT posts.* FROM posts
WHERE NOT EXISTS (
SELECT comments.id FROM comments WHERE comments.post_id = posts.id
AND comments.comment_type = 'good' AND
comments.created_at BETWEEN '2010-05-01 00:00:00' AND '2010-05-01 23:59:59')
I'm not sure that NOT EXISTS is perfect construction in this situation.
I'd like to take a string of text and find all of the hyper link tags, grab their href value, and replace the entire hyper link tag with the value of the href attribute.
Suppose we have frameset of with 2 frames, one frame is kind a tiny horizontal header and second is kind of "content" frame with 3rd-party html page inside. When user clicks on some link inside "content" frame, the whole page (frameset) should be reloaded with this link, the same behavior if "content" frame has "target=_top" attribute. How to do this using JS?
I want to set the LastPasswordSet attribute of a user in Microsoft Active Directory.
The .NET UserPrincipal API exposes the LastPasswordSet property as readonly.
Is there a way around this, to set the value (perhaps using ADSI)?
I have an Android activity with an ImageButton. I would like to execute some logic when the button is clicked and show a different image for the pressed state, but also receive the touch event on the activity.
By default only the button receives the touch event. If I set the clickable attribute of the button to false then only the activity receives the touch event.
What's the best way to receive the touch event in both the activity and the button?
I have this, birthday selection which is in 3 combobox, 1 for month, 1 for day and 1 for year.
But my database table has only this birthday attribute(no year, month or day).
How can I combine the items that are selected in those 3 combo boxes so that they would be fitting in the birthday column?
Hi
I am studying tomahawk, I just want to know if I generate a datatable using then how to sort the dataTable on the click on the header of that particular column, like we are using in normal attribute. Kindly Help.
I'm occasionally getting this error during normal use, and I've not found a way to stop it without removing the attribute that requires the token, which I'd rather not do.
I've gotten this bug during my own testing (but seemingly randomly) and I know from my logging that actual logged-in users are getting it as well.
Does anyone know what would cause the antiforgerytoken system to break (other than a real attack), and how I could fix this without opening up a security hole in my forms?
Thanks!
I have both a text_field and a text_area in Rails, and I want to disable the browser's auto-complete. Setting the attribute in either the text_field, text_area, or in the form itself, doesn't seem to make the browser stop trying to auto-complete. This is for Firefox 3.6.3 on OS X. Maybe it's more a browser issue than a RoR issue.
Thanks!
Correct me if I'm wrong, after reading drupal fapi related articles, I got the impression that fapi generates 'id' attributes by itself. It allows developers to assign 'name' attribute only. If that's the case, is there a way I can set desire 'id' value for elements? Because, I want my elements to have meaningful 'id' so that html/jquery code would be easier to read as well as save my time from going through already written jquery code to change those all 'id's that I've used inside.
P.S:drupal version - 6.x
I'm creating a custom extension and I would like to add a custom option when a certain item is purchased.
For example, when the product "Name Tag" is purchased, the extension would detect that the specific product has been ordered and assign a custom option of "Year" to it. The user does not see this, but the attribute is added and displayed in the admin when viewing the order.
Are there any specific listeners our there to accomplish this?
In Struts2 you can change the method used for execution for an action by changing the method attribute in the following line:
<action name="registerVal" class="cz.vutbr.fit.pishotel.model.action.Register" method="execute">
Is it possible to change the validation method used as well, or is the validate method name hardcoded.
I have this code
class HNCS (ThreadingTCPServer):
def verify_request(self, request, client_address):
for key in connections:
if connections[key].client_address[0] == client_address[0]:
if client_address[0] != '127.0.0.1':
return False
return True
def welcome(self):
return '''______________________________________________________
------------------------------------------------------
%s
______________________________________________________
------------------------------------------------------
* Server started %s
* Waiting for connections on port %i
''' % (gpl, ctime(), PORT)
I only can't figure out the line where it says
if connections[key].client_address[0] == client_address[0]
how come we used client_address as an attribute after dictionary???
< select size="2" multiple>
< option value="1">1< /option>
< option value="2">2< /option>
< option value="3">3< /option>
< option value="4">4< /option>
< option value="5">5< /option>
< option value="6">6< /option>
< option value="7">7< /option>
< option value="8">8< /option>
< option value="9">9< /option>
< option value="10">10< /option>
< option value="11">11< /option>
< option value="12">12< /option>
< option value="13">13< /option>
< /select>
size attribute of Select tag is not working properly in Safari.
if size attribute's value is greater than four then there have no problem, its working.
But when I set the value of size less than four then it show four values.
above example displays four options in safari but I want two options.
What is the reason for this ?
Is there a way to limit the url of saved credentials in browsers?
For example, if I save a username and password for http://www.website.com/login can I make it so that the rest of the forms in the site don't use these details? http://www.website.com/members, http://www.website.com/admin etc...
I'm aware of the autocomplete attribute but I don't want to turn off autocomplete entirely. I would like it if the browser remembered the login details per form or url.
You can know if the event stack is empty calling the gtk.events_pending() method, but I want to manipulate the pending events and filter it before the next gtk loop cycle, this data must be stored somewhere as an attribute or something, but where?
Thanks.
Is it possible to make a Telerik RadEditor single-line entry only?
For example, in an ASP TextBox there is the Multiline attribute
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" />
Is there a way to detect when the disabled attribute of an input changes in JQuery. I want to toggle the style based on the value.
I can copy/paste the same enable/disable code for each change event (as I did below) but I was looking for a more generic approach.
Can I create a custom event that will monitor the disabled attribute of specified inputs?
Example:
<style type="text/css">.disabled{ background-color:#dcdcdc; }</style>
<fieldset>
<legend>Option 1</legend>
<input type="radio" name="Group1" id="Radio1" value="Yes" />Yes
<input type="radio" name="Group1" id="Radio2" value="No" checked="checked" />No
<div id="Group1Fields" style="margin-left: 20px;">
Percentage 1:
<input type="text" id="Percentage1" disabled="disabled" /><br />
Percentage 2:
<input type="text" id="Percentage2" disabled="disabled" /><br />
</div>
</fieldset>
<fieldset>
<legend>Option 2</legend>
<input type="radio" name="Group2" id="Radio3" value="Yes" checked="checked" />Yes
<input type="radio" name="Group2" id="Radio4" value="No" />No
<div id="Group2Fields" style="margin-left: 20px;">
Percentage 1:
<input type="text" id="Text1" /><br />
Percentage 2:
<input type="text" id="Text2" /><br />
</div>
</fieldset>
<script type="text/javascript">
$(document).ready(function () {
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
$("input[name='Group1']").change(function () {
var disabled = ($(this).val() == "No") ? "disabled" : "";
$("#Group1Fields input").attr("disabled", disabled);
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
//remove disabled style to all enabled controls
$("input:not(:disabled)").removeClass("disabled");
});
$("input[name='Group2']").change(function () {
var disabled = ($(this).val() == "No") ? "disabled" : "";
$("#Group2Fields input").attr("disabled", disabled);
//apply disabled style to all disabled controls
$("input:disabled").addClass("disabled");
//remove disabled style to all enabled controls
$("input:not(:disabled)").removeClass("disabled");
});
});
</script>
How can I prevent a auto implemented property from being serialized by the binary formatter?
The [NonSerialized] attribute can only be used with fields. And the field is hidden when using auto implemented properties.
I'm using Django with google app engine. I'm using the google furnished django app engine helper project.
I'm attempting to create a Django modelformset like this:
#MyModel inherits from BaseModel
MyFormSet = modelformset_factory(models.MyModel)
However, it's failing with this error:
'ModelOptions' object has no attribute 'fields'
Apparently modelformset_factory() is expecting MyModel to implement a 'fields' accessor.
Anybody successfully used a modelformset with GAE datastore? Or is this a fundamental incompatibility between Django and GAE?
Hi,
I would like to know if the opengraph markup is W3C valid,
I'm getting the following error when I try to validate it:
Line 14, Column 17: there is no attribute "PROPERTY"
<meta property="og:site_name" content="sitename">
In case it's not valid, will it impact my pagerank and other search engines algo?
Is it possible to cloak those properties?
<input type="Checkbox" checked="" name="new">
if I have the above html in a document, how would I find it by searching for its name attribute?
Edit 1: Clarified that I was looking for a solution using Nokogiri
Assume I have the following tables (**bold** - primary key, *italics* - foreign key):
patient(**patient_id**, name)
disease(**disease_id**, name)
patient_disease(**p_d_id**, *patient_id*, *disease,_id* )
I want to draw the ER diagram for this. My idea is to make two entities, one for patient and one for disease, then make a n-to-n relation between them, with p_d_id as its attribute. Is that how it's supposed to be?
Hi Everyone:
I am wondering if there is some way to change a css attribute for the last li in a list using CSS. I have looked into using :last-child, but this seems really buggy and I can't get it to work for me. I will use Javascript to do this if necessary, but I want to know if anyone can think up a solution in CSS.
Thanks for any help!