Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Representing Dynamic Arrays in VB.NET

9 views
Skip to first unread message

sh

unread,
Aug 8, 2008, 2:33:08 PM8/8/08
to
Does anyone have any good ideas about the best way to represent a
dynamic array in VB.NET?

I'm looking to use it as a temporary, in memory store, not as a complex
database.

At first I thought to use a three-dimensional array, but that quickly
fell apart (redimensioning doesn't work the way MV needs). Then I
thought of using some kind of collection, but that looks complex to
implement as a three-dimensional store.

mv.NET is not an option in this project.

Does anyone have any ideas? Or better yet, has anyone actually done it?

Thanks.

Rex Gozar

unread,
Aug 8, 2008, 3:52:00 PM8/8/08
to
You can use "array of arrays" (not to be confused with multi-
dimensioned arrays) or "collection of collections" to nest your data
any number of levels deep.

I assume, though, you'll want to somehow be able to serialize/
deserialize dynamic array data as well. In that case, you'll need to
build your own functions to do so.

rex

RDW

unread,
Aug 8, 2008, 4:54:07 PM8/8/08
to

According to the UniObjects for .Net Developer's Guide you would use the
UniDynArray Class. This is if you are a UniVerse or UniData developer.

Ron White

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access

sh

unread,
Aug 8, 2008, 5:55:08 PM8/8/08
to

Have you ever done it? It looks like it would be quite complicated to
implement, or am I just imagining it.

It looks to me like collections would be the way to go - no need to keep
track of dimensions and having to redim them.

Message has been deleted

Mark Brown

unread,
Aug 8, 2008, 7:02:52 PM8/8/08
to
"sh" <sha...@prupipe.com> wrote in message
news:VNKdnTKK8I_5DAHV...@earthlink.com...


Just to create dynamic array-like functionality, create an "object" with
these properties (or something similar)

public xRec as string =vbnullstring ' define dynamic array somewhere
public default overloads property AVS()
get
try
return xrec
catch ex as exception
return vbnullstring
end try
end get
set (byval value as string)
try
xrec = value
catch ex as exception
end try
end set
end property
public overloads property AVS(byVal iAttr as integer)
dim XX(1) as string
get
try
xx = split(xrec,Chr(254))
return xx(iAttr-1) ' zero-relative
catch ex as exception
return vbnullstirng ' outside range of existing attributes
end try
end get
set(byval value as string)
try
xx = split(xrec,chr(254)) ' split the array into segments
' if they replace a value higher than we have, build up to it
if iAttr-1 > ubound(xx) then redim xx(iAttr-1) ' redimension
the array bigger
xx(iAttr-1) = value ' replace value
xrec = join(xx,Chr(254)) ' put it back together again
catch ex as exception
end try
end set
end property
public overloads property AVS(byVal iAttr as Integer, byval iVal as Integer)
dim XX(1) as string, YY(1) as string
get
try
XX = split(xrec,Chr(254))
YY = split(xx(iAttr-1),Chr(253))
return YY(iVal-1) ' zero-relative
catch ex as exception
return vbnullstirng ' outside range of existing attributes
end try
end get
set(byval value as string)
try
XX = split(xrec,chr(254)) ' split the array into segments
if iAttr-1 > ubound(XX) then redim xx(iAttr-1) ' redimension
the array bigger
YY = split(XX(iAttr-1),Chr(253))
if iVal-1 > ubound(YY) then redim YY(iVal-1)
YY(iVal -1) = value ' replace value
XX(iAttr-1) = join(YY,Chr(253))
xrec = join(xx,Chr(254)) ' put it back together again
catch ex as exception
end try
end set
end property

You get the idea. You can carry this on to as many levels as you want to
define delimiters (chr(251), ~, \ etc etc)


Mark

sh

unread,
Aug 11, 2008, 10:07:13 AM8/11/08
to
Mark

Looks interesting. I never thought of it this way. I'll give it a look.

When I did a copy & paste into a new class, I got a load of error
messages. I guess you posted it quickly. I'll have to clean it up to see
how it works.

Thanks

Mark Brown

unread,
Aug 11, 2008, 6:19:36 PM8/11/08
to
"sh" <sha...@prupipe.com> wrote in message
news:QtednaCnFsoM2j3V...@earthlink.com...

> Mark
>
> Looks interesting. I never thought of it this way. I'll give it a look.
>
> When I did a copy & paste into a new class, I got a load of error
> messages. I guess you posted it quickly. I'll have to clean it up to see
> how it works.
>
> Thanks
>


Let me know if you need more specific help. I typed it in from memory and
didn't add all the properties and methods.


Mark

Rex Gozar

unread,
Aug 12, 2008, 9:34:10 AM8/12/08
to
sh,

Here's a link with some how-to info on VB.NET collections:

http://www.java2s.com/Tutorial/VB/0160__Collections/0180__Collection.htm

If you really are trying to create temporary storage, collections is
probably the way to go.

But it seems that you are unintentionally constrained by "multi-value
thinking". You didn't say whether or not your need to serialize/
deserialize the data; since it's temporary I'm going to assume "no".
That being the case, it might be better to think of your data in terms
of "structures within a structure".

Instead of associating {name, name, name} with {city, city, city}, try
thinking in terms of { {name, city}, {name, city}, {name, city} }
storing the associated data together as separate structures (i.e.
collections).

rex

sh

unread,
Aug 12, 2008, 10:01:08 AM8/12/08
to
Mark

Thanks so much for your code snippet. I took the snippet, and created a
whole class, including Insert, Delete, and DCount methods and functions.
I'd be glad to post it, but I'm not sure a post here is the best way to
go with it.

I'd be happy to e-mail it to whoever is interested, or perhaps post it
to some multi-value site. However, I wrote it the "quick and dirty" way.
I'm not so happy with some of the syntax (some of it doesn't feel Pickie
or VB). I can see some places that can use some tightening up, or
perhaps better ideas of how to implement it, so I'd first like to get
some "peer review" of it. But it's really just an extension of your
ideas, Mark. Can I e-mail it to you first, Mark? Anyone else interested
in looking at it?

