199,114 Archived Topics

Remove Filter
Member Avatar for
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, …

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 …

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 …

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.

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.

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.

0
197
Member Avatar for VSBrown

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

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.

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.

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.

0
464
Member Avatar for VSBrown
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.

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.

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.

0
598
Member Avatar for VSBrown
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.

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.

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 …

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 …

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 …

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.

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

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 …

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.

0
548
Member Avatar for vegaseat

Swap two images as you move your mouse in and out of the image field. Uses onMouseOver, onMouseOut and a short javascript code.

Member Avatar for almostbob
0
172
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.

0
1K
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.

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 …

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 …

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 …

0
3K
Member Avatar for Gandalf

[b]1. mod_rewrite se friendly pages for vBulletin[/b] Here is a seo hack for vBulletin developed by Danielle Horowitz. You can find original text at [url="http://www.daniweb.com/techtalkforums/thread9379.html"]http://www.daniweb.com/techtalkforums/thread9379.html[/url] I have remade her instructions in the phpBB mod like format. You can read them here [url="http://www.daniweb.com/techtalkforums/post87148.html#post87148"]http://www.daniweb.com/techtalkforums/post87148.html#post87148[/url] You can download text file here [b]2. Meta …

Member Avatar for didier-fr
0
483
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 …

0
112
Member Avatar for Dark_Omen

Okay, this introduces two new things into the widget. The first thing you need is a picture file (.jpg, .png, .bmp etc...). The new code makes the picture into the button with the text "Hello, World" on the side. In the parentheses next to File.open you would put the file …

Member Avatar for bumsfeld
0
146
Member Avatar for Dark_Omen

This is kind of an extension to my previous code snippet. This language is really fun to use. I find it pretty easy to use and understand. This will create a window with a button.

Member Avatar for bumsfeld
0
333
Member Avatar for Dark_Omen

This is a basic window coded in Ruby. To download Ruby go to [url]www.ruby-lang.org[/url] and download the latest version. The latest version includes the FX toolkit that is needed to create this window.

Member Avatar for Dark_Omen
0
234
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, …

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 …

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 …

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 …

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 :-)

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 …

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.

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 …

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), …

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 …

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.

Member Avatar for rhenerlau
0
130
Member Avatar for vegaseat

You probably have seen those message snakes following the cursor on a web page. Well, the javascript code is not too complex, so let's look at it ...

0
113
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 …

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 …

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 …

Member Avatar for Rodan
0
184

The End.