Waraxe IT Security Portal
Login or Register
November 16, 2024
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 85
Members: 0
Total: 85
Full disclosure
SEC Consult SA-20241112-0 :: Multiple vulnerabilities in Siemens Energy Omnivise T3000 (CVE-2024-38876, CVE-2024-38877, CVE-2024-38878, CVE-2024-38879)
Security issue in the TX Text Control .NET Server for ASP.NET.
SEC Consult SA-20241107-0 :: Multiple Vulnerabilities in HASOMED Elefant and Elefant Software Updater
Unsafe eval() in TestRail CLI
4 vulnerabilities in ibmsecurity
32 vulnerabilities in IBM Security Verify Access
xlibre Xnest security advisory & bugfix releases
APPLE-SA-10-29-2024-1 Safari 18.1
SEC Consult SA-20241030-0 :: Query Filter Injection in Ping Identity PingIDM (formerly known as ForgeRock Identity Management) (CVE-2024-23600)
SEC Consult SA-20241023-0 :: Authenticated Remote Code Execution in Multiple Xerox printers (CVE-2024-6333)
APPLE-SA-10-28-2024-8 visionOS 2.1
APPLE-SA-10-28-2024-7 tvOS 18.1
APPLE-SA-10-28-2024-6 watchOS 11.1
APPLE-SA-10-28-2024-5 macOS Ventura 13.7.1
APPLE-SA-10-28-2024-4 macOS Sonoma 14.7.1
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> General discussion -> Algorithms
Post new topicReply to topic View previous topic :: View next topic
Algorithms
PostPosted: Fri Sep 24, 2004 7:55 pm Reply with quote
ic3
Regular user
Regular user
Joined: Jul 18, 2004
Posts: 14




hi can anyone help me with this algorithm??

http://icecold42.port5.com/Algorithm%201.doc

_________________
View user's profile Send private message
PostPosted: Sat Sep 25, 2004 5:26 pm Reply with quote
ic3
Regular user
Regular user
Joined: Jul 18, 2004
Posts: 14




i have made this in javascript to try and help me solve it - but its not 100% working can u help me with it?

Code:
<script>
var size =3;
var start =1;
var step =1;
var row =1;
var col = (size + 1) / 2;
var count = 1;
var number = start;
while (count > size * size)
{
var ans=new Array("row","col");
ans = number;
number = number + step;
count = count + 1;
var newrow = row - 1;

if (newrow < 1)
{
newrow = size;
}
var newcol = col - 1;
if (newcol < 1)
{
newcol = size;
}
if (array(newrow,newcol) != array("",""))
{
newrow = row + 1;
newcol = col;
}
if (newrow > size)
{
newrow = 1;
}
row = newrow
col = newcol
document.write("newrow:" + newrow + "<br>");
document.write("newcol:" + newcol + "<br>");
document.write("ans[0] + ans[1]:" + ans[0] + ans[1] + "<br>");
document.write("ans[1] + ans[0]:" + ans[1] + ans[0] + "<br>");
document.write("ans[1] + ans[1]:" + ans[1] + ans[1] + "<br>");
}
document.write("size:" + size + "<br>");
document.write("start:" + start + "<br>");
document.write("step:" + step + "<br>");
document.write("row:" + row + "<br>");
document.write("col:" + col + "<br>");
document.write("count:" + count + "<br>");
document.write("number:" + number + "<br>");
</script>

_________________
View user's profile Send private message
PostPosted: Sun Sep 26, 2004 5:12 pm Reply with quote
ic3
Regular user
Regular user
Joined: Jul 18, 2004
Posts: 14




ok i finished it:

Code:
<html>
<title>Task 2 Algorithm</title>

<body>
<form name=value>
size: <input type="text" name="size" value="0" size=1 maxlength=1>
start: <input type="text" name="start" value="0" size=1 maxlength=1>
step: <input type="text" name="step" value="0" size=1 maxlength=1>
<input type="button" value="Submit" onclick="wholething()"/></form>


<script language=javascript>

