132,726 Archived Topics
Remove Filter ![]() | |
Although the DateTime structure in .NET has an IsLeapYear method. Lots of people in here like to do this on their own. See this snippet on how it can be done. This is in C# but other language adepts might benefit from it also. Software Development | |
Hello, I've written a C++ class which 'estimates' the roots of a given number ... It was called 'sqr' because it was first intended to estimate square roots only, but later on I made some little changes to my code which made it possible to estimate every root ... So, … Software Development c++ | |
A quick way of spying inside of a process. You could also turn this into something like a disassemble, pretty easy, if you wanted too. Quick Notes: The inline assembly is GCC dependent(quick fix for other compilers), and in MinGW you need to link th32 and gid32. The code flow … | |
Hello there, I've written a C++ function 'stod', which converts a C++ string to a double ... You're free to use this code for EVERYTHING you want ... There's only one thing which I'm not appreciating: [B][COLOR="Red"]It's not allowed to sell this source code to anyone ![/COLOR][/B] The usage is … | |
Well , i have created a simple chatting interface . i would not call it a chatting interface actually cuz i had something else in my mind and finally landed on something else . i would like if you guys could excecute it and help me making it a real … Software Development client-server java user-interface | |
This is a simple program and all it does is fiddle with the registry and set the value of the desktop background to be the bmp file that you supply in the function. There are other things you can do with the windows registry, this is just one of the … Software Development python | |
Just a little snippet to check if a string contains only letters. Software Development | |
Here's some rudimentary code that does directory traversal recursively. Useful for inspecting the contents of a directory subtree. Sorting the directory information or inspecting file details within directories is beyond the scope of this routine. Software Development c | |
I want to show you some rules about bit operating like Not,And,Or,Xor,Shl,Shr... By FlamingClaw Software Development operating-system pascal | |
This code snipplet will find the placement of each letter in a array(string), from another array(character set). For example: the input would be something like this: string[256] = "gfdc" chrset[256] = "abcdefg" and the output would be: num[256] = 6, 5, 2 and 3 Software Development c | |
I've seen,there are guys that did not know,where to use a unit... See it just reference By FlamingClaw Software Development pascal | |
This little program a solution for putting a string into an array. The method is that the string is divided for chars.... By FlamingClaw Software Development pascal | |
Often there is a case when we want to fill an array with record,and this program will demonstrate it... Software Development pascal | |
| |
Many people says 'Don't use the GoTo statement,because your code will be unreadable....'.I say,can be use Software Development pascal | |
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.............. Software Development c | |
Hello friends, I am new participant in daniweb Here is the fantastic coding of SHEEL SORT.. Software Development c | |
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 … Software Development c | |
// 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; … Software Development c++ file-stream | |
Dear all This code is simulate some of math library funcs. Good Luck! Software Development c++ | |
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 … Software Development | |
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 … Software Development | |
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 … Software Development | |
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 … Software Development c++ | |
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! Software Development c++ | |
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! Software Development c++ | |
Here is a binary search program quite simplified Software Development c | |
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) Software Development c++ | |
It includes Binay tree construction,Inorder,preorder,postorder traversals Software Development c | |
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. Software Development java | |
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 !!! Software Development c++ | |
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 ! Software Development c++ | |
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 .......................... Software Development c | |
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]) Software Development c++ | |
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 … Software Development python | |
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. Software Development python | |
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 . … Software Development c++ | |
This code converts decimal number to hexadecimal number I wrote it by Borland 5.02 . Good Luck Software Development c++ | |
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! Software Development c++ | |
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 … Software Development c++ data-structure linked-list |
The End.