Page 7 of 7 « First<34567
Topic Options
#101454 - 2003-05-30 01:35 PM Re: KiXgolf: MOAN - Mother Of All Networks
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
nnn.nnn.nnn.255 is NOT a proper IP as it is reserved for broadcasts ...

well you could also argue about that [Roll Eyes]
_________________________



Top
#101455 - 2003-05-30 01:42 PM Re: KiXgolf: MOAN - Mother Of All Networks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jochen, that is the point.
the current rules allow 31 as mask that allows ip to be:
x.x.x.0 and x.x.x.255

btw hoby, even though my code works with current tests, it seems to have a problem with specific idiotic input...
will see if I can correct that but mostlikely that raises the score (as always)

so, don't loose your faith bro.
_________________________
!

download KiXnet

Top
#101456 - 2003-05-30 01:42 PM Re: KiXgolf: MOAN - Mother Of All Networks
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I have to go to work. [Frown] It look's like I can't get much more out of this code now and will lack time at work. Good job Lonkero.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#101457 - 2003-05-30 01:54 PM Re: KiXgolf: MOAN - Mother Of All Networks
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Me too am stuck. Think the Lonk did it again. Curious about his code [Wink]

Here's my latest:

code:
KiXtart
KiXtart Version = 4.21
KiXGolf Script = kixgolf_moan.kix

Computer
OS = Windows XP Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2784 MHz
Memory = 510 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: MOAN - Mother Of All Networks
Processing Start = 2003/05/30 13:59:00.250
Processing End = 2003/05/30 13:59:00.250
Duration = 0000/00/00 00:00:00.000
# Loops = 1
KiXGolf Result = passed (9 out of 9 correct)
KiXGolf Score = 1033

Thank you for participating in KiXtart Golf!

Note: Don't think this will pass cause only "C" ip number calculations functions.

Note 2:
take a look at my duration... [Big Grin] [Big Grin]
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#101458 - 2003-05-30 02:27 PM Re: KiXgolf: MOAN - Mother Of All Networks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
dudes, don't give up yet.

I think the winning score will have some fight as there surely is situations when they don't meet the requirements.

well, can't say for sure but know that my udf has pitfalls.

like, I have double udf.
as jens hasn't stated it more specifically I took it as it has been, multiple udf's are allowed if they just are scored too.
_________________________
!

download KiXnet

Top
#101459 - 2003-05-30 03:00 PM Re: KiXgolf: MOAN - Mother Of All Networks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
quote:
KiXtart
KiXtart Version = 4.21
KiXGolf Script = kixgolf_moan.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III
Speed = 797 MHz
Memory = 376 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: MOAN - Mother Of All Networks
Processing Start = 2003/05/30 16:07:37.712
Processing End = 2003/05/30 16:07:37.822
Duration = 0000/00/00 00:00:00.110
# Loops = 1
KiXGolf Result = passed (9 out of 9 correct)
KiXGolf Score = 808

Thank you for participating in KiXtart Golf!

quote:
KiXtart Golf Score
Tournament = KiXtart Golf: MOAN - Mother Of All Networks
Processing Start = 2003/05/30 16:09:45.295
Processing End = 2003/05/30 16:09:45.395
Duration = 0000/00/00 00:00:00.099
# Loops = 1
KiXGolf Result = passed (9 out of 9 correct)
KiXGolf Score = 807

quote:
KiXtart Golf Score
Tournament = KiXtart Golf: MOAN - Mother Of All Networks
Processing Start = 2003/05/30 16:19:31.809
Processing End = 2003/05/30 16:19:31.929
Duration = 0000/00/00 00:00:00.119
# Loops = 1
KiXGolf Result = passed (9 out of 9 correct)
KiXGolf Score = 792


KiXGolf Result = passed (9 out of 9 correct)
KiXGolf Score = 789


