132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for OurNation

When this program is run it asks for the coordinate grid points, then it processes that and the result is the run rise and slope.

Software Development java
0
278
Member Avatar for eagleeye

A simple demostration of how to clear the console screen in at least Dev-C++ 4.9.8.0 (I don't know about the other since I've only tried it on this one, but may and probably works,, with few if at all minor adjustments), what more can I say, other than it's not …

Software Development c++
Member Avatar for ankit_the_hawk
0
308
Member Avatar for Mahen

Setcolor was entirely programmed by Mahen of Mauritius. Who have never wished of changing the Font colors of the Command Prompt on the fly. Well this is where Setcolor comes in handy. The main function of this program is to change the default Font color of your Command Prompt. The …

Software Development c++
Member Avatar for berkcan
0
316
Member Avatar for vegaseat

Shows a basic way to create a form with a wallpaper image on it. Also shows how to add a transparent label to blend in with the wallpaper. Getting the label to be transparent wasn't all that commodious! The wallpaper is generated using a texture brush and bitmap image. The …

Software Development c#
0
3K
Member Avatar for jarn

Use layers to create plots within a browser. Each point to be plotted is rendered via a layer (using the DIV tag). Mozilla/Firefox/IE seem to handle thousands of layers without any problem. Can attach event handler to each point for additional interactivity. Snippet example is housed within a JSP at …

Software Development java
0
112
Member Avatar for vegaseat

One more look at BCX basic code to show the qbasic programmers how they can modernize. This shows a function that converts an integer value to a binary string. Notice that with BCX basic you need to declare your variables. Makes the code a little easier to read too. Variable, …

Software Development qbasic
0
462
Member Avatar for Dave Sinkula

