How to get a value of XElement without getting child elements?
An example:
<?xml version="1.0" ?>
<someNode>
someValue
<child>1</child>
<child>2</child>
</someNode>
If i use XElement.Value for <someNode> I get "somevalue<child>1</child><child>2<child>" string but I want to get only "somevalue" without "<child>1</child><ch...
How can I hide or show the value contained inside a TD tag?
E.g:
<td id="dateCell<%= i %>">
<%= Html.Encode(row.ActionOn.HasValue ? Html.FormatDateTime(row.ActionOn.Value) : Html.Encode("")) %>
</td>
How can I get the encoded value and hide or show it depending on a condition?
...
Hi
I'm using "plupload" plugin.
I have this input form :
<div id="flash_uploader" style="width: 610px; height: 330px;">You browser doesn't have Flash installed.</div><input type="text" name="categorie" id ="categorie" value="" /><input type="submit" value="send" />
I try to get the value of "categorie" with "multipart_params" but th...
Why would a DropDownList switch from Spanish into English when one selects a new item in it? And how does one prevent that from happening?
<asp:DropDownList ID="ddl_r1pc" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="ddlRelationship_SelectedIndexChanged">
<asp:ListItem></asp:ListItem>
<asp:ListItem ...
Hi all,
I got a select tag with some options in a HTML form:
(the data will be collected and processed using PHP)
Testing:
<SELECT NAME="Testing">
<OPTION VALUE="1"> One
<OPTION VALUE="2"> Two
<OPTION VALUE="3"> Three
</SELECT>
Is it possible for an option to carry multiple values like when a user selects
"One", then a f...
I'm not very sure about the question title,
here is the situation, please see the following sample code
// original data
a = [
{x : 1},
{x : 2},
{x : 3}
]
// assign to a variable
b = a[0]
// do some change
b.x = 5
alert(a[0].x)
// i thought it would still be 1 but it is 5, why???
*edit
thank you Amber and Andrei
i think...
I want to unique duplicate values in a dict. It looks like this:
d = {
"a":1,
"b":2,
"c":2,
"d":3,
"e":4,
"f":5,
"g":1,
"h":2,
"i":2,
"j":1,
"k":1}
Here is what I did:
# sort and unique the dict values
obj = d.values()
K = []
K = sorted(list(zip(*[(x,K.append(x)) for x in obj if not x in K])[0]
V=[]
for v1 in L:
V.append([k f...
Hi, i have a simple text input field users put in a number. I need to check which range the number matches (e.g. >10 or <1 ) and save a separate key/value for that range in the database.
I thought about a hidden field that changes its value as the user enters data but i don't know how to determine the range.
(I cannot modify the submit...
I'm having trouble with sprite animation in XNA that appears to be caused by a struct passed as a reference value. But I'm not using the ref keyword anywhere. I am, admittedly, a C# noob, so there may be some shallow bonehead error in here, but I can't see it.
I'm creating 10 ants or bees and animating them as they move across the scree...
I am looking for a way to change the option value from a select tag when users click on a link.
For example I have a select option html:
<select> <option value="0">Please Select</option>
<option value="1">red</option>
<option value="2">white</option>
</select>
And I have 2 links <a href="#" title="red" class="preview_link">red</a>...
My page should shown information like this:
No. Customer Bank_Name Amount
---------------------------
1. AAA Bank A 100
2. BBB Bank B 200
3. CCC Bank A 500
4. DDD Bank C 150
----------------------------
Total 950
How to sum amount as shown below:
Summary
No.Bank_Name...
i have found myself several times in the need of knowing the last values set to a range of variables that were in a certain portion of code, or method; maybe dispersed around the program.
does anyone know a way to select variables and know the last value set to them after the program ends running - in a windows maybe ?
...
What is the jquery equivalent to: document.forms[0].elements[i].value;
I don't know how to travel through a form and its elements in JQUERY and would like to know how to do it.
...
I have array data as shown below,
I want to store 'sale' value into database if my currency are USD.
Array ( [currency] => USD [sale] => 9120.00 [buy] => 8970.00 )
Array ( [currency] => SGD [sale] => 6653.75 [buy] => 6520.75 )
Array ( [currency] => HKD [sale] => 1173.40 [buy] => 1152.10 )
Array ( [currency] => CHF [sal...
Hi every one,
I want to get a return value from javascript in android. With Iphone, i can do it, but Android, i can't. I use loadUrl but return void not object. Anybody help me ? Thanks
...
I have this question, which i thought about earlier, but figured it's not trivial to answer
int x = x + 1;
int main() {
return x;
}
My question is whether the behavior of the program is defined or undefined if it's valid at all. If it's defined, is the value of x known in main?
...
Hi,
I have a XML file which contains the following:
<config>
<webservices>
<webservice>
<name>A</name>
<value>http://www.123.com</value>
</webservice>
<proxy enabled="false" useiedefault="false">
<name>
</name>
<value>
</value>
</proxy>
</webservices>
</config>
I...
The scenario is described below.
<li onmouseover="swapArrow_white()" onmouseout="swapArrow_black()"><a href="#">Menu<img src="common/images/downArrow.png" class="downarrow" /></a>
<li onmouseover="swapArrow_white()" onmouseout="swapArrow_black()"><a href="#">Menu<img src="common/images/downArrow.png" class="downarrow" /></a>
<li onmouse...
Hi. I have a query that look like this:
$sql = "UPDATE tbl SET amt_field='amt_field+1' WHERE username='" .mysql_real_escape_string($_SESSION['username']). "'";
mysql_select_db('db',$con);
mysql_query($sql,$con);
I want to increment the value as easily as possible
I have tried :
"UPDATE tbl SET amt_field='amt_field+1'...
Hi. I tried this in my php site <a href=?command=value>hell yeah</a>
And this to get the value :
if(isset($_POST['command'])){
$command=strip_tags($_GET['command']);
Does not seem to work.. Ps. The url have one this value also: ?lang=en_US
...