CodeCodex:Requested articles/1

From CodeCodex

ASCII file save

I am requesting an article about how to save a text / ascii document. -Codecodex 13:22, 1 May 2006 (CDT)

Recursive descent parsing code

I'm requesting a recursive-descent-parser code.It parses expressions from standart input , all expressions are enclosed are parenthesis, one pair of parenthesis per one infix operator.ex: = x 5 =>5

= y 9

=> 9

(x + y) => 14

I added code in C -- See here: Recursive descent parsing -206.160.140.2 09:17, 16 May 2006 (CDT)

Cryptographic code

hiii... does any one have code for any cryptographic techniques.. pls send it soon.

Are you looking for a specific laguage? Here's a good resource if you're looking for Java. [1] -WikiSysop 10:57, 15 July 2006 (CDT)

Here is code in Pascal:

<highlightsyntax language="pascal"> program Crypt; var Inp,Outp : string; Piece,Crypt : Char; ASCII,I : Integer; begin Writeln('Write text to crypt:'); Readln(Inp); Outp=; for I:=1 to Length(Inp)-1 do begin Piece:=Char(Copy(Inp,I,1)); ASCII:=Ord(Piece); ASCII:=ASCII+9; Outp:=Outp+Chr(ASCII); end; Writeln('Here is crypted text:'); Writeln(Outp); Readln; end. </highlightsyntax>

Calculate pi in hexadecimal

I'm requesting a method of calculating a large number of digits of pi in hexadecimal (not digit-extraction). --172.190.244.120 16:05, 15 July 2006 (CDT)


--Are you looking for something that converts pi to hex, or something that generates pi using hex?

Uploading a file

Hi friends, Can anybody tell me how to upload a file(in java)? Like we upload files in yahoo,rediff etc.,


Yours, Member.

Hi and welcome. I just created CodeCodex:Upload Filetypes, a place where we can talk about file types that we should allow to be uploaded.
I've already added .java .jar .zip and .rar. What other file types should we allow to be uploaded? -Nostromo 12:20, 9 August 2006 (CDT)

Matlab insertion sort and mergesort!

Hi can anybody give solution to the following problem in the form of code

Implement functions InsertionSort and MergeSort in Matlab. The function InsertionSort should be in the following form

[sorted_array no_comp] = insertion_sort (unsorted_array);


where unsorted_array is an input array of numbers, sorted_array is an output array of numbers sorted in the descending order, while no_comp is the number of comparisons performed by the function.

Similarly, function MergeSort should be in the following form

[no_comp] = merge_sort (unsorted_array);


where all input and output elements are defined in the same way as for InsertionSort. The difference between two functions is that MergeSort assumes that unsorted_array is a global variable defined in the wrapper function that calls it. Variable unsorted_arraywill be sorted in the descending order once the function returns to the main program.

Note: make sure that functions work for empty and small-sized input arrays.

Request for Wiki source Code

Hai, I am working on an application which needs to help the user create pages on the fly. I would be glad if some one could send me wiki source code. thanks and Regards ashok vundavalliashok@gmail.com

Hi Ashok, download MediaWiki here. Good luck! -Nostromo 21:53, 22 February 2007 (CST)

Delete files and folders

I would like someone to add the C source code for:

Deleting a file, Deleting an empty folder, Deleting a folder with it's contents,

or anything similiar

Please.

Thanks.

Welcome. Did you look in Category:I/O? You may or may not find C code there (most of this category is Java based right now) -- if you don't see it, please add it! -Nostromo 10:59, 9 February 2007 (CST)

GNU/Hurd

I'd like to see the source code for GNU/Hurd added. This GPL'd OS has the potential to surpass Linux in usability and adaptability.

Why not just get it yourself from [2]here. As it says on the Community Portal page, “This is not the place for entire packages or applications”. That would also go for operating system kernels.Ldo 00:40, 15 February 2007 (CST)

prison management system

i need code on prison management system .

Could you share a little more about your project? -WikiSysop 12:48, 6 February 2007 (CST)

requesting a code

can anyone please mail me a complete uniform cost search code written in java. i'm not a java progammer so please make it simple for me to understand and in a single java file. please don't use packages.. coz i won't understand a thing.

Thnks..

mail to: rinku0bd@yahoo.com

Hi runku0bd. You can find some information here: Uniform-cost search, however, I'm not sure you're going to find much of anything useful on CodeCodex if you don't understand some programming basics, like packages. Also, it's poor form to ask that someone email you on a wiki when asking questions -- the general etiquette is to return after a period of time to find a response. Good luck. -Nostromo 10:39, 9 February 2007 (CST)

How to create bar code in Java/JSP

Can you please suggest me with example code how to create bar code in Java and JSP. mail to: sudhirkumarsahoo@gmail.com

Sudhir, check out this sourcecode.

Struct Student_Information

<HIGHLIGHTSYNTAX language="COBOL">Struct Student_Information{

char f_name[15],s_name[15]; char course_title[15]; int roll_no,age float cgpa;

Struct student_address{

char permanent_address[50]; char correspondence_address[50]; char email_address[25]; }; address

Struct student_fone_number{

char home_no[15]; char mobile_no[11]; char work_no[15]; }; fone }; student</HIGHLIGHTSYNTAX>

ASCII

I would like to know how to change a letter to ASCII in Java

Try something like this:

<HIGHLIGHTSYNTAX language="java122"> public static void main(String[] args) { System.out.println(Integer.valueOf('A')); System.out.println(Integer.valueOf('B')); System.out.println(Integer.valueOf('C')); System.out.println(Integer.valueOf('a')); System.out.println(Integer.valueOf('b')); System.out.println(Integer.valueOf('c')); } </HIGHLIGHTSYNTAX> Output will be:

65
66
67
97
98
99

Note that this is actually the Unicode value of the character. However, the first 255 characters of Unicode are identical to ASCII, so it still works fine. Check out ASCII Table for more ASCII codes. -Nostromo 21:42, 22 February 2007 (CST)

I added this answer to an article: Find the ASCII or Unicode value of a character. -Nostromo 21:51, 22 February 2007 (CST)

process management in linux

need source code for linux process management

Could you provide a few more details on what you're trying to accomplish, and what you've found so far? Thanks. -Nostromo 10:35, 24 February 2007 (CST)

Database code

need code for a fully functional movie store database in java

huh? could you provide more details about what you're trying to do?

I am trying to implement a movie store database in Java that is capable of performing the following functions: add/delete a customer, add/delete a move, rent a movie to a customer, search for customers/movies based on their names, show who has borrowed a particular movie and their address and phone number, etc. The information that has to go in for the customers are: name, customer ID, birthday, gender, address, phone number and movie borrowed. The information that needs to go in for the movies are: title, genre, year released, director, starring and who its rented to.

code to parse e-mail

This is sivagnanam and i need code to convert e - mail into text file

What format are you converting from? -206.160.140.2 16:35, 12 March 2007 (CDT)

Company Hardware Management System

project name : hardware management system purpose: what are all the things are purchased by the company.it should be entered through an interface and maintain a database of that entire things. It can be accessed by staff,in-charge and the end user.the technologies should be used are JAVA/J2EE,JSP,SERVLET,SOFIA FRAMEWORK,ECLIPSE,JBOSS(APPLN SERVER),TOMCAT(WEB SERVER),DREAMWEAVER


EMAIL ID : renjeshraju@rediffmail.com

Hi renje -- welcome. I doubt you'll find the code you need here on codecodex -- simply because this wiki does not host source for entire applications, it's lower level than that. If you're able to break this application up into much smaller chunks (say -- specific classes or functions), we may be able to help -- otherwise I'd encourage you to visit SourceForge.net. Cheers -Nostromo 08:40, 11 May 2007 (CDT)

KMP algorithm

Hi, Referring to : http://www.codecodex.com/wiki/index.php?title=Knuth-Morris-Pratt_algorithm

How can I get the complete source code with pattern/text scanning? In C language.

Thanks!

The source exists on Knuth-Morris-Pratt algorithm -- are you unsure about how to implement it? -Nostromo 13:16, 28 September 2007 (CDT)

DataMining Algorithm

Did you have any specific question? -Nostromo 13:13, 28 September 2007 (CDT)

Headline text

I would like to get data mining algorithms like classification and association rule, and their implementation if possible I would appreciate if anyone could send me through: foysa1@yahoo.com Thank you in Advance

For basic algorithms for association rule mining see this page. We don't have any articles in the wiki currently -- it'd be great if you find one to return the source as a new article. -Nostromo 13:15, 28 September 2007 (CDT)

float to string conversion in C#

can somebody tell me hw to convert a float value into string?

Arti

reverse the number

how to reverse a number in java

Cast it as a string and read Reverse characters in a string. -Nostromo 13:13, 28 September 2007 (CDT)

// n is the input number, the reversed number will be stored in m. % = mod, / = integer divide m = 0; while(n % 10 > 0) { m = m*10 + n%10; n /= 10; }

Generate Hash Key In Java

Hi,

I need code that will generate a simple hash key from a 25 character string. That is, the input would be a string, and the output would be a hash key that would be generated using the characters in the string. I need this so that i can input a record into a hash table in a random access file.

PS: I need this in Java.

Thanks

I would just use any of the available encryption classes out on the web. Here is a very simple one, which would work great for simple problems. -Nostromo 13:12, 28 September 2007 (CDT)

K Means Clustering algorithm details

I need info regarding the usage of kmeans clustering algorithm in Java. I am new to coding and it will be very helpful if you can give me a step by step procedure on how to compile and run the program available so that I can use it in my own project.

Also I am getting the following error when trying to compile the PrgMain.java file:

Error:

PrgMain.java:1: pacakage org.c4s.algorithm.cluster does not exist import org.c4s.algorithm.cluster.DataPoint;

PrgMain.java:2: package org.c4s.algorithm.cluster does not exist import org.c4s.algorithm.cluster.JCA;

Please suggest how to fix this.


Thanks!

Hi! It sounds like you need to create the class "DataPoint" and compile that, which is included in the article K-means cluster analysis algorithm. Make sure you create all of the classes listed there -- and it should work for ya. -Nostromo 13:09, 28 September 2007 (CDT)

Hi, I did create all the classes and compile them. Everything else seems to work fine except this. Donno why. I get the above two errors and 5 warnings. I think it is not able to read org.c4s.algorithm.cluster.datapoint What else can you suggest? I need help asap. Thanks in advance.

There was a typo in the class PrgMain. Delete these two lines:
import org.c4s.algorithm.cluster.DataPoint;
import org.c4s.algorithm.cluster.JCA;
I suppose these were left over from the original source program. Since all of these classes are now in the same directory, you can omit these import statements. -212.199.180.124 11:25, 29 September 2007 (CDT)

Hello! Thank you so much for your help. This worked!!!

K Nearest Neighbor Algorithm Needed in Java

Hello, I am looking for a code in Java for the K Nearest Neighbor Algorithm for detecting Outliers in Cluster data. To be more precise, it would be great if I can get a code for detecting outlier clusters using k nearest neighbor algorithm (or) if there is any other better way to detect the outlier clusters, please suggest.

Thank you!

random number generation between two numbers code required in Java

Hello, I am looking for a code to generate random numbers between 74 and 84 in java. Please help.

Thank you!

See Generate a random number. -Nostromo 10:52, 27 October 2007 (CDT)
The above link doesn't work. Find the difference between the two given numbers, get a random double, multiply the random number by the difference, then add the smaller number. This will get you a random number between two given numbers. -Deo Favente 7:35, 8 April 2008 (CDT)
I am assuming that the OP wants an integer. In that case, you want to use Random.nextInt() to generate it. Generate a random integer up to the difference, and then add it to the lower number. --131.215.220.132 00:17, 14 April 2008 (CDT)

micromouse code(flood fill algorithm)

hi i m rahul shah from india i m amaking a micromouse for the frst time and i need a flood fill algorithm code for solving 16*16 maze. i want to use 89c51 microcontroller i will be thankful to u if u help me. my contact no is +91-9924361348 and my email id is rahulshah7388@yahoo.com

Hi Rahul -- it' using a different microcontroller, but you should check out this page that includes source for a Handy Board. -Nostromo 10:50, 27 October 2007 (CDT)

hybrid clustering algorithms code

hi,

I want code for any hybrid clustering algorithm. or any clustering algorithms code. If anybody have plz send to me.

Print Screen in VB Script

Hi,

I like to print a Screen and save it in a word document using VB Script. Please provide some inputs if any....

Thanks!!!

request: HTML: Advertizing

I would like to see an article on banner ads and how to make them.

binary math

i know how to do addition and subtraction in binary but i need to know how to do it in java using arrays of booleans. Methods that work use can use: prepend(array, element), append(array, element), fill(array, start, end, filler element), and arraycopy(dest array, src array, start, end) All the binary operators can be used.

path finding using voronoi diagram and A-star algorithm with java code

In robot techonology and game developing, it is important to provide correctly obstacle-collision path for robot or intelligent agent. In robot, maping , localization and path planning is corresponding processess. For path planning, there will be offline planning(pre planning before robot travel in known environment) and online planning (simultaneous planning while robot is travelling). To provide path planning, robot mapping is necessary case. Everyone can build metric map or topological map. In metric map, there will be feature or grid map. Feature map is composed of obstacles and things of environment by points, lines and polygons. Correctness is provided by composing map with grid, but not spatial relations. So in some cases, by applying voronoi diagram in robot grid map from laser sensor or others is good case for vectorization( composing map with obstacles corresponding to their areas with polygons and lines). After that, A-star algorithm is suitable for path planning upon this map. So please request codes for building grid and feature map , generating voronoi diagram upon this map and computing A-star algorithm because I'm not expert with coding.

request boyer moore code

I wanna implementation of boyer moore string search algorithm. An example code in java is prefers. my email address is c.palihakkara@gmail.com Thanks U....!!!

How to Create an Index page for a book using C or Java

Hi

   I am Prashanth

By using C or Java We have to write a code for Index page. All the contents can appear in the first page. So that by clicking on the page no we can directly enter into the page.

        kprashanth54@yahoo.com  my E-mail Id

PackRat Algorithm

Good day all

I would like code in regards to the Packrat algorithm which is an extension of the recursive decent parser( available here within Codecodex). Preferably in Java. 

Thanks

A Huffmann compressor using only basic OOP stuff

Last year, I took data transmission, and when I took the class, I knew zilch about data structures. I didn't even knew how to make a tiny little linked list. But the teacher was a great sadist, and guess what? He made me code a Huffmann compressor!

It wasn't until last month, while practicing programming on my own just to have something to keep myself busy, that I found out that a Huffmann compressor in Java, apart from binary trees, also needs generics, bitvectors and, preferrably, something faster than good ol' bubblesort.

Thus, if someone (maybe myself ^^;) could add a Huffmann compressor written only with stuff that someone with only a knowledge of OOP fundamentals can understand, I'd be eternally grateful. 200.56.94.99 11:38, 21 August 2008 (CDT)

Request of MATLAB code for Penrose rhombus Tiling

Can anyone please provide me the MATLAB code for Penrose Tiling(rhombi tiling)

its very very urgent...................plz help me............

Generate random numbers without repetition in a range

I am requesting an article about how to generate random numbers without repetition in a range.

Ex.: Generate 10 random numbers without repetition between 0-100

What language? -Nostromo 20:07, 22 July 2009 (UTC)
I thought it sounded fun so I just wrote it in Java: Generate Random Numbers Without Repetition. --Nostromo 20:29, 22 July 2009 (UTC)

Car wash simulation system multiserver model using c++

Car wash simulation system multiserver model using c++


Multi-server models can include more than one customer queue and the simplest models in this group are those that include a separate queue for every server. Each server object owns a queue and a customer object will receive service from only one server object. The queues are simple queues— FIFO queues. These models are considered to have several service stations in parallel, each station with a single server and a queue.

urgent Thanks