problem with number/number=number ?
i need for below
1/36 = 0,0277777777777778 but result should be 1
3/36 should be 1
35/36 should be 1..... (between 1 and 36)/36 should be 1
36/36 and 37/36 and 45/36 and 71/36 should be 2
(between 72 and 37)/36 should be 2
(between 107 and 73)/36 should be 3 and go on
how can i do it ?
ThanksMark as me if my question or my answer can be helpful for you :)
I think that
(int)(n / 36) + 1
will do the trick
it work true without below result 1 for 1/36 and 4 /36 and 35 /36 .. it is true.. but
result 2 for 36/36 . res...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?
if (docInfo.advPayMonths =...Number of User, Number of Connections
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?
> 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
On Sun, 12 Aug 2001 16:18:03 -0400, Stephan Marais <email@example.com> wrote:
You could write an openclient application tha...number connection with huge number user !
I use sqlhelper to get data from database.my table has 10000 records.I know that there are approximates 3000 users access my web application and load 10000 records about 5 minutes.I use method ExecuteDataSet to get DataSet from server.I feel that there are many connection hit database (connection pooling is about 90) , web application is quite slowly.Are there other solutions to get better ?Thank you very much.
How about caching the result from the database the first time?When you ask a question, remember to click "mark as answered" when you get a rep...How to connect to ASE where the Number of users connections reached max.
Is there any way the 'sa' can connect to the ASE when the server reached
user connections limit. Let us say if have the number of user connections =
100, Can we set the server to accept only 99 and leave one connection for
Any ideas ?
<mc> wrote in message
> > Is there any way the 'sa' can connect to the ASE when the server
> > user connections limit. Let us say if have the number of user
> connections =
> > 100, Can we set the server to a...Number of connections connected
I can limit the user connections to my sybase.
But how can I know how many connections currently connected
to my sybase ?
Kenneth Hui wrote:
> I can limit the user connections to my sybase.
Do you mean on a per user basis? If so, no.
> But how can I know how many connections currently connected
> to my sybase ?
'sp_who' or 'select * from sysprocesses' will show the
-am � 2001
...Default number of user connections to ASE
I have a 30 user licence of my ASE 11.5
I would like to know the number of user connections that are taken up by
default by the server. And how many user connections do I need to
account for , before deciding upon the number of actual client
connections (say, from a PB application)
Output of select @@version is : Adaptive Server Enterprise 11.5/P/Nt/OS
> I have a 30 user licence of my ASE 11.5
> I would like to know the number of user connections that are taken up by
> default by the server. And how many...Very large (>4000) number of connections to ASE
I work at an internet company where we currently use some home-grown middleware
to connect the perl/apache CGI scripts to our ASE 11.9.2 (soon to be 12.0)
servers. The front ends run on FreeBSD, and the Sybase server is on a Sun 4500.
We want to do away with our ad-hoc middleware, mostly for maintenance reasons.
We have calculated that if each httpd process had a persistent connection to
Sybase we'd need ~4000 connections, with a further problem being that the
httpd processes are relatively short lived (~200 hitsbefore being killed)
because they tend to grow too large other...Number of connections
If I need to connect up to 2000 users to Sybase server which platform is
Does NT can support this amount ?
Yes. ASE 11.5.1 and above on NT supports over 2000 connections.
Whether the performance is acceptable, you will have to decide.
> If I need to connect up to 2000 users to Sybase server which platform is
> Does NT can support this amount ?
> Best Regards.
Thanks for the replay.
We are currently workin...number of connections
Just a question ... is there a way to limit an user with connections?, I
mean, for example, I've an user named APLIC1, but I would like only this
user log in no more than 5 connections. Can I do that?
Thanks a lot in advance
...Check for number of Numbers in a string
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?
For i = 0 to myString.Length() Step 1
If IsNumeric(Mid(myString,1,1)) Then
'//Do something really neat
You may have to tweak that ...Re-number week numbers?
Is it possible to have week numbers off-set i.e.. for educational use week 1
is beginning of September .......
...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 :
...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
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")...