I have a number of currency values in a form select box (i.e. "£ ;2,500")... when the form is rendered though it keeps the £ as is, is there any way to convert it to an actual pound sign?
Please note, the space before the ; sign is intentional (so that stackoverflow doesnt render it)
This works in jQuery 1.3.2, but not in 1.4
$("#container").children().map(function() {
var child = $(this);
if (child.is(":select")) {
//do something with child
}
});
What is the right way to do this in jQuery 1.4?
Here is a table patients in MS access database, There is 20 records, I want to select first 0 10 records and after 11-20 records for pagination. How to solve this problem
I want to know how to get only hidden folder from String[]. Actually I have one string array and there show some files. There have normal and hidden files also but I want to try select only hidden folder from this array. So anyone can help me?
Is it possible to style the option elements of a select list/dropdown beyond background and font? I'm specifically looking to add some padding/margins so the list isn't as cramped.
Hi,
When I render my formset, one of the field renders as a select box because it is a foreign field in the model. Is there a way to change this to a text input? I want to populate that field by using Ajax auto complete. Adding a widget to the modelform is not working because the modelformset_factory takes a model and not a model form.
lets say i use jquery.get to retrive a website to string and how am i gonna select the whole table with class=product from it? $() seem cant work on string ....
I have a table named product which contains two columns:
id name
1 p1
2 p2
3 p1
4 p3
5 p4
I run the following query:
SELECT DISTINCT id, name FROM product;
As a result, PostgreSQL gives me the following output:
id name
1 p1
2 p2
3 p1
4 p3
5 p4
I want to avoid duplication of values in the name field, so the desired output should look like this:
1 p1
2 p2
4 p3
5 p4
How should I go about achieving this?
I have the following code and I have to select all the nodes with id="text" but not the nodes that already have a parent with id="text":
test00
test01
test02
*
test03
*
so in this example the query have to return only the two fo:block with content test00 and test03.
Thank you.
Im trying to implement the search feature in my website.
when the search keyword is entered in the textbox, and the category combo is selected, the form will be Posted and the result will be shown on the same page.
what i want is to keep the selected category of the combo by default in the form after posted
For eg., If i select the category 'Automobiles' in the combo and click search, after form submit, the combo should show the automobiles as default selected option. Please help me. Any help will be appreciated
If I'm creating a C# wrapper for a stored proc, and that sp only returns/selects (not sure) 1 value, should I use return or select at the end of that sp?
This is for t-sql.
In a form_tag, there is a list of 10 to 15 checkboxes:
<%= check_box_tag 'vehicles[]', car.id %>
How can I select-all (put a tick in every single) checkboxes by RJS? Thanks
For example I have type:
CREATE TYPE record AS ( name text, description text, tags text[])
And table:
CREATE TABLE items ( id serial, records record[] )
How can I select all items with records with tags 'test' (without using PL/pgSQL)?
Regular HTML select boxes (such as, e.g. found here), while being "chosen" are presented by the iPhone on a native widget that seems to totally ignore regular html font sizes and whatnot. It does some ellipsing when it goes too long, but the font is way too big for a list I want to present -- even on landscape, only about 35 characters can fit.
Is there any way to tell the iPhone to use a smaller font there?
This Query is giving me an error of #1054 - Unknown column 'totalamount' in 'where clause'
SELECT (amount1 + amount2) as totalamount
FROM `Donation`
WHERE totalamount > 1000
I know i can resolve this error by using group by clause and replace my where condition with having clause. But is there any other solution beside using having clause. If group by is the only solution then I want to know why I have to use group by clause even I havent use any aggregate function
thanks.
$('#bit_IsModule').click(function () {
if ($('#bit_IsModule:checked').val() == "true")
$("#featurename").slideUp();
else
$("#featurename").slideDown();
});
I want to disable the first value in the select list on the checkbox click ? how can i do that
I have this table
<table class="results" id="summary_results">
<tr>
<td>select all</td>
<td>name</td>
<td>id</td>
<td>address</td>
<td>url</td>
</tr>
<tr>
<td>
<input type="checkbox">
</td>
<td>john doe</td>
<td>1</td>
<td>33.85 some address</td>
<td>http://www.domain.com</td>
</tr>
<tr>
<td>
<input type="checkbox">
</td>
<td>jane doe</td>
<td>2</td>
<td>34.85 some address</td>
<td>http://www.domain2.com</td>
</tr>
<tr>
<td>
<input type="checkbox">
</td>
<td>sam</td>
<td>3</td>
<td>33.86 some address</td>
<td>http://www.domain3.com</td>
</tr>
</table>
I would like to select all the rows then download the content of the urls knowing that each url is linked to the id. for example the first url will be www.domain.com?id=1&report=report
How can you select an element that has current focus?
There is no :focus filter in jQuery, that is why we can use something like this:
$('input:focus').someFunction();
I have a email address like [email protected] and [email protected][email protected] ... etc
I want a Mysql select query so that it would trim user names and .com an returns output as
gmail,ymail,hotmail etc
I want to do the following dynamically
Generate numbers from 1 to 100 and then select 25 random numbers from it and display it in a console. Any easy way to do so?
I have Canine and CanineHandler objects in my application. The CanineHandler object has a PersonID (which references a completely different database), an EffectiveDate (which specifies when a handler started with the canine), and a FK reference to the Canine (CanineID).
Given a specific PersonID, I want to find all canines they're currently responsible for. The (simplified) query I'd use in SQL would be:
Select Canine.*
from Canine
inner join CanineHandler on(CanineHandler.CanineID=Canine.CanineID)
inner join
(select CanineID,Max(EffectiveDate) MaxEffectiveDate
from caninehandler
group by CanineID) as CurrentHandler
on(CurrentHandler.CanineID=CanineHandler.CanineID
and CurrentHandler.MaxEffectiveDate=CanineHandler.EffectiveDate)
where CanineHandler.HandlerPersonID=@PersonID
Edit: Added mapping files below:
<class name="CanineHandler" table="CanineHandler" schema="dbo">
<id name="CanineHandlerID" type="Int32">
<generator class="identity" />
</id>
<property name="EffectiveDate" type="DateTime" precision="16" not-null="true" />
<property name="HandlerPersonID" type="Int64" precision="19" not-null="true" />
<many-to-one name="Canine" class="Canine" column="CanineID" not-null="true" access="field.camelcase-underscore" />
</class>
<class name="Canine" table="Canine">
<id name="CanineID" type="Int32">
<generator class="identity" />
</id>
<property name="Name" type="String" length="64" not-null="true" />
...
<set name="CanineHandlers" table="CanineHandler" inverse="true" order-by="EffectiveDate desc" cascade="save-update" access="field.camelcase-underscore">
<key column="CanineID" />
<one-to-many class="CanineHandler" />
</set>
<property name="IsDeleted" type="Boolean" not-null="true" />
</class>
I haven't tried yet, but I'm guessing I could do this in HQL. I haven't had to write anything in HQL yet, so I'll have to tackle that eventually anyway, but my question is whether/how I can do this sub-query with the criterion/subqueries objects.
I got as far as creating the following detached criteria:
DetachedCriteria effectiveHandlers = DetachedCriteria.For<Canine>()
.SetProjection(Projections.ProjectionList()
.Add(Projections.Max("EffectiveDate"),"MaxEffectiveDate")
.Add(Projections.GroupProperty("CanineID"),"handledCanineID")
);
but I can't figure out how to do the inner join. If I do this:
Session.CreateCriteria<Canine>()
.CreateCriteria("CanineHandler", "handler", NHibernate.SqlCommand.JoinType.InnerJoin)
.List<Canine>();
I get an error "could not resolve property: CanineHandler of: OPS.CanineApp.Model.Canine". Obviously I'm missing something(s) but from the documentation I got the impression that should return a list of Canines that have handlers (possibly with duplicates). Until I can make this work, adding the subquery isn't going to work...
I've found similar questions, such as http://stackoverflow.com/questions/747382/only-get-latest-results-using-nhibernate but none of the answers really seem to apply with the kind of direct result I'm looking for.
Any help or suggestion is greatly appreciated.
I have some valid select statements that when I send to MSSQL2005 sometimes return the error "Cursor not returned from Query".
How can I trace this and find out what's wrong?
Thanks