This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index | |
if admin? | |
@orders = Gift.available.redeemed | |
@orders = @orders.includes(:redemption_product => [:vendor], :redemption_shipping_address => []) | |
else | |
@orders = current_vendor.purchased_gifts | |
end | |
@orders = @orders.with_aging if params[:sort].present? and params[:sort] == 'aging' | |
@orders = @orders.order("#{params[:sort]} #{params[:dir]}") if params[:sort].present? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<StatusResponse> | |
<AccountID>804682</AccountID> | |
<ErrorMsg/> | |
<StatusList> | |
<PICNumber><Status>SORTING/PROCESSING COMPLETE (PC) at 08:38 AM on 01/26/2012 in NEW YORK NY 10040.</Status> | |
<StatusBreakdown> | |
<Status_1>Out for Delivery January 26 2012 8:48 am NEW YORK NY 10040</Status_1> | |
<Status_2>Sorting Complete January 26 2012 8:38 am NEW YORK NY 10040</Status_2> | |
<Status_3>Arrival at Post Office January 26 2012 5:11 am NEW YORK NY 10040</Status_3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
typedef enum { | |
kGolfballGrippiesAnimationNone = 0, | |
kGolfballGrippiesAnimationLeft, | |
kGolfballGrippiesAnimationRight | |
} GolfballGrippiesAnimation; | |
@interface GolfballGrippies : UIView { | |
GolfballGrippiesAnimation currentAnimation_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2011-10-31 13:00:51] ./installer -a /Users/hbridges/.rvm/rubies/ree-1.8.7-2011.03 --no-tcmalloc --dont-install-useful-gems | |
[33m[44m[1mWelcome to the Ruby Enterprise Edition installer[0m[37m[40m | |
This installer will help you install Ruby Enterprise Edition 1.8.7-2011.03. | |
Don't worry, none of your system files will be touched if you don't want them | |
to, so there is no risk that things will screw up. | |
You can expect this from the installation process: | |
[1m1.[0m[37m[40m Ruby Enterprise Edition will be compiled and optimized for speed for this | |
system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def binary_search(needle, haystack): | |
search_index = int(math.floor(len(haystack) / 2)) | |
test_item = haystack[search_index] | |
print "Searching for %d in %s" % (needle, haystack) | |
print "Haystack is %d long. First looking at index %d" % (len(haystack), | |
search_index) | |
print "Item at index %d is %d" % (search_index, haystack[search_index]) |
NewerOlder