• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - rabbit

#1
ver-ix86-1.mpq
A=2521522835 B=3428392135 C=218673704 4 A=A^S B=B-C C=C+A A=A-B
Those are constant.  Hashed files are Brood War's 1.16.1.1 set.  Every bot I've tested gets a different hash result than StarCraft.  SC gets the same result with or without the loader, and is the same every time: 2d 37 85 0a.
StealthBot 2.6r3 gets hash result 13 93 da 60 with BNCSUtil 1.3.1.1
MirageBot 9.4 gets hash result 5b fd 3a 73 with BNCSUtil 1.3.1.1 + CheckRevision.dll 1.0.0.8
Genesis 1.9.5 gets hash result 2d 37 85 0a with BNCSUtil 1.3.1.1 (the correct value)

These results are constant per bot, and I'm trying more bots out now.
#2
Anyone on a Mac work with Delphi?  I'm trying to find someone who would be willing to work with the ICCup staff to get a Mac version of the AH launcher working.
#3
I'm writing a fairly simple server for chatting, mostly for fun and just to learn how to make something like this.
Right now, I'm thinking about something like this:


Basically, I have the main body with all the intialization and stuff of that nature.  Elsewhere, I've got configuration handlers for loading/saving the configuration files; a settings system (mostly what I need help with); a data buffering system; and incoming and outgoing parsers (easy parts to make, still need a little help).

Basically, red arrows are raw data coming in, green arrows are links between parts of the program, and blue are necessary links I can't think of a way to describe concisely.  Basically, my problem is that I suck at C.  I want my config handlers to be able to modify variables in settings, though I'm not sure how to do this.  Wrappers, direct edits, what?  Also, how would my parsers be able to use variables and such from the settings portion?
#4
General Discussion / Simple Request
May 15, 2007, 09:57 PM
Please ban tumeria.

Thank you in advance,
rabbit
#5
I'm trying to find a way to have a simple console program run with a scrolling output section and then a single static input line at the bottom.  I'm not sure how it's done.  I was thinking it was probably not iostream or stdio, but I'm not that familiar with either, really.
#6
Spht's Forum / WTF@SphtBotv3
April 02, 2007, 06:44 PM
Just now it randomly resized to just the title bar.  There was no little resize arrow, and the Min/Max buttons did nothing.  I had to press X to get it back.  Erg?
#7
Battle.net Bot Development / IP Banned by BNCS 0x0c?
February 22, 2007, 08:39 PM
Every time I send 0x0c I get IP banned, on every realm (which sucks).  I haven't checked the actual clients yet because I was stupid and IP banned myself from every server trying to make 0x0c not hate me.  Is it just me?
#8
General Discussion / Forum Tabstop?
February 18, 2007, 12:17 PM
When I hit tab from the post box, I used to tabstop to the post button, but now I tabstop to the banner, and in my habit of hitting tab-enter, I usually end up back at the main page.  It's only been happening the past couple of weeks, though.  What's changed?
#9
I can't right click inside Start > Programs.  Well, I can, but the context menu doesn't show up, and I want my stuff sorted.  I can right click everywhere else though.  Anyone know what's up?

[XP Pro, SP2]
#10
General Discussion / Get SC/BW to Accept Unicode?
December 03, 2006, 01:10 PM
I want to have BW read and print unicode characters properly (specifically to work with Microsoft IME), but I can't find a way to.  How can I do this?
#11
Okay, so, one day in my math class I got really bored, and I wrote up this equation:
http://www.liquid-server.org/images/-pictures-63bb1c697f340f0559a1fc85e4da12da_1161299204.gif

Now, over the next few days, utilizing the awesomeness of my green pen, I calculated f(7,3,5,31) = 6.  What I wantneed now is to find the inverse of this function within its constraints, though I'm not sure how to start.  Got any ideas?
#12
General Discussion / With the war in Israel...
July 13, 2006, 07:36 PM
...what's gonna happen to Yoni?
#13
General Discussion / Cheap Computers for Sale
June 08, 2006, 04:28 PM
I have many, many computers for sale/free.  I have a priority list set up already of about 15 people who want one.  My school is cleaning out old computers, mostly Pentium2/3's, and some iMacs.  More specific information will be provided later.

