199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Dave Sinkula

How might I write an implementation in C of the standard library function [inlinecode]strstr[/inlinecode]? Here's how I might. [url=http://www.daniweb.com/code/snippet313.html]What if I need it to be case-[b]in[/b]sensitive[/url]?

0
164
Member Avatar for Dave Sinkula

How might I write an implementation in C a case-insensitive version of the standard library function [inlinecode]strstr[/inlinecode]? Here's how I might. [url=http://www.daniweb.com/code/showsnippet.php?codeid=314]But I need it to be case-sensitive[/url]?

Member Avatar for c_coder
0
2K
Member Avatar for Dave Sinkula

How might I write an implementation in C of the standard library function [inlinecode]strstr[/inlinecode]? Here's how I might.

0
134
Member Avatar for yuppie

A small script which converts Microsoft Office Documents (Word, Excel, Powerpoint) to Posscript. You can build your own PDF Converter with this script. More Python/Pywin32 examples can be found at [url]http://www.win32com.de[/url] and Python based PDF Converter (for server and client usage) can be found at [url]http://www.goermezer.de[/url] .

0
383
Member Avatar for vegaseat

This is another GUI program using the Tkinter module. It shows you how to change the background and foreground color of a component/widget. In this case it is a button. The button itself is used to toggle the color selection via a color dialog box. Enough comments have been added …

0
906
Member Avatar for cheenu78

A program that can send mails. This requires that you have activation.jar and mail.jar in you classpath.

Member Avatar for balagangadharm
0
174
Member Avatar for kerribyrd

This is a program I created a couple of weeks ago for class using DevC++ compiler. THis program allows the user 20 tries to guess a number between 1 and 100. It keeps track of wins and losses and offfers the option to continue or quit, displaying game stats.

Member Avatar for manutd
0
552
Member Avatar for kerribyrd

This is a program I created a couple of weeks ago for class using DevC++ compiler. THis program allows the user 20 tries to guess a number between 1 and 100. It keeps track of wins and losses and offfers the option to continue or quit, displaying game stats.

0
108
Member Avatar for anurag_pareek

This Program gives the details (name, kernel, machine type, domain, groups, sizeof data types, etc) of the host it is running on.

Member Avatar for maxthrill
0
120
Member Avatar for anurag_pareek

This Program gives the UserDetails of the logged in User. a) The RealName b) Login Name ( Why do we need this?) c) Home Directory d) Default Login Shell Additional Purpose of this code would be to invoke/ learn at man getpwuid and about struct passswd

Member Avatar for bumsfeld
0
1K
Member Avatar for Mahen

This program allows u to search the Search Engine of GOOGLE from the command line. Just type MUPROG "searchtext" GIMME LOTZ OF STARZ

0
201
Member Avatar for iacobus

Here are five simple snippets, to be used as an introduction to the use of unicode. This is, of course, an on-going thing, and hopefully additional snippets and comments will be forthcoming from the members.

Member Avatar for vegaseat
0
159
Member Avatar for Troy

class_http.php is a "screen-scraping" utility that makes it easy to scrape content and cache scraped content for any number of seconds desired before hitting the live source again. Caching makes you a good neighbor! The class has 2 static methods that make it easy to extract individual tables of data …

Member Avatar for Samir
0
347
Member Avatar for harshchandra

It's a simple program .Just enter any date in dd/mm/yyyy format.If you enter wrong you will get the message .

0
192
Member Avatar for Sparkplug188

This is a very basic way to make a delay that someone new to VB might be able to use.

0
133
Member Avatar for Troy

class_db.php is a database class that provides methods to work with mysql, postgres, and mssql databases. Other database types can be easily added. The class provides a common interface to the various database types. A powerful feature of the class is the ability to cache datasets to disk using a …

Member Avatar for ethen_th
0
223
Member Avatar for vegaseat

Python's Tkinter module can be used to create a Graphics User Interface (GUI). This sample code creates a windows type form and positions a label and a canvas on the form. A simple shape is drawn on the canvas.

