132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for vicky_dev

This program prints the prime factors of a number. Eg. 56=2x2x2x7 .I've heard its really important and stuff.I believe it is really efficient and simple. Uses two functions : one to check if a number is prime and other to return the next prime number.

Software Development c
Member Avatar for bofarull
0
172
Member Avatar for letmec

This is a program to calculate the n-th root of any number. This program uses the NEWTON_RAPTION_ITERATION method for calculation. The general formula to find the n-th root of any number is : *-------------------------------* * (((n-1)/n)*x0) + (1/n)*(N/d) * *-------------------------------* where n =1,2,3............ (n-th root). x0 is First approximate root. …

Software Development c
Member Avatar for vegaseat
0
174
Member Avatar for anurag_pareek

In this program i had just extracted the modulo of the number given,and keep on adding it in linklist. later on,i reversed the link list and displayed the result. By:-- Anurag Pareek

Software Development c linked-list
Member Avatar for Kellaw
0
590
Member Avatar for anurag_pareek

VIRTUAL PIANO It's a very simple sound program , Input device is mouse. Sound function is used to produce output.Working is very simple based on seven natural freqencies.Move mouse over keys for sounds. Change range and note the difference.

Software Development c
0
201
Member Avatar for anurag_pareek

This is a simple balloon shooting game made in C language. In this game, there are number of balloons, a bow and arrows for shooting the balloons. The balloons rise from the lower portion of the screen. The bow is put on left side which can move up and down. …

Software Development c
Member Avatar for luna19
0
984
Member Avatar for johnroach1985

This program searches the given txt file.And tells you how many there are. Just a reminder don't forget to put the searced txt file in C: or change it accordingly for more info or questions [email]Silver.Lost.Raven@gmail.com[/email] have fun!!

Software Development pascal
0
546
Member Avatar for Dave Sinkula

Obtaining user input can be done in many surprisingly different ways. This code is somewhere in the middle: safer than [inlinecode]scanf("%d", &n)[/inlinecode], but not bulletproof. It is meant to be a simple but relatively safe demonstration. The function [inlinecode]mygeti[/inlinecode] reads user input from the stdin into a string using [inlinecode]fgets[/inlinecode]. …

Software Development c
0
1K
Member Avatar for Dave Sinkula

This snippet shows how to use the functions [inlinecode]time[/inlinecode], [inlinecode]localtime[/inlinecode], and [inlinecode]strftimetime[/inlinecode] to pick off only the time parts for display.

Software Development c
0
132
Member Avatar for Dave Sinkula

Some issues with date/time calculations. [Perhaps I ought to edit this one day and better describe it.]

Software Development c
0
132
Member Avatar for Dave Sinkula

To check for integer overflow, you can't simply check the [i]outcome[/i] of an operation, you need to check [i]before[/i] the operation. So how do you do that? This example checks for overflow with multiplication.

Software Development c
0
357
Member Avatar for Dave Sinkula