BTW Mark, I wasn't able to get those "default" methods to work. On the
first method, I got an error message saying that you cannot default a
method that has no parameter list. So I'm left with mvRec.Item as the
necessary syntax. Maybe you have a better way of doing it.

Sholom

Rex Gozar

unread,
Aug 13, 2008, 3:08:09 PM8/13/08
to
sh,

www.PickWiki.com is Ian McGowan's mv site. I try to encourage all
Pick developers to post their code and notes there.

http://www.pickwiki.com/cgi-bin/wiki.pl?Getting_Personal_With_PickWiki
http://www.pickwiki.com/cgi-bin/wiki.pl?How_To_Register

rex

sh

unread,
Aug 13, 2008, 3:39:42 PM8/13/08
to

OK, thanks. Right now I'm working with Mark on this stuff. Let's see
what happens.

Tony Gravagno

unread,
Aug 13, 2008, 5:28:51 PM8/13/08
to
(Late to the party, didn't send this earlier, sorry)

Sholom, please forgive, but I'm sort of surprised at the question.
.NET has a multitude of collection options for strong or weak data
types. You have the basic Collection, List, Array, ArrayList,
Hashtable, Queue, Stack, SortedList, Dictionary, and others. And you
can create a class that derives from IEnumerable, IList, ICollection,
and IDictionary.

With .NET collections you never need to redimension. That's done for
your internally, quickly, and transparently. It sounds like you're
just thinking about string[][] type object arrays.

Before you write off mv.NET, just note that you don't need to be
connected to a server to user mvItem objects, and the DataBasic class
has all the familiar functions like DCount, OConv, etc.

Good luck,
T

sh

unread,
Aug 14, 2008, 9:36:58 AM8/14/08
to
Tony Gravagno wrote:
> (Late to the party, didn't send this earlier, sorry)
>
> Sholom, please forgive, but I'm sort of surprised at the question.
> .NET has a multitude of collection options for strong or weak data
> types. You have the basic Collection, List, Array, ArrayList,
> Hashtable, Queue, Stack, SortedList, Dictionary, and others. And you
> can create a class that derives from IEnumerable, IList, ICollection,
> and IDictionary.
>
> With .NET collections you never need to redimension. That's done for
> your internally, quickly, and transparently. It sounds like you're
> just thinking about string[][] type object arrays.
>

Thanks Tony. I definitely thought that collections were the way to go,
but when I sat down to implement it, it LOOKED like it would be complex
to set up the right 3 dimensional collection object with all the
appropriate methods. Plus, none of the books I have, give an example of
a multi-dimensioned collection. So I asked if anyone had already thought
it through, which would make life a bit easier for me.

While Mark's method doesn't use collections, It does have appeal because
it's simple and elegant. I also like it because it revolves around
strings. With collections, I'd have to construct/deconstruct the
collection to a string (which is the end result I need).

> Before you write off mv.NET, just note that you don't need to be
> connected to a server to user mvItem objects, and the DataBasic class
> has all the familiar functions like DCount, OConv, etc.

Oh no, I didn't write off mv.NET. It's just that this project involves
handheld devices, which only run the .NET Compact Framework. mv.NET
won't run on the CF.

>
> Good luck,
> T

Tony, if you have any code snippets using collections I'd love to see
it. Do you have anything on your blog? I really am only looking for the
basic dynamic array functions - Extract, Insert, Delete, Replace.
Nothing fancy. I've already written my own generic DCount, IConv, OConv,
Locate, Field and Index functions to use in VB whenever I need them.

There are many ways to skin a cat (although I've only done it on a chicken).

Sholom

Gene

unread,
Aug 15, 2008, 11:52:45 AM8/15/08
to
Tony Gravagno <address.i...@removethis.com.invalid> wrote:
> Before you write off mv.NET, just note that you don't need to be
> connected to a server to user mvItem objects, and the DataBasic class
> has all the familiar functions like DCount, OConv, etc.
>

I'm going to second this. While the communication rate between the host
and the server is utter crap[*], the data manipulation objects are top
notch and are perfect if you want to manipulate multi-value data in a
"native" fashion. If you do any .Net programming at all, I'd recommend
buying mv.Net just for the mvItem objects.


* - In my personal experience even the C4 version of the D3 ODBC interface
(VB5) beats the snot out of the communication speed of mv.Net.

g.

Bill H

unread,
Aug 15, 2008, 11:05:36 PM8/15/08
to
Gene:

I've been using mv.NET for awhile on UniData and have found the
communication speed refreshingly fast. I use UO.NET through mv.NET and the
speed was a huge increase over our use of PDP.NET and our testing of ODBC on
D3 and OleDB on U2.

But then we're just sorry-a$$ed users, not the oracle's of CDP. :-)

Bill

"Gene" <ge...@deltasoft.com> wrote in message
news:ncudnUIYqMjQOzjV...@posted.connectcorp...

Tony Gravagno

unread,
Aug 16, 2008, 7:09:19 AM8/16/08
to
>"Gene" wrote
>> While the communication rate between the host
>> and the server is utter crap[*], the data manipulation objects are top
>> notch...

>> * - In my personal experience even the C4 version of the D3 ODBC interface
>> (VB5) beats the snot out of the communication speed of mv.Net.

"Bill H" responded:


>I've been using mv.NET for awhile on UniData and have found the
>communication speed refreshingly fast.

Gene posted a couple notes here about issues with the D3CL and tried
mv.NET at my recommendation. We had a few rounds at it, and for some
reason performance on his system really was unacceptable so he stuck
with the D3CL. I can't blame him at all.

My conclusion is that mv.NET continues to be best connectivity tool in
our industry, but for the v3.5.1.2 release that we tried with Gene
there is something bad going on under the hood that can cause
performance to tank - and it might be D3-specific or telnet-specific
or related to some specific setting like the 8bit conversion.

In every application I've seen we'll open the connection grab some
data, then do a virtual logoff (no disconnect, eliminates pain of
logon later), and performance is pretty good. Gene is opening, then
doing several reads with calcs in between, then closing - but the
performance of the individual reads was really bad. (Still in the ms
range but adding up to many seconds per business transaction, which
simply won't do.)

I now have a v3.5.1.3 which includes changes specifically to address a
performance issue that was found in the prior release. I don't have
details of what was changed so I will just run the same tests and see
if I get better numbers before and after. I welcome an opportunity to
run these benchmarks on any system running v3.5.1.2, and then on the
same system with v3.5.1.3.

To continue discussing this product-specific issue, anyone is welcome
to register at the Nebula R&D forum where I'll post notes in the
mv.NET forum sometime in the next week.
remove.pleaseNebula-RnD.com/forum

Regards,
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula R&D sells mv.NET and other Pick/MultiValue products worldwide,
and provides related development and training services

Simon

unread,
Aug 17, 2008, 5:14:02 AM8/17/08
to
Just picking up on the point regarding performance, stating at the
outset that I've not used mv.net in the past - but I believe that the
following applies.

For best performance between client and server, I have found that it
is best to keep the core business logic on the server, and interact
with it using something akin to a web service.

For example, rather than carrying out a series of transactions such
as :

1. Read Customer Record
2. Get next invoice no
3. Create Invoice Record
4. Write Customer Record
5. Update Customer Record with invoice history
6. write customer record.

Which involves 6 interactions with the server which are all "low-
level" read-writes. It is better to simply write a single transaction
which simply calls a databasic program on the server to "Update
Customer x With this sale" which does all the 6 steps in one go and
returns the success or error. Similarly, for user-interface
purposes where compiling data from multiple records for display, I've
always found it better to create a "virtual" single data structure
that is compiled on the server by a "call", which compiles the data on
the server and then returns in one go. This involves a little more
programming work, but will increase performance of the application
from the use-perspective many-fold.

Actually, I was about to start re-writing my vb.net based dynamic
array code and was also thinking about how to represent the data
structure. I'm also going to represent the dynamic array as a
string and use dotnet's extremely fast string handling code to
manipulate it. This is on the basis that most dynamic arrays are
relatively short (<100k). There will only be one exception that I'm
making, which is where the dynamic array contains information such as
a "report" which I is represented as a read-only dynamic array, with
attributes being a line of the report, and values being the columns.
These arrays can get big and I don't want to use standard dynamic
array handling to work with them which will be slow - I will convert
this immediately into a collection with each line being a fixed sized
array (of the number of columns). This will vastly speed up the
performance of generating reports (I convert the dynamic array into a
dataset for onward manipulation by standard dotnet controls).

Simon

On Aug 16, 12:09 pm, Tony Gravagno

Bill H

unread,
Aug 17, 2008, 4:33:53 PM8/17/08
to
Simon:

I'd think most MV programmers would agree with your analysis. Keep it
simple and keep it on the MV server.

There are serious problems with this though. First most .NET and other
client/server programmers don't have much of a clue about this concept
because they often don't work with an application server so close to the
data (the MV server). Most of my experiences with .NET programming is that
this technology is much slower and less efficient and is much more costly to
develop, support, and maintain. I've not been able to find any .NET
programmers (or Java programmers for that matter) who follow your techniques
working with MV because this is __NOT__ the methodology they learned. The
methodology they learned is convoluted, constantly works around design flaws
of the development model, abstracted beyond belief, and time consuming to a
far greater degree than previously known in this line of work.
Consequently, it is very difficult for those of us needing help to find
decent help. Many offer, but few if any can succeed.

When I refer to mv.NET's speed, I'm talking about the connection itself.
Your overview is excellent in describing the challenges of MV in utilizing
newer abstract technologies. Your level of knowledge of both technologies
(MV & .NET) place you in a unique position to integrate both technologies,
but I'm sorry to say this capability is nowhere to be found in the general
.NET developer community.

Just IMHO of course. :-)

Bill

"Simon" <si...@aphroditeuk.com> wrote in message
news:40034216-5453-4938...@d45g2000hsc.googlegroups.com...

Simon

[snipped]


Ross Ferris

unread,
Aug 17, 2008, 7:48:18 PM8/17/08
to
On Aug 17, 7:14 pm, Simon <si...@aphroditeuk.com> wrote:
<snip>

: Which involves 6 interactions with the server which are all "low-


: level" read-writes.  It is better to simply write a single
transaction
: which simply calls a databasic program on the server to "Update
: Customer x With this sale" which does all the 6 steps in one go and
: returns the success or error.    

I agree to a point, BUT the reality is that I would expect that the
ferification of a customer code would take place erly on in the
invoice entry process --> I want to not only KNOW that I have entered
a valid customer code, but also visually VERIFY I have selected the
RIGHT customer by seeing name/address details etc displayed. Likewise,
If I'm building up a stock invoice, I'm going to want to see that I've
selected the right product line at a time, and also probably access m
y host based pricing rules which can be "complex", including quantity
breaks, mixed product discount dealks etc


<snip>
:    I'm also going to represent the dynamic array as a


: string and use dotnet's extremely fast string handling code to
: manipulate it.

When the compiler people get around to taking advantage of the new
instructions available on the next generation of Intel chips to be
released (which includes support of string searches as a single
instruction at the silicon level --> vultures anyone?) this will only
get faster

Gene

unread,
Aug 18, 2008, 12:31:21 AM8/18/08
to
Bill H <som...@somedomain.com> wrote:
> Gene:
>
> I've been using mv.NET for awhile on UniData and have found the
> communication speed refreshingly fast. I use UO.NET through mv.NET and the
> speed was a huge increase over our use of PDP.NET and our testing of ODBC on
> D3 and OleDB on U2.
>
> But then we're just sorry-a$$ed users, not the oracle's of CDP. :-)
>
Well you know, I'm willing to believe that it's my specific configuration
requirements and not the product as a whole. If everyone saw the performance
that I did, nobody would use it. :)

