All I want to do is sort an array of ints by some arbitrary function, criteria(). This is the the only way I've figured out how to do it in Java.
There's a Python implementation of the same thing, for comparison's sake.
| *** glibc detected *** python2.7: free(): invalid pointer: 0x000000000e41a8a0 *** | |
| ======= Backtrace: ========= | |
| /lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x7f5ab00f1626] | |
| python2.7[0x559b31] | |
| python2.7[0x426577] | |
| /usr/local/lib/python2.7/dist-packages/sqlalchemy/cresultproxy.so(+0x1813)[0x7f5aadefd813] | |
| python2.7[0x5020b8] | |
| python2.7[0x425e5c] | |
| python2.7[0x425d02] | |
| python2.7[0x5754ad] |
Decide you want to make n delicious burgers
Go to a butcher, buy n/2 lbs of ribeye steak, ask them to grind it for you
Make that beautiful ground ribeye into 1/2 lb patties
Sprinkle sea salt and ground black pepper on both sides of the patties
Heat cast iron skillet to 400 degrees in an oven (leave the oven at 400)
I hereby claim:
To claim this, I am signing this object:
| <?xml version='1.0' encoding='utf-8'?> | |
| <widget id="com.example.foo" version="0.0.28" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> | |
| <name>Foo</name> | |
| <description>bla bla bla</description> | |
| <author email="[email protected]" href="http://phonegap.com">Foo</author> | |
| <preference name="AllowInlineMediaPlayback" value="false" /> | |
| <preference name="AutoHideSplashScreen" value="true" /> | |
| <preference name="BackupWebStorage" value="cloud" /> | |
| <preference name="DisallowOverscroll" value="true" /> | |
| <preference name="EnableViewportScale" value="false" /> |
| #!/usr/bin/env python | |
| import csv | |
| import fileinput | |
| import json | |
| import sys | |
| def main(): | |
| fields = set() |
| Glenn McCutchen's World Famous© Brunswick Stew | |
| ---------------------------------------------- | |
| Ingredients: | |
| Salt....................to taste | |
| Pepper..................to taste | |
| Tabasco© Sauce..........to taste | |
| Chicken.................One (1) pound, more or less | |
| Pork....................One (1) pound, give or take |
| import os | |
| import re | |
| example = """define([ | |
| 'jquery', | |
| 'underscore', | |
| 'backbone', | |
| 'lib/db_session', |
| # Super simple apache config for serving humortree locally under | |
| # OS X. The default apache config includes other/*.conf, so just | |
| # stick this somewhere like: | |
| # | |
| # /etc/apache2/other/humortree.conf | |
| <VirtualHost *:80> | |
| DocumentRoot "/Users/mccutchen/workspace/humortree.org" | |
| ServerName humortree.local | |
| ErrorLog "/private/var/log/apache2/humortree.local-error_log" |
| commit 7b4e29d030812813e29f7008da45502a68a583b3 | |
| Author: Will McCutchen <[email protected]> | |
| Date: Fri Oct 4 18:45:10 2013 +0000 | |
| api: allow 0 as rescheduling duration. | |
| The actual work of magically rescheduling to today in that case is | |
| left as an exercise for Snakes. | |
| diff --git a/api_v1/app/pattern.py b/api_v1/app/pattern.py |