199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for TkTkorrovi

Replaces every occasion of the pattern, or only the first occasion if there is a subexpression, between \( and \), anywhere in the regular expression, as repeated replace is not what one would expect in that case. The string size is restricted in POSIX regular expressions to the size of …

Member Avatar for xaviv
0
1K
Member Avatar for darkscript

This filters out the letters and numbers in the parameters you give it.

Member Avatar for hinduengg
0
127
Member Avatar for Sturm
Member Avatar for vijayan121

a string which can be used ala std::string, preserves case, but comparisons are not case sensitive.

Member Avatar for ~s.o.s~
0
463
Member Avatar for Arman Majumder

A JOptionPane version of the game of Penny Pitch. Uses numerical values spread on a board, and computer picks randomly chosen spot to place a penny and at the end of a run adds up the total score. *Two separate programs, PennyPitchGame and Square (Square Class)*

Member Avatar for NovaWarlock
0
2K
Member Avatar for Arman Majumder

A program that compounds interest [FONT=&quot]continuously [/FONT]to a specified premium, rate, and number of years. Displays the total work up in the GUI panel in a tree form.

0
178
Member Avatar for Arman Majumder

A simple program that displays the Muller-Lyer Illusion. Also tests the ability to draw simple figures using the Paint Component function.

0
1K
Member Avatar for Arman Majumder

A GUI form of the Game of Craps. Takes in total bank roll and bet for each round of the game. *Two seperate programs, Craps and CrapsData(Craps Class)*

0
1K
Member Avatar for Arman Majumder

A very simple program, which displays the coordinate points for the center point of the panel. Automatically updates the (X,Y) form coordinates with size modification.

0
731
Member Avatar for Arman Majumder

A red circle moves back and forth horizontally, when clicked (with a mouse) the circle halts motion and the background colour changes randomly, if clicked again the circle resumes it's motion and changes the background colour randomly. This loop continues until the user exits the program. *Two separate programs[FONT=&quot][/FONT], CirclePanel …

Member Avatar for cUtEAkew
0
1K
Member Avatar for Arman Majumder

A fixed Checkerboard board, which tests multiple panels each with alternating colors (Red and Black). Input the dimensions to output the board.

0
1K
Member Avatar for Arman Majumder

A simple GUI that tests the GridLayout function, multiple panels, and different coloured panels.

0
301
Member Avatar for msaqib

Demonstration of Linked list in java. Very simple and well commented java code for the beginners. Linked list of points are used to create a Polyline and display it More java codes at [URL="http://www.mycplus.com"]www.mycplus.com[/URL]

Member Avatar for jwenting
0
246
Member Avatar for sweetleaf

THE program highlights how to create a 2d array in freestore using pointers.. this is my first post so if i commit any fallacies regarding protocol or syntax please forgive me ....

0
110
Member Avatar for GreenDay2001

This would let you store different things of same type into one data structure, here its a list. A good and popular example would be file and folder hierarchical structure in your computer. Perhaps this is what this code demonstrates. The code has two classes [INLINECODE]File [/INLINECODE]and [INLINECODE]Directory[/INLINECODE](derived from File). …

0
298
Member Avatar for aj.wh.ca

Problem Description ----------------------- I tried to download my favourite site containing essays on history (leeching) with depth 4. For some reason say my download tool problem, I realized I could not download all the files. I had with me a list of files (list1) I downloaded and list of files …

Member Avatar for vegaseat
0
115
Member Avatar for php4ever

Okay so I had this need to vary the template layout of an osCommerce theme using its BTS (basic template system) and noticed that unlike standard osCommerce where you can edit each and every individual page to have a unique layout, BTS uses a template system to generate its look. …

0
126
Member Avatar for Stylish