g.

Gene

unread,
Aug 18, 2008, 12:36:22 AM8/18/08
to
Tony Gravagno <address.i...@removethis.com.invalid> wrote:
>
> Gene posted a couple notes here about issues with the D3CL and tried
> mv.NET at my recommendation. We had a few rounds at it, and for some
> reason performance on his system really was unacceptable so he stuck
> with the D3CL. I can't blame him at all.
>
I do want to commend Tony for the effort he spent trying to figure out what
on earth was going on with the system. :) It was like there was atomic sludge
in the pipe or something.

g.

Gene

unread,
Aug 18, 2008, 12:52:47 AM8/18/08
to
Bill H <som...@somedomain.com> wrote:
> (MV & .NET) place you in a unique position to integrate both technologies,
> but I'm sorry to say this capability is nowhere to be found in the general
> .NET developer community.
>
Now just a minute. :) You might want to modify that to "found in the
general .NET developer community that learned software development with
.NET"

I suspect that most (if not all) of us here started our careers when the
world was young. :) I will agree strongly that the new breed of programmers
out there that start out in .Net are as useless as brake lights on a barbecue.

A lot of the problem is that they use the tool without understanding what is
going on under the hood and that's a huge problem.

I rely heavily on back-end processing for all my applications - it's a lot
more efficient to make a rule module do the heavy lifting and cough back
the answer than it is to do it on the client. In order to improve the speed
of my cellular modem based users, I even started inspecting transactions
with WireShark to see exactly what I could cut and still get the job done.
That's when I found out things like the D3 object library making calls to the
host for every IConv() and OConv() calls. I created "local" versions of those
just to be able to cut down on the packet traffic. The down side is that I can
still tell exactly what the D3 object library is doing by seeing the ASCII
dumps of the TCP/IP packets. :)

