I would like to select all elements that have certain attribute or don't have it at all:
//job[@salary<"100" or !@salary]
This code is not valid. Which one is? Thanks!
hello all,
I am a newbie in iPhone development.
In my project there is one requirement that while editing text the iPhone's built in buttons Copy, Paste and Select all are available. I want the touch event on all these buttons and also want to display an action sheet title upon their respective touch events.
I am writing a Selenium test in PHP using the PHPUnit Selenium extension.
I know how to type something into a text field:
$this->type('fieldName', 'value');
But how do I select an option from a drop-down menu?
I'm looking for a way to programatically select all the content inside a TinyMCE editor instance.
The reason I need this is that I'd like it if all the text inside the editor was selected, as soon as someone clicks on it (I'm using TinyMCE in conjunction with JEditable, by the way).
Thanks,
Edan
I have a SQL query in my ASP.net web app that looks like this:
SELECT * FROM [Records] WHERE ([title] LIKE '%' + @title + '%')
@title, of course, is the value of a text box on the page.
My question is, why, when the text box is empty, does this return nothing? And how can I make it return everything, like logic tells me it ought to?
How to select top n rows from a datatable/dataview in asp.net.currently I am using the following code by passing the table and number of rows to get the records but is there a better way.
public DataTable SelectTopDataRow(DataTable dt, int count)
{
DataTable dtn = dt.Clone();
for (int i = 0; i < count; i++)
{
dtn.ImportRow(dt.Rows[i]);
}
return dtn;
}
Hi,
I have two tables: tblSizes and tblColors. tblColors has columns called ColorName, ColorPrice and SizeID. There is one size to multiple colors. I need to write a query to select the size and all the colors (as columns) for a that size with the price of each size in its respective column.
The colors must be returned as columns, for instance:
SizeID : Width : Height : Red : Green : Blue
1---------220-----220----£15----£20-----£29
Hope this makes sense
Thank you
How could I select all as one string seperated with a ,?
Example table:
Table
Stringtest
Examplestring2
Anotherstring
Otherstring
And the selected result should be Stringtest,Examplestring2,Anotherstring,Otherstring.
From a table element, I would like to select all rows that have the class even or the class odd.
I tried the jQuery syntax:
report.css("table.data tr[class~=odd even]").each{|line| parse_line_item(line)}
but it threw an error, any help is appreciated, thanks.
Is there anyway to batch two different select queries to either SQLite or SQLCE and get the two result sets back in C#? If not, is there an embedded database that handles this?
for example i use following command to find a record
SELECT users.mail FROM users WHERE users.uid = %s
if found an match, then i should like to delete this record, and update in the same query an another table. i can solve this with 'joins' ?
I have a table called Ads and another Table called AdDetails to store the details of each Ad in a Property / Value style, Here is a simplified example with dummy code:
[AdDetailID], [AdID], [PropertyName], [PropertyValue]
2 28 Color Red
3 28 Speed 100
4 27 Color Red
5 28 Fuel Petrol
6 27 Speed 70
How to select Ads that matches many combinations of PropertyName and PropertyValue, for example :
where PropertyName='Color' and PropertyValue='Red'
And
where PropertyName='Speed' and CAST(PropertyValue AS INT) > 60
I need to select static colums + a dynamic number of rows as columns in SQL
TABLE 1
-------
HotelID
BlockID
BlockName
TABLE 2
-------
BlockDate (unknown number of these)
NumberOfRooms
Desired Result Row
------------------
HotelID | BlockID | BlockName | 02/10/10 | 02/11/10 | 02/12/10 | ...N
Where the date columns are the unknown number of BlockDate rows.
What could possibly go wrong with the following transaction if executed by concurrent users in the default isolation level of READ COMMITTED?
BEGIN TRANSACTION
SELECT * FROM t WHERE pid = 10 and r between 40 and 60
-- ... this returns tid = 1, 3, 5
-- ... process returned data ...
DELETE FROM t WHERE tid in (1, 3, 5)
INSERT INTO t (tid, pid, r) VALUES (77, 10, 35)
INSERT INTO t (tid, pid, r) VALUES (78, 10, 37)
INSERT INTO t (tid, pid, r) VALUES (79, 11, 39)
COMMIT
I have a document with headings and unordered lists.
How can I use JQuery to select a given heading (by its unique class name) AND all content between that heading and the next heading?
I have the following scenario.
A Page with a DetailsView binded to an ObjectDatasource with cache-enabled. The SelectMethod is assigned at Page_Load event, depending on my User Level Logic.
After assigned the selectMethod and Parameters for the ODS, if Cache not exists, then ODS will be cached the first time. The next time, the cache will be applied to the ODS and the select event don't need to be fired since the dataresult is cached.
The problem is, the ODS Cache works fine, but I have a Refresh button to clear the cache and rebind the DetailsView.
Am I doing correctly ? Below is my code.
<asp:DetailsView ID="DetailsView1"
runat="server"
DataSourceID="ObjectDataSource_Summary"
EnableModelValidation="True"
EnableViewState="False"
ForeColor="#333333" GridLines="None">
</asp:DetailsView>
<asp:ObjectDataSource ID="ObjectDataSource_Summary"
runat="server"
SelectMethod=""
TypeName="BL.BusinessLogic"
EnableCaching="true">
<SelectParameters>
<asp:Parameter Name="idCompany" Type="String" />
<SelectParameters>
</asp:ObjectDataSource>
<asp:ImageButton ID="ImageButton_Refresh" runat="server" OnClick="RefreshClick" ImageUrl="~/img/refresh.png" />
And here is the code behind
public partial class Index : Page
{
protected void Page_Load(object sender, EventArgs e)
{
ObjectDataSource_Summary.SelectMethod = "";
ObjectDataSource_Summary.SelectParameters[0].DefaultValue = "";
switch (this._loginData.UserLevel) //this is a struct I use for control permissions e pages behaviour
{
case OperNivel.SysAdmin:
case OperNivel.SysOperator:
{
ObjectDataSource_Summary.SelectMethod = "SystemSummary";
ObjectDataSource_Summary.SelectParameters[0].DefaultValue = "0";
break;
}
case OperNivel.CompanyAdmin:
case OperNivel.CompanyOperator:
{
ObjectDataSource_Summary.SelectMethod = "CompanySummary";
ObjectDataSource_Summary.SelectParameters[0].DefaultValue = this._loginData.UserLevel.ToString();
break;
}
default: break;
}
}
protected void Page_LoadComplete(object sender, EventArgs e)
{
if (Cache[ObjectDataSource_Summary.CacheKeyDependency] == null)
{
this._loginData.LoginDatetime = DateTime.Now;
Session["loginData"] = _loginData;
Cache[ObjectDataSource_Summary.CacheKeyDependency] = _loginData;
DetailsView1.DataBind();
}
}
protected void RefreshClick(object sender, ImageClickEventArgs e)
{
Cache.Remove(ObjectDataSource_Summary.CacheKeyDependency);
}
}
Can anyone help me? The Select() Event of the ObjectDasource is not firing even I Remove the CacheKey Dependency
I have something that looks like this:
<s:select ... onchange="javascript:alert('testing')"/>
But when I run it and look at using firebug, the onchange is not there and so the javascript is not executed. Any ideas? This is driving me nuts.
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 want to select all the text of a System.Windows.Forms.TextBox() control in a GotFocus event, but all the examples I found make use of the .SelectionStart / .SelectionEnd properties of the control, and those aren't available in .NET 2.0 Framework.
Any ideas?
TIA,
Pablo
I have a system where a listview is populated.
I want to be able to select one of these files and press an edit button, which will then take the selected data into another form.
I am trying to find a way to identify the selected item in the listview and take it to the next form.
How can i achieve this?
What code would I need to show?
Thanks
Hi all,
You can easily use a List in struts2 select tag, but is there a way to use Map in tag?? If it is possible please provide a sample code...
thanx !
Hi fellow programmer
I want to select an anchor inside a div like this
<div class="response content">
Disapproved Bank Mandiri<br><br>
<p>
<a class="showlist" href="#">Back to list?</a>
</p>
</div>
What is the jquery to do this ?
i am using this code to select the checbox from fieldset.
$("fieldset:has(input[type='checkbox'])")
its working fine on the filedset i have studentid's i need to get the student id's which ever textbox is selected on the fieldset?
can anybody help me out?
thanks
Suppose I have a dataframe like this one:
df <- data.frame (id = c("a", "b", "a", "c", "e", "d", "e"), n=1:7)
and a vector with ids like this one:
v <- c("a", "b")
How can I select the rows of the dataframe that match the ids in v? I can't use the id column for rownames because they are not unique.