function wholething()
{
size = parseInt(document.value.size.value);
start = parseInt(document.value.start.value);
step = parseInt(document.value.step.value);
populate(size,start,step)

}

function doHeadings()
{
var headings = new Array("Size","Start","Step","Row","Col","Count","Number","Array(1,1)","Array(1,2)","Array(1,3)","Array(2,1)","Array(2,2)","Array(2,3)","Array(3,1)","Array(3,2)","Array(3,3)","NewRow","NewCol");

for (i=0; i<headings.length; i++)
{

document.write("<td width=44><b>" + headings[i] + "</b></td>");
}
document.write("</tr>")

}

function createTable()
{
document.write("<table width=792 border=1 bordercolor=black CELLSPACING=0, CELLPADDING=1><tr>");
}


function closeTable()
{
document.write("</table><br><br>")
}

function createArray(first,second)
{
answer=new Array(first);

for (i=0; i <first ; i++)
{
answer[i]=new Array(second);
}
return answer;
}

function doResults()
{
document.write("<tr>");
document.write("<td align=center>" + size + "</td>");
document.write("<td align=center>" + start + "</td>");
document.write("<td align=center>" + step + "</td>");
document.write("<td align=center>" + row + "</td>");
document.write("<td align=center>" + col + "</td>");
document.write("<td align=center>" + count + "</td>");
document.write("<td align=center>" + number + "</td>")
document.write("<td align=center>" + Empty(answer[0][0]) + "</td>");
document.write("<td align=center>" + Empty(answer[0][1])+ "</td>");
document.write("<td align=center>" + Empty(answer[0][2])+ "</td>");
document.write("<td align=center>" + Empty(answer[1][0])+ "</td>");
document.write("<td align=center>" + Empty(answer[1][1])+ "</td>");
document.write("<td align=center>" + Empty(answer[1][2])+ "</td>");
document.write("<td align=center>" + Empty(answer[2][0])+ "</td>");
document.write("<td align=center>" + Empty(answer[2][1])+ "</td>");
document.write("<td align=center>" + Empty(answer[2][2])+ "</td>");
document.write("<td align=center>" + newrow + "</td>");
document.write("<td align=center>" + newcol + "</td>");
document.write("</tr>");
}



function Empty(element)
{
if (element == undefined)
{
return "empty";
}
else return element;
}

function displayResults(results)
{
document.write("<table width=" + results.length * 80 + " border=1 bordercolor=black CELLSPACING=0, CELLPADDING=1><tr>");
document.write("<td width=44></td>");

for (i=0; i<results.length; i++)
{

document.write("<td width=80 align=center><b>" + (i+1) + "</b></td>");
}

document.write("</tr>");


for (i=0; i<results.length; i++)
{
document.write("<tr><td align=center><b>" + (i+1) + "</b></td>");

for (j=0; j<results.length; j++)
{
document.write("<td align=center>" + Empty(results[i][j]) + "</td>");
}
document.write("</tr>");
}
closeTable();
}


function populate(size,start,step)
{

row = 1;
col = (size + 1)/2;
count = 1;
number = start;
answer = createArray(size,size);
createTable();
doHeadings();
do
{
answer[row-1][col-1]=number;

number=number+step;

count++;

newrow = row-1;

if (newrow<1)
{
newrow = size;
}

newcol = col-1;

if (newcol<1)
{
newcol = size;
}


if (answer[newrow-1][newcol-1] != undefined)
{
newrow = row+1;
newcol = col;
if (newrow > size)
{
newrow=1;
}
}
row = newrow;
col = newcol;
doResults();

}
while (count <= Math.pow(size,2))

closeTable();
document.write("<br><br>")
displayResults(answer);
}




</script>

_________________
View user's profile Send private message
PostPosted: Fri Nov 12, 2004 1:01 am Reply with quote
OkIDaN
Regular user
Regular user
Joined: Nov 12, 2004
Posts: 6
Location: Azerbaijan




Heh, nice trilogy. Consider this post as the Null byte.
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number
Algorithms
www.waraxe.us Forum Index -> General discussion
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 1

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.036 Seconds