g.


Simon

unread,
Aug 18, 2008, 3:34:51 AM8/18/08
to
Ross

I was simply highlighting the normal worst-case scenario for having
the business logic on the client end of the system.

No question that the user-interface should allow verification of data
entry as you go along, but even this can be improved by this
process.

Take the example of verification of a customer code. It might be
that to verify the customer code simply needs a yes/no verifcation and
ther customer name displayed. Even if this is a single read, for
many implementations (I don't know about mv.net) of client/server
communication this would need 2 calls - one to open the file, one to
read it. Then the whole record needs to be returned to the client in
order to extract the name. A simple subroutine call could return a
two lined variable - one indicating whether the customer code is valid
(a 1/0 true/false setting) and the second containing the name for
display.

Regards
Simon

Tony Gravagno

unread,
Aug 19, 2008, 8:48:51 PM8/19/08
to
Sholom wrote:

>Does anyone have any good ideas about the best way to represent a
>dynamic array in VB.NET?
>
>I'm looking to use it as a temporary, in memory store, not as a complex
>database.

I just wrote something up. The thing to understand with this first
attempt is that there are two data types, Strings for Data and
MDArrays for dynamic arrays. In MV we look at these as inter-related
but I have separated them out. In MV we can say:
item = ""
item<2> = abc:@vm:def
We see here that a dynamic array is created with no data. Another
dynamic array element <2> is inserted inside the first, this consists
of two elements. The third step, is that the elements of dynamic
array in <2> are assigned with values - <2,1>="abc" and <2,2>="def".

Let's see how that's been implemented. This is actually functional C#
code, no shortcuts, magic, or imagination involved.


MDArray a = new MDArray();

This is the same as saying item="" but I'm defining 'a'
specifically as a dynamic array and not a String.

a.Insert(1 , new MDArray()); // a<1> is empty

We're inserting a new array inside the first element of the
existing array. This is recursive. "a" is a dynamic array and here
we're creating an element a[1] that itself is another array - but
dynamic arrays here can contain both arrays and data as we'll see.

a[1].Insert(1 , "first"); // a<1,1> = "first"

This is where string data must be separated from structure. The
array element a[1] contains a dynamic array but now we're also adding
an array of data. The first element is the string "first".

a[1].Insert(2 , "second"); // a<1,2> = "second"

There are dozens of functions in addition to Insert to manage where
data is placed, searching, deleting, and manipulation of data
elements.

a[2].Insert(1 , "prima"); // a<2,1> = "prima" (auto create a<2>)

Note that I didn't need to Insert a[2], just like MV, simply
referencing it expands the dynamic array to accommodate the value.

a[1].Insert(2 , new MDArray());

a<1,2> is a new array of subvalues, the existing a<1,2> shifts down
just like in MV. You should recognize here that unlike MV the a[1]
array element contains both a sub-array with more dimensions, and also
an array of data.

a[1][2].Data[2] = "sub"; // a<1,2,2> = "sub"

Note that the data elements dynamically expand to accommodate the
index specified, just like in MV. The Insert function isn't really
necessary.

Retrieving data:

string result = a[1][2].Data[2];

Some distinction has to be made between data and structure. When we
want data we need to be explicit. a[1] returns an array. a[1][2]
returns the second array element within a[1]. To get the data out of
that array, we need the .Data property, and then we need to specify
which element from that _data_ array we want.

Taking it to extremes:

a[1][2][2][4][1][3].Data[2] = "wow";

No inserts required, that one line creates a 6 dimensional array.
We can have as many elements as we want, and every single element and
sub-element has it's own array of data. (Starting to look like Caché
here...)

