Uncrackable algorithm for serial-numbers

371 byte By robinhollensteina at 2007-10-1 23:57:45
In the last few days, Ive been thinking:Whats the use of sofisticated programs that cost millions to develope, and cost a few hundred dollars and there you can download a pirate version?There must be an uncrackable algorithm for protecting serial numbers or something like that.I would like to ...

Improving Java Regular Expression Compile Time

1162 byte By ecco80a at 2007-10-2 0:02:20
Hi,Just wondering if anyone here knows how can i improve the compile time of Java Regular Expression?The following is fragment of my code which I tired to see the running time.Calendar rightNow = Calendar.getInstance();System.out.println("Compile Pattern");startCompileTime = ...

n weight matrix

263 byte By czetsuyaa at 2007-10-2 0:04:30
Can someone teach me an algo on how to construct an nxm bit matrix (I mean here a matrix composed only of 1 and 0). Whose columns have a weight n. Example 1 0 1 0 1 0If you add up columnwise then the weight is n. God day and God bless!

n weight matrix

269 byte By czetsuyaa at 2007-10-2 0:04:31
Can someone teach me an algo on how to construct an nxm bit matrix (I mean here a matrix composed only of 1 and 0). Whose columns have a weight n. Example 1 0 10 1 0If you add up columnwise then the weight is 1. God day and God bless!

Quadratic formula plz help?!?!

251 byte By Numba1Drummer89a at 2007-10-2 0:06:44
As most of you probably know, the quadratic formula is as follows:-b+ sqr(b^2-4ac)2aand-b-sqr(b^2-4ac) 2ahow would u write that in java as those 2 roots, thanks for your help

solving yule-walker equations

856 byte By jallatrynea at 2007-10-2 0:07:14
HelloI want to estimate the parameters of an AutoRegressive model order p=5, and from netsearches I understand this entails 1) estimating the autocorrelationfunction up to and including lag 52) creating a correlationmatrix R from these, where r_ij = r_ji3) solving the system R dot a = bwhere a ...

n weight matrix

418 byte By czetsuyaa at 2007-10-2 0:11:24
what i want is a zero-one matrix whose sums of all columns are distinct n. it can be any size. example:1 0 0 0 0 0 1 1 0 1 0 00 0 1 0 0 10 0 1 0 0 00 1 0 1 0 1it seems symmetric though but it has a total of weight 1 see the column weight. any combination of the columns are accepted as long as ...

Help with Big Oh and # of operations

1971 byte By Stumpeda at 2007-10-2 0:16:00
I'm having trouble with caluclating the number of operations and big Oh notation for the below code. Help would be greatly appreciated.static int bar(int a, int n){int k = n; //1 operationint ans = 1; //1 operationint temp = a; //1 operationdo{if (k % 2 == 0)//if k is an even number// ...

Weighted Sorting

1517 byte By NickRicea at 2007-10-2 0:16:06
Hey guys,I'm looking at this particular problem of weighted sorting and group inference. Maybe someone can help me devise an efficient and robust algorithm for it.The scenario is that I have an array (or any other data collection for that matter) of string values. For example:a[1] = ...

Strange Bublesort implementation flaw on wikisource