These computers are free, minus S&H, which I need a destination zip code to calculate, though I don't mind bonuses, which also get you moved up the priority list (ie: something two people want, the one with the most priority gets it).

All are 10/100 ethernet compatible, all have CD-ROM drives (slowest 12x, fastest 34x).  Most probably have HDs and RAM.  All have keyboards, and, soon, mouses and monitors.

Specifics:
http://www.x86labs.org:81/forum/index.php/topic,6139.0.html
#14
Right now I've got a fairly simple little GTK program with a window, TextView and ScrollWindow.  When I run my program from my terminal, it shows up in the proper size and all that, but when I run it from my context menu, it is very small and annoying.

My MAIN issue, however, is that when I click the X in the corner to kill it, the window disappears, but the program itself doesn't terminate.  I've tried a few methods, but I don't know how to kill it completely.  My code:
#include <gtk/gtk.h>

GtkWidget *window;
GtkWidget *text;
GtkWidget *sw;

void printmsg(char* msg);

int main(int argc, char *argv[])
{
gtk_init (&argc, &argv);
   
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
text = gtk_text_view_new();

gtk_window_set_resizable((GtkWindow *) window, 1);

sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);

gtk_container_add(GTK_CONTAINER(window), sw);

gtk_container_add(GTK_CONTAINER(sw), text);

gtk_widget_show(sw);
gtk_widget_show(text);
gtk_widget_show(window);

gtk_window_resize((GtkWindow *) window, 650, 350);

gtk_widget_show(text);
gtk_widget_show(window);

printmsg("hello\n");
printmsg("world\n");

gtk_main();
   
return 0;
}

void printmsg(char* msg)
{
GtkTextBuffer* buffer;
GtkTextIter iter;

buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
gtk_text_buffer_get_end_iter(buffer, &iter);
gtk_text_buffer_place_cursor(buffer, &iter);

gtk_text_buffer_insert_at_cursor(buffer, msg, -1);
gtk_text_buffer_get_end_iter(buffer, &iter);
gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(text), &iter, 0, TRUE, 0, 1);
}
#15
I'm having a hard time finding a RichTextBox or equivalent in GTK.  I've found TextView, but not any info on how to create one.  Anyone got any info?
#16
Fun Forumâ„¢ / Honda Civic!
April 20, 2006, 05:03 PM
Not sure how old it is, but it's awesome: http://84.40.3.164/
#17
When do we get to see the new template go live?  It's pretty.
#18
Java Programming / Reversing a Linked List
February 15, 2006, 06:30 PM
Ok, so, my mind has been not working so well about this.  My task is to take a linked list, make a new linked list with the same elements, but in reverse, and not alter the first list.  I've failed to do this for about 2 weeks now, and it's really starting to bug me.  My codes:

/********************************************************
* Linked List Control Class                            *
* @package util                             *
* @author  Spencer Ragen                              *
* @date    February 08, 2006                           *
* @time    12:37:04.810 EST                            *
* *
* Management wrapper for the ListNode class.           *
*******************************************************/

package util;