string final = a[1][2][2][4][1][3].Data[2];

That simply returns the data from the element just created. The
final value is "wow".


I need to hone it up a bit but now I'm wondering what to do with it.
Thoughts that come to mind are :
- See if there is a way to eliminate .Data for a[1][2] = "val".
- Support data types other than string.
- Serialize/save the data to disk for later reference.
- Try various functions and make sure they work.
- Test with VB.NET.
- Document, package, and sell it.

T

sh

unread,
Aug 25, 2008, 11:15:05 AM8/25/08
to
Simon wrote:

> Actually, I was about to start re-writing my vb.net based dynamic
> array code and was also thinking about how to represent the data
> structure. I'm also going to represent the dynamic array as a
> string and use dotnet's extremely fast string handling code to
> manipulate it.

Just wondering. When you say "extremely fast string handling" are you
refering to the standard String class, or to the StringBuilder class?

Tony Gravagno

unread,
Aug 25, 2008, 4:57:41 PM8/25/08
to
Hmm. Theory is proved once again: Nothing kills a thread more
brutally than a complete solution. ;)

T


>Sholom wrote:
>>Does anyone have any good ideas about the best way to represent a
>>dynamic array in VB.NET?
>>
>>I'm looking to use it as a temporary, in memory store, not as a complex
>>database.

>I just wrote something up.

[snip]

Simon

unread,
Aug 26, 2008, 3:52:22 AM8/26/08
to

stringbuilder class..

Simon

Simon

unread,
Aug 26, 2008, 6:14:17 AM8/26/08
to

hmmm I seem to be answering thread items twice! Apologies.

sh

unread,
Aug 26, 2008, 9:46:44 AM8/26/08
to
Tony Gravagno wrote:
> Hmm. Theory is proved once again: Nothing kills a thread more
> brutally than a complete solution. ;)
>
> T
>
>

I'm not sure the thread died because of a complete solution. It might
have died because people didn't understand what you wrote. (I, for one.)

1) Is this the complete code? I was expecting to see some code for
methods to implement the solution. Is the complete code on your blog?
Are you implementing dynamic arrays without any new code, just using
regular c# methods?

