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
================================== | |
/home/sward/.m2/repository/com/googlecode/japi-checker/reference-test-jar/0.1.4-SNAPSHOT/reference-test-jar-0.1.4-SNAPSHOT.jar | |
/home/sward/.m2/repository/com/googlecode/japi-checker/new-test-jar/0.1.4-SNAPSHOT/new-test-jar-0.1.4-SNAPSHOT.jar | |
================================== | |
/home/sward/.m2/repository/com/googlecode/japi-checker/reference-test-jar/0.1.4-SNAPSHOT/reference-test-jar-0.1.4-SNAPSHOT.jar | |
/home/sward/.m2/repository/com/googlecode/japi-checker/new-test-jar/0.1.4-SNAPSHOT/new-test-jar-0.1.4-SNAPSHOT.jar | |
class com/googlecode/japi/checker/tests/RemovedClass extends java/lang/Object { | |
- source: RemovedClass.java | |
- debug: null | |
+(m) <init> ()V null null |
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
IRBuilder19.java:198:in `receiveArgs': java.lang.NoSuchFieldError: UNDEFINED | |
from IRBuilder19.java:252:in `receiveMethodArgs' | |
from IRBuilder.java:1782:in `defineNewMethod' | |
from IRBuilder.java:1801:in `buildDefn' | |
from IRBuilder.java:492:in `build' | |
from IRBuilder.java:2535:in `buildNewline' | |
from IRBuilder.java:523:in `build' | |
from IRBuilder.java:913:in `buildBlock' | |
from IRBuilder.java:478:in `build' | |
from IRBuilder.java:1084:in `buildClass' |
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 encode(bytearray []) | |
//process bytearray here | |
end | |
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 exists?(conditions = :none) | |
return false if @association.owner.new_record? | |
super(conditions) | |
end |
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
OS: Mac OSX Mountain Lion | |
make test | |
running API tests | |
............ | |
OK (12 tests) | |
running GC tests |
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
# Object Counter for use in example on vipulnsward.com about Frozen | |
# Strings in Ruby | |
module ObjectCounter | |
def self.count | |
GC.disable | |
before_count = ObjectSpace.count_objects | |
yield | |
after_count = ObjectSpace.count_objects | |
after_count.each do |k,v| | |
after_count[k] = v.to_i - before_count[k].to_i |
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
class Product | |
def initialize(name, price, launched_on) | |
@name, @price, @launched_on = name, price, launched_on | |
end | |
def name | |
@name | |
end |
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
df = NSDateFormatter.alloc.init # Date Formatter | |
df.dateFormat = "yyyy-MM-dd" | |
Product.new("iPhone 5", 199, df.dateFromString("2012-09-21")).price | |
products = [Product.new("iPhone 5", 199, df.dateFromString("2012-09-21")),Product.new("iPad Mini", 329, df.dateFromString("2012-11-02")),Product.new("MacBook Pro",1699, df.dateFromString("2012-06-11")),Product.new("iMac", 1299, df.dateFromString("2012-11-02"))] |
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
(main)> products.valueForKeyPath("@count") | |
=> 4 | |
(main)> products.valueForKeyPath("@sum.price") | |
=> 3526.0 | |
(nil)? products.valueForKeyPath("@avg.price") | |
=> 881.5 | |
(nil)? products.valueForKeyPath("@max.price") | |
=> 1699 | |
(main)> products.valueForKeyPath("@min.launched_on") | |
=> 2012-06-11 00:00:00 +0530 |
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
(main)> iPadMiniPredicate = NSPredicate.predicateWithFormat("name = 'iPad Mini'") | |
=> #<NSComparisonPredicate:0x9d27250> | |
(main)> products.filteredArrayUsingPredicate(iPadMiniPredicate) | |
=> [#<Product:0x9b4f780 @name="iPad Mini" @price=329 @launched_on=2012-11-02 00:00:00 +0530>] | |
(main)> macbookProPredicate = NSPredicate.predicateWithFormat("name = 'MacBook Pro'") | |
=> #<NSComparisonPredicate:0x9d24d70> | |
(main)> products.filteredArrayUsingPredicate(macbookProPredicate) | |
=> [#<Product:0x9b4fac0 @name="MacBook Pro" @price=1699 @launched_on=2012-06-11 00:00:00 +0530>] |
OlderNewer