I am using ASP.Net 3.5.
I have fiiled dropdown list in javascript using ajax service but unable to get its selected value in button click event on server side.
I need to multiply an integer (two's compliment) by a floating point constant. Here is what I have:
.data
pi dd 3.14
int dd 0ah
.code
fld pi
???
fmul ST(1), ST
How can I convert int to a floating point value for multiplying against pi?
Documentation says (http://code.google.com/appengine/docs/java/urlfetch/overview.html#Request_Headers):
These headers are set to accurate values by App Engine, as appropriate
Does the value for X-Forwarded-For included some identity of the gae application?
What's the quickest way to remove an element from a Map by value in Java?
Currently I'm using:
DomainObj valueToRemove = new DomainObj();
String removalKey = null;
for (Map.Entry<String, DomainObj> entry : map.entrySet()) {
if (valueToRemove.equals(entry.getValue())) {
removalKey = entry.getKey();
break;
}
}
if (removalKey != null) {
map.remove(removalKey);
}
Each item in my array is an array of about 5 values.. Some of them are numerical ending in "GB".. I need the same array but with "GB" stripped out so that just the number remains.
So I need to iterate through my whole array, on each subarray take each value and strip the string "GB" from it and create a new array from the output.
Can anyone recommend and efficient method of doing this?
How do I hard code an absolute maximum or minimum value for a float or double? I want to search out the max/min of an array by simply iterating through and catching the largest.
There are also positive and negative infinity for floats, should I use those instead? If so, how do I denote that in my code?
Hi there,
I want to allow users enter numbers in textfield and once the textbox loses focus. The number is formatted with commas.
e.g. User enters 100000
textfield looses focus
value displayed: 100,000
How can I achieve this in Grails.
I have looked at
<g:formatNumber number="${myNumber}" format="\\$###,##0" />
But it doesnt solve my problem as the number is from a textfield.
thanks
Much appreciated.
I'm getting this message,"The string '7/22/2006 12:00:00 AM' is not a valid AllXsd value.", when deserializing an XML, the element contains a date, this is the property that is supposed to be mapped to the element:
[XmlElement("FEC_INICIO_REL",typeof(DateTime))]
public DateTime? FechaInicioRelacion { get; set; }
Am I doing something wrong?
I am trying to put all elements of rbs into a new array if the elements in var(another numpy array) is =0 and <=.1 . However when I try the following code I get this error:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
rbs = [ish[4] for ish in realbooks]
for book in realbooks:
var -= float(str(book[0]).replace(":", ""))
bidsred = rbs[(var <= .1) and (var >=0)]
any ideas on what I'm doing wrong?
I'm getting this error in CodeIgniter when trying to load the email library:
Can't use method return value in write context
It's happening on line 827 of Loader.php in [codeigniter root]/system/libraries/Loader.php
include_once($filepath);
where $filepath equals "/var/www/system/libraries/Email.php"
I called it like this in another php file:
$this->load->library('email');
where $this is the CodeIgniter instance.
According to the CodeIgniter email doc page, I'm doing it right. But it's not working...
How to save user imputed value in TextBox? (WPF XAML) So in my xaml window I have a TextBox. User sturts my application inputs some values in to it and presses a button or hints Enter. He closes an app. Opens it up again. How to make his inputs be saved in that TextBox in WPF?
I'm trying to get the first href attribute in a page using Selenium RC (in Python):
sel.get_text("xpath=//@href")
this returns an empty string.
However, an identical xpath on the same page inside Firefox (using the "View XPath" extension) yields the correct value.
I've tried fiddling with it, but the same happens for other attributes (eg @class) -- is there something awfully wrong with selenium or am I overlooking something trivial here?
I am using C++ boost's dynamic_bitset.
I have already allocated a variable and I just want to change its value - to construct it anew from an 'unsigned long' like from the constructor, but I don't want to allocate the memory again or to create a temporary variable.
What can I do?
Hi, I need to know the signal strength of a Bluetooth connection to a remote device that I make with my Android 2.1 phone. From the SDK, I can see that I can determine the RSSI at the time I discover the remote device. But I can't see how to update that RSSI value over time.
Can someone give me a hand? Thanks!!
I've finally installed all the requirements (so i think!) of a Django project, and I'm trying to get a local install running on my Mac (OSX 10.4).
I'm getting the following error:
Blockquote
OperationalError at /
no such table: django_content_type
Request Method: GET
Request URL: http://127.0.0.1:8000/
Exception Type: OperationalError
Exception Value:
no such table: django_content_type
Exception Location: /Users/Diesel/Desktop/DjangoWork/pinax-ev/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py
in execute, line 170
Python Executable: /Users/Diesel/Desktop/DjangoWork/pinax-ev/bin/python
Python Version: 2.5.1
I saw this construction in order to get the browser viewport width:
function () { return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; }
I understand the browser quirks involved. What I don't understand is why || returns the value. So I tried this alert(undefined || 0 || 3); and sure enough, it alerts 3. I find this bizarre, because I expect true or false. Could anyone explain what's going on?
Hello,
I need to find the string,decimal or boolean, byte value from jquery grid control,,
using extension methods,, can anybody tell me how to write extension methods to find string,decimal values?
thanks
plz help me
i am creating multiple chechbox with same name and id how i get value of array when i submited form ? using cake php
create('Report', array('action'='add')));
for($i=0;$i
" id="Report" /
}
}
?>
A = imread(filename, fmt)
[X, map] = imread(...)
The above is in the synopsis part of imread, which seems to say that the return value of a MATLAB function depends on how it's called? Is that true?
We have a WPF windows application that contains a stackpanel control, that I want to be visible only for testing, but not when it is in production.
We'd like to store the visibility value of that stackpanel in the application configuration file (app.config).
What is the WPF way of achieving this?
I have a table having a single auto Auto Incremented column. How Can i insert the value. Using
Insert into table or some other way
Thanks
Waiting for your replay..
I have several anchor tags on a page with the same id of 'hrefCompare'. I need to dynamically set the value of the href attribute on ALL of these a tags.
I am currently trying to do this:
$("#hrefCompare").attr("href", "foobar.com");
However, this only sets the very first anchor tag with that ID. there's 7 more on this page with the same id of 'hrefCompare'. How can I set all of the href values with that ID?
When I add a reference to my project, I usually want to use Specific Version = FALSE. This is because our automated build will set the version number. I see the default behavior is to be TRUE.
Is there a way to change this? Counting on manually changing that value is error prone (and I end up breaking the build).
I have a JavaScript class that has a method:
function someClass() {
this.someMethod = someClass_someMethod;
}
function someClass_someMethod() {
// make an AJAX request
}
The problem is that someClass_someMethod() needs to return the value of the AJAX request.
I'm using jQuery's $.getJSON() method to fetch the data. The data needs to be returned but it seems the only way to get the data is through a callback.
How can this be done?