Ruby On help with processing nzb/xm...

by Elij, January 10, 2010 01:30 Star_fullStar_fullStar_full

When dealing with XML there...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
def set_teams_members
	members = get_components(Fees::ITEMS, params[:fee][:teams], params[:teams])
	teams = get_components(MembershipFee::ITEMS, params[:fee][:members], params[:members])
...

Ruby On Need to remove If else

by Elij, January 30, 2009 13:44

rationalise your object mod...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
RankHistory.find(:all, :conditions => [ "created_at IN (?)", RankHistory.maximum(:created_at, :group => :id)])

Ruby On Nested select; is there a b...

by Elij, December 11, 2008 19:58

not really sure what you me...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
private static bool canBeXmlSerialized(object @object)
{
	return @object is IXmlSerializable || @object.GetType().IsSerializable;
...

C# On Check type is XML Serializable

by Elij, November 20, 2008 01:55 Star_fullStar_fullStar_fullStar_full

If you have an instance at ...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
public static class HtmlHelper {
    public static string StripHtmlComments(string html) {
        if (html == null) {
...

C# On Strip Html Comments

by Elij, November 11, 2008 04:52 Star_fullStar_fullStar_fullStar_full

haven't tested -- but if it...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
def convert(file)
	output = [""]

...

Ruby On Pretty output of permission...

by Elij, November 07, 2008 00:08 Star_fullStar_fullStar_fullStar_fullStar_full

Not much difference -- but ...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
tail -1000000 process.log | grep 'PROCESSING N' | cut -d: -f2 | sort | uniq -c

Bash On Groupping with stats

by Elij, November 01, 2008 18:29 Star_fullStar_fullStar_fullStar_fullStar_full

It's straight forward to do...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
using System;
using System.Text.RegularExpressions;

...

C# On Parse Relative Date

by Elij, September 11, 2008 06:16 Star_fullStar_fullStar_fullStar_full

Please note I haven't teste...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
@songs = {}
feed = RssParser.run("http://ws.audioscrobbler.com/1.0/user/me/recenttracks.rss")
feed[:items].each { |item| @songs[item[:title]] = item[:link] }
...

Ruby On Think this needs a loop

by Elij, September 06, 2008 20:18 Star_fullStar_fullStar_fullStar_fullStar_full
4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
List<Item> items = new List<Item>();

string descriptions = string.Join(",", items.Select(item => item.Description).ToArray());

C# On Traversing a List and colle...

by Elij, July 09, 2008 05:20 Star_fullStar_fullStar_fullStar_fullStar_full

If linq is an option (.net ...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
<html>
<head>   
<title>My Experiment</title>   
...

JavaScript On How to Refactor from a Loop...

by Elij, December 31, 2007 10:49 Star_fullStar_fullStar_fullStar_full

bit hacky...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
grep -n UNRESERVED /usr/lib/ruby/1.8/uri/common.rb

Ruby On why does this puke?

by Elij, December 20, 2007 08:18

It doesn't include the pipe...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
import re

def getWordFrequencies(text):
...

Python On Count word occurrences in a...

by Elij, December 08, 2007 08:58 Star_fullStar_fullStar_fullStar_full

The regex needs some work -...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk
1
2
3
4
		GridBagConstraints c = new GridBagConstraints();
		c.insets.bottom = 2;
		c.insets.top = 2;
...

Java On Swing GridBagLayout in calc...

by Elij, November 21, 2007 05:08 Star_fullStar_fullStar_full

I've demonstrated using fal...

4d72203c38dd5f3e3d2d446b5888e8a7 Talk