469,323 Members | 1,567 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

comparing combinations

Hi, i'm from belgium, europe, and my english is not perfect, so my excuses.
I ame looking for someone ho can help me with my problem.

I want to compare combinations in an imputfile, and if they have 2 or 3 or more the same numbers i want remove then; all the combinations have to be compared
i give you an example:
the imput file:

1, 2, 3, 4, 5, 6
1, 2, 3, 4, 8, 9
4, 5, 6, 10, 12, 15
7 9 11 13 15 16
7 9 15 18 20 22

Combinations with max 2 equal numbers; the othets must be removed from the imput list
the output list:
1 2 3 4 5 6
7 9 15 18 20 22

is it possible in a box were i can change
the file name and place: *.txt
the max same numbers: 2-10
THANKS
suzy
Jul 20 '05 #1
6 1028
>"suzy" <su************@skynet.be> wrote in message
news:40*********************@news.skynet.be...
Hi, i'm from belgium, europe, and my english is not perfect, so my excuses. I ame looking for someone ho can help me with my problem.


Suzy, your English is OK, but you need
to look into various things..

1) Note that Java and JavaScript are not
the same language, decide which you are
going to use before you go any further.

2) 6 groups is far too wide a 'cross-post'.
Also some of the groups you posted to
are not valid groups.
If your question is Java, restrict it to
comp.lang.java.help.
If it is JavaScript, post to
comp.lang.javascript

3) You are posting in 'html' format, which does
not work well with most NewsReader programs,
please adjust the options of your program to post
to UseNet in 'plain text' only.

Thanks in advance

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
Jul 20 '05 #2

"Andrew Thompson" <Se********@www.invalid> schreef in bericht
news:sf******************@news-server.bigpond.net.au...
"suzy" <su************@skynet.be> wrote in message

news:40*********************@news.skynet.be...
Hi, i'm from belgium, europe, and my english is not perfect, so my

excuses.
I ame looking for someone ho can help me with my problem.


Suzy, your English is OK, but you need
to look into various things..

1) Note that Java and JavaScript are not
the same language, decide which you are
going to use before you go any further.

2) 6 groups is far too wide a 'cross-post'.
Also some of the groups you posted to
are not valid groups.
If your question is Java, restrict it to
comp.lang.java.help.
If it is JavaScript, post to
comp.lang.javascript

3) You are posting in 'html' format, which does
not work well with most NewsReader programs,
please adjust the options of your program to post
to UseNet in 'plain text' only.

Thanks in advance

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology

thanks for your answer
i do not know if it is a problem for java or javascript? i think java
thanks
suzy
Jul 20 '05 #3
suzy wrote:
"Andrew Thompson" <Se********@www.invalid> schreef in bericht ....
1) Note that Java and JavaScript are not
the same language, decide which you are
going to use before you go any further.

... i do not know if it is a problem for java or javascript? i think java


If it is on the web and it is an applet, it is Java.
If it is on the web and _not_ an applet, it is
JavaScript.

If it is _not_ on the web, it is Java.

[ That is oversimplifying it, but it is a
rough guide. ]

Do you want to do this in a web page?

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
Jul 20 '05 #4

"Andrew Thompson" <Se********@www.invalid> schreef in bericht
news:K5******************@news-server.bigpond.net.au...
suzy wrote:
"Andrew Thompson" <Se********@www.invalid> schreef in bericht

...
1) Note that Java and JavaScript are not
the same language, decide which you are
going to use before you go any further.

..
i do not know if it is a problem for java or javascript? i think java


If it is on the web and it is an applet, it is Java.
If it is on the web and _not_ an applet, it is
JavaScript.

If it is _not_ on the web, it is Java.

[ That is oversimplifying it, but it is a
rough guide. ]

Do you want to do this in a web page?

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology

it is not an applet, and not on the web; i want to run the program on my
laptop, windows xp; maybe i insert it in excel for further transformation

suzy
Jul 20 '05 #5
"suzy" <su************@skynet.be> wrote ...
<snip>
it is not an applet, and not on the web; i want to run the program on my
laptop, windows xp; maybe i insert it in excel for further transformation


