sloppycode.net
Code snippets
Bits and pieces from various languages
Home
›
Code snippets
C#
ASP
Delphi
Java
Javascript
Perl (CGI)
PHP
Misc
GZip and Deflate page compression in ASP.NET
Using GZip and Deflate to compress your pages
C# Google maps postcode parser
Does a Google maps lookup on all postcodes from a webpage, and plots them with Google maps.
Network tools source
The source code for the network tools page.
Const vs Readonly in C#
The differences between const and readonly.
C# Password generator
Generate random alpha-numeric and prounceable passwords.
C# ACL example
Using access control lists in C#.
Streaming binary/text data via the web in C#
Streaming or downloading text and binary from a website in C#.
Binary upload to SQL Server in C#
A small tool for uploading binary data to a SQL Server database.
Method invocation in C#
A very basic example of reflection in C#
Richtext box Caret example
Changing a Richtextbox caret in C#, plus tab autocompletion.
Reflection and type discovery in C#
A small application that loads an assembly and displays its types in a treeview.
Image conversion in C#
A small C# app to convert to/from jpg,gif,tif,png.
LDAP/Active directory in C#
An application for displaying the LDAP (open LDAP, AD) tree of an LDAP database.
Optimum textfile reading in C#
Reading ascii text files fast.
MD5 and SHA in C#
Wrapper class for MD5 and SHA encryption methods.
Symmetric encryption in C#
Symmetric (two way/key based) encryption wrapper class.
Sending messages to windows in C# via winapi
Using EnumWindows, SendMessage in C#
Serialization as a database in C#
Using serialization as persistent object store (in non bs-bingo: a database)
C# XML Browser demo app
Reading nodes into one big tree, including node values and attributes
SQL Server Report format converter
A tool for converting SQL Server report format files to a SQL script.
XML Comment Cheat Sheet
.NET XML Documentation guide + cheat sheet
ASP COM-less Upload
Upload files to your server without the need for a server-side ASP Component (COM).
DataProducer
A class for separating the presentation layer from the data layer in ASP.
ASP Database access: Access
Using Access with ASP.
ASP Database access: mySQL
Using mySQL with ASP.
ASP Database access: mySQL with Scibit.com drivers
Using mySQL with Scibit.com drivers
ASP Database access: Oracle
Using Oracle with ASP.
ASP Database access: SQL Server
Using SQL Server with ASP.
ASP Ascii table
Printing an Ascii table in ASP
ASP Visitor counter
A basic ASP visitor counter using a textfile.
Writing to Excel in ASP
Writing to an Excel spreadheet in ASP
List all installed COM objects
An application for showing all COM objects.
Winamp control class - TWinampApi
A class for controlling Winamp 2 and 3.
Creating a native windows DLL
Making DLLs (native) in Delphi 5.
Class example
A basic example of class creation.
Exception handling in Delphi
An example of errors and handling them.
Instr function for Delphi
A small method to add to the Pos function.
String splitting
Splits a string into a list
Using windows native DLLs
Static and dynamic loading of a DLL
DataProducer
A class for separating the presentation layer from the data layer in Java.
Ascii table
A borrowed ascii table in servlet format.
Date formatting
Formatting the date in Java/Servlets.
JavaMail sample
Using JavaMail to send mail with a servlet.
JDBC example usage
Using JDBC to access various databases.
XML parsing with JDOM
Using JDOM to parse an XML document (servlet example).
Server Variables
Printing all the server variables in a servlet.
Black and White colour chooser
A greyscale colour picker like you find in Adobe applications.
Colour picker
A colour picker widget.
Web-safe colour palette
A dynamic web palette.
Javascript Mailto spam protector
Encodes mailto: addresses to protect email addresses from harvesters. Possibly the most sophisticated encryption algorithm invented.
Cookie example
Getting and setting cookies in Perl.
Date and time sample
Details about the format of dates and time in Perl.
Form to mail example
A very basic form to mail in Perl.
HTML output/priting in Perl
An alternative way of printing HTML in Perl.
Link extraction/parsing
Extract links from the HREF attribute.
DirectoryBrowser class
Allows you browse files and folders.
File class
A PHP file system class modelled on Java's File class.
FileSystem class
A PHP file system class modelled on FSO
FormTemplate class
A small class for simplyfying HTML forms in PHP.
Graph class
Displays a simple table-based graph.
HtmlSource class
Retrieve the HTML source from a website, and parse/strip its tags.
HtmlTable class
A class for displaying HTML tables
OnlineUsers class
Tracks how many people are currently browsing your website.
DataProducer class
A class for templating in PHP.
PagePress class
Compresses your HTML using GZIP, reducing bandwidth and page load times.
pcCalendar
A class for displaying calendar info.
Rant class
A shoutbox style class.
StopWatch class
A class for measuring how long a page takes to load.
ThumnailBrowser class
Displays large/small thumbnails of image folders.
Tree class
A class for displaying a windows-explorer like tree.
Upload class
A class for simplying the uploading of files.
Whois class
A class for performing whois lookups in PHP.
Database access: Access
A basic example of using Access with PHP.
Database access: mySQL
A basic example of using mySQL with PHP.
Database access: Oracle
A simple example of using Oracle with PHP.
Database access: SQL Server
A simple example of using SQL Server with PHP.
Visitor counter
Text-file based visitor file counter.
Form to email example
A basic form to email snippet.
Munzip - mass unzip files
Unzip many files with the Exceed unzip library.
Update DNS
A Windows shell script for updating dynamic dns.
XTree
Produces a tree output of a directory structure.
Outlook export
Exports all Outlook inbox, contacts, appointments to an XML file.
New Text Document Registry Entry
Restoring the new text document right click option in explorer.
UML cheet sheet
UML cheet sheet for class diagrams
› Home
› C#
› Snippets
› Articles
› Tools
› Taglines
› ASP
› Dictionary Object
› FSO
› Unix cheat sheet
› Gaming
› CSS
› Yak
› Umbraco
› About
› Contact
› Privacy
› Projects
› Search