2) You create "MDArray a = new MDArray()". What is an MDArray
(multi-dimensional array?)? Is it a built-in type or is it something
you've implemented? I did a search on the term, and could only come up
with the fact that an MDArray is a SafeArray (whatever that is). Is an
MDArray what's called a jagged array in VB?

In short, your reply was over my head. Maybe you can expand on it in
your blog and post a link to the explanation.

It also might be a good idea to do the code in VB. Most of us are Basic
programmers, and while I have some grasp of c# code, in many cases (and
this I believe is one of them) the devil is in the details.

Tony Gravagno

unread,
Aug 26, 2008, 1:37:11 PM8/26/08
to
Preface : yes, I understand I'm being rather difficult here, just try
to see it from my side.

Sholom wrote:

>Tony Gravagno wrote:
>> Hmm. Theory is proved once again: Nothing kills a thread more
>> brutally than a complete solution. ;)

>I'm not sure the thread died because of a complete solution. It might
>have died because people didn't understand what you wrote. (I, for one.)

Like the solution I provided for comparing fields I suspect - that one
with full code.
removepleaseNebula-RnD.com/freeware/Comparative.AQL.txt

>1) Is this the complete code? I was expecting to see some code for
>methods to implement the solution. Is the complete code on your blog?
>Are you implementing dynamic arrays without any new code, just using
>regular c# methods?

Code? You asked if anyone has done this or if anyone has ideas. I
answered the question in the affirmative. Now you actually want the
code too?

Is that for-fee open source where people generously pay for the time
taken to develop, test, and support the software, even though they
have all the source and they could get away with not paying for it?

Or is the next implied step that by providing the source here or
somewhere that it becomes free - as in beer?

It's a good thing no one is out there asking if someone has an idea of
how to write an accounting application or a bunch of people here would
be out of business.


>2) You create "MDArray a = new MDArray()". What is an MDArray
>(multi-dimensional array?)? Is it a built-in type or is it something
>you've implemented?

I wrote it - a custom solution to a unique request.

>I did a search on the term, and could only come up
>with the fact that an MDArray is a SafeArray (whatever that is). Is an
>MDArray what's called a jagged array in VB?

Not related, I made up the classname onthe fly.

>In short, your reply was over my head. Maybe you can expand on it in
>your blog and post a link to the explanation.

Is this bottom line descriptive enough?


a[1][2][2][4][1][3].Data[2] = "wow";

>It also might be a good idea to do the code in VB. Most of us are Basic
>programmers, and while I have some grasp of c# code, in many cases (and
>this I believe is one of them) the devil is in the details.

a(1)(2)(2)(4)(1)(3).Data(2) = "wow" 'VB


Regards,
T

sh

unread,
Aug 26, 2008, 3:09:08 PM8/26/08
to
Tony Gravagno wrote:

>
> Code? You asked if anyone has done this or if anyone has ideas. I
> answered the question in the affirmative. Now you actually want the
> code too?
>
> Is that for-fee open source where people generously pay for the time
> taken to develop, test, and support the software, even though they
> have all the source and they could get away with not paying for it?
>
> Or is the next implied step that by providing the source here or
> somewhere that it becomes free - as in beer?
>
> It's a good thing no one is out there asking if someone has an idea of
> how to write an accounting application or a bunch of people here would
> be out of business.
>
>

Well, I guess you could look at it from that perspective. On the other
hand, all help/info provided in this (or any) forum could technically be
"chargeable". Yet people do provide a certain amount of that help free
of charge (up to a point). I guess it's part of our God-given human soul
to help others. But each one of us must decide where that "chargeable
point" is.

You clearly felt that what I was looking for should be "chargeable".
Mark Brown didn't feel so.

Mark's code snippet (it was just a snippet, off the top of his head) was
exactly what I was looking for. I took his idea, modified some of it to
my liking, added some bells and whistles, and in a couple of hours I had
a functional DynamicArray class. I even offered to post my class
someplace for use by others. It didn't even dawn on me to charge for it
because it's just not that big a deal. It's just a couple of little
routines. The web is full of these kinds of helpful routines offered by
people for free.

Tony, I know that you've done more than your fair share of helping
others on this forum over the years. And I appreciate it. It stands to
reason that you've probably been burned over the years by "freebies", so
you might be overly sensitive on this issue. I just think your off the
Mark (upper-case "M", pun intended) on this one.

But maybe I'm wrong. After all, I was the one looking for the idea.

Anyway, thank you very much Mark Brown.

sh

unread,
Aug 26, 2008, 3:13:25 PM8/26/08
to
Tony Gravagno wrote:

> Is this bottom line descriptive enough?
> a[1][2][2][4][1][3].Data[2] = "wow";
>
>
>> It also might be a good idea to do the code in VB. Most of us are Basic
>> programmers, and while I have some grasp of c# code, in many cases (and
>> this I believe is one of them) the devil is in the details.
>
> a(1)(2)(2)(4)(1)(3).Data(2) = "wow" 'VB
>
>
> Regards,
> T

