Overriding ActiveRecord's find method





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 3 Next »
0
Date Submitted Wed. Oct. 29th, 2008 10:51 AM
Revision 1
Helper Celebhir
Tags Directory | find | Folder | PHP | Recursive | search
Comments 1 comments
This function takes a directory, and a "folder" search parameter.
If it finds the directory (either in single level, or any sub folder) it will return the relative path of that folder. "FALSE" if not found. Skips over files and "." and ".." directories. Recursive by default.
0
Date Submitted Sat. Mar. 8th, 2008 1:41 PM
Revision 1
Beginner chorny
Tags find | Grep | Perl
Comments 0 comments
Usage:
found('asdf',@array);

P.S. In perl 5.10 can be written as
use 5.010;
'asdf'~~@array;
1
Date Submitted Mon. Jun. 9th, 2008 3:54 AM
Revision 1
Helper jamesmcm
Tags Encryption | Ruby
Comments 0 comments
A quick implementation of an encrypter which can't be cracked by frequency analysis.
1
Date Submitted Mon. Jun. 9th, 2008 3:56 AM
Revision 1
Helper jamesmcm
Tags decryption | Ruby
Comments 0 comments
The decrypter for the simple encrypter I posted earlier - Takes the encrypted text from a text file - "encrypt.txt" which the encrypter automatically writes to.
1
Date Submitted Mon. Jun. 9th, 2008 4:00 AM
Revision 1
Helper jamesmcm
Tags converter | Ruby
Comments 0 comments
A simple algorithm to convert decimal numbers to binary; pointless since most languages have an inbuilt function but was used for learning about algorithm design.
1
Date Submitted Sat. Feb. 18th, 2006 1:46 PM
Revision 3
Beginner seasons
Tags 0 | 1 | Ruby
Comments 2 comments
Directory Utility for Ruby
1
Date Submitted Fri. Jun. 16th, 2006 9:01 AM
Revision 1
Beginner cyu
Tags migration | rails | rake | Ruby
Comments 0 comments
By default, migrations will run on the development environment. Here's how you would specify another environment.
2
Date Submitted Wed. Aug. 9th, 2006 5:49 AM
Revision 1
Beginner plinge
Tags Ruby | signals | slots
Comments 0 comments
Well, ruby is actually so flexible that there is no real need to implement the goode olde signals & slots metaphor. But it serves nicely as demonstration of ruby properties, so here we go.
4
Date Submitted Thu. Oct. 19th, 2006 4:36 PM
Revision 1
Beginner lagsalot
Tags rails
Comments 0 comments
This will render a flash div only if there is a message in flash. Also will set the id to the flash key.

flash[:notice] returns

This is the notice
4
Date Submitted Mon. Mar. 31st, 2008 6:10 PM
Revision 1
Beginner berkeley_mikeg
Tags explorer | IE | Internet | override | proxy
Comments 0 comments
I have created this sippet because I VPN into work to check problems or e-mail and had to change my IE settings to surf the internet. With this sippet, once configured will allow you to override your internet explorer proxy settings to connect and browse the internet with one double click of the mouse or as I have done, add it to my VPN profile auto starter and it reconfigures my internet browser after i'm connected.
(this will shut the browser if it's running, make the changes and launch it with the changed configuration)
« Previous 1 2 3 Next »