This is yet another example of reversing a string. This version modifies the original, reversing the string in place. [I]See also [url=http://www.daniweb.com/code/snippet522.html]Strings: Reversal, Part 2[/url][/I].

Software Development c
0
615
Member Avatar for Dave Sinkula

This problem is a typical homework question. The code presented here may contain some elements that may be a little "ahead of the game" in coursework, but it presents some of the basic elements that might be used in such an exercise.

Software Development c
Member Avatar for Sealteam56
0
246
Member Avatar for vegaseat

Where you ever curious what the most common letter is in a typical text file? Just another question to ask a friend. The answer is right here in this tiny code snippet. The program converts the text to all lower case letters, and then list them out alphabetically showing the …

Software Development c++
Member Avatar for programtrav
0
189
Member Avatar for rhenerlau

Place the file with part one of the code on the server. This part of the code gets placed in a batch file (text file with the extension *.BAT) and placed on each client's machine. Again, you will need to change the paths used to the real paths on your …

Software Development client-server visual-basic
0
169
Member Avatar for pankleks

It is a small two-in-one calculator that can work as a regular or RPN calculator, selected by a RPN checkbox. It has a four level stack similar to the HP 48 calculator made from four Tmemos. This code shows you how to make visual effects(RPN stack) from existing delphi components. …

Software Development delphi pascal
0
197
Member Avatar for ShawnCplus

This is the first program I wrote, well besides Hello world. I put about a lot of hours into this code, it started as a divisional calculator than i evolved it so it would ask your name and calculate your average and i was messing around with the system ("") …

Software Development c++
Member Avatar for ShawnCplus
0
889
Member Avatar for aj.wh.ca

This is a bit more tough than it sounds. well some one gave me this problem and I found this tricky not until I used recursion.

Software Development c linked-list
0
790
Member Avatar for Tight_Coder_Ex

There are numerous calls to Win32 API that return detailed information as to failure via GetLastError (). I've devised a method by which to get the textual information corresponding to error and the address of the call that caused the violation. If GetLastError () returns null, then it can serve …

Software Development api assembly
0
324
Member Avatar for vegaseat

Just a simple way to separate the words contained in a sentence. As an option you can store the words in a vector. If you are not familiar with a vector, use an array instead.

Software Development c++
0
192
Member Avatar for vegaseat

I look at BCX-basic as a modernized qbasic. This simple code creates a Windows GUI program that plays a midi instrumental music file. To keep it simple, the file it looks for is "TheRose.mid" file. If you don't have this file, you have the option of editing the code, or …

Software Development file-system gui
Member Avatar for billzilla
0
222
Member Avatar for vegaseat

Remember the Spirograph? It used geared circles to create some rather artistic geometric designs. This program uses triangles to follow in the Spirograph's foot steps. The math is rather simple, just a couple of sine and cosine functions, also the ubiquitous for loops, everything wrapped up in the using() statement. …

Software Development c#
0
174
Member Avatar for Comatose

A Simple Function To Generate A Random Password Of A Given Set Of Characters

Software Development visual-basic
Member Avatar for willdove
0
314
Member Avatar for Narue

A fairly complete implementation to provide another perspective on a seemingly simple program.

Software Development c
Member Avatar for Ene Uran
0
146
Member Avatar for TkTkorrovi

A very rudimentary more, press enter to view next screenful of text, like with print command in ed text editor.

Software Development c
0
104
Member Avatar for TkTkorrovi

Similar to cat in unix textutils. You can actually edit files with these. Remember that ctrl-z sends end-of-file in windows, and ctrl-d in linux.

Software Development c unix
Member Avatar for Dani
0
105
Member Avatar for TkTkorrovi

Text fragment extractor (usage: fragment /pattern/[n] [/pattern/[n]] file), similar to the print command in ed and vi, with pattern range. If the second pattern is omitted, prints to the end of file. Use quotation marks when there are spaces in the argument. Finds the first pattern, then the second pattern, …

Software Development c
0
130
Member Avatar for vegaseat

The code shows you how to create a window without a titlebar that can be dragged with the mouse. Set the FormStyle property to fsStayOnTop. The form contains a small 18 button calculator. When you create the form and calculator components, try to make it tiny, it is cute that …

Software Development delphi pascal
0
322
Member Avatar for Mahen

Chargen is a program created entirely by mahen of Mauritius. The simple task of Chargen is to generate characters, but the most important aspect of this particular program is it's abillity to process user input. Due to the way the program was programmed, any input that the user will make …

Software Development c++
0
376
Member Avatar for Siersan

Unlike a balanced skip list, a probabilistic skip list uses random numbers to determine the height of each node rather than deterministic logic. The only real advantage of using a linked structure instead of an array based structure is in code maintainability.

Software Development c linked-list
0
106
Member Avatar for Siersan

Array based skip lists are a pain to work with. They are error prone and difficult to follow. Worse, they are difficult to extend so that the data structure is deterministic rather than probabilistic (a desirable property). The following implementation uses a linked structure instead of arrays for the levels.

Software Development c data-structure
0
147
Member Avatar for VSBrown

A program that reads in two integers and determines an prints if the first is a multiple of the second.

Software Development c++
0
197
Member Avatar for VSBrown

A program used to calculate each employee's pay based on that employee's paycode.

Software Development c++
Member Avatar for freckman1981
0
2K
Member Avatar for VSBrown

A program that inputs three integers from the keyboard and prints the sum, average, product, smallest and largest of these numbers.

Software Development c++
0
200
Member Avatar for VSBrown

Find all Pythagorean triples for side1, side2 and hypotenuse in which all sides are no larger than 500. Use a triple nested for loop that tries all possibilites.

Software Development c++
0
2K
Member Avatar for VSBrown

A program that asks the user to enter two numbers, obtains the two numbers from the user and prints the sum,product,difference, and quotient of the two numbers.

Software Development c++
0
464
Member Avatar for VSBrown

Uses only integers for monetary values to calculate compound interest.

Software Development c++
Member Avatar for Ene Uran
0
188
Member Avatar for VSBrown

Uses the string comparision functions and the techniques for sorting arrays to alphabetize a list of strings. Uses the names of 10 or 15 towns in your area as data for the program.

Software Development c++
0
992
Member Avatar for VSBrown

A test program that will call the PROC findGCD, passing in the integer values input by the user and then it will display the results to the screen.

Software Development assembly
0
637
Member Avatar for VSBrown

A program that will test the Nonrecursive Factorial procedure using a value passed in by the program user and will also do a time comparision of the Nonrecursive and Recursive Factorial functions.

Software Development assembly
0
598
Member Avatar for VSBrown

Will demonstrate dumping the registers.

Software Development assembly
0
2K
Member Avatar for Tight_Coder_Ex

Additional features will be added to this section of code such as fixing window size proportial to monitors resolution and subclassing the single edit control of this program. You'll notice I don't call ShowWindow here as WS_VISIBLE in windows style is defined.

Software Development assembly
0
261
Member Avatar for eagleeye

A program that plays a MIDI file and stops it, and than starts a different MIDI file. The same concept applies to .wav files mciSendString("play the_file",NULL,0,NULL); starts playing it, and as expected mciSendString("stop the_file",NULL,0,NULL); stops playing it.

Software Development c++
Member Avatar for tamtamtaramtam
0
853
Member Avatar for Tight_Coder_Ex

I've often wondered why M$ didn't make creating a window a simple as registering a class in that only one 32 bit value need be passed to calling routine. Although this is not ground breaking code design it does facilitate calling code only set EBX to point to all values …

Software Development assembly
Member Avatar for vegaseat
0
186
Member Avatar for Tight_Coder_Ex

I prefer to use this method as it doesn't clutter a windows procedure with dozens of conditionals and it address my primary objective of coding as tight as possible [28 bytes]. If you think my method can be improved upon in size and/or speed please post your solution. Note: I …

Software Development assembly
0
212
Member Avatar for Tight_Coder_Ex

The next few posts will be what's required to get a window to display on the monitor. The code between Main & Pump will probably change as time goes on, but for now this is all that is required. I choose this method or placement because only 28 bytes of …

Software Development assembly
0
220
Member Avatar for Tight_Coder_Ex

These are a pair of routine I use quite often. I know MemSet is virtualy the same as ZeroMemory in kernel32.dll, but there may be a time I want to use these in an embedded system where this dll won't be avaliable.

Software Development assembly
Member Avatar for vegaseat
0
206
Member Avatar for Tight_Coder_Ex

As part of a larger hobby project that I'm undertaking being a doubly linked list for 95/98/XP, this is the first in a series that I will be posting. Upon completion, I will have a complete application written in assembly for the Windows platform. Compiled with NASM

Software Development assembly linked-list
Member Avatar for Dani
0
218
Member Avatar for vegaseat

Many moons ago I wrote a Delphi program that could tell the exact character in a ListBox, as you clicked on it with a mouse. I found a little info on the NET that lets you get at least the item in a ListBox using C#. I made it work …

Software Development c# delphi
0
267
Member Avatar for vegaseat

You can look at a selected file's date and time stamp and change it with this Delphi program. XP files need a little extra TLC, but it's taken care of too.

Software Development delphi pascal
0
548
Member Avatar for vegaseat

A data stream is used to load a bitmap image and convert it to a jpeg image. The converted image is displayed and saved to a .jpg file.

Software Development file-stream image pascal
0
1K

The End.