199,114 Archived Topics
Remove Filter ![]() | |
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. | |
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...) … | |
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. | |
This is Delphi code, just testing if there is some interest. | |
This simple program will draw several randomly sized and colored lines on the screen. Makes a good screensaver! | |
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 … | |
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. | |
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. | |
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++ … | |
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. | |
This is Similar to the Previous Snippet, but it puts indivdual pixels of different colors randomly on the screen. Also makes a nice screensaver! | |
Ok, this is about as simple as it gets. This is a hit counter for your page that stores the count in a simple text file of your choosing. No need for a database, MySQL or otherwise. No complicated rubbish. Just one single function and one single file to store … | |
Well like my previous snippet but completing the collection i suppose, this snippet counts how long it takes to parse the page and displays it somewhere.. | |
You've seen those sites that say how many seconds it took to parse the page and how many database queries comprised the page. Well heres the database query bit... | |
| |
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 … | |
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! | |
Put it in you footer at Admin CP->Board Wrappers, and underline will disappear for username links. This code only makes sense when you have underline enabled for links in your CSS. | |
Have you ever wanted an arcade for your forum? Well now you can! The best part is you can play the games from x arcade at your forum, and not at some site! The instructions are easy to understand, and in no time you will have an arcade! Unlike If … | |
Add to....Board Wrappers: Footer No need to really change anything in the code, if you want to select a different default URL just change the variable in the top of the script. It's there so that at least some URL is added to the website url field. You can't add … | |
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. | |
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 … | |
If query is called getResults and your field name is called myField To change to 2-across or 3-across, or whatever, just change the MOD 4 to 2 or 3 or whatever number you wish. | |
Change Your_Query to match your query name, Your_data to match your field name(s), and change the colors (ffffff and dadada) to match the colors you want. | |
Change the yourActionPage.cfm to the name of the page you want to open, and adjust the sizes and other parameters as you need. | |
Alrighty! My goal here is to add the specified information into a MySQL database, but then also include a script that goes back and checks to make sure that the entrie given does not already exist. If you have any corrections, or any ideas on how to do this, I'd … | |
Hi, this is my first post here, just wanted a place to post some PHP code for a Savant2 plugin I created. I hope that's ok. If you've never heard of Savant/Savant2, you should definitely visit its website. Savant is a very elegant template solution for PHP that stands out … | |
| |
There are probably a few different version of this...here's the one I use which I find pretty simple: | |
Simple CLS for Resizing CTLs on a FRM | |
A simplistic program to compute the volume of a cylinder when its radius and length are input via MyInput.class | |
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. | |
A short example of passing variables between methods (functions). | |
The JOptionPane class is used to give the CompMortgage.java program a front-end GUI interface. The class is divided into numerous functions. | |
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. | |
A demonstration of introductory object oriented programming. A class to define a circle object with radius, area, and perimeter parameters. | |
This program consists of two functions in one class. It is the driver program for the CircleClass.java file. | |
A program similar to CircleClass.java which defines a rectangle object. ClientProgram.java is the driver program for the Rectangle.java file. | |
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. | |
A program combining a switch statement with static variables in a class. Based on the switch statement, a class object is dynamically created. | |
Nothing fancy, but I know many new programmers are often confused about recursion. Recursion simply is when a method calls itself. What MyTree does is it adds nodes to the root node, then that root node can be used to create a JTree. The populate() method reads in a list … | |
| |
Here is a code to sort numbers instead of strings using the BubbleSort method. The difference here is you don't use compareTo() for numbers as you do with strings. | |
Hi Dani, fine Examples (the others too) to learn programming Java, but where is the MyInput.java class? Thanks Eddi | |
This program consists of two functions in one class. It demonstrates a recursive function to calculate the factorial of a number. | |
Hi everyone, I've been working on this calculator for days, and now i am making it opensource so that everyone can bring his own contribution, please comment all your codes very well. |
The End.