urgent

urgent

am 02.03.2005 11:59:02 von kalikoi

Hi,

I have an array as follows

a=array("1","2","3","3","2","5","5","1","3")

Now i want a function(in vbscript or in asp) which makes my array as follows

a=array("1","2","3","3.1","2.1","5","5.1","1.1","3.2")

Regards
Kalyan

Re: urgent

am 02.03.2005 12:35:39 von Roland Hall

"Kalyan" wrote in message
news:8d9bccc3.0503020259.5d929817@posting.google.com...
: I have an array as follows
:
: a=array("1","2","3","3","2","5","5","1","3")
:
: Now i want a function(in vbscript or in asp) which makes my array as
follows
:
: a=array("1","2","3","3.1","2.1","5","5.1","1.1","3.2")

I want more customers, urgently. Tell you what, let's trade. You become my
customer and pay me to create the script to change your array. Deal?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp

Re: urgent

am 02.03.2005 14:33:24 von Steven Burn

LMFAO!

--=20
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Roland Hall" wrote in message =
news:e2n12vxHFHA.1096@tk2msftngp13.phx.gbl...
> "Kalyan" wrote in message=20
> news:8d9bccc3.0503020259.5d929817@posting.google.com...
> : I have an array as follows
> :
> : a=3Darray("1","2","3","3","2","5","5","1","3")
> :
> : Now i want a function(in vbscript or in asp) which makes my array as =

