Search   Articles   Dev Forums   Personalize   Favorites   Member Login   ASP.Net Hosting
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Wednesday, January 07, 2009

Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 
FREE 12 month online training for ASP.NET & MS Expression Studio and a Free copy of MS Expression Web with Windows Server Purchase

Home > Search > Articles & Samples > C-Sharp > Database > Data Structures
Search:
What's New - What's Hot


AVL Binary Tree for C++        
Total Hits: 26  |  Today: 0 Author: Dimiter Georgiev       Rating:  
Read Reviews | Write Review |   Your Rating: 

Very often, I had wanted a container that provides fast insertion and fast indexing. I also often had the need for sorted containers. Here, I present an AVL binary tree implementation that serves all these needs. # Here is some info on AVL binary trees: AVL Trees.
# Here is another CodeProject entry on AVL binary trees (I haven't used this implementation):...

Comparing DataSets using LINQ        
Total Hits: 17  |  Today: 0 Author: Cat Monty       Rating:  
Read Reviews | Write Review |   Your Rating: 

One of my recent projects included simple, and I believe, commonly done tasks. We were implementing a project utilizing the Microsoft Visual Studio Professional edition, with C# 3.0, and the task was to compare two snapshots taken from the same table within a particular time interval. The purpose of this task was to determine if any changes where done on the server side within a given time interval....

How to Use CslaGen to Generate CSLA Data Access Layer Code        
Total Hits: 120  |  Today: 0 Author: Tiago Freitas Leal.       Rating:  
Read Reviews | Write Review |   Your Rating: 

CSLA is a free 3-tier framework for Framework 2.0 and 3.0. The Apress book "Expert C# 2005 Business Objects, Second Edition" by Rockford Lhotka documents CSLA for C# and there is also a VB 2005 edition. This is not a closed project, but rather a living and evolving one. It is supported by a dynamic and helpful community you can find here. You can get CSLA C# and VB source files here.

CslaGen is a code generator that takes care of generating the data access layer files needed for the CSLA ...

Sorted Set and MultiSet with embedded keys.        
Total Hits: 35  |  Today: 0 Author: Mick O'Neill       Rating:  
Read Reviews | Write Review |   Your Rating: 

There are 3 collection objects defined in this project, all of them based on AVL trees. This article does not go into the AVL algorithms - there are plenty of articles aready on that, and in fact I used the Goletas Collections code for that part of the implemetation. This artical concentrates on using Keys embedded in the objects as the sort order, rather than having separate keys as required by the SortedList and SortedDictionary object in the .NET framework....

Using Stack class in C#        
Total Hits: 69  |  Today: 0 Author: amsprasad       Rating:  
Read Reviews | Write Review |   Your Rating: 

Below is the Source code of the Stack Class usage in C#. WinForms App which visually shows the Stack. Below is the Doc to show the usage of Stack Class. Just compile the StackDemo.cs file using csc StackDemo.cs and run StackDemo.exe to see the sample.

Stack is a Simple DataStucture which allows Insert/Remove of Items at one end. It is basically called as LIFO (Last In First Out) data structure (i.e. the item which is added last is the first one to be removed) .NET has a built in class for...

Bit Indexed Hash Table        
Total Hits: 12  |  Today: 0 Author: K.L.K       Rating:  
Read Reviews | Write Review |   Your Rating: 

The basic C# Dictionary K,V class does not perform well for large numbers of keys, this article presents an alternate class for this purpose.Imagine you have a long-running application that gathers new data. For performance reasons, any time it gets a new piece of data, it first checks whether it has already encountered it before storing it (to disk, database, etc.). The idea is to do the check in-memory before accruing the cost of the expensive disk operation....

Apply "yield return" recursively - iterating tree-datastructures        
Total Hits: 56  |  Today: 0 Author: Mr.PoorEnglish       Rating:  
Read Reviews | Write Review |   Your Rating: 

"tree-datastructures" are often used (e.g: Xml, Directory-System, Forms.ControlCollection).
they are very powerfull, but a little unhandy:

* you cannot enumerate them by foreach. For each action you want to execute on each tree-leaf you have to implement a specialized recursive method.
* its not trivial to leave the recursive execution before it reaches its natural end.
* passing some arguments (e.g. search-patterns of a recursive search) blows out the function-stack....

Read data from XML File using DataTable in C#        
Total Hits: 259  |  Today: 0 Author: CodeSmithDotNet       Rating:  
Read Reviews | Write Review |   Your Rating: 

Reading data from an xml file with the help of DataTable in C# is very easy. You just need to use one method of DataTable called ReadXML. Here is this article I'll show you how to complete this task of reading xml data into a DataTable....

Is there any need of Boxing and Unboxing?        
Total Hits: 365  |  Today: 0 Author: G.Gnana Arun Ganesh       Rating:  
Read Reviews | Write Review |   Your Rating: 

With Boxing and unboxing one can link between value-types and reference-types by allowing any value of a value-type to be converted to and from type object. Boxing and unboxing enables a unified view of the type system wherein a value of any type can ultimately be treated as an object. Converting a value type to reference type is called Boxing.Unboxing is an explicit operation.In this article let us see would we really need to box a data type?...

Fast List Data Structure        
Total Hits: 1  |  Today: 1 Author: Tolga Birdal       Rating:  
Read Reviews | Write Review |   Your Rating: 

FastList is purely my implementation of combining data structures to have a more powerfull (Maybe not for all cases, but for some specific cases) one. It is a templated class which enables you to use the fast insertion and deletion properties of Doubly Linked Lists and fast access operation of arrays. This way one can have O(1) deletion, O(1) insertion and O(1) access time....

