When is a number not a number?I've got some server script that determines the "SELECTED" entry in a SELECT
control. (The code below is a snippet.) If no information is returned then
I want the number defaulted a hard-coded value, otherwise, I want number
that matches the returned value selected. The defaulted, hard-coded value
works but the comparison (i == val) doesn't work if a a value was returned
in the information. I've verified that it is indeed a number within the
range I want.
Why would this comparison fail like this?
TIA
Alan Rosine
<snip>
if (docInfo.advPayMonths =...
phone numbers dialing (skype) by clicking the number in web pageName: konicek
Email: jkonicekatvolnydotcz
Product: Firefox
Summary: phone numbers dialing (skype) by clicking the number in web page
Comments:
how can I switch on phone numbers dialing (skype) by clicking the number
in web page?
Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.2) Gecko/2008091620 Firefox/3.0.2
From URL: http://hendrix.mozilla.org/
Note to readers: Hendrix gives no expectation of a response to this feedback
but if you wish to provide one you must BCC (not CC) the sender for them to
see it.
...
Random number excluding a number.
i have been playing around with random numbers and to get a random number between say 1 and 100 i use a code like this :
System.Random RandNum2 = new System.Random();
int MyRandomNumber2 = RandNum2.Next(1, 100);
but if i want to get a number between 1 and 100 excluding the number 50. is this possible? thanks Si
Kind of a funny concept for random, but you could put the calls to random in a loop and exit when the result is not 50. blink18jew:i have been playing around with random numbers and to get a random number between say 1 and 100 i use a code like this :
...
Number of User, Number of ConnectionsHi,
Does open client provide a mechanism to write an application that will alow
me to monitor the number of users and connections to a database?
Regards,
San
> Does open client provide a mechanism to write an application that will alow
> me to monitor the number of users and connections to a database?
I do not think Open Client has a way to do it, but I think the easiest is to
select the info from master.dbo.sysprocesses
Stephan
On Sun, 12 Aug 2001 16:18:03 -0400, Stephan Marais <smarais@mindspring.com> wrote:
You could write an openclient application tha...
Re-number week numbers?Is it possible to have week numbers off-set i.e.. for educational use week 1
is beginning of September .......
...
VB.NET: How to convert hexadecimal number to normal (decimal) number?
Hi to all
VB.NET function Hex() converts numbers to hexadecimal strings, is there any reverse function that converts hexadecimals back to numbers??
Thanks, Hooker
Hi, how are you?
In C#, we have something like:
Convert.ToInt32(string strValue, int Base)...
So I basically can do:
Int iDecimal = Convert.ToInt32("AF8", 16);
I'm pretty sure there must be something like it on VB.Net.
Hope this Helps,
Covohttp://covodev.blogspot.com/"Everything should be made as simple as possible, but not simpler", A. Einstein
That should work, thanks.
I'm fine, BTW...
Number of connections (spid numbers)Since upgrading from 11.9.2 to 12.5.1, I have noticed a
significant increase in the spid number assigned to
connections. Actually, it broke an application that captures
@@spid to a 3-char field. I usually have no more than
between 300 and 400 concurrent connections with anywhere
from 30 - 50 new connections each hour (per sysmon). The
spid numbers are now reaching over the 1000 mark. Has
anything changed in how spid numbers are assigned? I assumed
that a spid number is assigned either by one thats been
previously assigned and available or the next highest number
sequentially. If I ch...
Replace number with Number+R
Using vb.net 2005 I want to do the following:
I have a formula, ex, something like
1 + 2 + ((3 + 4 + 5)/4)
and I want to replace each number with number+R
ex:
1R + 2R +.... and so on.
whats a good code snippet to do this? I am thinking some regexp will do the trick.
think i just got it:
someString = System.Text.RegularExpressions.Regex.Replace(someString , "\d+", "$&R")...
Check for number of Numbers in a string
Hi all,
Need some help here. I know in C++ and Java, I can check for the number of Numbers in sa string. One example is "RN12" will have 2 numbers while "RN1234" will have 4. How do I do it in VB.net? Thanks for all the help!SGDOTNET.ORG
I know there has to be a better way but couldn't you just write an for next statement to analyze the string?
Imports Microsoft.VisualBasic.Information
For i = 0 to myString.Length() Step 1
If IsNumeric(Mid(myString,1,1)) Then
'//Do something really neat
End If
Next
You may have to tweak that ...
numberHi there
I'm a new bird to Perl - and I have a little problem.
I have a file input where I split the file into an array and that works
fine, but there is some "spam" in the beginning of the file I want to
get rid of - the problem is that I never know how many lines there is
with this "spam"!
Therefore I want to make a check that excludes all lines there doesn't
start with a number in other languages I would make a check like
If (! isNaN(string)) {
.....
}
How do I make this check In Perl?
I haven't been able to find something similar in ...
Number
Hello,What should be the data type for holding numbers with 2 decimal places (2.32, 4.23, 1.23, ...)?Thanks,Miguel
You could use the double datatype
double decimalNumber = 12.21;
for more about datatypes check this link
HCHaissam Abdul MalakMCAD.NET| Blog |
u can use double.parse or System.Math.Round functions
have a look at the code below
double number = 123456.646;number = double.Parse(number.ToString("####0.00"));
Decimal d = 17.3501m;d = Math.Round(d, 2);Arshad Rasheed - MCPFree ASP.Net & Ajax books Please mark the most helpful reply/replies as "Answer"...
number
How to get host name and port number from my computer please send me the details
HttpContext.Current.Request.Url.Host
HttpContext.Current.Request.Url.Port
--------------------------------------------------------Don't forget to click "Mark as Answer" on the post(s) that helped you.NHibernate with ASP.net Problem-Design-Solution sample applicationScott ASP.net blog
HttpContext.Current.Request.Url.Host
HttpContext.Current.Request.Url.PortRegardsNicsam[!!!!!!!Hopes this helps you!!!!!!!]...
numberName: panda-fighter@yandex.ru
Email: panda-fighteratyandexdotru
Product: Minefield
Summary: number
Comments:
75215
Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:2.0a1pre) Gecko/2008051003 MRA 5.3 (build 02560) Minefield/4.0a1pre
From URL: http://hendrix.mozilla.org/
Note to readers: Hendrix gives no expectation of a response to this feedback
but if you wish to provide one you must BCC (not CC) the sender for them to
see it.
...
Number
Hello,Inside a GridView I am accessing a value of the datasource:DataBinder.Eval(gvrContainer.DataItem, "Average")I know this is of type Double. I want to round it and change it to integer.How can i do this?Thanks,Miguel
Either of the following.(replace "num" with your column name "Average")
<asp:TemplateField HeaderText="num" SortExpression="num">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("num", "{0:F0}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="num" HeaderTex...