I have a project to write an algorithm for Lembel-Ziv code?
923185
int main(int argc, char *argv[])\n{\nint c, i, j, k, l, m;\nshort will_continue = FALSE;\nunsigned char index_buffer[BUFFER_LENGTH];\nunsigned char line[BUFFER_LENGTH];\nchar *p[2];\nunsigned char code[MAX_CODE_SIZE] = "";\nunsigned char code_word[MAX_CODE_SIZE] = "";\nint current_dic_fill = 2;\nFILE *fd, *code_file;\nunsigned char dictionary[DICTIONARY_SIZE][MAX_WORD_LENGTH];\nunsigned char word[MAX_WORD_LENGTH];\n\nif(argc != 3) { /* We require two arguments */\nprintf("Welcome to the Lempel-Ziv encoder.&#92;n This program encodes a data file with the lempel-ziv algorithm. &#92;nPlease enter two arguments; the first is the data input file, the second is the encoded output file.&#92;n");\nexit(0);\n}\n\n/* Open the input file */\nfd = fopen(argv[1], "r");\nif (fd == NULL) {\nprintf("Could not open the file name: %s , exiting!&#92;n", argv[1]);\nexit(-1);\n}\n\n/* Map the first two characters of the input to the dictionary */ \ndictionary[0][0] = fgetc(fd);\ndictionary[0][1] = '&#92;0';\ndictionary[1][0] = fgetc(fd);\ndictionary[1][1] = '&#92;0';\nif ((fseek(fd, -2, SEEK_CUR)) < 0) /* Reset the file cursor */ \nexit(-1); \n \nwhile ((c = fgetc(fd)) != EOF) { /* Main file reading loop, reading character by character */\nif (strlen(word) >= MAX_WORD_LENGTH) {\nprintf("Current word: %s is to big to handle, bailing out!&#92;n", word);\nexit(-1);\n}\n\nword[strlen(word)] = c;/* Append the newly read character to the end of the current word */\nword[strlen(word) + 1] = '&#92;0';/* Dont forget the null termination */\nfor (i = 0; (i < current_dic_fill) && (!will_continue); i++) {/* Slow linear search through the dictionary */\nunsigned char current_dict_word[MAX_WORD_LENGTH];\nfor (j = 0; dictionary[i][j] != '&#92;0'; j++) {\ncurrent_dict_word[j+1] = '&#92;0';/* Dont forget the null termination */\ncurrent_dict_word[j] = dictionary[i][j];\n}\nif (strcmp(current_dict_word, word) == 0)  /* Found a match in the dictionary*/\nwill_continue = TRUE; /* Flag so that we break out of the double loop */\n}\nif (will_continue) {\nwill_continue = FALSE;\ncontinue;\n}\n\n/* Didn't find a match, save the word on the first available place in the dictionary */\ncurrent_dic_fill++;\nif(current_dic_fill > DICTIONARY_SIZE) {\nprintf("Dictionary full, exiting!&#92;n");\nexit(-1);\n}\n\nfor (i = 0; i < strlen(word); i++) \ndictionary[current_dic_fill - 1][i] = word[i];/* Save the word in the dictionary */\ndictionary[current_dic_fill - 1][strlen(word)] = '&#92;0';/* Don't forget to null terminate the string */\n\n/* Remove the last caracter and save the dictionary index as code*/\nstrcpy(code_word, word);\ncode_word[strlen(word)-1] = '&#92;0'; /* Remove the last character from the word to be coded */\nfor (i = 0; (i < current_dic_fill) && (!will_continue); i++) {\n/* Another slow linear search through the dictionary */\nunsigned char current_dict_word[MAX_WORD_LENGTH];\nfor (j = 0; dictionary[i][j] != '&#92;0'; j++) {\ncurrent_dict_word[j] = dictionary[i][j];\ncurrent_dict_word[j+1] = '&#92;0';/* Dont forget the null termination */\n}\nif (strcmp(current_dict_word, code_word) == 0) {/* Found a match */\n/* As we in this inefficient implementation are saving everything in a plain text file we need to convert the int to a string. I later found out that you can solve this one much easier with a simple sprintf call :/ */\nl = i;\nk = 0;\ndo { /* Count the amount of digits */\nif((l % 10) == 0) \nl++;\nl = l / 10;\nk++;\n} while (l !=0);\nif (k > 1) { /* Slow path for all index numbers bigger than 9 */\nfor(l=0; l < k; l++) {\nindex_buffer[l+1] = '&#92;0';\n\nindex_buffer[l] = i / pow(10, k-l-1);\nif (l == 0) {\nindex_buffer[l] += '0'; \ncontinue;\n}\n/* For each numeral except the first one (i. e 1xx), subtract the higher numerals */\n/* example: 123, we want the number 3
1138566
Have a look at http://alumnus.caltech.edu/~chamness/prime.html - it's a Java prime number generator with source code
999529
try www.codeproject.com they have all sorts of code examples.
246299
h= (C*I/A+T/k)*z*log(.7*y)
1064231
Go to http://www.elance.com and post your project. I get all of my web programming done there.
280441
http://www.cs.ucdavis.edu/~haungs/paper/node11.html
437960
why not try Danube's Enigma, it is easy and fulfills the requirements of all matlab projects!\n:)
676950
A few that come to mind at Euler, Maxima and Octave. Unfortunately, I don't think any of the free packages come close to Mathematica or Matlab, but maybe one of them will still meet your needs.
314789
How to work it? It's not very difficult. You just need to write your code and compile it.\n\nUnfortunately I can't send you anything, but you can check out my first source for more information.
979933
I'm giving u the program (in C), just go through it, then write the algo. It'll be easier.\n\n// Program :  MERGE  SORT\n\n#include<stdio.h>\n#include<conio.h>\n\nvoid mergesort(int *,int);\n\nvoid main()\n{\nint x[30],n,i;\nclrscr();\nprintf("Enter total no. of elements");\nscanf("%d",&n);\nprintf("Enter %d nos.",n);\nfor(i=0;i<n;i++)\n   scanf("%d",&x[i]);\n\nmergesort(x,n);\n\nprintf("After sorting in descending order :&#92;n");\nfor(i=n-1;i>=0;i--)\n  printf(" %d",x[i]);\n\ngetch();\n}\n\n\n\nvoid mergesort(int x[],int n)\n{\n  int aux[30],l1,l2,u1,u2,i,j,k,size;\n  size=1;   // merges file of size 1\n  while(size<n)\n  {\n    l1=0;   // initialize lower-bound of 1st. file\n    k=0;    // k is index for auxilliary array\n    while(l1+size<n)\n    {\n      // initialize remaining parameters...\n      l2=l1+size;\n      u1=l2-1;\n      u2=(l2+size-1)<n ? (l2+size-1):(n-1);\n      for(i=l1,j=l2;i<=u1 && j<=u2;k++)\n if(x[i]<=x[j])\n   aux[k]=x[i++];\n else\n   aux[k]=x[j++];\n      while(i<=u1)\n      aux[k++]=x[i++];\n      while(j<=u2)\n      aux[k++]=x[j++];\n\n      l1=u2+1;\n    } /* end of 2nd. while-loop */\n    for(i=l1;k<n;i++)\n       aux[k++]=x[i];\n    for(i=0;i<n;i++)\n       x[i]=aux[i];\n\n    size*=2;\n  } /* end of 1st. while-loop */\n}
990832
try this dude www.planetsourcecode.com
205119
I think u can post the same question in the Matlab news group(mathworks.com),since it is dedicated to Matlab user community,I think that u will find the code for ur prog.\nOR try searching in the google
247507
Go find a program called Emule.
525985
I think the numerical recipes book is the gold standard for solutions to these and many other kinds for problems.\n\nThis book is freely available online at\n\nhttp://www.library.cornell.edu/nr/cbookcpdf.html\n\nFor your questions take a look at chapter 10\n\nIf you can master this book you should have no shortage of programming opportunities.
762446
visit www.codeproject.com         ...............
269590
Use a decompiler such as Reverse Engineering Compiler. \n\nhttp://www.backerstreet.com/rec/rec.htm
344651
Hey, email me, LBphan@gmail.com, i might be able to help you out a bit, ive got some stuff for c++ and c# if youre curious, and ill give you whatever youre looking for free of charge.  my name is andy, by the way.