This file contains hidden or 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
$> cat data/smile/test1.smile | |
:) | |
??test key#?nullField!?foofoo2??a???aãb$ | |
??2??????"foo"Ffoo | |
bar?% | |
$> cat test/test.php | |
<?php | |
$smile_file = dirname(__FILE__) . '/../data/smile/test1.smile'; |
This file contains hidden or 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
/* | |
* Copyright 2010-2012 Ning, Inc. | |
* | |
* Ning licenses this file to you under the Apache License, version 2.0 | |
* (the "License"); you may not use this file except in compliance with the | |
* License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains hidden or 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
/*! SET storage_engine=INNODB */; | |
DROP TABLE IF EXISTS accounts; | |
CREATE TABLE accounts ( | |
record_id int(11) unsigned NOT NULL AUTO_INCREMENT, | |
id char(36) NOT NULL, | |
external_key varchar(128) NULL, | |
email varchar(128) NOT NULL, | |
name varchar(100) NOT NULL, | |
first_name_length int NOT NULL, |
This file contains hidden or 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
// Killbill object interface | |
package com.ning.billing.beatrix.util; | |
import java.util.List; | |
public interface MyKBI { | |
List getList(); | |
} |
This file contains hidden or 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
public class TestFoo { | |
@Test | |
public void testFoo() throws Exception { | |
final DBI dbi = new DBI("jdbc:h2:mem:"); | |
dbi.onDemand(HoneyBadger.class).inTransaction(new Transaction<Object, HoneyBadger>() { | |
@Override | |
public Object inTransaction(final HoneyBadger transactional, final TransactionStatus status) throws Exception { | |
transactional.create("something"); | |
transactional.delete("something"); |
This file contains hidden or 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
java.lang.NullPointerException | |
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) | |
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) | |
at sun.reflect.generics.repository.ConstructorRepository.getParameterTypes(ConstructorRepository.java:94) | |
at java.lang.reflect.Method.getGenericParameterTypes(Method.java:291) | |
at org.skife.jdbi.com.fasterxml.classmate.ResolvedTypeWithMembers.resolveMethod(ResolvedTypeWithMembers.java:438) | |
at org.skife.jdbi.com.fasterxml.classmate.ResolvedTypeWithMembers.resolveMemberMethods(ResolvedTypeWithMembers.java:352) | |
at org.skife.jdbi.com.fasterxml.classmate.ResolvedTypeWithMembers.getMemberMethods(ResolvedTypeWithMembers.java:183) | |
at org.skife.jdbi.v2.sqlobject.SqlObject.buildHandlersFor(SqlObject.java:89) | |
at org.skife.jdbi.v2.sqlobject.SqlObject.buildSqlObject(SqlObject.java:66) |
This file contains hidden or 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
select | |
effective_date | |
, cur_period_rev.recognized_amount + past_period_rev.recognized_amount | |
from ( | |
select | |
effective_date | |
, recognized_amount | |
from recognized_revenue | |
where recognized_date = date_format(curdate(), '%Y-%m-01') | |
and effective_date >= date_format(curdate(), '%Y-%m-01') |
This file contains hidden or 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
select | |
effective_date | |
, cur_period_rev.recognized_amount + past_period_rev.recognized_amount | |
from ( | |
select distinct effective_date fulldate from recognized_revenue | |
) pivot_date | |
join ( | |
select | |
effective_date | |
, recognized_amount |
This file contains hidden or 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 EnumeratorIterator | |
def initialize(delegate) | |
@buffer = [] | |
# We expect an Enumerable or Enumerator | |
@delegate = delegate.is_a?(Enumerable) ? delegate.to_enum : delegate | |
_next | |
end | |
def has_next |
This file contains hidden or 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
#!/usr/bin/env awk -f | |
# Based on the idea from https://blogs.oracle.com/taylor22/entry/using_r_to_analyze_g1gc, the | |
# script is updated to use the format of the gc logs as received with the parameters: | |
# -XX:+UseThreadPriorities | |
# -XX:ThreadPriorityPolicy=42 | |
# -Xms1995M -Xmx1995M | |
# -Xss256k -XX:StringTableSize=1000003 | |
# -XX:SurvivorRatio=8 | |
# -XX:MaxTenuringThreshold=1 |
OlderNewer