Popular source snippets
-
» GENERIC LOGGING CLASS
Category: C#
Visits: 1100
- Generic logging class from business objects. Can be easily setup to log to the application event log and/or a database.
-
» STR REPLACE
Category: Javascript
Visits: 1090
- Javascript string replace is a very useful function. Javascript has a built-in string replace function but it uses regular expressions. Here you will fint two versions of custom string replace functions...
-
» SOCKET ERROR HANDLING
Category: Python
Visits: 1054
- A simple to understand example of how to handle socket errors in python
-
» DLL INJECTION
Category: C++
Visits: 1041
- The below is a cool snippet of code that can insert a dll into a process. Just provide the Process ID and the path of the dll. What's even cooler about this code is how it works.
-
» GET ALL CLASSES WITHIN A PACKAGE
Category: Java
Visits: 1028
- The code below gets all classes within a given package. Notice that it should only work for classes found locally, getting really ALL classes is impossible.
-
» CREATE IMAGE'S THUMBNAIL
Category: C#
Visits: 1009
- Create a thumbnail from an image and save the thumbnail into it's original image file format
-
» CONVERT A GENERIC COLLECTION TO A GENERIC ARRAY
Category: C#
Visits: 1000
- This method converts a generic collection to a generic array.
-
» CAPTCHA IMAGE
Category: C#
Visits: 972
- How to create a captcha image using C#
-
» RENAME ALL FILES IN A DIRECTORY WITH A DATE
Category: Bash
Visits: 961
- This script is good for log files... ofcourse we can modulate this and use it for more things than adding dates at the beginning of file names.
-
» DECIMAL TO BINARY CONVERSION
Category: Python
Visits: 961
- Converting a decimal integer (denary, base 10) to a binary string (base 2) is amazingly simple. An exception is raised for negative numbers and zero is a special case. To test the result, the binary string...