I needed a way to spawn multiple threads, have them monitored, and restarted if an error occured. I came up with the following. This snippet is from a larger program, so if there is a problem please let me know. This is for command line and tested on Linux (well, …

0
125
Member Avatar for Stylish

Here is a little spinner thing for the command line, used when your current bash script is waiting on a background/system process. The weird character is ^H or a backspace.

Member Avatar for cfajohnson
0
254
Member Avatar for thekashyap

------------------------------------------------------------ [COLOR=Blue][B]Intro:[/B][/COLOR] This is a small program that measures the performance of given java classes. In snippet there are 2 classes: 1. TestClass.java contains all java classes that are being measured for performance, I've picked up Narue's Sorting Algorithms as AUT (application under test) 2. AJPerf.java: contains the aspect that …

Member Avatar for thekashyap
0
150
Member Avatar for Fungus1487

Theres no doubting that using Java Swing is time consuming on load times. So heres a demo splash screen to keep your users captivated. You will need two classes for this example i.e. Splash.java and SplashWindow.java (remember line: 8 change this to match your splash image) just change the class …

Member Avatar for newtonorina
0
169
Member Avatar for vijayan121

choose a random element from a sequence when a. you do not know how many elements are there before hand b. you want to make one single pass through the sequence c. you do not want to use auxiliary storage

0
736
Member Avatar for vegaseat

A short C# code snippet to get the US Naval Observatory Master Clock Time from: [URL]http://tycho.usno.navy.mil/cgi-bin/timer.pl[/URL] The snippet displays the raw HTML code with the time infomation and then extracts one specific US time zone.

Member Avatar for Mustafa Laith
0
685
Member Avatar for vegaseat
Member Avatar for Mpiangu

This code will create for you an application. we are goig to use visual c++ for it open visual, c++. click file then New. in the New dialogue box click projects. click win32 application. give it a name eg my_project. and click finish. Then again click file. click files. the …

0
158
Member Avatar for Mpiangu

hi every body try out this code it can store your info and then retriaeve it ant any time you wish. They are two codes each wrote separatly so first write the outputting code and run it. Then write the inputting code and also run it have fun:lol:

Member Avatar for Mpiangu
0
194
Member Avatar for Lardmeister

A closer look at some string methods, just having a learning experience and fun with this C# class. This program uses a simple MessageBox to display the results.

0
167
Member Avatar for Lardmeister

I could not resist to put this little utility into a GUI dress. The code shows you that the C# StringBuilder is nicely suited to create the binary string. Also included is a check to assure that the input is an all digit numeric string.

Member Avatar for Lardmeister
0
380
Member Avatar for Lardmeister

A quick look at finding a substring in a string and giving the position of the substring, if found. The string method IndexOf() has a number of options to explore.

0
231
Member Avatar for vegaseat

C# has two types of strings, one is immutable and the other, the class StringBuilder, is mutable (dynamic). I just wanted to hang a short code snippet out there to show you some of the typical operations.

Member Avatar for varagpraveen
0
192
Member Avatar for vegaseat

I followed Lardmeister's smart hints about creating templates with VC# 2003 and using SnippetCompiler.exe to write and test the rest of the program. It also allows you to build the executable (only 7k in size). The algorithm is from one of my Python snippets I wrote a long time ago. …

Member Avatar for Ene Uran
0
1K
Member Avatar for Lardmeister

Here I made a GUI template with a Form, Button and Listbox using MS VCS 2003. MS VCS 2003 still produces a single file usable as a templet, whereas MS VCS 2005 smears files all over the map. Must be some marketing persons idea of market dominance. I took the …

Member Avatar for vegaseat
0
457
Member Avatar for Lardmeister

It's spring break, so let's beep in C# code, actually a 440 Hz A. We are just borrowing the Beep() function from the Windows kernel.

Member Avatar for HLA91
0
179
Member Avatar for Lardmeister

There are plenty of things you can code in C# without having to rely on the ever so omnipresent MS-VCS. Here is an example of some typical drawings like lines, arcs, circles, text, curves and gradients you can create with C# and actually retain some control over the program. This …

Member Avatar for nido
0
342
Member Avatar for Lardmeister

A very simple C# console program to give you a table of investment (savings) growth over the years. To compile the program, copy and paste the code into an editor, and save it for instance as "savings.cs". Then find the C# compiler "csc.exe" in the "C:\Windows\Microsoft.NET\Framework\ ..." folder and run …

Member Avatar for Lardmeister
0
159
Member Avatar for Lardmeister

A simple picture viewer written in C# that allows you to view jpg, bmp, gif and animated gif image files. Uses a file dialog to load files, and keeps track of pictures already viewed with a list box.

Member Avatar for vegaseat
0
175
Member Avatar for Lardmeister

A simple C# program showing you how easy it is to create a basic Windows GUI program which will display the results of a factorial number calculator.

Member Avatar for Lardmeister
0
214
Member Avatar for thekashyap

Hi *, Here is a small program I had created to search for a given .class file within given CLASSPATH. It is primarily used in our project on test machines where lotsa ppl put lotsa patches in lotsa paths/jars and finally end up wondering which class file is being used. …

0
212
Member Avatar for daniusr

This script displays the current time in your browser. You can choose the 12-hours format or the 24-hours format.

Member Avatar for fclose_fp
0
295
Member Avatar for eXceed69
Member Avatar for eXceed69

An interactive program using std::cin, std::cout, while loop and switch which will take from user no. 0 to 9 and print the number in characters. (eg. if user inters 0 the program shall respond You Have Entered : ZERO) If any negative number is given program should terminate.

Member Avatar for Ene Uran
0
156
Member Avatar for Lazaro Claiborn

Here is just a simple program to sort two strings inputted from the user entered on the command line.

Member Avatar for John A
0
215
Member Avatar for GreenDay2001
Member Avatar for hashjoe
0
150
Member Avatar for GreenDay2001
0
132
Member Avatar for Ene Uran

The small images you put on buttons and such are nice, but a real pain if you have to attach all those image files to your program. Python's base64 encoding module makes it easy to convert the binary image code to a string that you can simply make part of …

Member Avatar for vegaseat
0
2K
Member Avatar for RwCC

The following is a simple painting program. It uses Windows Forms and will allow you to draw whatever you want. You can also include code to change the colour or size of the brush via a right click menu by using code such as this: [CODE] MenuItem mi = new …

Member Avatar for Ali.M.Habib
0
468
Member Avatar for Mushy-pea

Well, I asked Dani and she said I could create a Haskell catagory in code snippits just by submitting a Haskell program :p . What self respecting code repository would be without one? So here goes, this program calculates the nth triangular number, given n by the user. Steven.

Member Avatar for Rashakil Fol
0
105
Member Avatar for ShawnCplus

This program was inspired by my college math 1 class. It takes the values of a1, a2, b1, b2, c1, c2 and solves, displays the equation and shows the work. It also stops if the equation is dependant or inconsistent (Zero division) Cramer's Rule if a1x+b1y=c1 and a2x+b2y=c2 then x=((c1*b2)-(c2*b1))/((a1*b2)-(a2*b1)) …

0
3K
Member Avatar for Matt Tacular

Ever have two lists in python and you want to know what how much of one list the other contains? This code snippet will help you do that.

Member Avatar for vegaseat
0
360
Member Avatar for vegaseat

Sometime in my childhood biology class I heard that the fancy colors of butterfly wings aren't really true colors, but interference patterns. This program claims to create interference patterns using a series of 3d sine waves using Python's popular pygame module. The whole contrivance is pretty to look at, and …

0
222

The End.