10662 byte By gamehacka at 2007-10-2 0:21:35
IMPORTANT! Please read it carefully in order to understand. Thanks for reading.Hi all,Today we explored the Bubble sort algorithm at school(Sixth Form in the UK, Y13) when we doing some Discrete Maths. So I thought I would go and implement it in Java(i've been doing Java for 4 days now). I ...

Sudoku algorithm for available numbers

318 byte By cringea at 2007-10-2 0:38:31
Hi guys!I want to create a java sudoku but I'm stuck with the backtracking algorithm to get the available numbers to insert in the current cell. Can someone point me to a method that gives me an int[] with all available numbers for the current ...

poker odds

67491 byte By davidstummera at 2007-10-2 0:48:17
Hi, i found some source code online for a holdem poker odds calculator.i had a look at the code, and tried to copy and compile it. It compiles, but doesn't give the answer i was expecting! bascially it's for a java appletts which you can see here: http://www.jbridge.net/jimmy/holdem_sim.htmAs ...

Matrix Construction

227 byte By czetsuyaa at 2007-10-2 0:48:44
Does anyone here know how to construct a matrix A where A=0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1for column = 3and if column = n, then rows = 2^n - 1

Pixel "selection" algorithm

772 byte By AcidRainLiTEa at 2007-10-2 0:55:38
I am trying to write an algorithm that operates on a 2-bit (Black and white) image. Given a black pixel, it needs to be able to find all other black pixels that are directly connected to it, or indirectly connected to it (connected to it by being connected to another pixel that is directly ...

Constructing Binary tree

248 byte By Hypnagoguea at 2007-10-2 0:58:32
So this is my first post here and i am beginning to like this forum.Can anybody help me on how to construct Binary tree from inorder and postorder traversals,i just want to know the algorithm so that i can apply it.Please help.

Preorder to Postorder

529 byte By Hypnagoguea at 2007-10-2 0:59:10
I am making another thread but at the moment i am very much bogged down due to unavailality of algorithms in my books....Let T be a tree in which every non leaf node has two children and we have to convert the preoder listing of T into post order listing..I can think that first element will be ...

Dynamic Programming Using Java

134 byte By sazsa6a at 2007-10-2 1:03:23
hiiii...anyone knows how to use a dynamic programming to compare a mouse movement using java? i hope some one can help me......

2-3 tree implementation

186 byte By Nighteyesa at 2007-10-2 1:05:19
Hi all.Does anyone have an implementation of a 2-3 (balanced) tree data structure that supports insert and delete operations?Any such help would be much appreciated.

How to plot an IP on world map

186 byte By Sabih_15a at 2007-10-2 1:12:43
hey .. im trying to plot an IP on world map ... i am able to get the country name using whois database .. but am confused on how to plot the location of ip on world map ...

JDOM: get line number

405 byte By fischefra at 2007-10-2 1:17:34
Hi,I'm writting a program were I need each JDOM element's line number i.e. the line where the tag starts because there's a second panel with the xml file's source code and when I doubleclick on a jtree's node (which is in the first panel) the second panel should scroll to the tag which ...

decrypttion and encryption

576 byte By mehdi62ba at 2007-10-2 1:23:39
Hi experts,I have a problem which I don't know anything about its topicI don't know anything about decryption and encryption,please help meThe code key is gRindL88Encryption key xxg67t The message:ve6y9 5ek68 d9r4q ap006 yns9l 3r8il fe9j2ne783 wtbb6 yhu7x qk4rf rdif3 gy8j8 ugahtnk1lt (x2)I ...

Reverse engineer - who can find the CRC algorithm

303 byte By svanggaarda at 2007-10-2 1:25:20
Given 3 dataseries with 1 byte CRC:1) 55 0C 00 20 00 01 15 00 00 00 00 00 00 00 01 01 00 00 (CRC=71)2) 55 09 00 53 00 01 00 00 00 00 00 00 01 00 01 (CRC=9C)3) 55 0A 00 46 00 01 00 00 00 00 00 00 00 00 00 00 (CRC=02)Any idea which algorithm is ...

java

381 byte By t123a at 2007-10-2 1:39:39
i have a problem sollving this very simple question?here goesa programme in java is made to encrypt and decrypt messages.using only letters. the programme should be done using the ascii code. and instead of an a show b and b an cfor example "dog" should be encrypt as "eph". letter +1 what is ...

check string end among a list of strings

598 byte By Ahmed.Saada at 2007-10-2 1:40:29
Hello, I need to write a function that checks the end of a string among a list of strings. I don't want to know which string matches, I just need a true/false value to tell me whether any string matches or not. First, I tried to call the fucntion String.endsWith() with each one separately. ...

strings

118 byte By t123a at 2007-10-2 1:45:27
I have Question how do we assigen a method to a string when its not equalexample a is not equal b

loop

243 byte By t123a at 2007-10-2 1:45:33
i want to creat a loop okso that my programme has no errors here goesloop when input not equal to a,b and chow do i do thatusing the "while" i can't seem to make that work any body knows

Subset sorting

178 byte By Learnablea at 2007-10-2 2:00:53
Given:A sorted array of integers AAn unsorted array of integers BB is a subset of AIs there a way to improve upon the O(nlogn) bound to sort B?

DAWG or B-Tree?

218 byte By mehdi62ba at 2007-10-2 2:02:28
I want to make a simple dictionary of words now I don't know which structure is bettera B-Tree or a DAWG?I want to have the fastest search through the words?any opinion or comparision are wellcome

Coin counting algoritham

757 byte By raj_rajaa at 2007-10-2 2:04:35
hello guys,In my multiplayer game application at one stage i need to calculate the coins required to get particular amount..for that there is one algoritham i have seen at http://www.seeingwithc.org/topic1html.htmli have tried to understand third apporach of dynamic programming but in that case ...

Import data from MSExcel 2003

78 byte By arunmoyala at 2007-10-2 2:05:38
how to import data from MSExcel 2003 via xml?can any one help me

Recursion not working

1790 byte By harryt1a at 2007-10-2 2:05:53
Hi guys,I am trying to figure out how come my code is not working properly. The design and algorithm are correct but it seem that the recursion method did not fully return the whole value that passed.I have two different recursion method but both of them are not returning the rest of the value ...

Waiting for a thread

2427 byte By da_lua at 2007-10-2 2:06:02
Hi,i have a problem with threads...in my "main" programm there is a method, that starts other methods...In one method there are started two new threads, whitch copys the data from one DBMS to another. Now the main- programm should wait untill the threads have finished copying.public void ...

Comparing two binary trees (is element A of Tree1 also element of Tree2?)

304 byte By WillTrya at 2007-10-2 2:09:04
HelloIs there any "classic" algorithm that searches a given tree to find if it share elements (value) with other trees ?Something like traversing Tree1 and, for each element/node, check all of Tree2's nodes and compare would probably work... although it seams "heavy". ...

Classic Bin Packing Problem