public class LinkedList
{
protected static ListNode head = null;
protected static ListNode ppop = null;

public LinkedList()
{
}

/********************************************************
* ListNode getHead()                                   *
* @author Spencer Ragen                              *
* @return head (ListNode) *
* *
* Returns the address of the first node                *
*******************************************************/
public static ListNode getHead()
{
return head;
}

/********************************************************
* void add()                                           *
* @author Spencer Ragen                              *
* @param  data (Object)                             *
* *
* Creates a new node at the end of the list with a     *
* value of data                                        *
*******************************************************/
public static void add(Object data)
{
if(head == null)
{
head = new ListNode(data, null);
return;
}

ListNode b = null;
ListNode n = head;

while(n != null)
{
b = n;
n = n.getNext();
}

n = new ListNode(data, null);
if(b != null) b.setNext(n);

return;
}

/********************************************************
* void add()                                           *
* @author Spencer Ragen                              *
* @param  data (ListNode)                              *
* *
* Creates a new node at the end of the list with an    *
* address of data                                      *
*******************************************************/
public static void add(ListNode data)
{
if(head == null)
{
head = data;
return;
}

ListNode b = null;
ListNode n = head;

while(n != null)
{
b = n;
n = n.getNext();
}

n = data;
if(b != null) b.setNext(data);

return;
}

/********************************************************
* void insert()                                        *
* @author Spencer Ragen                              *
* @param  data (Comparable)                            *
* *
* Places a new node into the list where data is less   *
* than the next node and greater than or equal to the  *
* previous node                                        *
*******************************************************/
public static void insert(Comparable data)
{
ListNode b = null;
ListNode n = head;

while(n != null && data.compareTo(n.getValue()) > 0)
{
b = n;
n = n.getNext();
}

if(b == null)
head = new ListNode(data, n);
else
b.setNext(new ListNode(data, n));

return;
}

/********************************************************
* void push()                                     *
* @author Spencer Ragen                              *
* @param  data (Object)                            *
* @param  pos (int)                                *
* *
* Insert a new node with the specified position or at  *
* the end (if pos < 0 or pos > list length) *
*******************************************************/
public static void push(Object data, int pos)
{
if(pos < 0)
{
add(data);
return;
}

int i = 0;
ListNode b = null;
ListNode n = head;

while(n != null && i < pos)
{
b = n;
n = n.getNext();
i++;
}

if(b == null)
head = new ListNode(data, n);
else
b.setNext(new ListNode(data, n));
}

/********************************************************
* ListNode pop()                                 *
* mostly untested                             *
* @author Spencer Ragen                              *
* *
* Get the next node.  Returns null if at tail and *
* resets to head *
*******************************************************/
public static ListNode pop()
{
if(ppop == null)
{
ppop = head;
return null;
} else {
ListNode r = ppop;
ppop = ppop.getNext();
return r;
}
}

/********************************************************
* boolean remove()                                     *
* @author Spencer Ragen                              *
* @param  data (Object)                                *
* @return true (removed) *
* @return false (not found) *
* *
* Set's the node whose next's value is data to point   *
* to the node after that                               *
*******************************************************/
public static boolean remove(Object data)
{
ListNode b = null;
ListNode n = head;

while(n != null && !data.equals(n.getValue()))
{
b = n;
n = n.getNext();
}

if(n == null)
return false;

if(b == null)
head = n.getNext();
else
b.setNext(n.getNext());

return true;
}

/********************************************************
* boolean remove()                                     *
* @author Spencer Ragen                              *
* @param  data (ListNode)                              *
* @return true (removed) *
* @return false (not found) *
* *
* Set's the node whose next is data to point to the    *
* node after that                                      *
*******************************************************/
public static boolean remove(ListNode data)
{
ListNode b = null;
ListNode n = head;

while(n != null && data != n)
{
b = n;
n = n.getNext();
}

if(n == null)
return false;

if(b == null)
head = n.getNext();
else
b.setNext(n.getNext());

return true;
}

/********************************************************
* ListNode find()                                      *
* @author Spencer Ragen                              *
* @param  data (Comparable)                            *
* *
* Returns the address of the node whose value is equal *
* to data                                              *
*******************************************************/
public static ListNode find(Comparable data)
{
ListNode b = null;
ListNode n = head;

while(n != null && data.compareTo(n.getValue()) > 0)
{
b = n;
n = n.getNext();
}

return n;
}

/********************************************************
* void find()                                          *
* @author Spencer Ragen                              *
* *
* Sets the value and next of each node to null *
*******************************************************/
public static void erase()
{
ListNode b = null;
ListNode n = head;

while(n != null)
{
b = n;
n = n.getNext();
b.setNext(null);
b.setValue(null);
}
}

/********************************************************
* int getElems()                                 *
* mostly untested                             *
* @author Spencer Ragen                              *
* *
* Returns the number of elements in the list *
*******************************************************/
public static int getElems()
{
int c = 0;

if(head == null)
return 0;

ListNode n = head;

while(n != null)
{
n = n.getNext();
c++;
}

return c;
}

/********************************************************
* void print()                                         *
* @author  Spencer Ragen                              *
* *
* Prints out the entire list giving the node's address,*
* value stored, and the address to the next node *
*******************************************************/
public static void print()
{
ListNode n = head;

while(n != null)
{
System.out.println("This: " + n);
System.out.println("    Data: " + n.getValue());
System.out.println("    Next: " + n.getNext());
n = n.getNext();
}
}

}


