Waraxe IT Security Portal
Login or Register
November 23, 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: 110
Members: 0
Total: 110
Full disclosure
APPLE-SA-11-19-2024-5 macOS Sequoia 15.1.1
Local Privilege Escalations in needrestart
APPLE-SA-11-19-2024-4 iOS 17.7.2 and iPadOS 17.7.2
APPLE-SA-11-19-2024-3 iOS 18.1.1 and iPadOS 18.1.1
APPLE-SA-11-19-2024-2 visionOS 2.1.1
APPLE-SA-11-19-2024-1 Safari 18.1.1
Reflected XSS - fronsetiav1.1
XXE OOB - fronsetiav1.1
St. Poelten UAS | Path Traversal in Korenix JetPort 5601
St. Poelten UAS | Multiple Stored Cross-Site Scripting in SEH utnserver Pro
Apple web content filter bypass allows unrestricted access to blocked content (macOS/iOS/iPadOS/visionO S/watchOS)
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
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.048 Seconds