915 byte By @MEa at 2007-10-2 2:16:16
I am so new at this and would love it if somebody could help me code this for my school assignment..bThe problem that I have to solve is this.. : I have five different possible solutions First Fit, First Fit with Sorting, Best Fit, Best Fit with Sorting and Optimal FitIn this problem all the ...

How get inorder from preorder and postorder in tree?

85 byte By tomzza at 2007-10-2 2:17:01
Hi,How can I draw the tree by using preorder and postorder?tomzz

java code statistics analysis

377 byte By barbywarea at 2007-10-2 2:20:54
Hi,I see some product that use "java code statistics analysis" in order to my JR programmer made program as SR programmer or as AP.I think that is better for my apps this tools.I think that this tool could make "robots" and could make that SR programmer to cash more money. I like see a Open ...

Computing an appropriate division scale for pow with negative arguments?

1009 byte By billrobertsona at 2007-10-2 2:29:57
private static BigDecimal pow(BigDecimal bd, int n) {return n < 0 ? BigDecimal.ONE.divide(bd.pow(-n), _ARBITRARY_NUMBER_ , BigDecimal.ROUND_HALF_UP) : bd.pow(n); }Rather than plugging in an arbitrarily large number for the scale in the division operation, I would like to try to set the ...

Best way to do regexp search on file directory?

585 byte By hseikalya at 2007-10-2 2:30:34
Hi,I was wondering if anyone has any suggestions on how to do an efficient regexp search on a list of filenames (12000+) straight from a local physical directory? The current method I am using is pulling up the directory in a File object and doing a wildcard filter on a subset of the files. ...

P2P Algorithm

149 byte By robinhollensteina at 2007-10-2 2:30:45
When a P2P host connects, how can he find other peers without contacting a server. Is there an algorithm for this?R. Hollenstein

noob - NEED HELP!

1134 byte By karandeepa at 2007-10-2 2:32:51
hi im new to java and im writing a simple program, but the arithmetic is just too confusing!i have to write a program that asks a user for their birth year encoded as two digits (like "62") and for the current year, also encoded as two digits (like "99"). The program is to correctly write out ...

How to get a generator matrix of a binary linear(n,k) codes

120 byte By switch_lifea at 2007-10-2 2:34:55
What class or functionality can java handle this related task? Does anyone know something about it? Thanks a lot!

optimal bin packing problem

2688 byte By phadeda at 2007-10-2 2:36:43
I have a homework assignment that I'm really stuck on. I'm not looking for code (I'm sure I could find that if I wanted, but I really want to UNDERSTAND this).I need to make a recursive method to find the OPTIMAL solution (least number of bins used).The professor basically gave us an ...

24 byte Unique Id

1400 byte By Geeth12a at 2007-10-2 2:55:44
Hi,I need to generate a 24 byte unique Id to for the mq correlation id (our mq host receiver is not setting the message id to correlation id. It only sets the corr id that we give in request as corr id in response)Since we have a clustered application server environment, we need to make sure ...

blossom code for edmond's algorithm(maximum matching)

260 byte By el_griegoa at 2007-10-2 2:59:08
Hi, can anybody tell me if and where I can find the complete sourcecode for edmond's algorithm?I'm searching the part of the blossom procedure....if anyone has it, please inform me by mail...ThanksEl_griego(nikosmisirlis@yahoo.gr)

ACM problem(weighted trees)!~~a bit hard

1035 byte By soulbleedsa at 2007-10-2 3:06:53
Hi, all, I just started this problem a while ago, and basically I am kind of stuck in building trees to store the input, any hints?Thanks in advance.and here's the link to the problem: http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php?p=3283For the algorithm, all I can think of is ...

Varying Inputs with FF Neural Nets

888 byte By tanseya at 2007-10-2 3:09:39
I am creating an AI for a multiplayer game which needs to consider various factors of other players. I wish to use an ANN to evaluate all the players' and output one of 3 reactions. The information I need to consider is simple enough to retrieve, but I am having an issue with it because there ...

Saving a binary search tree in a file

868 byte By meth0da at 2007-10-2 3:13:01
This pseudo-code is meant to save a binary search tree then restore it to a balanced shape:readTree(inputFile, n)if (n > 0) {treeNode = a new node withnull child references;set treeNode抯 left child toreadTree(inputFile, n/2);Read item from file intotreeNode抯 itemset treeNode抯 right child ...

Priority Queues

834 byte By meth0da at 2007-10-2 3:13:04
Hi there i need help on implementing this algorithm. Its called the LPT algorithm(Longest Processing Time), not sure if many of you have heard of it? We use two priority queues. The first priority queue stores all the tasks in which the processing time of a task is the priority value. Each time ...

how can i construct the shape of a binary tree from its preOrder traversal

113 byte By ybbesta at 2007-10-2 3:14:06
can someone give me the algorithms on constructing the shape of a binary tree from its preOrder traversal.

Threads and Multiple Clients

900 byte By kirjavaa at 2007-10-2 3:24:09
I'm working on an online strategy game and I'm almost done with the difficult parts, but I just had a friend point out that my server is going to be really slow. Right now I start a seperate thread to listen to every client and each of those threads starts a seperate "function" thread ...