[ 30. May 2003, 15:16: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#101460 - 2003-05-30 03:20 PM Re: KiXgolf: MOAN - Mother Of All Networks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Okay, time for me to jump in and cite from the rules:
quote:
You are not allowed to use additional code that is external to the MOAN UDF. All code must be contained within the MOAN UDF.
Thus, the first example is valid while the second example is not valid as code outside the MOAN UDF is being called
code:
;example 1
;!
function moan($a,$b,$c)
; doing my thing
endfunction
;!
;!

code:
;example 2
;!
function moan($a,$b,$c)
$a=externaludf($b)
endfunction
function externaludf($a)
endfunction
;!
;!

However, COM calls to components that are part of a standard Windows installation are allowed. That is covered in the rules, too.

I'm glad to see that we finally have some competition going on [Big Grin]
_________________________
There are two types of vessels, submarines and targets.

Top
#101461 - 2003-05-30 03:27 PM Re: KiXgolf: MOAN - Mother Of All Networks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, my all scores can be trashed.
was just to post 785 but as the rules are what they are, I have no score and thus hoby is the leader.
_________________________
!

download KiXnet

Top
#101462 - 2003-05-30 03:35 PM Re: KiXgolf: MOAN - Mother Of All Networks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
That part has always been in there right from when I originally posted the KiXgolf challenge.
_________________________
There are two types of vessels, submarines and targets.

Top
#101463 - 2003-05-30 03:48 PM Re: KiXgolf: MOAN - Mother Of All Networks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Got a new score:
code:
KiXtart Golf Score
Tournament = KiXtart Golf: MOAN - Mother Of All Networks
Processing Start = 2003/05/30 09:52:58.508
Processing End = 2003/05/30 09:52:58.678
Duration = 0000/00/00 00:00:00.169
# Loops = 1
KiXGolf Result = passed (13 out of 13 correct)
KiXGolf Score = 1265

Thank you for participating in KiXtart Golf!

I've used my own updated .INI file which contaisn a couple of traps ;-) I've posted it below:
code:
;WARNING: Some lines are broken for readability purposes. Please unbreak before using.
[Test 1]
IP=192.168.1.2
NetworkID=192.168.1.0
SubnetMask=255.255.255.0
Solution=1

[Test 2]
IP=192.168.0.1
NetworkID=192.168.1.0
SubnetMask=255.255.255.0
Solution=0

[Test 3]
IP=192.168.10.123
NetworkID=192.168.10.0
SubnetMask=255.255.255.192
Solution=0

[Test 4]
IP=
NetworkID=10.10.5.4
SubnetMask=255.255.255.252
Solution=10.10. 5. 5,10.10. 5. 6

[Test 5]
IP=192.10.128.55
NetworkID=
SubnetMask=27
Solution=192.10.128.32

[Test 6]
IP=
NetworkID=12.65.55.16
SubnetMask=28
Solution=12.65.55.17,12.65.55.18,12.65.55.19,12.65.55.20,12.65.55.21,
12.65.55.22,12.65.55.23,12.65.55.24,12.65.55.25,12.65.55.26,
12.65.55.27,12.65.55.28,12.65.55.29,12.65.55.30

[Test 7]
IP=10.10.10.2
NetworkID=
SubnetMask=255.255.255.254
Solution=

[Test 8]
IP=10.10.10.2
NetworkID=10.10.10.0
SubnetMask=
Solution=255.255.254.0,255.255.255.0,255.255.255.128,255.255.255.192,
255.255.255.224,255.255.255.240,255.255.255.248,255.255.255.252
SolutionAlternate=/23,/24,/25,/26,/27,/28,/29,/30

[Test 9]
IP=192.168.99.55
NetworkID=192.168.99.55
SubnetMask=
Solution=

[Test 10]
IP=192.168.255.128
NetworkID=192.168.255.128
SubnetMask=255.255.255.128
Solution=1

[Test 11]
IP=123.123.123.63
NetworkID=123.123.123.32
SubnetMask=27
Solution=1

[Test 12]
IP=123.123.123.34
NetworkID=123.123.123.33
SubnetMask=31
Solution=

[Test 13]
IP=
NetworkID=
SubnetMask=
Solution=

_________________________
There are two types of vessels, submarines and targets.

Top
#101464 - 2003-05-30 03:54 PM Re: KiXgolf: MOAN - Mother Of All Networks
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
As there was a little confusion over the rules, I don't think this helper is out of order...

There is a way of getting around the requirement for having a single function without adding too much to your code, providing you don't need more than two parameters:
code:
Function Moan($a,$b,$c)
Select
Case $a="!1"
; Code from first external function
Exit 0
Case $a="!2"
; Code from second external function
Exit 0
EndSelect
...
; Normal MOAN code
; Call first "external" function
$x=Moan("!1",$y,"")
; More Moan code
; Call second "external" function
$u=Moan("!2",$v,$w)
EndFunction

If you only have a single external function then a simple If/EndIf will suffice.

Top
#101465 - 2003-05-30 04:07 PM Re: KiXgolf: MOAN - Mother Of All Networks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sure, but coded it in already [Big Grin]
code:
KiXtart
KiXtart Version = 4.21
KiXGolf Script = kixgolf_moan.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III
Speed = 797 MHz
Memory = 376 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: MOAN - Mother Of All Networks
Processing Start = 2003/05/30 17:14:12.316
Processing End = 2003/05/30 17:14:12.426
Duration = 0000/00/00 00:00:00.110
# Loops = 1
KiXGolf Result = passed (9 out of 9 correct)
KiXGolf Score = 807

Thank you for participating in KiXtart Golf!

nah, let's make it not so:
code:
KiXGolf Score       = 806



[ 30. May 2003, 16:08: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#101466 - 2003-05-30 04:12 PM Re: KiXgolf: MOAN - Mother Of All Networks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
An EXECUTE() would work, too! [Big Grin]
_________________________
There are two types of vessels, submarines and targets.

Top
#101467 - 2003-05-30 04:14 PM Re: KiXgolf: MOAN - Mother Of All Networks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jens, you have mistype there.
test 12 has actually correct result of 0.

anyway, gladly the 13 is not one of the tasks [Wink]
get overflow exception and if I would code around it, that would cause at least 10 strokes more.
_________________________
!

download KiXnet

Top
#101468 - 2003-05-30 09:16 PM Re: KiXgolf: MOAN - Mother Of All Networks
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Should I post my code?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#101469 - 2003-05-30 09:22 PM Re: KiXgolf: MOAN - Mother Of All Networks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Please post your codes here: KIXgolf: MOAN(), Part II
_________________________
There are two types of vessels, submarines and targets.

Top
Page 7 of 7 « First<34567


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.071 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org