199,114 Archived Topics
Remove Filter ![]() | |
By calling this function from the header row of your table, you can make your table collapsible. | |
Sometimes, you need to see what properties does that object have and what values are assigned to them. This snippet does that. | |
in the previous snippet i compared two tables having columns as name and value pairs. this new one compares two tables of any number of columns(as long as it is the same number on both tables). | |
Hello friends here i present a simple address diary program that store name, phone number,sunsigh,best moment date of birth and place,and also hobby of a person.... When you run this u must fill password and password is "hello"... I think you will enjoy it.............. | |
Hello friends, I am new participant in daniweb Here is the fantastic coding of SHEEL SORT.. | |
compares to tables and highligthts the changes | |
converts the html tables which are created by string concatenation to dom table objects | |
I saw that in some xml files, child numbers are not the same for the elements which will correspond to our table rows. So i created a more smart version which is error tolerant. | |
| |
Here are 2 pieces of code. The first makes a hidden partition accessible by creating a path to it and assigning a drive letter. The second removes the path definition, effectively rehiding the partition. It is advised that caution be taken in the use of this code. The core to … | |
// Displays a file in either upper- or // lowercase depending upon a user request. #include <fstream> #include <iostream> #include <string> #include <ctype.h> using namespace std; // Display(): display text stream using ToFunc // modification void Display(ifstream &fin, int (*ToFunc)(int c)) { // extract and display characters one-at-a-time char CurrentChar; … | |
Dear all This code is simulate some of math library funcs. Good Luck! | |
C# delegates make it really easy to implement the visitor pattern. Instead of making an abstract class and Visit methods that accept a single argument of that class's type, let your Visit methods accept multiple arguments. So instead of a visitor class with N abstract methods, your Visit methods take … | |
You could implement recursive algorithms in ways that avoid risking stack overflow, i.e. by manually implementing a stack of variables or a stack of states. It is better to implement combinators that take pieces of recursive definitions and do this work for you. It is particularly easy to do in … | |
This is something very simple but very hard to find in google, it took me 30 minutes to solve it out. You have a value of type string and you want to get index number of that value in your enumeration, and now you can use that index number for … | |
This is a sample code snippet of a quicksort that uses templating and function pointers to allow the user to sort an array of anything from numbers to strings to structures. The idea is, that the coder writes a small function thats return type is bool, It should return true … | |
Hi friens Linear search is a way of finding an element in the array that we made it . Binary search is quicker than Linear search . in this code if key was found , it is removed from array and then sorted array is shown again. Good Luck! | |
Dear all This code shows, look for an integer number in the array of this type that we used from Binary search. It was wrote by Borland 5.02 . Good Luck! | |
Here is a binary search program quite simplified | |
This snippet can be used to convert from bases between 2 & 16 to base between 2 & 16. This is an extension on converting decimal to any base snippet found here: [url]http://www.daniweb.com/code/snippet1067.html[/url] (By no means is this the best method of doing this, but provides rather a nice way) | |
It includes Binay tree construction,Inorder,preorder,postorder traversals | |
Pascal's triangle is a geometric arrangement of the binomial coefficients in a triangle. The rows of Pascal's triangle are conventionally enumerated starting with row zero, and the numbers in odd rows are usually staggered relative to the numbers in even rows. A simple construction of the triangle proceeds in the … | |
This is a simple implementation of the Chaos Game to produce a Seirpinski Triangle. | |
Dear entourage Here is a solution that read two matrix of complex numbers ( including imaginary an real ) and add and multiply these together. I wrote it by Borland 5.02 . Do joy !!! | |
Dear all This code first read a string then shows number of repetition of each character . I wrote it by Borland 5.02 . Good Luck ! | |
This program displays all possible permutations of the string entered. say if u enter "abc" as input string the possible permutations would be displayed as ......................... abc acb bca bac cab cba .......................... | |
This class allows you to use the Google AJAX Translation API to translate arbitrary text to the many languages supported by the Google API. Source versioning added to: [url]http://code.google.com/p/php-language-api/[/url] | |
This snippet shows how you can manually split up a sentence using multiple delimiters. In this example, I split up this sentence: [ICODE]"Hello, my name is william!"[/ICODE] into the following: [ICODE]"Hello"[/ICODE] [ICODE]"my"[/ICODE] [ICODE]"name"[/ICODE] [ICODE]"is"[/ICODE] [ICODE]"william"[/ICODE] As you can see, the delimiters are not included ([ICODE]" ,!"[/ICODE]) | |
This snippet defines a cachedProperty decorator. A cached property differs from a property in that it's value is only computed the first time that the property is accessed and then stored in the object's dict for later use. If the object's attribute is explicitely deleted, it will be computed again … | |
This snippet defines a function [icode]patfilter(pattern, rule, sequence)[/icode] which implements filtering a sequence of strings according to various criteria. The output is either a subsequence of strings, or a sequence of match objects. | |
Hi my friends In this part you can see a link list that sort when you add your number. First number set as the first node. next number that you will enter , is compare with first node. if it was less than first , it set as first . … | |
This code converts decimal number to hexadecimal number I wrote it by Borland 5.02 . Good Luck | |
Hi Hi Hi this solution is inverse of other solution that changed Decimal number to hexadecimal . It changes hexadecimal number to Decimal ! There is the other way to change characters to numbers. Good Luck! | |
Hi ladies and gentlemen This program is a sample of data structure for information of students . this data structure is Linked List that include public & private filds. Its private has the other class which i named it node. node builds physical structure of linklist class. node class consist … | |
Dear programmer This program get 2 (simply) numbers in 10 radix , then changes them to 16 radix and add together and finally shows result. I wrote it by Borland 5.2 C++ . Good Luck! | |
Accepts number as input, writes the prime numbers up to that number to the screen. | |
This code snippet will produce strings of numbers (1 thru 49) with no repeated numbers in the same string and no duplicated string of numbers in the list of strings. To change the range of numbers the script generates change 49 in the code to your requirements. Please feel free … | |
While strolling around in the methods of the Graphics class, I bounced on the CopyFromScreen method. He, so why not make a screen capture utility! I know there is lots of this stuff out there. But it just seems like fun to try to make one myself. I made a … | |
Blink and you will see them appear in a Console window. This is a translation to C# of a Modula-2 implementation by N.Wirth, the inventor of Pascal. The tested integers are obtained by incrementing alternatively by 2 and 4, thereby avoiding multiples of 2 and 3 in the first place. … | |
I received some feedback on my [URL="http://www.daniweb.com/code/snippet1019.html"]earlier code snippet[/URL] regarding how to generate unique random numbers and someone suggested I make a shorter, easier example, so here it is. This example simply generates the integers from 0 to 9 in random order without any repeats. It is basically the function … | |
Many threads in daniweb's python forum deal with menu based programs which run in a terminal. This snippet defines a handy class, MenuCrawler, to help writing such programs. Subclassing from this base classes and adding methods corresponding to a given set of menus allows one to build the menu-based application. … | |
A slightly modified version of Bucket Sort that uses LinkedLists and initializes buckets only when required. Results in massive speed improvements. | |
Although there is little need for any sort algorithm in C#. Every collection class has a sort method, so why would you wanna write one for yourself? My guess to learn and see how it is done. Well her are implementations of two popular sorts. The arrays are integer but … | |
After flipping through some organic chemistry books I had, I found a interesting little table of basic hydrocarbons. I decided it would be nice to play around with it, by putting together something that could to some accuracy generate them. I am by no means a chemist. You don't even … | |
I decided to find a use for the STL map, and this is what I decided would be cool to practice with. Just have three placed in the code. Could use a function to load the requested elements from a file. |
The End.