public static class Enum<T>
{
public static T Parse(string s)
...
C# On Seriously why is there no T...
by Wolfbyte,
February 21, 2011 06:14
Assembly GetFromCache(string name) {
if(!assemblyCache.Contains(name)) return null;
return assemblyCache[name];
...
C# On Getting data from a list of...
by Wolfbyte,
December 14, 2010 04:03
Lots of small methods and t...
public static class ListExtensions
{
public static string RenderList<T>(this HtmlHelper helper, IEnumerable<T> list,
...
def make_change(amount, coins = [100, 50, 20, 10, 5, 1, 0.5, 0.1])
make_change_rec(amount, coins.sort { |a,b| b <=> a })
end
...
def in_pos_activation?(&block)
return is_pos_activation? { true } unless block_given?
session[:pos_activation] && yield
...
def transact( objs, actions ) (objs.empty? or (objs[0].send(actions[0]) and transact(objs[1..-1],actions) )) or (objs[0].send(actions[1]) and false) end
require 'rexml/document' class REXML::Elements ...
Ruby On cleaner way to limit result...
by Wolfbyte,
July 15, 2008 05:43
Be wary of converting it to...
public static string AsCommaSeparatedValues<T>(this IEnumerable<T> items, Func<T, string> translator)
{
return items.Select(translator).AsCommaSeparatedValues();
...
C# On Traversing a List and colle...
by Wolfbyte,
July 10, 2008 08:22
Curses! I wasn't logged in ...

Create your own generic Enu...