package util;

public class ListNode
{
    private Object value;
    private ListNode next;

    public ListNode(Object initValue, ListNode initNext)
    {
value = initValue;
next = initNext;
    }

    public Object getValue()
    {
return value;
    }

    public ListNode getNext()
    {
return next;
    }

    public void setValue(Object theNewValue)
    {
value = theNewValue;
    }
   
    public void setNext(ListNode theNewNext)
    {
next = theNewNext;
    }
}


import util.LinkedList;
import util.ListNode;

public class Thing
{
public static void main(String [] args)
{
LinkedList test = new LinkedList();
LinkedList test2;

test.add("testing0");
test.add("testing1");
test.add("testing2");
test.print();

test2 = reverseList(test);

System.out.println();
System.out.println();

test2.print();

// run the garbage collector
System.gc();
}

public static LinkedList reverseList(LinkedList init)
{
LinkedList ret = new LinkedList();

try
{
ListNode [] vals = new ListNode[init.getElems()];

System.out.println("Elements: " + init.getElems());

for(int i = 0; i < vals.length; i++)
{
ListNode p = init.pop();

if(p == null) break;

vals[i] = new ListNode(p.getValue(), null);
}

vals[vals.length - 1].setNext(null);

for(int i = vals.length - 2; i > 0; i--)
vals[i].setNext(vals[i - 1]);

for(int i = vals.length - 1; i > 0; i--)
ret.add(vals[i]);

} catch(NullPointerException npa) {
// dont care
} finally {
return ret;
}
}
}


If I missed anything, please let me know.  My main problems are in Thing, method reverseList().  Thanks for any help.
#19
I'm doing some basic work with cryptography right now, and I'm looking into different methods.

My teacher suggested using Riemann's zeta as a base, but I look at it and can't help but notice that it goes off to infinity.  I was wondering if anyone has any knowledge of how it would be used?

I currently use it by just taking it's limit, but I'm pretty sure it's not the most effective way...
#20
General Programming / Pontifex
January 15, 2006, 09:26 AM
Well, Pontifex is an encryption schema from the book Cryptonomicon (which is really good, btw).  Just thought I'd share:
#!/usr/bin/perl -s

$f = $d ? -1 : 1;
$D = pack('C*', 33..86);
$p = shift;
$p = ~y/A-Z/;
$U = '$D = ~s/(.*)u$/U$1/; $D = ~s/U(.)/$1U/;';
($V = $U) = ~s/U/V/g;
$p = ~s/[A-Z]/$k = ord(#&) - 64, & e/eg;
$k = 0;

while(<>)
{
    y/a-z/A-Z/;
    y/A=Z//dc;
    $o .= $_
} $o .= 'X'

while length($o) %5 && !$d;

$o = ~s/./chr(($f * &e + ord($&) - 13) %26 + 65/eg;
$o = ~s/X*$// if $d;
$o = ~s /.{5}/$& /g;
print "$o\n";

sub v
{
    $v = ord(substr($D, $_[0])) - 32;
    $v > 53 ? 53 : $v;
}

sub w
{
    eval "$U$V$V";
    $D = ~s/(.*)([UV].*[UV])(.*)/$3$2$1/;
    &w(&v(53));
    $k ? (&w($k)) : ($c = &v(&v(0)), $c > 52 ? &e : $c)
}


Actually, I'm not even sure if it works, but it looks interesting!