I also find your attitude condescending. Sick him, Chandru.

sh

unread,
Aug 26, 2008, 3:48:27 PM8/26/08
to

That should have been "Sic him, Chandru" (before the spelling police get
after me).

(Although, I wonder what Freud would have to say about my slip.)

Tony Gravagno

unread,
Aug 26, 2008, 7:45:04 PM8/26/08
to
All points noted and humor appreciated.

My position is based on the "teach a man to fish" principle and the
lament that very few people in this community separate software
freedom from free beer. I don't mind providing code and I don't mind
giving away software for free. But I do have difficulties providing
open source freeware in a community that both "expects" it and where
the community at large really doesn't benefit that much from the
effort.

Sholom, you've expressed gratitude here for comments and code. It's
the underlying expectation that bothers me - not specifically from
you, please don't take this directly, this is a community trend. You
didn't want "any ideas, anyone done it?", you wanted "please give a
fully functional free and open source solution that I can sell to
someone else." If you were offering a new tool to the MV community -
also free and open source - then I would have offered free code. If I
had offered code under GPL, would you or anyone else here respect the
license? Probably not because the underlying motivation is profit.
If this this the case then why should I be motivated to support
someone else's profit-making endeavor at my own personal expense?
Gratitude is a wonderful thing, but if you are getting financial
benefit from something you find on the internet, then at least buy a
cup of coffee for the people who have helped you to accomplish your
goals.

Perhaps this is a topic for a discussion in the IRC channel, Skype,
Spectrum, or somewhere similar: What do the words "free" and "open
source" mean in the Pick community?

Regards,
T

Ed Sheehan

unread,
Aug 27, 2008, 10:06:27 AM8/27/08
to
"Tony Gravagno" <address.i...@removethis.com.invalid> wrote in
message news:2dv8b4pn0roauab40...@4ax.com...

> All points noted and humor appreciated.
>
> My position is based on the "teach a man to fish" principle and the

<snip>

Give a man a match, and he'll be warm for a minute.
Use the match to set him on fire, and he'll be warm for the rest of his
life.

Ed


Gene

unread,
Aug 27, 2008, 10:31:32 AM8/27/08
to
Tony Gravagno <address.i...@removethis.com.invalid> wrote:
> All points noted and humor appreciated.
>
> My position is based on the "teach a man to fish" principle and the
Give a man a fish and he eats for a day. Teach a man to fish and he
goes, "Hey, where's my fish?" :)


Tony I think an important point that gets overlooked is that MV environments
with one exception are closed source, commercial ventures. Nobody gets
into MV as a hobbyist. Because of that, there's always a "pay me" clause
to just about everything we do involving MV.

Programmers that aren't MV centric and involved in open source haven't been
exposed to the "pay me" mind-set that MV people have.

Their attitude tends to be, "This is neat/interesting/fun, enjoy it." as they
throw their code out there for others.

We however, tend to try to negotiate the reward before we do the work. :) It's
a survival instinct of sorts. As such, we're an overly suspicious lot when it
comes to getting (or giving!) something for free. We're always wondering what
the catch is or when the other shoe will drop.

In my personal opinion, Open Source isn't about doing something for free, it's
about doing something because I enjoy it. If someone wants to throw money at
me for it, great. If not, no big deal because I was going to do it anyway.

Many of the people here either are or have been consultants. This tends to
craft a mindset that everything they do could have some income potential.
This is not bad, but it tends to promote a "what's in it for me?" attitude.
Again, this isn't bad - especially if what you create is your sole income
stream. You need to eat and pay the mortgage and you're certainly entitled
to earn money on what you create. Over time however, it also creates a very
cynical mindset - especially after dealing with clients that want to squeeze
every last drop out of you for the least amount of money.

If doing things Open Source is fun for you, do it! If not, don't bitch about
how others are just throwing away their work for nothing. It makes us look
petty and greedy.

If someone posts something here that basically amounts to "please give me a
solution to my problem" it's your choice to help or not. Complaining that
they just want something for nothing is just stupid. If you don't want to
help, don't.

If I post a question to this newsgroup (or any place else public for that
matter), I expect the help I get to be free. If someone replies, "I'll help
you, but you have to pay me first", I'll tell 'em to See Figure #1 and go
elsewhere. However, if I reach out to a specific individual or company, it
won't surprise me to find some kind of renumeration comes up at some point
and in that framework, it's perfectly acceptable.

When I posted the scripts I use for print-to-email and emailing data from D3,
I didn't do it because I wanted some reward, I did it because I figured that
someone at some point could benefit from what I'd done. I did it because
it was fun. Now granted, Tony managed to get some ad copy out of it, but
that's what Tony does. :) He's not bashful about exploiting opportunities. :)

g.

Chandru Murthi

unread,
Aug 27, 2008, 9:51:43 PM8/27/08
to
sh> I also find your attitude condescending. Sic him, Chandru.