In [url=http://www.daniweb.com/code/snippet149.html]Part 2[/url], you may have noticed that the bits representing the [i]value[/i] of an [font=courier new]unsigned int[/font] did not appear to match the bits representing the [i]object[/i]. This is because of the [i][url=http://en.wikipedia.org/wiki/Endianness]endianness[/url][/i] of my implementation. When it comes to displaying the bits of objects that take more space …

Software Development c
0
146
Member Avatar for Dave Sinkula

In [url=http://www.daniweb.com/code/snippet148.html]Part 1[/url], I chose [font=courier new]unsigned int[/font] as the type to use for displaying the bits of a value. The same general procedure can be done with other types as well. The biggest issue really is the expression which generates the most significant bit, for which there are a …

Software Development c
0
406
Member Avatar for Dave Sinkula

It is often instructive to display the bits of a value. (This is similar to 'converting' an integer to binary.) The way I have done this in this snippet is to start at the most significant bit and work your way through all the rest of the bits. (Continued in …

Software Development c
0
378
Member Avatar for pcpalct

Yep. I have no life. Here's the simplest and stupidest form of C++ coding ever known to man kind...the change counter. What does it do? Count change :-)

Software Development c++
0
249
Member Avatar for vegaseat

This shows you how to create a Windows GUI program in BCX basic and embed the Media Player in the form. It will give you a fully functional player with a 30k executable size for your MP3 files. The needed header files and library files are included in the BCX …

Software Development gui
0
236
Member Avatar for vegaseat

New to me, but MS InternetExplorer does have COM support you can access from basic code. I had to test this out and make it work. We are using BCX basic, one of the successors to Qbasic.

Software Development html-css
0
193
Member Avatar for vegaseat

Another look at BCX basic. Here we use COM support to manipulate Excel. In other words, from within the basic code we are entering a few numbers into the Excel spreadsheet and add them up. Of course you can do much more powerful stuff. With COM support you can also …

Software Development
0
156
Member Avatar for Dave Sinkula

This is a very common task for a beginner programmer. Unfortunately many beginners do not seem to understand the question. First, know that binary, decimal, octal, hexadecimal, and others are simply [i]representations[/i] of values. The value of 123 (decimal) still has the same [i]value[/i] if it represented in hexadecimal (7B), …

Software Development c
Member Avatar for al3x748769
0
542
Member Avatar for vegaseat

I just had to do this to see how it would look like in the code field. This small prime number generator is written in BCX basic, a mildy more modern basic than Qbasic. With BCX basic you can throw in C and assembler code and it would actually compile …

Software Development
Member Avatar for vegaseat
0
110
Member Avatar for Tom Pilk

This is a little program in QBasic which counts the number of characters in a string. Made by Buff - two errors removed by me. Thanks Buff.

Software Development qbasic
Member Avatar for rhenerlau
0
130
Member Avatar for vegaseat

Sooner or later a Csharp snippet had to appear. This one builds a form containing a set of buttons. A bitmap drawing area is used to draw a series of circles with random color, radius and center location. Your creation can be saved as a jpeg image file. You can …

Software Development c#
Member Avatar for borjelewin
0
3K
Member Avatar for vegaseat

Many of you know how I like to use sound to make the old computer box more interesting. The midi file packs a lot of neat instrumental music. It is very simple to play, even in a console application, using the winmm.lib file that comes with just about any Windows …

Software Development c++
Member Avatar for evilsilver
0
250
Member Avatar for 1o0oBhP

Log files are useful things. They are used in programs to display the values or variables or other useful information such as what the program is doing. This is useful is the program crashes at some point or is not behaving as it should. By writing values and events to …

Software Development c++
Member Avatar for Rodan
0
184
Member Avatar for vegaseat

This Delphi procedure sends the text contained in a multiline editbox (memo in Delphi lingo) to a printer. The font and font size can be specified.

Software Development delphi pascal printer
0
247
Member Avatar for 1o0oBhP

An introduction to the Win32 GUI. The code creates a simple window that you can play with. Many parameters can be changed if you like! The unusual thing about windows apps is that rather than directly handling inputs (ie the position of the mouse / what control has focus ect...) …

Software Development c++ gui queue
Member Avatar for bumsfeld
0
632
Member Avatar for vegaseat

Just to give you an idea what Delphi can do, here is a plot of the ever popular sin(x). I have put enough information into the code comments so you can build the form. The PaintBox Paint Event takes care of the plotting.

Software Development delphi pascal
0
973
Member Avatar for vegaseat

This is Delphi code, just testing if there is some interest.

Software Development delphi pascal
Member Avatar for eddie-jdp
0
209
Member Avatar for DeFrog777

This simple program will draw several randomly sized and colored lines on the screen. Makes a good screensaver!

Software Development pascal
Member Avatar for Dani
0
207
Member Avatar for 1o0oBhP

A singly (sp) and a Doubly Linked list class to create linked lists. Can be used to make dynamic arrays and could also be templated to work with any data type (this is old code and i didnt know how to at the time). Has been extremely useful to me …

Software Development c++ linked-list
Member Avatar for 1o0oBhP
0
112
Member Avatar for harshchandra

This program finds the solution of system of simulataneous equation Using GAUSS SEIDEL METHOD. This method is very popural among the students who studies Numerical Techniques.Though this program cant find the solution of every equations,it is widely used.This can only found the solutions of those equations which are Digonally dominant.

Software Development c
0
280
Member Avatar for vegaseat

What is so easy to do in HTML gets quite involved in C. Once you learn to look past the standard GUI overhead it becomes more obvious. This example shows the effect of the mouse cursor moving across a label by changing foreground and background colors.

Software Development c gui
0
220
Member Avatar for vegaseat

This snippet shows how to draw a red circle on a Windows form. Original code via BCX, modified to compile with Dev C++. The GUI code looks a little complex. Gets simpler, once you get past the required overhead. For those who need some hand holding with the Dev C++ …

Software Development c++ gui ide
0
2K
Member Avatar for ALT-F4

This small program simply allows the user to call two different methods passing along an interger value to each. One method will output numbers from zero utnil that integer value using iteration. The other method outputs numbers from zero to that integer using recursion.

Software Development java
Member Avatar for Dani
0
192
Member Avatar for DeFrog777

This is Similar to the Previous Snippet, but it puts indivdual pixels of different colors randomly on the screen. Also makes a nice screensaver!

Software Development pascal
Member Avatar for yvesli
0
329
Member Avatar for BlackDice

returns TRUE or FALSE depending on whether or not a file exists

Software Development c++
Member Avatar for venomlash
0
122
Member Avatar for BlackDice

this is a wrapper around the AnimateWindow API. this allows random animations in a dialog. I just call it in the dialog's OnInitDialog() handler. The 'fade' effect has not been implemented because I didn't like the idea of having to call RedrawWindow or something like that because sometimes the borders …

Software Development api c++
Member Avatar for Satil
0
159
Member Avatar for BlackDice

Returns the name of a folder in a CString after allowing user to browse for it. This is just a wrapper around the SHBrowseForFolder API, but it's great for only allowing a user to browse for folders!

Software Development api c++
0
197
Member Avatar for chound

This programme can find the dimensions of cuboid and cylinder. In cuboids it can find missing dimensions also. Eg. if length is missing and volume is given it will find the length.

Software Development c++
0
430
Member Avatar for chound
Member Avatar for bumsfeld
0
213
Member Avatar for C#Coder

Adding this because it took literally an hour of searching before I found a code sample using fscanf that read more than just the first line of a file. This code assumes you're reading a file line by line that has the angle (int) followed by the Sine Value of …

Software Development c
0
4K
Member Avatar for Paladine
Member Avatar for SleepDepD
Member Avatar for SleepDepD

There are probably a few different version of this...here's the one I use which I find pretty simple:

Software Development visual-basic
Member Avatar for mjwest10
0
234
Member Avatar for SleepDepD
Member Avatar for SleepDepD
0
139
Member Avatar for Dani

A simplistic program to compute the volume of a cylinder when its radius and length are input via MyInput.class

Software Development java
0
191
Member Avatar for Dani

A simple demonstration of how MyInput.class can be used to input data from the keyboard. Computation is then done to compute the interest rate on a mortage.

Software Development java
Member Avatar for holmes008
0
201
Member Avatar for Dani

A short example of passing variables between methods (functions).

Software Development java
Member Avatar for p.bondam
0
201
Member Avatar for Dani

The JOptionPane class is used to give the CompMortgage.java program a front-end GUI interface. The class is divided into numerous functions.

Software Development gui java
Member Avatar for diamonddog
0
181
Member Avatar for Dani

A single class consisting of multiple methods is used to demonstrate the robustness of keyboard input in Java. A try-catch block is used. The program graphically prints out a square root table by using JTextArea, JScrollPane and JOptionPane.

Software Development java
Member Avatar for Ghost
0
232
Member Avatar for Dani

A demonstration of introductory object oriented programming. A class to define a circle object with radius, area, and perimeter parameters.

Software Development java
0
274
Member Avatar for Dani

This program consists of two functions in one class. It is the driver program for the CircleClass.java file.

Software Development java
0
196
Member Avatar for Dani

A program similar to CircleClass.java which defines a rectangle object. ClientProgram.java is the driver program for the Rectangle.java file.

Software Development java
0
2K
Member Avatar for Dani

Two classes which aim to demonstrate private and public members of a class. A static variable is used as an accumulator to keep track of the number of class objects which are created.

Software Development java
Member Avatar for tunstar
0
255

The End.