132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for ddanbe

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
0
178
Member Avatar for tux4life

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++
Member Avatar for tux4life
0
185
Member Avatar for niladri.saha06

This program finds the love score between two persons

Software Development c
Member Avatar for MosaicFuneral
0
240
Member Avatar for MosaicFuneral

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 …

Software Development assembly c++
0
462
Member Avatar for tux4life

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 …

Software Development c c# c++
Member Avatar for tux4life
0
4K
Member Avatar for rahul8590

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
Member Avatar for toyi
0
280
Member Avatar for lllllIllIlllI

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
Member Avatar for shadwickman
0
253
Member Avatar for ddanbe

Just a little snippet to check if a string contains only letters.

Software Development
0
814
Member Avatar for banders7

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
0
260
Member Avatar for FlamingClaw

I want to show you some rules about bit operating like Not,And,Or,Xor,Shl,Shr... By FlamingClaw

Software Development operating-system pascal
0
199
Member Avatar for Hiroshe

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
Member Avatar for Hiroshe
0
119
Member Avatar for FlamingClaw

I've seen,there are guys that did not know,where to use a unit... See it just reference By FlamingClaw

Software Development pascal
0
783
Member Avatar for verruckt24

This code snippets shows how to reverse a string using a stack.

Software Development java
0
351
Member Avatar for FlamingClaw

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
0
214
Member Avatar for FlamingClaw

This little calculator can +,-,/,*.Very simple,by FlamingClaw

Software Development pascal
0
199
Member Avatar for FlamingClaw

We change the order of elements of a vektor Created by FlamingClaw

Software Development pascal
0
974
Member Avatar for FlamingClaw

Often there is a case when we want to fill an array with record,and this program will demonstrate it...

Software Development pascal
0
217
Member Avatar for FlamingClaw
Member Avatar for FlamingClaw

see this simple example...very nice,and easy

Software Development linked-list pascal
0
131
Member Avatar for FlamingClaw

Many people says 'Don't use the GoTo statement,because your code will be unreadable....'.I say,can be use

Software Development pascal
Member Avatar for FlamingClaw
0
1K
Member Avatar for FlamingClaw

For Statement examples,see it...

Software Development pascal
0
143
Member Avatar for surender_kumar

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
0
122
Member Avatar for surender_kumar

Hello friends, I am new participant in daniweb Here is the fantastic coding of SHEEL SORT..

Software Development c
0
179
Member Avatar for FlamingClaw
0
270
Member Avatar for banders7

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
Member Avatar for banders7
0
600
Member Avatar for hastingo

// 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
0
105
Member Avatar for sahasrara

Dear all This code is simulate some of math library funcs. Good Luck!

Software Development c++
Member Avatar for subtercosm
0
535
Member Avatar for subtercosm

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
0
137
Member Avatar for subtercosm

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
0
108
Member Avatar for serkan sendur

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
0
3K
Member Avatar for Freaky_Chris

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++
0
227
Member Avatar for sahasrara

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++
0
145
Member Avatar for sahasrara

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++
Member Avatar for ddanbe
0
120
Member Avatar for seeniya
Member Avatar for seeniya
0
237
Member Avatar for Freaky_Chris

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++
0
683
Member Avatar for shital3144

It includes Binay tree construction,Inorder,preorder,postorder traversals

Software Development c
Member Avatar for sahasrara
0
188
Member Avatar for kameshwar

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 …

Software Development c++ pascal
0
147
Member Avatar for sciwizeh

This is a simple implementation of the Chaos Game to produce a Seirpinski Triangle.

Software Development java
Member Avatar for sciwizeh
0
548
Member Avatar for sahasrara

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++
0
2K
Member Avatar for sahasrara

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++
Member Avatar for tux4life
0
136
Member Avatar for dileepkumar235

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
Member Avatar for dileepkumar235
0
176
Member Avatar for William Hemsworth

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++
Member Avatar for William Hemsworth
0
277
Member Avatar for Gribouillis

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
0
497
Member Avatar for serkan sendur
Member Avatar for Dave Sinkula
0
235
Member Avatar for serkan sendur
0
127
Member Avatar for Gribouillis

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
Member Avatar for Gribouillis
0
402
Member Avatar for sahasrara

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++
Member Avatar for sahasrara
0
163
Member Avatar for sahasrara

This code converts decimal number to hexadecimal number I wrote it by Borland 5.02 . Good Luck

Software Development c++
0
163
Member Avatar for sahasrara

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++
Member Avatar for sahasrara
0
193
Member Avatar for sahasrara

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
0
175

The End.