> follows
> :
> : a=3Darray("1","2","3","3.1","2.1","5","5.1","1.1","3.2")
>=20
> I want more customers, urgently. Tell you what, let's trade. You =
become my=20
> customer and pay me to create the script to change your array. Deal?
>=20
> --=20
> Roland Hall
> /* This information is distributed in the hope that it will be useful, =
but=20
> without any warranty; without even the implied warranty of =
merchantability=20
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation - =
http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>=20
>=20

Re: urgent

am 02.03.2005 15:00:39 von reb01501

Roland Hall wrote:
> "Kalyan" wrote in message
> news:8d9bccc3.0503020259.5d929817@posting.google.com...
>> I have an array as follows
>>
>> a=array("1","2","3","3","2","5","5","1","3")
>>
>> Now i want a function(in vbscript or in asp) which makes my array as
>> follows
>>
>> a=array("1","2","3","3.1","2.1","5","5.1","1.1","3.2")
>
> I want more customers, urgently. Tell you what, let's trade. You
> become my customer and pay me to create the script to change your
> array. Deal?
>

Cute :-)
You have to admit it is an intriguing problem ... I may give it a whirl
later if I can take time away from my own job.

Kalyan, is there a possibility that the source array could already have had
this algorithm applied to it? Or do you plan to do this transformation only
once to a particular set of data elements?

Bob

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: urgent

am 02.03.2005 15:10:41 von raydan

It's not really that difficult:
a=array("1","2","3","3.1","2.1","5","5.1","1.1","3.2")

My work here is done. :-)

"Bob Barrows [MVP]" wrote in message
news:%23Jsd7AzHFHA.904@tk2msftngp13.phx.gbl...
> Roland Hall wrote:
> > "Kalyan" wrote in message
> > news:8d9bccc3.0503020259.5d929817@posting.google.com...
> >> I have an array as follows
> >>
> >> a=array("1","2","3","3","2","5","5","1","3")
> >>
> >> Now i want a function(in vbscript or in asp) which makes my array as
> >> follows
> >>
> >> a=array("1","2","3","3.1","2.1","5","5.1","1.1","3.2")
> >
> > I want more customers, urgently. Tell you what, let's trade. You
> > become my customer and pay me to create the script to change your
> > array. Deal?
> >
>
> Cute :-)
> You have to admit it is an intriguing problem ... I may give it a whirl
> later if I can take time away from my own job.
>
> Kalyan, is there a possibility that the source array could already have
had
> this algorithm applied to it? Or do you plan to do this transformation
only
> once to a particular set of data elements?
>
> Bob
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>

Re: urgent

am 02.03.2005 16:33:40 von reb01501

Bob Barrows [MVP] wrote:
> Roland Hall wrote:
>> "Kalyan" wrote in message
>> news:8d9bccc3.0503020259.5d929817@posting.google.com...
>>> I have an array as follows
>>>
>>> a=array("1","2","3","3","2","5","5","1","3")
>>>
>>> Now i want a function(in vbscript or in asp) which makes my array as
>>> follows
>>>
>>> a=array("1","2","3","3.1","2.1","5","5.1","1.1","3.2")
>>
>> I want more customers, urgently. Tell you what, let's trade. You
>> become my customer and pay me to create the script to change your
>> array. Deal?
>>
>
> Cute :-)
> You have to admit it is an intriguing problem ... I may give it a
> whirl later if I can take time away from my own job.
>
> Kalyan, is there a possibility that the source array could already
> have had this algorithm applied to it? Or do you plan to do this
> transformation only once to a particular set of data elements?
>

Here is an example that assumes the transformation will only be done once.
It uses an array of arrays:

dim a
a=array("1", "3", "2", "3","2","5","5","1","3", "4")
dim b(),c
redim b(0,0)

dim i, j
for i = 0 to ubound(a)
j=int(a(i))
if ubound(b,2) < j then
redim preserve b(0, j)
redim c(0)
c(0)=a(i)
b(0, j) = c
else
c=b(0, j)
if IsArray(c) then
redim preserve c(ubound(c)+1)
else
redim c(0)
end if
c(ubound(c)) = cstr(csng(j) + .1 * ubound(c))
b(0, j)=c
a(i) = c(ubound(c))
end if
next
response.write join(a,"
")

I'm sure that someone will come up with some regular expression that will do
this in a couple statements ...

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: urgent

am 02.03.2005 20:31:32 von Chris Hohmann

"Bob Barrows [MVP]" wrote in message
news:OFhs40zHFHA.588@TK2MSFTNGP15.phx.gbl...
> Bob Barrows [MVP] wrote:
> > Roland Hall wrote:
> >> "Kalyan" wrote in message
> >> news:8d9bccc3.0503020259.5d929817@posting.google.com...
> >>> I have an array as follows
> >>>
> >>> a=array("1","2","3","3","2","5","5","1","3")
> >>>
> >>> Now i want a function(in vbscript or in asp) which makes my array as
> >>> follows
> >>>
> >>> a=array("1","2","3","3.1","2.1","5","5.1","1.1","3.2")
> >>
> >> I want more customers, urgently. Tell you what, let's trade. You
> >> become my customer and pay me to create the script to change your
> >> array. Deal?
> >>
> >
> > Cute :-)
> > You have to admit it is an intriguing problem ... I may give it a
> > whirl later if I can take time away from my own job.
> >
> > Kalyan, is there a possibility that the source array could already
> > have had this algorithm applied to it? Or do you plan to do this
> > transformation only once to a particular set of data elements?
> >
>
> Here is an example that assumes the transformation will only be done once.
> It uses an array of arrays:
>
> dim a
> a=array("1", "3", "2", "3","2","5","5","1","3", "4")
> dim b(),c
> redim b(0,0)
>
> dim i, j
> for i = 0 to ubound(a)
> j=int(a(i))
> if ubound(b,2) < j then
> redim preserve b(0, j)
> redim c(0)
> c(0)=a(i)
> b(0, j) = c
> else
> c=b(0, j)
> if IsArray(c) then
> redim preserve c(ubound(c)+1)
> else
> redim c(0)
> end if
> c(ubound(c)) = cstr(csng(j) + .1 * ubound(c))
> b(0, j)=c
> a(i) = c(ubound(c))
> end if
> next
> response.write join(a,"
")
>
> I'm sure that someone will come up with some regular expression that will
do
> this in a couple statements ...
>
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>

<%
Dim dct, a, i, iMax
Set dct = CreateObject("Scripting.Dictionary")
a = Array("1","2","3","3","2","5","5","1","3")
iMax = Ubound(a,1)
For i = 0 To iMax
If dct.Exists(a(i)) Then
dct(a(i)) = dct(a(i)) + 1
a(i) = a(i) & "." & dct(a(i))
Else
dct(a(i)) = 0
End If
Next
Set dct = Nothing
Response.Write Join(a,", ")
%>

Re: urgent

am 03.03.2005 00:20:01 von reb01501

Chris Hohmann wrote:
> Dim dct, a, i, iMax
> Set dct = CreateObject("Scripting.Dictionary")

Duh!
Of course!

Bob
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: urgent

am 03.03.2005 04:49:25 von kalyan kamesh

Hi Chris Hohmann,

Thanks For ur Early reply.
May i Know u r complete details.Regarding me i'am Kalyan
working as a junior programmer in pbsystems(India)(www.pbsystems.com).My
mail id is kalikoi@gmail.com.
if u find time please leave u r mailid\chat id so that we can maintain a
great friendship relation in the upcoming days.


Regards
kalyan



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Re: urgent

am 03.03.2005 14:00:59 von reb01501

Chris Hohmann wrote:

Hey Chris, looks like you have another fan ...
:-)

Bob
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: urgent

am 03.03.2005 19:20:50 von Roland Hall

"Bob Barrows [MVP]" wrote in message
news:eww6ME$HFHA.3336@TK2MSFTNGP10.phx.gbl...
: Chris Hohmann wrote:
:
: Hey Chris, looks like you have another fan ...
::-)

Chris has all the luck. (O:= However, after posting that email address,
the Op will have to search for any mail coming from Chris among the myriad
of SPAM currently on its way.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp

Re: urgent

am 03.03.2005 19:35:37 von Chris Hohmann

"kalyan kamesh" wrote in message
news:%23SMJ$P6HFHA.3760@TK2MSFTNGP12.phx.gbl...
> Hi Chris Hohmann,
>
> Thanks For ur Early reply.
> May i Know u r complete details.Regarding me i'am Kalyan
> working as a junior programmer in pbsystems(India)(www.pbsystems.com).My
> mail id is kalikoi@gmail.com.
> if u find time please leave u r mailid\chat id so that we can maintain a
> great friendship relation in the upcoming days.

I'm glad I was able to help. As a rule, I don't make my email address
public. Truth be told, I check these newsgroups with greater regularity than
my email, so this is probably the best place to reach me. Also, I feel it's
important to share any useful advice in a community setting so others might
also benefit from it. I look forward to helping you with any future ASP
related questions you may have, if I am able. I'd also like to recommend
aspfaq.com which has been an invaluable resource for me.

Sincerely,
Chris Hohmann

Re: urgent

am 04.03.2005 04:38:43 von kalyan kamesh

hi chris,

thanks for u r reply.atleast tell about u? where r u from?what r u
doing?



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Re: urgent

am 04.03.2005 20:03:41 von Chris Hohmann

"kalyan kamesh" wrote in message
news:Oi08quGIFHA.276@tk2msftngp13.phx.gbl...
> hi chris,
>
> thanks for u r reply.atleast tell about u? where r u from?what r u
> doing?
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

I live in southern California and I am a programmer by trade. I work in the
medical/education industry and currently develop in ASP and MSSQL. I
previously worked in the financial industry and also have experience with
..Net, Java, Oracle, Cold Fusion, Linux, Apache, mySQL, PHP, ... This is
starting to sound dangerously close to a resume and there are more
appropriate forums for that, so I'll end it here.

Re: urgent

am 14.03.2005 13:47:16 von kalyan kamesh

hi Chris,

I got another requirement in vb.net.I got a resultset from a table and
it is loaded in a datagrid.Can u help me how 2 wrap text in items in the
datagrid ie on the form load the items should be wrapped.please
help.waiting for u r early reply



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Re: urgent

am 14.03.2005 13:59:53 von reb01501

kalyan kamesh wrote:
> hi Chris,
>
> I got another requirement in vb.net.I got a resultset from a table and
> it is loaded in a datagrid.Can u help me how 2 wrap text in items in
> the datagrid ie on the form load the items should be wrapped.please
> help.waiting for u r early reply
>
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: urgent

am 14.03.2005 17:40:10 von Roland Hall

"kalyan kamesh" wrote in message
news:%23E6p0PJKFHA.3296@TK2MSFTNGP15.phx.gbl...
: I got another requirement in vb.net.I got a resultset from a table and
: it is loaded in a datagrid.Can u help me how 2 wrap text in items in the
: datagrid ie on the form load the items should be wrapped.please
: help.waiting for u r early reply

To add to Bob's message...

Threads fall off eventually. A new question should have its own thread. It
will also allow more to participate rather than thinking the same thread was
ongoing.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp