From codeuu,source code
A smart decompressor. Uses an interesting algorithm which involves some heuristics. May be improved in the future for more performance.
I HAVE POSTED THIS CODE TO SOME OTHER WEBSITES (CODEPROJECT.COM AND OTHERS) AND I HAVE RECEIVE SOME VERY GOOD FEEDBACKS ABOUT IT. I KNOW THAT THIS CHATBOT IS FAIRLY SMART, SO DONT FORGET TO VOTE FOR ME!
This is a complete Tictactoe game, it includes many functionalities, you can play games
Apply the queue concept
demonstrates the use of object oriented programming. a full description of the purpose is in the read me file
This document is a literature survey about block ciphers, especially based on Feistel Network, presented in form of a report. The report concentrates on providing a starting point for designing strong, secure, and efficient cryptosystems. Various design issues and algorithms have been described in the report. Description about various forms of cryptanalysis has also been provided. Report explains the key players of design of block ciphers in detail. The report will provide as a excellent reference material for anyone who wants to design a Feistel network based block cipher.
It is a great code for beginners to learn from. It accepts a 2D array and displays it. It calculates the sum of each row, each column and each diagonal and displays them. It calculates the sum of diagonal elements and non-diagonal elements and displays them. It also calculates the sum of all elements above and below right diagonal, and of those above and below left diagonal, separately, and displays them.
The code includes a portable tokenizer like the StreamTokenizer in Java. It parses and interprets an arithmetic expression expressed in a flexible C-like syntax.
Here you have a number of sorting and searching algorithms. They include
This package contains a sort header file I developed with 4 types of sorts: bubble, insertion, quick, and selection. The header also uses templates so that you can implement the sorting of several types.
Allows the user to test various sorting and searching algorithms
Algorithms and Data Structures - Linked Lists & Trees. Here you have examples of linked lists, stacks, queues and binary search trees. oop
This is just a simple Calculator that allows someone to +,-,*,/ fractions. Was a class lab thought it might actually be useful to someone.
The program accepts the names of an input and an output file from the command line. Reads strings from the input file into a two dimensional array: char input[20][40]. Uses bubble sort and strcmp to sort the strings in ascending order and writes the sorted array to the output file.
The program accepts the name of an input file from the command line. Then it reads strings from the input file into a dynamically allocated array of pointers to char. Prompts the user for a string to search for. After that it searches the array using binary search. If found, reports the row (counting from 1) in which the target was found. If not found, reports "Not Found"
<>
</b>
A general-purpose doubly-linked list C++ class.
A Priority Queue C++ implementation.
A C++ Class implementing a shortest-path algorithm on a rectangular grid where grid elements can be marked impassable and the algorithm must quickly find the shortest path from point A to point B. Uses a priority queue class. This is typically used in game software to allow the AI to move a unit from one map location to another.
this is a small trick to add 2 numbers with out using the add signe + using XOR and & operaters.
It is an example of a bottom-up parser, using an algorithm I came up with. My bottom-up parser was completely hand-written, without any code generation. It's algoritm is centered around a finite-state machine code as a tree structure with several nodes and edges. The grammar is generated at runtime.
This program demonstrates my implementation of the floating horizon
This program is to show how to get the last digit of an integer type without using
simulate the scheduling of a CPU, calculate waiting time & average, turnaround time,etc...
This is pathfinder artificial intelligence program in which the PI Robot solves any closed maze that is it finds it way through mazes.It uses my 4 way block algorithm to solve 2d puzzles.It can be used in games, as a base to develop much more complex intelligence and robotics.Please credit and vote for me.
Implement the advanced encryption standard (AES) in C. Includes certification test from FIPS.
Perform all sorting techniques, including bubble sort, selection sort, insertion sort, heapsort, merge sort and quicksort. The program employs an array list as the data storage.
An implementation of the Game of Life algorith, I wrote many years ago. The whole display is rather primitive, as the algorithm just draws to the screen without using a window...
Archimedes spiral
This programe evaluates an algebric expresion.It uses binary tree algorithms,classes and other data structures...it is a good exercise for data types(it uses STL classes)
This is a little project I embarked on a couple of weeks ago, to write a base64 encoding algorythm in pure ANSI C, with no platform specific code at all. It consists of a single source file and a simple header. There is no documentation included as it is very self explanitory.
This is a little project I embarked on a couple of weeks ago, to write a base64 encoding algorythm in pure ANSI C, with no platform specific code at all. It consists of a single source file and a simple header. There is no documentation included as it is self explanitory.
This code gives an animated solution to the N-queen problem, only that due to a large chess board i have been able to accomodate only a maximum of 7 queens..
The Huffman coder/decoder is a set of classes classes with general C++ code. Currently, it can only be used on C "FILE" streams.
To solve N Queens Problem
Teaches the baisic loops and operations like sqrt
This is a simple arithmetic expression evaluator,it handles operation such as addition, substraction, multiplication and division,the modulus operator,the power function and parentheses are also handled.
Solves Algebraic Equations with the Determinant method. Introduces linear algebra which is very helpful in computers
Defines a simple vector space model classifier interface and two derived examples - a rule based classifier and a case based classifier.
The implementation of the program has been improved, the repetitions made by the program
Allows the reading of bits from a given byte provider.
base64 encoder,decoder.
realize a binarie, octal, decimal an hexadecimal cpnvertion.
This code and accompanying explanation is designed to be an introduction to basic genetic algorithms. It uses the roulette wheel method to optimize the function x^2 using six digit binary strings. The accompanying document goes through the algorithm and the code step-by-step.
BCD counter & the 4 bits of clock pulses
Base64 is a public encoding/decoding algorithm. It is used in many ways, for example in authorization and E-mail attachments. Let's say you want to enter a site that requests a user name and password (I'm talking about that dialog thing that you get in your browser). You type in "MyUserName" and "MyPassword". At this point the browser first concatenates the strings with a colon between them: "MyUserName:MyPassword". Then it encodes the resulting string with Base64. The result is "TXlVc2VyTmFtZTpNeVBhc3N3b3Jk". This is what is sent to the web-server (this is the process in a non-secure protocol like http - in a secure protocol like https, the process is a bit different). Another use is in E-mail attachments. When you attach a non-text file (such as a JPG file) to your E-mail message, your E-mail client first encodes this file in Base64, and only then sends it to the SMTP server. When you retrieve the E-mail message from the POP server, you receive the encoded file and your E-mail client decodes it to get the original file back.
Demonstrates Boyer Moore string searching algorithm
Shows how to overload basic operators like +,-,/,*,<,>, and ==. It even overloads >> and <<. So that cout<<Fraction; is possible.
BUBBLE SORT program
Este codigo realiza una simulaci?n de cuenta bancaria en donde se introduce el nombre y da distintas opciones para realizar operaciones bancarias.
This is a binary search algorithm that first sorts the array and then searches by jumping on the middle element , as linear search of arrays is quite slow with large arrays
Compression using Burrows Wheeler Transform.
Find the single source shortest path using Bellman Ford algorithm.
This is banker's algorithm used by the operating system to determine the safe sequence in a system.Your have to input two matrices and the processes along with there instances of each resource required . the programm will then tell u the sequence in which resource must be allocated to different processes so the system remains in a safe state. This is deadlock avoidance
base64 enables you to encode/decode data streams in the base64 alphabet (this mechanism is used to attach content to email messages)
A simple BINARY , DECIMAL, HEXADECIMAL, BASE X , <<<<<<CALCULATOR>>>>..this code demostrates how to do all this operations with a simple few lines of code...NOTE: that it is not a complete calculator..it only demostrates the way it is done :)...but you can make it complete with yust a few modifications...i have found a lot of code in PSc but none of it works the way it has to..so here you have a few lines of free and working code :)
Finds every possible combination of ASCII
Miscellaneous BorlandC Programs and Algorithms
This is a small demo which explains and demonstrates how to use the binary search tree data structure. Binary trees are extremely efficient at inserting and traversing ordered data, with only order log n complexity for insertion and traversal. Please leave any comments or questions you have.
To enable computation with arbitrary large integers. Test run log file is at http://groups-beta.google.com/group/log-files/msg/c0cea141d6f67a57
Bin + Bin = Bin , Dec
This is a simple Blowfish encryption/decryption class implemented in C++ (MFC)
This code implements Bresenham algorithm
-- UPDATED --
This is the algorithm of drawing a circle using the line command. Usefull for Novice/Beginners to show how mathematical functions/modules can be written if not available in built-in libraries.
This will compute CRC16 and CRC32 checksums for any file, string, or byte array! There is also both the static and dynamic methods for computing them too. The CRC32 checksum is blazing fast and possibly one of the fastest on PSC. (You can see in the screenshot a 100 meg file took but a few seconds) The CRC16 is not highly optimized as I am not going to use it. I just wrote this for the CRC32 checksum and added CRC16 just for giggles. This is going to be used in a commercial product so enjoy. The code is pretty straight forward so it is not heavily commented. The test project is in VB. Please leave feedback and vote for me if you like this.
This code is a calculator pojected in C plataform using many funtions with best algorithms. Enjoy!
This is a DLL to be used with VB. It is the C companion to the VB BinWorks II program posted there on Jan. 1, 2001. Does BYTE, INT & LONG to bin, hex etc. Mostly shows C programmers how to write DLLs and for VB programmers they can check that I didn't build in any VIRUS code. The accompanying VB code can be found in the psc-VB section.
Encrypt/decrypt text file with Caesar Cipher
simulate the scheduling of a CPU, calculate waiting time & average, turnaround time,etc...
This will extract words from a file and keep track
My CPP Examples
ceasar cipher encryptionand decryption
Find the G.P.A. of student. This code uses and array that user creates the size of and returns the GPA. This can be an example of how to create a array without telling the compiler the size at compile time. It also uses pointers, if statements, and for loops.
this code illustrate how to create a file shortcut with com interfaces.
Demonstrates binary search with either
THIS PROGRAM IS TO FIND THE CONVOLUTION X[N]*H[N] OF TWO SEQENCES X[N] AND H[N] TO FIND THE CONVOLUTION RESULT Y[N] AND TO PLOT THE THREE SIGNALS,X[N],H[N] & Y[N] WHICH IS A VERY IMPORTANT APPLICATION IN DIGITAL SIGNAL PROCESSING
The classical cipher cryptography type is transposition ciphers, which systematically replace letters or groups of letters
Uses Clipping Windows to Clip Visible Portions of Lines...Very Basic (but brilliant) CG Algorithm...
This compression is based on the RLE compression basis. It compressed a file of mine that was about 660,000 bytes to 440,000 bytes in about .201 second. and decompressed it in .102 second! Thats a 30% reduction in size in a fraction of a second! enjoy!
random move your mouse
This centers text and prints in using cputs, so you can change the font color in Turbo C++ or Borland C++.
This program graphically explains basic sorting algorithms. Included is the bubble sort, the insertion sort, the selection sort, the shell sort, and the quick sort. There is a delay option so that the sorting can be slowed down to see what the computer is doing as well as a pause option so that you can pause the sorting on the screen by simply clicking the graph.
IT SHOWS AN EXPANTION WAVE
IT SHOWS DIFERENT KIND OF ROPES
Goal
This little program will gather all entered characters and determine how many numeric characters there are, alpha characters and special punctuation chars, including spaces!
A strcat() clone function, concatenates two char arrays and auto. delimits both strings with a space!! If you hate the strcat() function in the string.h, get this!
This program is a simple calculator for simple arithmetic, it uses a switch statement, check it out!
This program is dumb but kinda amusing, it's an X that is printed in random places... sorry, I was bored.
To show one possible rendering of the mandelbrot set in openGL. The mandelbrot set is rendered with varying precision and a slight rotation. i kept the precision down so it wouldn't be too processor intensive. hope you enjoy.
This is a command-line compression and extraction tool using an Huffman algorithme. The source code also includes heap and bit stream management functions.
Web page : http://alexvn.freeservers.com/s1/perfometer.html
Computing very long numbers, including Fibonacci ones (for instance, Fibonacci[5,000,000])
A simple BINARY , DECIMAL, HEXADECIMAL, BASE X , <<<<<<CALCULATOR>>>>..this code demostrates how to do all this operations with a simple few lines of code...NOTE: that it is not a complete calculator..it only demostrates the way it is done :)...but you can make it complete with yust a few modifications...i have found a lot of code in PSc but none of it works the way it has to..so here you have a few lines of free and working code :)
A Chess Tool Is Moving On A Board That You Can Change His Sizes Until He Reaches A Number Of Steps That You Said Would Be Enough. When He Come To This Step, He Prints His Course, And Try To Find The Next course. The Chess Tool Can Be Selected From All Chess Tools Exist.
This code demonstrates how MPEG-Layer 3 (MP3) files are read by programs like WinAmp and Windows Media Player. Note this code uses no Windows API calls, DLLs, or OCXs. This is the *RAW*, *VERY UNREFINED* CODE for reading and playing MP3s. It contains no examples, but is based on FreeAmp, so if you want an example, FreeAmp is as close as you're going to come. I do plan on creating an example sometime later on, but for now, here's the code that everyone's wanted. =) I can't take credit for this code, though. The ORIGINAL MP3 decoding algorithms were written by the Fraunhaufer Institute. Oh yeah, while I'm at it, vote for me! =)
Implementation of the CRC32 algorithm which is also used in PKZip, Winzip, Ethernet, FDDI and many others. This unit is compatible with these applications, because it uses the same popular 32 bit polynomial 0x04C11DB7.
general library graphics,strings,sockets,math,matrix,vectors,file
Calculate CCITT cyclic redundancy codes (CRC)without clobbering the processor's data cache. Both 16 and 32 bit codes are provided.
Basic Graphics Algorithms
Circular Doubly Linklist :-
convert decimal to binary ,... it is very simple code. if you have a time and like it vot it please!!!
CPU Scheduling algorithm. It uses round robin technique to assign the processor to various processes currently runnig.
Simulates the two CPU-scheduling algorithms used by operating systems, namely Priority scheduling and Multilevel Queue.
The purpose of this code is offer a mechanism for programmers to allow them to make efficient use of switches in a command driven application and to extract the arguments for each switch eg appname.exe -t bling -r haha -g
This program simulates the round robin Algorithm of operating system To know how the process works, you must know the concept of round robin scheduler Algorithm in operating system.
This code generates either one number, or a sequence of numbers, based on a crytographically secure seed value. It depends on a call to CryptGenRandom. See the code for details...
THe program contains 2 simple functions:
Different Cpu Scheduling algorithms graphical representation
Calculate Pi to 10000 digits
The C++-program simulates a Nondeterministic Multitape Post Machine (PM). PM is defined by set of setup files. The simulator works as ordinary (deterministic) Post Machine as well.
New version! A minor speed optimization.
PerfectNum finds perfect numbers. It's actually answering a question in Ask A Pro. I hope this teaches someone something useful.
This is a newer version of my old one (PerfectNum). This one is much faster. I wrote this to answer a question in Ask A Pro. Please vote on my programs (either good or bad). Also, be sure to check out my other programs.
Use an argument to specify how many primes to find. NumPrimes will find that number of primes starting at 2. This is an answer to an Ask A Pro question. If the compiled EXE doesn't work, lower the SIZE definition.
preemptive priority, non preemptive, round robin
This a a search called the Binary Seacrh. It is extremely fast and straight to the point. Works on strings and numbers.
This code implements colors in DOS console mode and calculates a mass equation (physics).
This program will calculate the nth Fibonacci number,
knowing the usage of getch function and a little animation
avoid any deadlock state in resources allocation
This program likes as Dos Shell of Microsoft.
Enter a valid date and this program will tell which day of the week the inputed date is/was
This program will draw a box on the console screen in accordance with a user specified width and height.
DeCSS Source code. Code that decrypts the CSS encryption algorithm found on DVDs.
The program calculates the shortest distance from a beginning point for all other points of a 2D array
Implement the MARCHANT calculator method of extracting DECIMAL square roots
Drawing triangle
Find the single source shortest path using dijkstras algorithm
This code written for a directed graph. it search the given graph and prints the edges which are after dfs search selected.
The Programme take values form the user and draw a pyramid of that height
Reasonably good algorithm to convert a number from decimal to binary system of numbers. Can accept numbers upto 35 million. Hope the comments are sufficient.
The Huffman coder/decoder is a set of classes classes with general C++ code. Currently, it can only be used on C "FILE" streams.
//======================================================================================
database algorithms for query joins, implementation of algorithms such as nested loop joins, hash joins and sort-merge joins in c programming language.
This program is used to demonstrate proper data-directed design for generating reports of any kind.
This algorithm will recursively subdivide the rendering area, until said area contains only a single object, or it reaches a predefined minimum, at which point it will perform a z-sort, and only draw the pixel(s), closest to the display plane. This algorithm renders with zero overdraw, regardless of scene complexity. It can also be extended to divide to the subpixel level, which will give an antialiased effect.
Here's a program with which you can see the element comparision very perfectly. so enjoy my code & must vote for it.
Encrypting Files by Sequence Encryption
Takes the N value from the user and solves the NxN queens problem.
This solves the same problems as my last submission, Can you place 8 queens on a chess board such that none of them will attack each other? The only difference with this version is that it uses a Linked Stack instead of an array based Stack.
This program read a file once original.txt was called and he encodes it to a binary format.
It encrypts/decrypts strings and files using one of either two methods (which the user specifies): XOR or add 2.
This program reads a given equation and finds the root for the equation using bisection methid.
Six stage sudoku solver. Runs five stages of heuristics, if that doesn't work it falls back on brute force. It's cracked every puzzle I've thrown at it, so I'm pretty sure it will solve anything.
the puurpoise of this program is to parse expressions from an input file and display token type and value in an output file
Questions from past ICPSC competitions are solved, and the logic behind each is explained to provide an introduction to simple logic, and programming skills.
this is a fairly simple code that determines whether the integer you
UsingFord-Fulkerson method, implemented Edmonds-Karp algorithm to solve the maximum flow in the weighted network. This is 1st part of my term project in my Algorithm class. This also the 1st program I coded by C++, so there may here some redundancies and errors in my source code, please show them to me if you find any.
This code implement Edmonds-Karp algorithm (an improvement of Ford-Fulkerson method) using C++. I coded this on Microsoft VC++ v60. This is my first program written in C++, so it may contain some error or redundancy. Please inform me if you find any.
Calculate the first come first serve process
simulate a simple file system using the best fit, worst fit and first fit methods.
The Algorithm is an efficient way determing if a Linked list contains a loop...the source code is commented...for more info read the wikipedia page...
It allows faster binary and linear search using the basic indexing. cades file has been included. it allows you to compare the time taken by each type of search
It creates the fractal of a complex polynomial (the fractal is created with the Newton-Raphson algorithm) There is a help file included that you will find a bit more enlightning!
This code will evaluate a FCM and help to solve real world problems.
This program will open a file in read ("r") mode and will provide a pause for every 10 lines, so the reader can be able to read it.
Flexible Vector and Matrix Classes enable to use vectors and matrixes with arbitrary bounds.
Please vote:This code generates both fibanocci and non fibanocci sequences upto user specified limit and writes the output onto text file.
Understanding the use for equations and being able to use alternative ways around arrays.
converts number to word
This is a Graph algorithm. Very famous and effective algorith for finding all pairs shortest path. This is one kind of dynamic programming approach. There are several problems in ACM problem sets based on this algorithm.
Find and replace string in a html file (unicode version).
This will compute CRC16 and CRC32 checksums for any file, string, or byte array! There is also both the static and dynamic methods for computing them too. The CRC32 checksum is blazing fast and possibly one of the fastest on PSC. (You can see in the screenshot a 100 meg file took but a few seconds) The CRC16 is not highly optimized as I am not going to use it. I just wrote this for the CRC32 checksum and added CRC16 just for giggles. This is going to be used in a commercial product so enjoy. The code is pretty straight forward so it is not heavily commented. The test project is in VB. Please leave feedback and vote for me if you like this.
This is the fastest 8-puzzle solver algorithm I have seen, with resolution times of under a second. Its speed is due to the fact that the visited states are saved as bits. It has not been exaustively tested but so far, all the solutions have been correct. E-mail me any questions or comments, and rate my code if you think it deserves it.
The Genetic Algorithm Library is used for function optimization i.e.to find minimum or maximum value of
Genetic algorithm library is used for function optimization i.e to find global minimum or global maximum value of a function.The JAVA GUI is very user friendly,linux compatible and unique.
Almost every programming system offers the programmer some functionality to dynamically allocate storage in amounts not for-seen at coding time. Except in the rare cases when those objects are used and needed for the whole running time of the program, eventually the storage used by them must be freed and given back to some management facility-otherwise your program would continue to grow, eating up tons of unused storage space. If manual memory management (for example, malloc and free in C) is used, it forces the programmer to keep track of which memory is still required, and he is responsible for freeing it. This destroys the good software engineering principle that programs should be developed in small independent components. If we are using automatic memory management, it frees the programmer from these concerns, making it easier for us to code in the language of our problem, rather than the tedious details of the implementation. Automatic memory management is often called, as GARBAGE COLLECTION. Automatic memory management is a service, either as a part of the language or as an extension that automatically recycles memory that a program would not otherwise, use again. Automatic memory managers (often known as garbage collectors) usually do their job by recycling blocks that are unreachable from the program variables. Download the complete article ...
LA UTILIZACION DE FUNCIONES BASICAS DE EL MODO GRAFICO
- This is a Radix Sort Exchange routine which will work only on
This module implements a generic 'container' in C. The container can contain either pointers or actual data of any size and type, including structures. Using this method, you no longer have to write a separate bit of code for every data type you want to store.
This is an example of Binary Search. Very heavily documented. It allows you to enter in the number that you want to search for and also a number you know that was not in the array.
This program demonstrates the creation of trees in C++. I've included a GUI to display the tree structure. You will need the correct BGI (Borland Graphics Interface) to run it.
This article explains how game trees work, and the use of minimax method for deciding the best move.
UPDATED...
Grphically Represents how Tower of Hanoi actually works.
UPDATED...
Compute a greedy tour of a Euclidean graph, which is often used to initialize iterative optimization routines (e.g. 2-opt) for geometric traveling salesman problems.
The Huffman coder/decoder is a set of classes classes with general C++ code. Currently, it can only be used on C "FILE" streams.
ilustrate an hierarchy species...
This "file" will introduce pointer's to new programmer's...
This code is a sample realization of Huffman algorithm. It includes code for algorithm itself and two sample programms, compressor and decompressor. It can be used for file compression/decompression, but max compression ratio of Huffman alg-m is only 8:1, which is much worse than for example WinZip
This app will take any file and bind itself into a Windows Bitmap (24 bit bitmaps preferred) This method is called "Steganography" This will also extract the file back out of it. And no, this isnt just tacking the file to the end of the file. It's actually alot more complicated than that. Oh yeah, and the bitmap wont change it's quality... good way to hide things from other people :)
demonstrates huffman compression/decompression
Compressing and Decompressing files with
This is a mathematical library that I coded about two months ago. I think it's a powerfull tool for those who need real strong and fast algorithms for complex math computation.
Huffman Tree Encoder is an implementation of the HUffman algorithm.I wrote a simplified version of the Algorithm for this program. The Algorithm is also available with the program.The program can generate codes for the symbols entered as well as display the tree for them. An included illustrative example explains this process.View the included HTML file for Algorithm,Program and the Example.
A hash table that stores key/pointer pairs. The table can handle either numbers or strings as keys, you specify which type it is when you create it.
Data Compression is a one of the most renowned branches of the Computer Science. Over the years, a lot of research has been done in this field to compress data into numerous ways and many standards have been developed. Data Compression can be defined as reducing the amount of storage space required to store given amount of data. Data compression comes with lots of advantages, it saves storage space, bandwidth, cost and TIME required to transmit data from one place to another. In this article we will throw light on Huffman Coding for data compression.
This code will sort an integer array using Heap Sort algorithm.
This is a step by step method to find the inverse of matrix of order 3.
The program takes an image file (ASCII) as input, displays it on the screen then asks for user to input the coordinates of point and a color to change the color of the image. Very neat example with sample image file included. A good demonstration of using recursive functions. Enjoy!
This tutorial will provide new comers to c++ a good understanding of class construction, important lines are commented!
This code will take a whole ip address
Implementation of AVL Tree which spent much of
Inheritance and Polymorphism Exercise
infix expresion chang to postfix
This code is a demostration of insertion of a Node in linked-list and printing the new list .
find out the codes for kruscal's algorithm.
fuzzy
algorithms
you must run th program or see the code to find out what it is.It is a famous algorithm and very cool ...
Search for the minimum or maximum k-entry node in a weighted graph.
A simple C function for k-means clustering of data points in Euclidean space.
A K Nearest Neighbours Classifier for the Vector Space Model
LANDo Code lets the user create his own code(own set of rules) for the letters of the alphabet and writes in a file("lando.ap") the encrypted text.For a future decryptor i added another file that keeps a letter by letter account of the code("landocode.ap")
UPDATED...
Loop invariants are very important in algo desin and code verification. This document explains about the Loop invariants at a beginner-intermediate level, that is other than the basic definations, provides with some formal formulation too.
Hello Programmers!!
Compares the time taken by the searches to search in an 8000 size array. can reuse the code in any program.
Demonstrates LZ compression decompression
MERGE TWO LINEAR ARRAYS
This program demonstrates using ADTs in the Standard Template Library (STL) to create an infix to postfix or Reverse Polish Notation (in honor of its developer Jan Lukasiewicz) calculator. This happened to be one of my first GUI programs developed in BC++ builder but it also includes a console project using the same functions in VC++. I've also tested the portability of the code in g++.
Have you ever wanted to count the lines of your code in C or C++ without the commentaries and blank lines,well with this program you can do it.
I was looking for a link list code here on PSC for my sis and couldnt find anything good. So made one myself. Posting here to help people like my sis. Its a Turbo C code.
evaluates logical expressions using a binary expression tree. Interface is for 4 variables only, but library is for n variables.
This is a global book search in a library database. This code is upgraded. The previous code is Library (in coding standars). This is (L 2) a very good global search algorithm.
A function that computes the longest common sub-sequence of two strings
This program calculate Mandelbrot set on parallely using MPI/LAM.It also render the set using xlib.It required gcc compiler and MPI to run and to compile, you need xlib development files.
This programm calculate the famouse Mandelbrot set and render it using xlib.(Compiled version included: As any *nix based OS have X11 or X server this program will run on any *nix platform )
Make or remove a con folder
Merge Sort, Insertion Sort, Radix Sort, Heap Sort, Bucket Sort, Quick Sort and Counting Sort.
Bubble Sort, BiDirectional Bubble Sort, Bitonic Sort.
There are 3 Types of Fibonacci Calculations Implemented.
This example introduces beginners on using main's parameters argc and *argv[] using File I/O! Excellent for learning how to use main's parameters and learn file i/o at the same time!
/* PROGRAM TO COMPUTE PRODUCT OF TWO MATRICES */
Shows basic usage of the apmatrix class and one algorithm to complete a magic square.
More examples in the spirit of Fazle Arefin's "swap magic" written as inline macros. The examples calculate the maximum, the minimum or the value of the (i,j)'th entry of a
Some magical functions to calculate the maximum, and minimum, the values of a unit matrix in the spirit of Fazle Arefin's "magic swap".
to print odd magicSuare
Encrypts and decrypts data using two c++ programs and a batch program
MathHead parses a simple mathematical expression, using order of operations, with a simple algorithm. BTW, rock the vote!
By accepting entries for Bitrate, Sampling Rate, and Time Length, the calculator can estimate the filesize of MP3s and also the number of frames per file. All of the entries are in Menu form for easy use
It converts any amount of months, even some in billions, to years. It even tells you how many years along with months if it doesn't convert equally. It also tells you the fraction of a year if the months are less than 12. I also included a Macintosh version, so both Windows and Macintosh people are happy. Enjoy!
In a mobile ad-hoc nerwork, there are several mobile stations with wirless transceivers with a limitted range of transmission. When two
Allows the user to test various sorting and searching algorithms
A couple of days ago, a guy named John Michael Tomakin wrote a program to create Magic Squares, you know, one of those old math games...Well, I downloaded his program and found it a little too complicated, so I told him that and made a simpler version of it, with a bonus, you can see 2 different algorithms: One that creates squares matching rows and columns and another that matches rows, columns and diagonals. I hope it is useful for somebody -> This is just a little code experiment, so don't need to vote for it...
[ 1] |> Bubble Sort
general library graphics,strings,sockets,math,matrix,vectors,file
For a student who looking for Code example
does matrix add and mul of two user defined sqare matrices
This program determines the number of ways of goint from grid 1x1 to nxn in a chess board style board containing nxn number of grids
Implemnts AND and OR gates using a neuron. Neuron is the basic unit of neural networks that are a active part of todays Artificial networks. This is simply the stucture of a simple neuron.
this code fild quctly wat betwean node
This 'C' code converts NFA (Non-deterministic finite Automation) to (DFA)Deterministic Finite Automation by Subset algorithm. NFA constructed from regular expression by Thomson's algorithm. (used to make Compiler or Interpreter). It is not complex code and shows Structs, Dynamic memory allocation, pointers and etc. (Compile it under C++ compiler)
it is a multithreaded version of netcmd
New RNG (Random Number Generator)
Web page : http://alexvn.freeservers.com/s1/huffman_template_algorithm.html
This code generates and writes output to an external file of a non fibanocci series upto user entered value. Fun and easy for beginners too.
This is numerical analysis code from one of my university assignments. It finds the roots of two different mathematical equations using the following methods: newton's method, the secant method, bisection method and the modified method of false position.
This is bezier curve for n-points. The formula i have used here was developed by Mr. asif baig. You just click of various points on the screen and then press enter . The programm would draw a curve
Graphical Animation to N-Queen Problem.
This is a flawless program that converts your integer input to words >> Input:17848 Output: Seventeen Thousand Eight Hundred forty Eight, and the code has great comments
Generates a number tree
Name : Network Socket Programming in C/C++ on Unix
This code is a calculator pojected in C plataform using many funtions with best algorithms. Enjoy!
The implementation of the program has been improved, the repetitions made by the program
shows atrianlge
Covert decimal to binary, octal, hexadecimal or binary, octal, hexadecimal to binary.
Compute a nearest-neighbour tour of a weighted graph, which is often used to initialize iterative optimization routines for traveling salesman problems.
A basic back propagation algorithm written in C++. It is written using Classes hence can be extended to be used in your applications too...
This program implements the open addressing linear hashing scheme which allows to map (and store) values associated with a certain key into a table. If collisions occur, the algorithm looks for the next slot and so on until an empty one is found. The hash formula is: hash = (key + (N/3 + 1)*i) modulo N, where N is the table size.
Understand the operators overloading in c++
Ode solver: Originally written to solve the Schr?dinger Equation this class is dynamic enough to solve almost any ode. See www.adampetrus.com for an example how to use the code
Shows how to crash programs using the buffer overflow
It calculates prime numbers upto at least 10000000000 using a parallel imlementation of seives algo. The parallel implementation drastically reduces the calculation time.
implements the pitagoras numbers until max
This programs is a simulator for processor scheduling.
Find all prime values up to whatever number you specify! Can be very easily changed to Vanilla C code instead of c++.
This code will print the larger and smaller of three integers (or numbers if you change the int to float) using nested if statements.
This article will explain you the preconditions and postcondition and thence the condition approach in desgning your program . These also help in veryfying the integrity of your programs.
Calculate the answer to a PostFix expression. Uses OOP to implement a stack to store the numbers and then remove the numbers off of the stack (class stack) Enjoy!
This is almost the same as my Reverse Polish calculator submission but this time uses a different technique called recursive decent parsing. You can use this to make a comparison of the two methods. This program is at home in vc++, c++ builder, and g++.
Calculate hexidecimal values of pi digits
This program will calculate the nth Fibonacci number,
simple function to calculate the power of any number
to findout the minimum spanning tree.
This program randomly generates values and stores them in a 10 element array and thereafter prints the element and value within aswell as the histogram for the element value!.By re-running this program numerous times differentvalues will be automatically generated!
postfix calc
Recursive search through all sub directories from the root directory specified for files with specified extension. Use the function processfile(sFileName) as a hook for your parsing code.
CPU Page Replacement algorithm Least Recently use(LRU). It uses how the pages are swap from Main memory to secondry memory.
In this Program I am showing how page frames are going to be handle in the RAM and Harddisk. And how pages are going to swap Harddisk to RAM. RAM have Less space than Harddisk but it is more faster than harddisk.
Checks if the entered number is a prime
Basically chks the parantheis, chks whether all the open curly brackets r closed or not, if not then it prints out an invalid string message :)
Accept initial values from user and complete the PERT table
This console program is a relatively simple demonstration of an efficient way to see whether a number is a prime number or not.
Particle atraction with OpelGL
Cardgame consits of 52 card ,randomly shuffling and give five card to two poker. Determine each poker contain a pair , tow pairs , three kind (e.g three jacks ) or four kind (e.g four queens).And flush, straight , or straight flush
Generates prime numbers using Eratosthenes's algorithm. Total rewrite. This version adds command line options, is slightly faster, halves the memory footprint, and fixes an error where (25) was occasionally listed as a prime.
This program displays all of the permutations of a string.
Reverse Stack recursively i.e., from LIFO to FIFO recursively.
RSA key generation, enjoy and remember me in your prayers
To calculate the postfix expressions
The Rijndael Encryption algorithm has been recently recognized as an AES (Advanced Encryption Standard). It was recently (April 2001) released in Visual Basic. The source code here is for Micro$oft Visual C++ 6.0 for developing and testing. Have fun with it! More information can be found at: http://csrc.nist.gov/encryption/aes/rijndael/ --or at -- http://fp.gladman.plus.com/cryptography_technology/rijndael/index.htm (the second URL explains the specs and test vectors in C, etc.
This program uses the Runge-Kutta method to solve a second order differential equation and plot the results.
This program uses simple programming techniques
This program will calculate the nth Fibonacci number,
reverse of number
VERRY VERRY FUN PROGRAM FOR WHOM LOVE MATH .This program is Root funtion with out using <math.h> only <stdio.h> and <stdlib.h>.
this program prompts the user to input any integer of any size desired
if you want to find out the shortest path then please go for this code. it will really help you out & don't foget to vote for me. Thanks.
Generates Basic Magic Squares when Given a Sum.
Software rendering algorithms, implements: point, wireframe, Lambert, Gouraud, Phong/Blinn Lighting models, texture mapping, tangent space Normal/Bump mapping, colored lighting, includes several meshes, textures, and normal maps, uses a proprietary mesh format, but will load wavefront.obj meshes as well..
A small project aiming to prove a theory that grids can be solved using only the "possible value" method, whereby the numbers are filled in according the condition that that position has only one possible value, in filling this in, possible values matching this number on the same x and y axis, and "block" are removed, thus allowing space for more single possible value positions. This cycle is repeated until the grid is complete.
animation and queue implementations