When did I get elected attack dog? ;) Actually I was going to restrain
myself (and that's haaaarrrrd) until this
just came in:

>TG: "Sholom, you've expressed gratitude here for comments and code. It's


the underlying expectation that bothers me - not specifically from you,
please don't take this directly, this is a community trend"

So even your THANKS are not enough!. Next time give us your firstborn in
return for the lines of
code. And don't forget to tattoo the GPLlicence agreement on his/her arm
before shipment.

Gene, in his post, expressed it perfectly, so I'll turn over the attack
mantel to him:

>If someone posts something here that basically amounts to "please give me a
solution to my problem" it's your choice to help or not. Complaining that
they just want something for nothing is just stupid. If you don't want to
help, don't.

>What do the words "free" and "opensource" mean in the Pick community?

"Free", hmm, that's a tough one. I'll get back to ya.

Chandru

"sh" <sha...@prupipe.com> wrote in message
news:ksadnRmueuqUwynV...@earthlink.com...

Ross Ferris

unread,
Aug 27, 2008, 11:33:30 PM8/27/08
to
Isn't Open Sauce something you find in a hamper (upside down) after
returning from a picnic or BBQ?

(Translation: looks tempting at the time, but can quickly turn into a
sticky mess!!!)

Gene

unread,
Aug 28, 2008, 10:16:33 AM8/28/08
to

Which is a really good reason to keep your sauce closed and your source
open. :)

g.

GVP

unread,
Sep 4, 2008, 1:51:34 AM9/4/08
to
BRIZ COM interface have methods for working with arrays. I can extract
such methods into standalone ATL object if need.

For example:
*************
ArrayToString transforms an array to a string where elements of an
array are divided by the given symbol.
Object.ArrayToString (IArray, OString As String, DelimiterString As
String) As Long
ARR(0)="00100"
ARR(1)="075"
ARR(2) =""
ARR(3)="Example string 1"
ARR(4)="Example string 2"
ARR(5)=""
ARR(6)="00010"
CV=OBJ.ArrayTOString (ARR,STR,"|")

Result:
STR="00100|075||Example string 1|Example string 2||00010"
************************
ArrayToStringEX transforms an array to a string where elements of an
array are divided by the given symbols.

Object.ArrayToStringEX (IArray, OString AS String, DELIMITERSArray) AS
Long

*********
ConvertToSubArray and ConvertToSubArrayNet transforms an array of
strings to an array of arrays of strings.

Object.ConvertToSubArray (IArray, DelimiterString AS String)
Object.ConvertToSubArrayNet (IArray, OArray, DelimiterString AS
String)

ARR(0)="00100|075|My test string 1|My test string 1||00010"
ARR(1)= "00101|092|My test string 2|My test string 2||00010"
ARR(2)="00205|181|My test string 3| My test string 3||00010"
CV=OBJ.ConvertToSubArray(ARR,"|")
Result is:
ARR(0) -
ARR(0)(0)="00100"
ARR(0)(1)="075"
ARR(0)(2)="My test string 1"
ARR(0)(3)="My test string 1"
ARR(0)(4)=""
ARR(0)(5)="00010"

ARR(1) -
ARR(1)(0)="00101"
ARR(1)(1)="092"
ARR(1)(2)="My test string 2"
ARR(1)(3)="My test string 2"
ARR(1)(4)=""
ARR(1)(5)="00010"
ARR(2) -…

****************
ArrayDelElement, ArrayInsElement, ArrayFind, ArrayFIndExactly,
SortArray, SortArrayNet, SortArray2, SortArray2Net, StringToArray,
StringToArrayEx

Regards,
Grigory

Message has been deleted
Message has been deleted
Message has been deleted

Gene

unread,
Sep 5, 2008, 9:43:50 AM9/5/08
to
alpingt...@googlemail.com <alpingt...@googlemail.com> wrote:
>> ARR(1)(3)="My test string 2"
>> ARR(1)(4)=""
>> ARR(1)(5)="00010"
>> ARR(2)
>>
>> ****************
>> ArrayDelElement, ArrayInsElement, ArrayFind, ArrayFIndExactly,
>> SortArray, SortArrayNet, SortArray2, SortArray2Net, StringToArray,
>> StringToArrayEx
>>
>> Regards,
>> Grigory
>
> this is crap and non extendable effective dynamic array management
> within VB should only be effected via functions

Ok, Mr. I've got No Social Skills At All, why don't you present YOUR
high and mighty solution to the problem?

Grigory may or may not have posted an optimal solution to the problem, but
at least he's not known for posting some of the most bizarre and inane crap
I've ever seen this side of a Net.Kook debate.

g.

Peter McMurray

unread,
Sep 5, 2008, 8:05:18 PM9/5/08
to
Hi Gene
Don't worry about it, I am afraid that alpington's alter ego tronic is
having another bad hair day.
Peter McMurray
"Gene" <ge...@deltasoft.com> wrote in message
news:MuedndIYx9QLqlzV...@posted.connectcorp...

Gene

unread,
Sep 8, 2008, 10:03:47 AM9/8/08
to
Peter McMurray <excal...@bigpond.com> wrote:
> Hi Gene
> Don't worry about it, I am afraid that alpington's alter ego tronic is
> having another bad hair day.
>

Oh I know. Responding to sock puppets is pointless, but I'd had it. :)

g.

0 new messages