So, you have a file with lines containing a set of numbers.
You want to eliminate lines which have 2 or more similar numbers.
You have no code at the moment - that's why you are talking something about
renaming the file as a .txt file (which I don't understand) or inserting the
file in an excel sheet for further manipulation.

The probelm as stated is neither a java or javascript problem. It is at this
stage just a logical problem. What language you choose to use to solve it is
really irrelevant until you have it clear in your mind how to solve it. To
take your example -
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 8, 9
4, 5, 6, 10, 12, 15
7 9 11 13 15 16
7 9 15 18 20 22

For the first and second lines, which is the one to discard? If you keep
line 1, line 3 goes too. If you keep line 2 instead, then line 3 also stays
in. Similarly which line of lines 4 and 5, do you keep? Seems like your rule
is early lines stay in if subsequent lines contain 2 or more similar
numbers. You need to be clear about this.

Now, putting these values into an excel file will do nothing. There is no
processing logic built in excel to do what you want. From within excel, you
would need to call a macro (which itself would probably be written in VB to
do the processing you want). So one way or another, you would need a bit of
programming. If you intend to write it in java, do it and come back here
when you are stuck. Similarly, go to the javascript group only (and not
here) if you decide to write it in javascript. If you don't know programming
at all, get a friend to do it or pay someone to write it for you and install
it for you on your laptop ... or maybe someone here might be in the mood to
write the code!

ge0rge
--
Matter cannot be created or destroyed, nor can it be returned without a
receipt.
Jul 20 '05 #6

"ge0rge" <ge****@privacy.net> schreef in bericht
news:c0*************@ID-175222.news.uni-berlin.de...
"suzy" <su************@skynet.be> wrote ...
<snip>
it is not an applet, and not on the web; i want to run the program on my
laptop, windows xp; maybe i insert it in excel for further
transformation
So, you have a file with lines containing a set of numbers.
You want to eliminate lines which have 2 or more similar numbers.
yes or 3 or more, or 4 or more

You have no code at the moment - that's why you are talking something about renaming the file as a .txt file (which I don't understand) or inserting the file in an excel sheet for further manipulation.
the outputfile can be a txt file or with an other extention, but i have to
insert or copy in excel
the language is for me not important if i can use it on my pc; javascript
can
with regards suzy
The probelm as stated is neither a java or javascript problem. It is at this stage just a logical problem. What language you choose to use to solve it is really irrelevant until you have it clear in your mind how to solve it. To
take your example -
1, 2, 3, 4, 5, 6
1, 2, 3, 4, 8, 9
4, 5, 6, 10, 12, 15
7 9 11 13 15 16
7 9 15 18 20 22

For the first and second lines, which is the one to discard? If you keep
line 1, line 3 goes too. If you keep line 2 instead, then line 3 also stays in. Similarly which line of lines 4 and 5, do you keep? Seems like your rule is early lines stay in if subsequent lines contain 2 or more similar
numbers. You need to be clear about this.

Now, putting these values into an excel file will do nothing. There is no
processing logic built in excel to do what you want. From within excel, you would need to call a macro (which itself would probably be written in VB to do the processing you want). So one way or another, you would need a bit of programming. If you intend to write it in java, do it and come back here
when you are stuck. Similarly, go to the javascript group only (and not
here) if you decide to write it in javascript. If you don't know programming at all, get a friend to do it or pay someone to write it for you and install it for you on your laptop ... or maybe someone here might be in the mood to write the code!

ge0rge
--
Matter cannot be created or destroyed, nor can it be returned without a
receipt.

Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

45 posts views Thread by Market Mutant | last post: by
1 post views Thread by Jim Hubbard | last post: by
reply views Thread by suzy | last post: by
2 posts views Thread by David | last post: by
36 posts views Thread by rbt | last post: by
19 posts views Thread by Thomas Cameron | last post: by
15 posts views Thread by Thomas Cameron | last post: by
3 posts views Thread by Ryan | last post: by
2 posts views Thread by GrantMagic | last post: by
5 posts views Thread by Bails | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.