Results for "Category: Data Structures"
Code reads an array and writes array's php code to a file.
Ok, I ran into a problem, MS out of some odd wisdom didn't do as you would think with the defaultvalue of a data column. you would think it so simple right? In a database such as SQL server you can set the default value to a function, I can do this with a datacolumn too such as. column1.defaultvalue = system.guid.newguid Though this has an issue, if you use this in a grid you will see as you add new rows that the darn guid is the same. It's calling the newguid only once when setting up the table and it's holding that value static for the rest of the life of the datatable\datacolumn. This goes against common knowlege in how MS does things in other area's, such as the before mentioned SQL server using NewID() will get you a new ID each time. Keep in mind that even other funtions like Now() (which returns current date time) won't work, the defaultvalue will always be the same datetime. So I don't have a solution for the default, I have a different solution. Custom datatable and custom datacolumn classes. You will see in my custom column style that there is a new property called (autogenerateguid)if set to true then it will then set each new row with the correct new guid. Though this is all code based, it works for what I need it to do. It also features the use of an un-documented function and class. NewRowFromBuilder Function System.Data.DataRowBuilder Class I've seen other post's that show to use the rowchanging or positionchanged events in order to do the same thing, this example gets to the source of the newrow creation. What would be better is that if you assign a function that MS would call that function each time instead of this lame static method.
Implementation of Arraylist collection, Listbox and Serialization
This program implements a doubly linked list as a binary search tree and includes functions to: traverse inorder, preorder & postorder, insert and delete a node, search for a node, and count the height of a given leaf.
Pointers Tutorial. Introduction to pointers for beginners. I hope u find it useful. :)
Hash table management by Jerry Coffin, with improvements by HenkJan Wolthuis.
This is the third installment of the Lessons in C programming tutorials created by me, Alexander. In this lesson I will cover loops. Loops basically do what it sounds like, loop. If you have read lesson 2 you should understand some Boolean expressions. If you do not, you should read it again. When working with loops it is important to understand truth and false. Maybe you should try doing some truth tables with problems.
Now that you have learned all about variables, loops, and if statements it is time to learn the next thing in programming: Functions. Obviously, you should have a good idea about what a function is, as you have used ones like cout before. However, this lesson will be more in detail about not only functions that are already made, but about making your own, or maybe I will continue this later...
This lesson is one on strings. Strings are really arrays, but there are some different functions that are used for strings, like adding to strings, finding the length of strings, and also of checking to see if strings match. Strings are basically sentences, or words. Like, "This is a string".
Template for a doubly linked-list data structure, can be used also for queues and stacks.
produces a link list as a queue. it is part of my billing project and so uses order placing. nothing complicated.
An introduction to linked lists for beginners. I know there are already some. I guess it won't hurt to have another.
a simple vector template.
A simple stack template.
a simple little list template, done for practice. Comes with example driver.
This is a heap sort algorithm that implements an array as a heap, sorts as many as 10000 numbers that are randomly generated and writes them to a file called "heap.out".
Demonstration of expression trees. Creating and evaluationg an expression tree, a special type of binary tree.
This is simple example of doubly linked list. You can insert/delete items anywhere in the list.
The following code, when running, looks like the text is actually typing itself. This technique uses two main things, char arrays and the Sleep(); function. This technique would be great to use for slash screens, presentations or just impressing your friends! Also, please take the time to vote for my code. Thanks!!
This is to help users to know how we can create our own Database Files with any structure using C Language.