A Generic Circular Array        
Total Hits: 6  |  Today: 0 Author: Jean-marc Lai       Rating:  
Read Reviews | Write Review |   Your Rating: 

CircularArray T is a class that implements a fixed length first in last out 'queue' or buffer. This is useful, for example, if you want to keep, say, the last 30 values in a real-time system. The next value gets put into the array, and then the last value in the array gets pushed out. It does this by using a fixed array, and uses the DivRem math operator to calculate the position of the head and the tail in the array. It's like the array is circular, with a pointer moving around the circle. The ...

State Pattern in C++ Applications        
Total Hits: 16  |  Today: 0 Author: Daniel Larocque       Rating:  
Read Reviews | Write Review |   Your Rating: 

The state pattern is very useful when you need an object to alter its behaviour when this object’s state changes. The purpose of this article is to give you an example of the State pattern in action. In that case, the State pattern has been applied to a small game framework. During the last year, I have written some small DirectX games. One of the problems I’ve encountered was the transition between game states. For example, when the game starts, I was usually displaying an Introduction page on ...

Circular Buffer Made Easy        
Total Hits: 29  |  Today: 0 Author: Nisamudheen       Rating:  
Read Reviews | Write Review |   Your Rating: 

A circular buffer is a fixed amount of memory area that can be used in a circular fashion. That means data can be stored from the beginning of the buffer to the end and then repeat the process. The process is same for the retrieval operation. Here, the reading and writing operations are supposed to be done from different threads. In this case, there arises two conditions. One is to check whether there is enough space in the buffer to perform a write operation. If not, the condition is called a b...

Stack implementation using templates        
Total Hits: 17  |  Today: 0 Author: kin       Rating:  
Read Reviews | Write Review |   Your Rating: 

A stack is an adaptor that provides a restricted subset of container functionality: it provides insertion, removal, and inspection of the element at the top of the stack. Stack is a "last in first out" (LIFO) data structure: the element at the top of a stack is the one that was most recently added. Stack does not allow iteration through its elements. Always remember stack of plates to understand stacks. I decided to write this class last week because I needed it for a small project but after a w...

Heap Data Structure        
Total Hits: 24  |  Today: 0 Author: Arman Z. Sahakyan       Rating:  
Read Reviews | Write Review |   Your Rating: 

This article briefly describes the notion of the Heap data structure and provides an implementation source code - the CHeapTree class. CHeapTree is an array based auto-resizing class that efficiently implements the Heap data structure. The heap is a data structure which is a special kind of complete binary tree. The main distinction is that a Heap stores its nodes in a partial order. Also, the nodes are filled from left to right so that if a specific node has no left child, it should have no ri...

Store more than 32 1-bit-flags in a single 'scalar'        
Total Hits: 15  |  Today: 0 Author: Patrick Hoffmann       Rating:  
Read Reviews | Write Review |   Your Rating: 

Have you ever had the problem that you were storing your bit-flags in a WORD and you were reaching the border of 16 bits? Then you may have used a double word instead of a word. But what are you doing on a 32 bit system when you cross the 32 bit border? Then you have to use other ways to store your bits. One of our programmers reached that point, a few weeks ago. He came to me to ask me for a way to handle that problem. I told him to build a class that provides all standard operations that might...

Tree data class for C++        
Total Hits: 19  |  Today: 0 Author: Alexander Kovachev       Rating:  
Read Reviews | Write Review |   Your Rating: 

Not so long ago in one of my recent projects I needed a tree class for representing data structures. I looked all over the web and didn't find any acceptable solution. A tree is a structure which is not as simple as an array or list, so unfortunately STL comes without it and I had to write one myself. I divided the implementation on two main parts: Data and Node. Data object is responsible for holding the data, and the Node (Tree) for the tree structure....

CABMBitSet and CFlexBitSet - Compact Storage with easy interface        
Total Hits: 13  |  Today: 0 Author: BuddyLeeJr       Rating:  
Read Reviews | Write Review |   Your Rating: 

Dealing in both the embedded and GUI world, there are many times where I find that I want to store large numbers of BOOL flags or enums that have a limited range, say 0 to 7 for example, but I do not want to take up an INT to store such a thing to disk. Historically, I have followed the steps of those before me at work and created integers and masks to grab the correct bit to store or retrieve the value. Recently, a coworker came up with a nice idea of abstracting this to be viewed as an array. ...

Binary, octal, and hexadecimal 32 bit structs        
Total Hits: 22  |  Today: 0 Author: DaveyM69       Rating:  
Read Reviews | Write Review |   Your Rating: 

Although data is obviously stored in memory or on disk in binary form, .NET automatically converts it into base 10 (decimal) whenever we want to see the data or set values. It does have a little functionality for getting or setting values in other bases, as listed below. These suffice in most situations, but I’ve often found I need a more natural/flexible way that basically wraps these functions up. This class library is a few simple bits of code to address this. All the structs are built around...

Octree Search        
Total Hits: 25  |  Today: 0 Author: Kam       Rating:  
Read Reviews | Write Review |   Your Rating: 

A data structure is an approach of storing data in a computer in a way that it can be accessed efficiently. A clever data structure allows a variety of vital operations to be achieved, using as few resources, both execution time and memory space, as possible. A tree is a widely-used data structure that emulates a tree structure with a set of linked nodes. An Octree is a tree data structure in which each inner node has up to eight leaves. Octrees are most often used to partition a three dimension...


1  2  Next >> 


DevASP.Net - Disclaimer - Privacy
Copyright © 2008 DevASP.net