7 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for xrjf

The days when the calculator had almost 3 thousand visits a day have gone. Since then, there have been several major versions and lots of minor versions. Somehow, I feel pleased in that the present core algorithm follows the rules of the first I read; of course, extending the simplicity …

0
399
Member Avatar for turt2live

Simply enough: Call the function, get the returned filename. Function Variables: $file : The input file (source/background) $destination : Where you want the new watermarked image to go $overlay : The overlay image (foreground), this is default set (if not passed in) to "images/watermark.png" $X : X-Position of overlay (default …

Member Avatar for webatz
1
521
Member Avatar for thines01

Here is a technique I use for sending an email using GMail. Notice: You might need to change your email settings under [B]Forwarding and POP/IMAP[/B] inside your GMail settings (to Enable POP). Here is a test program for using the class library (shown in the snippet box): [CODE] using System; …

0
708
Member Avatar for Krstevski

Hello friends, I wrote a simple class for string validation and now I want to share with you. The class contains: - Constructor(s) public Validator() public Validator(string text) - Properties private string strText = string.Empty; - Method(s) public bool isNullOrEmpty() public bool isNullOrEmpty(string str) public bool isLengthMax(int maxLength) public bool …

Member Avatar for Momerath
1
239
Member Avatar for Beat_Slayer

ITunes Library Persistent ID Editor. Sample usage: [CODE]fxml = 'iTunes Music Library.xml' # path to xml file fitl = 'iTunes Library.itl' # path to itl file itk = ITunesLibKeys(fxml, fitl) print itk.file_xml # prints path to xml file print itk.file_itl # prints path to itl file print itk.xml_key # prints …

0
1K
Member Avatar for Krstevski

This simple library containing some methods of Ajax. Example about addContent(url, target): With this function you can change the content of the someone DIV tag. E.g: index.php [CODE=php] <html> <head> <title>Untitled Document</title> <script type="text/javascript" src="ajax.js"></script> </head> <body> <div id="test"> <a href="javascript: addContent('test.php', 'content')"> Change </a> </div> <div id="content"> <label> This …

0
782
Member Avatar for god0fgod

I've created a few functions to be used with pygame which are based on anti-aliased curves. At the moment and likely forever, it has two useful functions: aacircle(s,x,y,r,colour): Draws an anti-aliased circle on the surface s at the starting point x and y with the radius r. The circle will …

0
758

The End.