2,322 Reusable Code Snippet Topics
Remove Filter ![]() | |
Iterative and recursive programs.these programs have been tested and run very well.enjoy | |
.,'this program will simply creates a diamond using asterisk.,' just try out this code i am sure you will be interested.!.. email me about your comment in this simple program!..help me if you know the easiest way to construct this kind of program..' | |
![]() | Hi from Begueradj, This program written in Turbo C simulates a student data bases using files. Basic operations such as seeking for a given student, deleting, adding and sorting are implemented here. Feel free to give me your points of view. Thanks, Begueradj. ![]() |
Text to speech can be implemented in its simplest form using Microsoft's Component Object Model (COM) connecting to the Speech API (SAPI). The attached Python code shows you how to do this. | |
The code prompts the user for a student name and the marks then prints out the report with a letter grade..It also asks the user for the file name and stores the data in the file. | |
This short Python snippet shows you how to read mouse wheel events with the Tkinter GUI toolkit. Windows and Linux have different bindings and read different events, but can be included in the same program code for use with either operating system. | |
This class Generate A unique string. You can concatenate Timestamp to this Unique String and use it as Unique ID | |
This is a very simple program that uses text mode to display a boucing "ball." The ball is just a character that moves across the screen, erasing all in its path. It is coded to work like a screensaver, so the program ends when any key is hit. NOTE: I … | |
Just copy and paste the snippet into a file and save. You need to save this under the web root, not in a web accessible folder. For example, on linux you could save it in your home directory. Say your user is "joe" then save it in /home/joe/ . Ify … | |
Just post simple code. Give a feedback if it helps u :) | |
EventViewer can be accessed by Selecting Event Viewer from Administrative Tools of Control Panel. This code snippet will add an Entry called Shalvin inside the Application section. | |
This well commented Python snippet uses wxPython's plotting widget to graph the projectile motion of two different firing angles on the same plotting canvas. | |
Uploading a file to a specific folder inside the virtual directory. | |
| |
aspnet_regsql is a tool user for installing membership, role and personalization tables to Sql Server. 1. Porting all tables to Sql Server 2. Porting only membership tables to Sql Server 3. Removing all membership and role tables 4. Removing Personalization tables. I am be posting a detailed blog on Membership … | |
Web site Administration Tool is accessible only from the hosting server. Many times programmers won't have direct access to the the hosting server. So knowledge of ASP.Net Membership classes is an added advantage in creating an administrative module for the site. In this code snippet we will take up: 1. … | |
CAS is the programatically means by which you secure the resouce of a system like file system, printer, registry, etc. in contrast to Role Base Security (RBS) | |
Enables creating substring arrays from strings seperated by character sets . | |
Hi all, Have you ever heard of "Petals Around the Rose?" It's a logic puzzle. The way it works is, I roll five dice, then tell you what the "score" is for this round. I can repeat this for you as many times as you want. It's your job to … | |
Here is the code to write a serverSocket which listens on a given port. I have used a dummy Socket to change serverSocket's port dynamically. This method uses a inner class which is basically a thread and it creates a serversocket in thread by given port no. If you want … | |
Serialization is the process of saving the state of an object into persistant medium. BinaryFormatter class is used for serializing and deserializing an object. HybridDictionary is optimized for key-based item retrieval from both small and large collections. | |
Though .Net classes are vast and versatile at time you will have to resort to Win32 API calls for accomplishing certain tasks. The following code shows a simple example of invoking a Win32 api. The best way to use Win32 apis is to encapsulate it in a class module. The … | |
TreeView was one of my favourite control in COM. It is well suited for creating Chart of Accounts, Hierarchical data and the like. Though there is a tree view in .Net I find it less flexible in comparison to COM TreeView. The issue with using COM TreeView in C# is … | |
Easy way to showing messageboxes in asp.net using c# | |
Hi this is a very simple program explaining of Threads using the runnable interface. I hope this will help in some other way.:) | |
Set page's scroll position programmatically according to server side processing | |
I use GetTickCount in a lot of my applications, so I built this snippet to convert to hours minutes and seconds. Leading extraneous data is excluded from output. | |
[URL="http://www.bitstorm.org/gameoflife/"]Life[/URL] is a "game" or cellular automaton - an evolving computational state system - developed by a Cambridge mathematician named John Conway. The idea is simple: start with a board of dimensions (x,y). Populate the board with an initial pattern of occupied and empty cells. In every turn, the rules … | |
SelectTopFrom method gets the top rows from dataview or datatable | |
when you have long web pages, your users may be confused scrolling within your pages because built-in javascript scrollIntoView method makes the page move suddenly. ScrollToControl method moves slowly enabling the user to keep track of where he/she is going. | |
by using the code below you can bind your enums to your dropdown lists Serkan Åžendur | |
Just playing with the no. points used in the program: 1. Even no cannot be prime except 2 2. % division of odd by even cannot be 0 | |
Just playing with the no. points used in the program: 1. Even no cannot be prime except 2 2. % division of odd by even cannot be 0 | |
Good day, here is one of the commands that will allow you to get sound in your program. It was compiled using DevC++. | |
Nothing but the VERY HARD Work out for long day and night. It was actually i made it for my project work which my friend loved it very much. This might be the useful stuff to you also. Ya Now days rarely anyone uses the BGI stuff but also it … | |
This program generates lines of pascal's triangle, numbers after 23 generate weird output. | |
Sometimes you want to accomplish something with a minimum ammount of code. Here is an example of using modern Python concepts of lambda, list comprehension and all() to create an anonymous function that returns a prime list from 2 to n. | |
This program takes a parameter, which is how many prime numbers you need. However if you want to make a program which checks whether a number is prime or not you can delete everything in the main function and put this line instead: cout << isPrime (argv [1]) ? "It's … | |
Two methods for two distinct needs when splitting a string | |
This program uses snipets from a couple of other programs that I put together in order to make a program that displays the time and date and refreshes the time and date every second. I commented practically every line to explain, as far as I know, what it does. If … | |
Frequently, you may need to isolate words in a phrase. In this example, we'll use substr to carry out this task. | |
This is a neat little program to calculate the date of easter in any given year. The principle is based on the julian calendar. | |
Visal has contributed code for computing a formula. I have updated his code to reflect vb.net coding style. I have also refactored the code, so it is easier to understand. I have not checked the code. The vb.net project files are as attached. Jerry Dusing (email: [email]jerrydusing@yahoo.com[/email]) | |
| |
A little program to convert angles to and from Decimal degrees, Degrees decimal minutes and Degrees minutes decimal seconds. | |
First off, C++ does not know anything about the I/O device you are using. It can be a keyboard and monitor, or a file, or a network connection, or anything which can do I/O. What that means is that there is no standard way to do this in C++. That … | |
First off, C does not know anything about the I/O device you are using. It can be a keyboard and monitor, or a file, or a network connection, or anything which can do I/O. What that means is that there is no standard way to do this in C. That … | |
Written using Boa Constructor, with code added to do the conversion from C to F or F to C. The code has been altered to give a single file so don't open it in Boa Constructor. |
The End.