0
243
Member Avatar for Dave Sinkula

Obtaining user input can be done in many surprisingly different ways. This code is somewhere in the middle: safer than [inlinecode]gets(text)[/inlinecode] or [inlinecode]scanf("%s", text)[/inlinecode], but not bulletproof. It is meant to be a simple but relatively safe demonstration. The function [inlinecode]mygetline[/inlinecode] reads user input from the [inlinecode]stdin[/inlinecode] into a string …

Member Avatar for kedhar
0
328
Member Avatar for soumyajit_c`

Connection To Access Database and Save,Retrieve,Update D:\access\try.mdb=The Address of the Access database table 'Try'. Take a module as ModMain(Copy the code) table fields: idno,name,designation.(idno=auto number) textBoxes=TxtName,TxtDesignation And Combobox=CboRetrieve buttons=new,save,retrieve,exit

Member Avatar for bruce2424
0
1K
Member Avatar for vicky_dev

Hey People! This program gives you all Pythagorean triplets in a given range.( Eg. ( 3,4,5) - 3^2+4^2 = 5^2 ). I've used a pointer to allocate memory to hold the squares of all numbers in the range. The program uses a function to search for element in the array.

0
219
Member Avatar for vicky_dev

This program prints the prime factors of a number. Eg. 56=2x2x2x7 .I've heard its really important and stuff.I believe it is really efficient and simple. Uses two functions : one to check if a number is prime and other to return the next prime number.

Member Avatar for bofarull
0
172
Member Avatar for letmec

This is a program to calculate the n-th root of any number. This program uses the NEWTON_RAPTION_ITERATION method for calculation. The general formula to find the n-th root of any number is : *-------------------------------* * (((n-1)/n)*x0) + (1/n)*(N/d) * *-------------------------------* where n =1,2,3............ (n-th root). x0 is First approximate root. …

Member Avatar for vegaseat
0
174
Member Avatar for anurag_pareek

In this program i had just extracted the modulo of the number given,and keep on adding it in linklist. later on,i reversed the link list and displayed the result. By:-- Anurag Pareek

Member Avatar for Kellaw
0
590
Member Avatar for anurag_pareek

VIRTUAL PIANO It's a very simple sound program , Input device is mouse. Sound function is used to produce output.Working is very simple based on seven natural freqencies.Move mouse over keys for sounds. Change range and note the difference.

0
201
Member Avatar for anurag_pareek

This is a simple balloon shooting game made in C language. In this game, there are number of balloons, a bow and arrows for shooting the balloons. The balloons rise from the lower portion of the screen. The bow is put on left side which can move up and down. …

Member Avatar for luna19
0
984
Member Avatar for johnroach1985

This program searches the given txt file.And tells you how many there are. Just a reminder don't forget to put the searced txt file in C: or change it accordingly for more info or questions [email]Silver.Lost.Raven@gmail.com[/email] have fun!!

0
546
Member Avatar for Dave Sinkula

Obtaining user input can be done in many surprisingly different ways. This code is somewhere in the middle: safer than [inlinecode]scanf("%d", &n)[/inlinecode], but not bulletproof. It is meant to be a simple but relatively safe demonstration. The function [inlinecode]mygeti[/inlinecode] reads user input from the stdin into a string using [inlinecode]fgets[/inlinecode]. …

0
1K
Member Avatar for Dave Sinkula

This snippet shows how to use the functions [inlinecode]time[/inlinecode], [inlinecode]localtime[/inlinecode], and [inlinecode]strftimetime[/inlinecode] to pick off only the time parts for display.

0
132
Member Avatar for Dave Sinkula

Some issues with date/time calculations. [Perhaps I ought to edit this one day and better describe it.]

0
132
Member Avatar for Dave Sinkula

To check for integer overflow, you can't simply check the [i]outcome[/i] of an operation, you need to check [i]before[/i] the operation. So how do you do that? This example checks for overflow with multiplication.

0
357
Member Avatar for Dave Sinkula

This is yet another example of reversing a string. This version modifies the original, reversing the string in place. [I]See also [url=http://www.daniweb.com/code/snippet522.html]Strings: Reversal, Part 2[/url][/I].

0
615
Member Avatar for Dave Sinkula

This problem is a typical homework question. The code presented here may contain some elements that may be a little "ahead of the game" in coursework, but it presents some of the basic elements that might be used in such an exercise.

Member Avatar for Sealteam56
0
246
Member Avatar for vegaseat

Where you ever curious what the most common letter is in a typical text file? Just another question to ask a friend. The answer is right here in this tiny code snippet. The program converts the text to all lower case letters, and then list them out alphabetically showing the …

Member Avatar for programtrav
0
189
Member Avatar for rhenerlau

Place the file with part one of the code on the server. This part of the code gets placed in a batch file (text file with the extension *.BAT) and placed on each client's machine. Again, you will need to change the paths used to the real paths on your …

0
169
Member Avatar for JRED

This code snippet will attempt to show newbies to php how to connect and retrieve data from a PostgreSQL Database Server using PHP.

Member Avatar for Troy
0
195
Member Avatar for corewizard
Member Avatar for Drew

This is a neat little script that will tell you how many active users you have on your site. You do need a webhost that supports the global.asa file! Most free hosts dont. [B]Code From: [URL="http://http://www.iportalx.net"]http://www.iportalx.net[/URL][/B]

0
140
Member Avatar for pankleks

It is a small two-in-one calculator that can work as a regular or RPN calculator, selected by a RPN checkbox. It has a four level stack similar to the HP 48 calculator made from four Tmemos. This code shows you how to make visual effects(RPN stack) from existing delphi components. …

0
197
Member Avatar for ShawnCplus

This is the first program I wrote, well besides Hello world. I put about a lot of hours into this code, it started as a divisional calculator than i evolved it so it would ask your name and calculate your average and i was messing around with the system ("") …

Member Avatar for ShawnCplus
0
889
Member Avatar for aj.wh.ca

This is a bit more tough than it sounds. well some one gave me this problem and I found this tricky not until I used recursion.

0
790
Member Avatar for Tight_Coder_Ex

There are numerous calls to Win32 API that return detailed information as to failure via GetLastError (). I've devised a method by which to get the textual information corresponding to error and the address of the call that caused the violation. If GetLastError () returns null, then it can serve …

0
324
Member Avatar for Scribbller
Member Avatar for vegaseat

Just a simple way to separate the words contained in a sentence. As an option you can store the words in a vector. If you are not familiar with a vector, use an array instead.

0
192
Member Avatar for vegaseat

I look at BCX-basic as a modernized qbasic. This simple code creates a Windows GUI program that plays a midi instrumental music file. To keep it simple, the file it looks for is "TheRose.mid" file. If you don't have this file, you have the option of editing the code, or …

Member Avatar for billzilla
0
222
Member Avatar for vegaseat

Shows how to connect a button onclick event to a javascript function to change the background color of the document. Just cut and paste the code into Notepad or other editor, save as BGchanger.htm and run it on your browser.

Member Avatar for Mohan0704
0
191
Member Avatar for vegaseat

Remember the Spirograph? It used geared circles to create some rather artistic geometric designs. This program uses triangles to follow in the Spirograph's foot steps. The math is rather simple, just a couple of sine and cosine functions, also the ubiquitous for loops, everything wrapped up in the using() statement. …

0
174
Member Avatar for Comatose
Member Avatar for willdove
0
314
Member Avatar for Narue

A fairly complete implementation to provide another perspective on a seemingly simple program.

Member Avatar for Ene Uran
0
146
Member Avatar for TkTkorrovi

A very rudimentary more, press enter to view next screenful of text, like with print command in ed text editor.

0
104
Member Avatar for TkTkorrovi

Similar to cat in unix textutils. You can actually edit files with these. Remember that ctrl-z sends end-of-file in windows, and ctrl-d in linux.

Member Avatar for Dani
0
105

The End.