text:
#include <cctype>

#include <graphene/app/api.hpp>
#include <graphene/app/api_access.hpp>
#include <graphene/app/application.hpp>
#include <graphene/app/impacted.hpp>
#include <graphene/chain/database.hpp>
#include <graphene/chain/get_config.hpp>
#include <graphene/utilities/key_conversion.hpp>
#include <graphene/chain/protocol/fee_schedule.hpp>
#include <graphene/chain/confidential_object.hpp>
#include <graphene/chain/market_object.hpp>
#include <graphene/chain/transaction_object.hpp>
#include <graphene/chain/withdraw_permission_object.hpp>
#include <graphene/chain/worker_object.hpp>

#include <fc/crypto/hex.hpp>
#include <fc/smart_ref_impl.hpp>

namespace graphene { namespace app {

    login_api::login_api(application& a)
    :_app(a)
    {
    }

    login_api::~login_api()
    {
    }

    bool login_api::login(const string& user, const string& password)
    {
       optional< api_access_info > acc = _app.get_api_access_info( user );
       if( !acc.valid() )
          return false;
       if( acc->password_hash_b64 != "*" )
       {
          std::string password_salt = fc::base64_decode( acc->password_salt_b64 );
          std::string acc_password_hash = fc::base64_decode( acc->password_hash_b64 );

          fc::sha256 hash_obj = fc::sha256::hash( password + password_salt );
          if( hash_obj.data_size() != acc_password_hash.length() )
             return false;
          if( memcmp( hash_obj.data(), acc_password_hash.c_str(), hash_obj.data_size() ) != 0 )
             return false;
       }

       for( const std::string& api_name : acc->allowed_apis )
          enable_api( api_name );
       return true;
    }

    void login_api::enable_api( const std::string& api_name )
    {
       if( api_name == "database_api" )
       {
          _database_api = std::make_shared< database_api >( std::ref( *_app.chain_database() ) );
       }
       else if( api_name == "block_api" )
       {
          _block_api = std::make_shared< block_api >( std::ref( *_app.chain_database() ) );
       }
       else if( api_name == "network_broadcast_api" )
       {
          _network_broadcast_api = std::make_shared< network_broadcast_api >( std::ref( _app ) );
       }
       else if( api_name == "history_api" )
       {
          _history_api = std::make_shared< history_api >( _app );
       }
       else if( api_name == "network_node_api" )
       {
          _network_node_api = std::make_shared< network_node_api >( std::ref(_app) );
       }
       else if( api_name == "crypto_api" )
       {
          _crypto_api = std::make_shared< crypto_api >();
       }
       else if( api_name == "asset_api" )
       {
          _asset_api = std::make_shared< asset_api >( std::ref( *_app.chain_database() ) );
       }
       else if( api_name == "debug_api" )
       {
          // can only enable this API if the plugin was loaded
          if( _app.get_plugin( "debug_witness" ) )
             _debug_api = std::make_shared< graphene::debug_witness::debug_api >( std::ref(_app) );
       }
       return;
    }

    // block_api
    block_api::block_api(graphene::chain::database& db) : _db(db) { }
    block_api::~block_api() { }

    vector<optional<signed_block>> block_api::get_blocks(uint32_t block_num_from, uint32_t block_num_to)const
    {
       FC_ASSERT( block_num_to >= block_num_from );
       vector<optional<signed_block>> res;
       for(uint32_t block_num=block_num_from; block_num<=block_num_to; block_num++) {
          res.push_back(_db.fetch_block_by_number(block_num));
       }
       return res;
    }

    network_broadcast_api::network_broadcast_api(application& a):_app(a)
    {
       _applied_block_connection = _app.chain_database()->applied_block.connect([this](const signed_block& b){ on_applied_block(b); });
    }

    void network_broadcast_api::on_applied_block( const signed_block& b )
    {
       if( _callbacks.size() )
       {
          /// we need to ensure the database_api is not deleted for the life of the async operation
          auto capture_this = shared_from_this();
          for( uint32_t trx_num = 0; trx_num < b.transactions.size(); ++trx_num )
          {
             const auto& trx = b.transactions[trx_num];
             auto id = trx.id();
             auto itr = _callbacks.find(id);
             if( itr != _callbacks.end() )
             {
                auto block_num = b.block_num();
                auto& callback = _callbacks.find(id)->second;
                fc::async( [capture_this,this,id,block_num,trx_num,trx,callback](){ callback( fc::variant(transaction_confirmation{ id, block_num, trx_num, trx}) ); } );
             }
          }
       }
    }

    void network_broadcast_api::broadcast_transaction(const signed_transaction& trx)
    {
       trx.validate();
       _app.chain_database()->push_transaction(trx);
       _app.p2p_node()->broadcast_transaction(trx);
    }

    void network_broadcast_api::broadcast_block( const signed_block& b )
    {
       _app.chain_database()->push_block(b);
       _app.p2p_node()->broadcast( net::block_message( b ));
    }

    void network_broadcast_api::broadcast_transaction_with_callback(confirmation_callback cb, const signed_transaction& trx)
    {
       trx.validate();
       _callbacks[trx.id()] = cb;
       _app.chain_database()->push_transaction(trx);
       _app.p2p_node()->broadcast_transaction(trx);
    }

    network_node_api::network_node_api( application& a ) : _app( a )
    {
    }

    fc::variant_object network_node_api::get_info() const
    {
       fc::mutable_variant_object result = _app.p2p_node()->network_get_info();
       result["connection_count"] = _app.p2p_node()->get_connection_count();
       return result;
    }

    void network_node_api::add_node(const fc::ip::endpoint& ep)
    {
       _app.p2p_node()->add_node(ep);
    }

    std::vector<net::peer_status> network_node_api::get_connected_peers() const
    {
       return _app.p2p_node()->get_connected_peers();
    }

    std::vector<net::potential_peer_record> network_node_api::get_potential_peers() const
    {
       return _app.p2p_node()->get_potential_peers();
    }

    fc::variant_object network_node_api::get_advanced_node_parameters() const
    {
       return _app.p2p_node()->get_advanced_node_parameters();
    }

    void network_node_api::set_advanced_node_parameters(const fc::variant_object& params)
    {
       return _app.p2p_node()->set_advanced_node_parameters(params);
    }

    fc::api<network_broadcast_api> login_api::network_broadcast()const
    {
       FC_ASSERT(_network_broadcast_api);
       return *_network_broadcast_api;
    }

    fc::api<block_api> login_api::block()const
    {
       FC_ASSERT(_block_api);
       return *_block_api;
    }

    fc::api<network_node_api> login_api::network_node()const
    {
       FC_ASSERT(_network_node_api);
       return *_network_node_api;
    }

    fc::api<database_api> login_api::database()const
    {
       FC_ASSERT(_database_api);
       return *_database_api;
    }

    fc::api<history_api> login_api::history() const
    {
       FC_ASSERT(_history_api);
       return *_history_api;
    }

    fc::api<crypto_api> login_api::crypto() const
    {
       FC_ASSERT(_crypto_api);
       return *_crypto_api;
    }

    fc::api<asset_api> login_api::asset() const
    {
       FC_ASSERT(_asset_api);
       return *_asset_api;
    }

    fc::api<graphene::debug_witness::debug_api> login_api::debug() const
    {
       FC_ASSERT(_debug_api);
       return *_debug_api;
    }

    vector<account_id_type> get_relevant_accounts( const object* obj )
    {
       vector<account_id_type> result;
       if( obj->id.space() == protocol_ids )
       {
          switch( (object_type)obj->id.type() )
          {
            case null_object_type:
            case base_object_type:
            case OBJECT_TYPE_COUNT:
               return result;
            case account_object_type:{
               result.push_back( obj->id );
               break;
            } case asset_object_type:{
               const auto& aobj = dynamic_cast<const asset_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->issuer );
               break;
            } case force_settlement_object_type:{
               const auto& aobj = dynamic_cast<const force_settlement_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->owner );
               break;
            } case committee_member_object_type:{
               const auto& aobj = dynamic_cast<const committee_member_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->committee_member_account );
               break;
            } case witness_object_type:{
               const auto& aobj = dynamic_cast<const witness_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->witness_account );
               break;
            } case limit_order_object_type:{
               const auto& aobj = dynamic_cast<const limit_order_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->seller );
               break;
            } case call_order_object_type:{
               const auto& aobj = dynamic_cast<const call_order_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->borrower );
               break;
            } case custom_object_type:{
              break;
            } case proposal_object_type:{
               const auto& aobj = dynamic_cast<const proposal_object*>(obj);
               assert( aobj != nullptr );
               flat_set<account_id_type> impacted;
               transaction_get_impacted_accounts( aobj->proposed_transaction, impacted );
               result.reserve( impacted.size() );
               for( auto& item : impacted ) result.emplace_back(item);
               break;
            } case operation_history_object_type:{
               const auto& aobj = dynamic_cast<const operation_history_object*>(obj);
               assert( aobj != nullptr );
               flat_set<account_id_type> impacted;
               operation_get_impacted_accounts( aobj->op, impacted );
               result.reserve( impacted.size() );
               for( auto& item : impacted ) result.emplace_back(item);
               break;
            } case withdraw_permission_object_type:{
               const auto& aobj = dynamic_cast<const withdraw_permission_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->withdraw_from_account );
               result.push_back( aobj->authorized_account );
               break;
            } case vesting_balance_object_type:{
               const auto& aobj = dynamic_cast<const vesting_balance_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->owner );
               break;
            } case worker_object_type:{
               const auto& aobj = dynamic_cast<const worker_object*>(obj);
               assert( aobj != nullptr );
               result.push_back( aobj->worker_account );
               break;
            } case balance_object_type:{
               /** these are free from any accounts */
               break;
            }
          }
       }
       else if( obj->id.space() == implementation_ids )
       {
          switch( (impl_object_type)obj->id.type() )
          {
                 case impl_global_property_object_type:
                  break;
                 case impl_dynamic_global_property_object_type:
                  break;
                 case impl_reserved0_object_type:
                  break;
                 case impl_asset_dynamic_data_type:
                  break;
                 case impl_asset_bitasset_data_type:
                  break;
                 case impl_account_balance_object_type:{
                  const auto& aobj = dynamic_cast<const account_balance_object*>(obj);
                  assert( aobj != nullptr );
                  result.push_back( aobj->owner );
                  break;
               } case impl_account_statistics_object_type:{
                  const auto& aobj = dynamic_cast<const account_statistics_object*>(obj);
                  assert( aobj != nullptr );
                  result.push_back( aobj->owner );
                  break;
               } case impl_transaction_object_type:{
                  const auto& aobj = dynamic_cast<const transaction_object*>(obj);
                  assert( aobj != nullptr );
                  flat_set<account_id_type> impacted;
                  transaction_get_impacted_accounts( aobj->trx, impacted );
                  result.reserve( impacted.size() );
                  for( auto& item : impacted ) result.emplace_back(item);
                  break;
               } case impl_blinded_balance_object_type:{
                  const auto& aobj = dynamic_cast<const blinded_balance_object*>(obj);
                  assert( aobj != nullptr );
                  result.reserve( aobj->owner.account_auths.size() );
                  for( const auto& a : aobj->owner.account_auths )
                     result.push_back( a.first );
                  break;
               } case impl_block_summary_object_type:
                  break;
                 case impl_account_transaction_history_object_type:
                  break;
                 case impl_chain_property_object_type:
                  break;
                 case impl_witness_schedule_object_type:
                  break;
                 case impl_budget_record_object_type:
                  break;
                 case impl_special_authority_object_type:
                  break;
                 case impl_buyback_object_type:
                  break;
                 case impl_fba_accumulator_object_type:
                  break;
          }
       }
       return result;
    } // end get_relevant_accounts( obj )

    vector<order_history_object> history_api::get_fill_order_history( asset_id_type a, asset_id_type b, uint32_t limit  )const
    {
       FC_ASSERT(_app.chain_database());
       const auto& db = *_app.chain_database();
       if( a > b ) std::swap(a,b);
       const auto& history_idx = db.get_index_type<graphene::market_history::history_index>().indices().get<by_key>();
       history_key hkey;
       hkey.base = a;
       hkey.quote = b;
       hkey.sequence = std::numeric_limits<int64_t>::min();

       uint32_t count = 0;
       auto itr = history_idx.lower_bound( hkey );
       vector<order_history_object> result;
       while( itr != history_idx.end() && count < limit)
       {
          if( itr->key.base != a || itr->key.quote != b ) break;
          result.push_back( *itr );
          ++itr;
          ++count;
       }

       return result;
    }

    vector<operation_history_object> history_api::get_account_history( account_id_type account,
                                                                       operation_history_id_type stop,
                                                                       unsigned limit,
                                                                       operation_history_id_type start ) const
    {
       FC_ASSERT( _app.chain_database() );
       const auto& db = *_app.chain_database();
       FC_ASSERT( limit <= 100 );
       vector<operation_history_object> result;
       const auto& stats = account(db).statistics(db);
       if( stats.most_recent_op == account_transaction_history_id_type() ) return result;
       const account_transaction_history_object* node = &stats.most_recent_op(db);
       if( start == operation_history_id_type() )
          start = node->operation_id;

       while(node && node->operation_id.instance.value > stop.instance.value && result.size() < limit)
       {
          if( node->operation_id.instance.value <= start.instance.value )
             result.push_back( node->operation_id(db) );
          if( node->next == account_transaction_history_id_type() )
             node = nullptr;
          else node = &node->next(db);
       }

       return result;
    }

    vector<operation_history_object> history_api::get_relative_account_history( account_id_type account,
                                                                                uint32_t stop,
                                                                                unsigned limit,
                                                                                uint32_t start) const
    {
       FC_ASSERT( _app.chain_database() );
       const auto& db = *_app.chain_database();
       FC_ASSERT(limit <= 100);
       vector<operation_history_object> result;
       if( start == 0 )
         start = account(db).statistics(db).total_ops;
       else start = min( account(db).statistics(db).total_ops, start );
       const auto& hist_idx = db.get_index_type<account_transaction_history_index>();
       const auto& by_seq_idx = hist_idx.indices().get<by_seq>();

       auto itr = by_seq_idx.upper_bound( boost::make_tuple( account, start ) );
       auto itr_stop = by_seq_idx.lower_bound( boost::make_tuple( account, stop ) );
       --itr;

       while ( itr != itr_stop && result.size() < limit )
       {
          result.push_back( itr->operation_id(db) );
          --itr;
       }

       return result;
    }

    flat_set<uint32_t> history_api::get_market_history_buckets()const
    {
       auto hist = _app.get_plugin<market_history_plugin>( "market_history" );
       FC_ASSERT( hist );
       return hist->tracked_buckets();
    }

    vector<bucket_object> history_api::get_market_history( asset_id_type a, asset_id_type b,
                                                           uint32_t bucket_seconds, fc::time_point_sec start, fc::time_point_sec end )const
    { try {
       FC_ASSERT(_app.chain_database());
       const auto& db = *_app.chain_database();
       vector<bucket_object> result;
       result.reserve(200);

       if( a > b ) std::swap(a,b);

       const auto& bidx = db.get_index_type<bucket_index>();
       const auto& by_key_idx = bidx.indices().get<by_key>();

       auto itr = by_key_idx.lower_bound( bucket_key( a, b, bucket_seconds, start ) );
       while( itr != by_key_idx.end() && itr->key.open <= end && result.size() < 200 )
       {
          if( !(itr->key.base == a && itr->key.quote == b && itr->key.seconds == bucket_seconds) )
          {
            return result;
          }
          result.push_back(*itr);
          ++itr;
       }
       return result;
    } FC_CAPTURE_AND_RETHROW( (a)(b)(bucket_seconds)(start)(end) ) }

    crypto_api::crypto_api(){};

    blind_signature crypto_api::blind_sign( const extended_private_key_type& key, const blinded_hash& hash, int i )
    {
       return fc::ecc::extended_private_key( key ).blind_sign( hash, i );
    }

    signature_type crypto_api::unblind_signature( const extended_private_key_type& key,
                                                     const extended_public_key_type& bob,
                                                     const blind_signature& sig,
                                                     const fc::sha256& hash,
                                                     int i )
    {
       return fc::ecc::extended_private_key( key ).unblind_signature( extended_public_key( bob ), sig, hash, i );
    }

    commitment_type crypto_api::blind( const blind_factor_type& blind, uint64_t value )
    {
       return fc::ecc::blind( blind, value );
    }

    blind_factor_type crypto_api::blind_sum( const std::vector<blind_factor_type>& blinds_in, uint32_t non_neg )
    {
       return fc::ecc::blind_sum( blinds_in, non_neg );
    }

    bool crypto_api::verify_sum( const std::vector<commitment_type>& commits_in, const std::vector<commitment_type>& neg_commits_in, int64_t excess )
    {
       return fc::ecc::verify_sum( commits_in, neg_commits_in, excess );
    }

    verify_range_result crypto_api::verify_range( const commitment_type& commit, const std::vector<char>& proof )
    {
       verify_range_result result;
       result.success = fc::ecc::verify_range( result.min_val, result.max_val, commit, proof );
       return result;
    }

    std::vector<char> crypto_api::range_proof_sign( uint64_t min_value,
                                                    const commitment_type& commit,
                                                    const blind_factor_type& commit_blind,
                                                    const blind_factor_type& nonce,
                                                    int8_t base10_exp,
                                                    uint8_t min_bits,
                                                    uint64_t actual_value )
    {
       return fc::ecc::range_proof_sign( min_value, commit, commit_blind, nonce, base10_exp, min_bits, actual_value );
    }

    verify_range_proof_rewind_result crypto_api::verify_range_proof_rewind( const blind_factor_type& nonce,
                                                                            const commitment_type& commit,
                                                                            const std::vector<char>& proof )
    {
       verify_range_proof_rewind_result result;
       result.success = fc::ecc::verify_range_proof_rewind( result.blind_out,
                                                            result.value_out,
                                                            result.message_out,
                                                            nonce,
                                                            result.min_val,
                                                            result.max_val,
                                                            const_cast< commitment_type& >( commit ),
                                                            proof );
       return result;
    }

    range_proof_info crypto_api::range_get_info( const std::vector<char>& proof )
    {
       return fc::ecc::range_get_info( proof );
    }

    // asset_api
    asset_api::asset_api(graphene::chain::database& db) : _db(db) { }
    asset_api::~asset_api() { }

    vector<account_asset_balance> asset_api::get_asset_holders( asset_id_type asset_id ) const {

      const auto& bal_idx = _db.get_index_type< account_balance_index >().indices().get< by_asset_balance >();
      auto range = bal_idx.equal_range( boost::make_tuple( asset_id ) );

      vector<account_asset_balance> result;

      for( const account_balance_object& bal : boost::make_iterator_range( range.first, range.second ) )
      {
        if( bal.balance.value == 0 ) continue;

        auto account = _db.find(bal.owner);

        account_asset_balance aab;
        aab.name       = account->name;
        aab.account_id = account->id;
        aab.amount     = bal.balance.value;

        result.push_back(aab);
      }

      return result;
    }

    // get number of asset holders.
    int asset_api::get_asset_holders_count( asset_id_type asset_id ) const {

      const auto& bal_idx = _db.get_index_type< account_balance_index >().indices().get< by_asset_balance >();
      auto range = bal_idx.equal_range( boost::make_tuple( asset_id ) );

      int count = boost::distance(range) - 1;

      return count;
    }
    // function to get vector of system assets with holders count.
    vector<asset_holders> asset_api::get_all_asset_holders() const {

      vector<asset_holders> result;

      vector<asset_id_type> total_assets;
      for( const asset_object& asset_obj : _db.get_index_type<asset_index>().indices() )
      {
        const auto& dasset_obj = asset_obj.dynamic_asset_data_id(_db);

        asset_id_type asset_id;
        asset_id = dasset_obj.id;

        const auto& bal_idx = _db.get_index_type< account_balance_index >().indices().get< by_asset_balance >();
        auto range = bal_idx.equal_range( boost::make_tuple( asset_id ) );

        int count = boost::distance(range) - 1;

        asset_holders ah;
        ah.asset_id       = asset_id;
        ah.count     = count;

        result.push_back(ah);
      }

      return result;
    }

} } // graphene::app


text:
/* Get a function yielding an array of computed values for each node in the
 * AST, indexed by AST node id */

var R = require('ramda');
var parse = require('./parse');
var astFunc = require('./func').fromAST;

var _values = function(AST) {
  var funcs = [];
  (function collectFuncs(node) {
    funcs[node.id] = astFunc(node);
    node.children.forEach(collectFuncs);
  })(AST);
  return function(ctx) {
    return funcs.map(function(func) {
      return func(ctx);
    });
  };
};

var values = R.pipe(parse, _values);
values.fromAST = _values;
module.exports = values;

redpajama_set_name: RedPajamaGithub


text:
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.util.Map;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
 * Created by Stephen West on 02/01/2017.
 */
public class TestTextDisplay {

    private static Map<String, String> tests;

    @BeforeAll
    public static void readTestCases(){
        tests = TestUtils.readTestFile("data01.txt");

    }

    @Test
    public void testEmptyTeste4x4isReadCorrectly() {
        assertEquals(
                "...." + System.lineSeparator() +
                        "...." + System.lineSeparator() +
                        "...." + System.lineSeparator() +
                        "...." + System.lineSeparator(), tests.get("e4x4"));
    }

    @Test
    public void testEmptyTeste3x5isReadCorrectly() {
        assertEquals(
                "....." + System.lineSeparator() +
                        "....." + System.lineSeparator() +
                        "....." + System.lineSeparator(), TestUtils.getTestCase("data01.txt", "e3x5"));
    }

    @Test
    public void testEmptyTeste5x5isReadCorrectly(){

        assertEquals(
                "....." + System.lineSeparator() +
                         "....." + System.lineSeparator() +
                         "....." + System.lineSeparator() +
                         "....." + System.lineSeparator() +
                         "....." + System.lineSeparator(), TestUtils.getTestCase("data01.txt","e5x5") );
    }

    @Test
    void tesSnakeAt0_0isReadCorrectly(){

        assertEquals(
                "....." + System.lineSeparator() +
                "....." + System.lineSeparator() +
                "....." + System.lineSeparator() +
                "....." + System.lineSeparator() +
                "S...." + System.lineSeparator(), TestUtils.getTestCase("data01.txt","e5x5s0_0") );
    }

    @Test
    void tesMushroomAt0_0isReadCorrectly(){

        assertEquals(
                "....." + System.lineSeparator() +
                        "....." + System.lineSeparator() +
                        "....." + System.lineSeparator() +
                        "....." + System.lineSeparator() +
                        "M...." + System.lineSeparator(), TestUtils.getTestCase("data01.txt","e5x5m0_0") );
    }

}


text:
package org.openntf.xpt.core.utils;

import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Iterator;
import java.util.List;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;

import org.openntf.xpt.core.Activator;

import com.ibm.commons.util.StringUtil;
import com.ibm.xsp.extlib.util.ExtLibUtil;
import com.ibm.xsp.model.AbstractDataSource;

public class XPTLibUtils {

	public static String getXptLibVersion() {
		try {
			String s = AccessController.doPrivileged(new PrivilegedAction<String>() {
				public String run() {
					Object o = Activator.getInstance().getBundle().getHeaders().get("Bundle-Version"); // $NON-NLS-1$
					if (o != null) {
						return o.toString();
					}
					return null;
				}
			});
			if (s != null) {
				return s;
			}
		} catch (SecurityException ex) {
		}
		return "";
	}

	// ==============================================================================
	// Style utility
	// ==============================================================================

	public static String concatStyleClasses(String s1, String s2) {
		if (StringUtil.isNotEmpty(s1)) {
			if (StringUtil.isNotEmpty(s2)) {
				return s1 + " " + s2;
			}
			return s1;
		} else {
			if (StringUtil.isNotEmpty(s2)) {
				return s2;
			}
			return "";
		}
	}

	public static String concatStyles(String s1, String s2) {
		if (StringUtil.isNotEmpty(s1)) {
			if (StringUtil.isNotEmpty(s2)) {
				return s1 + ";" + s2;
			}
			return s1;
		} else {
			if (StringUtil.isNotEmpty(s2)) {
				return s2;
			}
			return "";
		}
	}

	public static AbstractDataSource getDatasource(String compName, String dsName, boolean deep) {
		UIComponent uiTop = FacesContext.getCurrentInstance().getViewRoot();
		UIComponent uiFound = ExtLibUtil.getComponentFor(uiTop, compName);
		if (uiFound == null) {
			return null;
		}
		return getDatasourceFromUIComp(uiFound, dsName, deep);
	}

	private static AbstractDataSource getDatasourceFromUIComp(UIComponent uic, String dsName, boolean deep) {
		Object obj = uic.getAttributes().get("data");
		if (obj != null && obj instanceof AbstractDataSource) {
			return (AbstractDataSource) obj;
		}
		if (obj != null && obj instanceof List<?>) {
			List<?> lstDS = (List<?>) obj;
			for (Object obj2 : lstDS) {
				if (obj2 instanceof AbstractDataSource) {
					AbstractDataSource as = (AbstractDataSource) obj2;
					if (as.getVar().equals(dsName)) {
						return as;
					}
				}
			}
		}
		if (!deep) {
			return null;
		}
		if (uic.getChildCount() > 0) {
			for (Iterator<?> itChild = uic.getChildren().iterator(); itChild.hasNext();) {
				Object objChild = itChild.next();
				if (objChild instanceof UIComponent) {
					UIComponent uicChild = (UIComponent) objChild;
					AbstractDataSource adsRC = getDatasourceFromUIComp(uicChild, dsName, deep);
					if (adsRC != null) {
						return adsRC;
					}
				}
			}

		}
		return null;
	}

}


text:
@protocol userLoginCallback <NSObject>
-(void) fbLogin:(NSString*) displayName shortname:(NSString*)shortName andID:(NSString*)userid;
@end

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) id<userLoginCallback> _delegate;
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) TWRadiationCoreAPI *coreApi;

- (void)sessionStateChanged:(FBSession *)session state:(FBSessionState) state error:(NSError *)error;
@end


text:
<?php

namespace itaw\ApiBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class itawApiBundle extends Bundle
{
}


text:
	<form method="post" action="<?php echo site_url('booking/add'); ?>">

Ticket Booking

		<fieldset class="darktable">

					Ticket Type
					Price
					Add Seats
					Quantity
					Subtotal Price

					Adult

					<button class="plusBtn" type="button" onclick="setTheatre('SA')">+</button>
					0
					$0.00
					<input type="hidden" name="SA" value="">

					Concession

					<button class="plusBtn" type="button" onclick="setTheatre('SP')">+</button>
					0
					$0.00
					<input type="hidden" name="SP" value="">

					Child

					<button class="plusBtn" type="button" onclick="setTheatre('SC')">+</button>
					0
					$0.00
					<input type="hidden" name="SC" value="">

					First Class Adult

					<button class="plusBtn" type="button" onclick="setTheatre('FA')">+</button>
					0
					$0.00
					<input type="hidden" name="FA" value="">

					First Class Child

					<button class="plusBtn" type="button" onclick="setTheatre('FC')">+</button>
					0
					$0.00
					<input type="hidden" name="FC" value="">

					Beanbag - 1 Person

					<button class="plusBtn" type="button" onclick="setTheatre('B1')">+</button>
					0
					$0.00
					<input type="hidden" name="B1" value="">

					Beanbag - 2 Persons

					<button class="plusBtn" type="button" onclick="setTheatre('B2')">+</button>
					0
					$0.00
					<input type="hidden" name="B2" value="">

					Beanbag - 3 Children

					<button class="plusBtn" type="button" onclick="setTheatre('B3')">+</button>
					0
					$0.00
					<input type="hidden" name="B3" value="">

				<input type="hidden" id="movie" name="movie" value="">
				<input type="hidden" id="day" name="day" value="">
				<input type="hidden" id="time" name="time" value="">

		</fieldset>

		<fieldset id="pricefield" hidden>
			Total Price
			<input type="text" name="price" id="price" value="$0.00" readonly>

		</fieldset>

		<input type="submit" tabindex="-1" style="position:absolute; top:-1000px" class="esc">
		<input type="submit" value="Submit">
		<button type="button" class="close">Cancel</button>
	</form>


text:
// Template Source: BaseEntityRequestBuilder.java.tt
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All Rights Reserved.  Licensed under the MIT License.  See License in the project root for license information.
// ------------------------------------------------------------------------------

package com.microsoft.graph.requests;

import com.microsoft.graph.http.IRequestBuilder;
import com.microsoft.graph.core.ClientException;
import com.microsoft.graph.models.AccessReviewInstance;
import com.microsoft.graph.models.AccessReviewInstanceFilterByCurrentUserOptions;
import java.util.Arrays;
import java.util.EnumSet;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;
import com.microsoft.graph.core.IBaseClient;
import com.microsoft.graph.http.BaseRequestBuilder;
import com.microsoft.graph.models.AccessReviewInstanceBatchRecordDecisionsParameterSet;

// **NOTE** This file was generated by a tool and any changes will be overwritten.

/**
 * The class for the Access Review Instance Request Builder.
 */
public class AccessReviewInstanceRequestBuilder extends BaseRequestBuilder<AccessReviewInstance> {

    /**
     * The request builder for the AccessReviewInstance
     *
     * @param requestUrl     the request URL
     * @param client         the service client
     * @param requestOptions the options for this request
     */
    public AccessReviewInstanceRequestBuilder(@Nonnull final String requestUrl, @Nonnull final IBaseClient<?> client, @Nullable final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
        super(requestUrl, client, requestOptions);
    }

    /**
     * Creates the request
     *
     * @param requestOptions the options for this request
     * @return the AccessReviewInstanceRequest instance
     */
    @Nonnull
    public AccessReviewInstanceRequest buildRequest(@Nullable final com.microsoft.graph.options.Option... requestOptions) {
        return buildRequest(getOptions(requestOptions));
    }

    /**
     * Creates the request with specific requestOptions instead of the existing requestOptions
     *
     * @param requestOptions the options for this request
     * @return the AccessReviewInstanceRequest instance
     */
    @Nonnull
    public AccessReviewInstanceRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
        return new com.microsoft.graph.requests.AccessReviewInstanceRequest(getRequestUrl(), getClient(), requestOptions);
    }

    /**
     *  Gets a request builder for the AccessReviewReviewer collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.AccessReviewReviewerCollectionRequestBuilder contactedReviewers() {
        return new com.microsoft.graph.requests.AccessReviewReviewerCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("contactedReviewers"), getClient(), null);
    }

    /**
     * Gets a request builder for the AccessReviewReviewer item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.AccessReviewReviewerRequestBuilder contactedReviewers(@Nonnull final String id) {
        return new com.microsoft.graph.requests.AccessReviewReviewerRequestBuilder(getRequestUrlWithAdditionalSegment("contactedReviewers") + "/" + id, getClient(), null);
    }
    /**
     *  Gets a request builder for the AccessReviewInstanceDecisionItem collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.AccessReviewInstanceDecisionItemCollectionRequestBuilder decisions() {
        return new com.microsoft.graph.requests.AccessReviewInstanceDecisionItemCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("decisions"), getClient(), null);
    }

    /**
     * Gets a request builder for the AccessReviewInstanceDecisionItem item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.AccessReviewInstanceDecisionItemRequestBuilder decisions(@Nonnull final String id) {
        return new com.microsoft.graph.requests.AccessReviewInstanceDecisionItemRequestBuilder(getRequestUrlWithAdditionalSegment("decisions") + "/" + id, getClient(), null);
    }
    /**
     *  Gets a request builder for the AccessReviewStage collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.AccessReviewStageCollectionRequestBuilder stages() {
        return new com.microsoft.graph.requests.AccessReviewStageCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("stages"), getClient(), null);
    }

    /**
     * Gets a request builder for the AccessReviewStage item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.AccessReviewStageRequestBuilder stages(@Nonnull final String id) {
        return new com.microsoft.graph.requests.AccessReviewStageRequestBuilder(getRequestUrlWithAdditionalSegment("stages") + "/" + id, getClient(), null);
    }

    /**
     * Gets a builder to execute the method
     * @return the request builder
     */
    @Nonnull
    public AccessReviewInstanceAcceptRecommendationsRequestBuilder acceptRecommendations() {
        return new AccessReviewInstanceAcceptRecommendationsRequestBuilder(getRequestUrlWithAdditionalSegment("microsoft.graph.acceptRecommendations"), getClient(), null);
    }

    /**
     * Gets a builder to execute the method
     * @return the request builder
     */
    @Nonnull
    public AccessReviewInstanceApplyDecisionsRequestBuilder applyDecisions() {
        return new AccessReviewInstanceApplyDecisionsRequestBuilder(getRequestUrlWithAdditionalSegment("microsoft.graph.applyDecisions"), getClient(), null);
    }

    /**
     * Gets a builder to execute the method
     * @return the request builder
     * @param parameters the parameters for the service method
     */
    @Nonnull
    public AccessReviewInstanceBatchRecordDecisionsRequestBuilder batchRecordDecisions(@Nonnull final AccessReviewInstanceBatchRecordDecisionsParameterSet parameters) {
        return new AccessReviewInstanceBatchRecordDecisionsRequestBuilder(getRequestUrlWithAdditionalSegment("microsoft.graph.batchRecordDecisions"), getClient(), null, parameters);
    }

    /**
     * Gets a builder to execute the method
     * @return the request builder
     */
    @Nonnull
    public AccessReviewInstanceResetDecisionsRequestBuilder resetDecisions() {
        return new AccessReviewInstanceResetDecisionsRequestBuilder(getRequestUrlWithAdditionalSegment("microsoft.graph.resetDecisions"), getClient(), null);
    }

    /**
     * Gets a builder to execute the method
     * @return the request builder
     */
    @Nonnull
    public AccessReviewInstanceSendReminderRequestBuilder sendReminder() {
        return new AccessReviewInstanceSendReminderRequestBuilder(getRequestUrlWithAdditionalSegment("microsoft.graph.sendReminder"), getClient(), null);
    }

    /**
     * Gets a builder to execute the method
     * @return the request builder
     */
    @Nonnull
    public AccessReviewInstanceStopRequestBuilder stop() {
        return new AccessReviewInstanceStopRequestBuilder(getRequestUrlWithAdditionalSegment("microsoft.graph.stop"), getClient(), null);
    }
}


text:
layout: post
title: "Diana Nyad: Never, ever give up"
date: 2014-01-02 01:26:39 -0800
external-url: https://www.ted.com/talks/diana_nyad_extreme_swimming_with_the_world_s_most_dangerous_jellyfish
tags:
- TED_Talks
---

Diana Nyad is a hero of mine. An inspirational speaker and someone so
comfortable in her skin it's contagious, she is a marvel. She's a long-distance
swimmer to top all long-distance swimmers. In this video, she tells the story
and inspiration behind her swim from Cuba to Florida — a 53-hour journey
— and tells us to "never, ever give up."


text:
This is my personal notes and **focuses on** several aspects as listed below.

**If you want to see all CVPR 2017 papers, please refer to the CVF open access of all CVPR 2017 papers:**
* **[Main Conference Papers](http://openaccess.thecvf.com/CVPR2017.py)**
* **[Workshop Papers](http://openaccess.thecvf.com/CVPR2017_workshops/menu.py)**

## Table of Contents
### Low Level vision
1. [Sensor & Calibration](#calib)
2. [Multiple View Geometry](#mvg)
3. [3D Reconstruction](#3DReconstruction)
4. [3D vision and Deep Learning](#3DvisionandDeepLearning)

### Middle level vision
1. [Computational Photography](#cp)
2. [Optical Flow](#OpticalFlow)
3. [2D/3D feature detection and matching](#Features2d)
4. [SLAM](#slam)
5. [Image Retrieval](#ImageRetrieval)

### High Level vision
1. [Human Analysis](#human)
2. [Face Analysis](#face)
3. [Object Tracking](#track)
4. [6 DOF Object detection & tracking](#r6d)
5. [Object Detection](#objectdetection)

### ML and vision
1. [Transfer Learning & Domain Adaptation](#transferlearning)
2. [DL model compression](#DLmodelcompression)
3. [Machine Learning theory](#ml)

Topics **not included** here but I am also interested with:

1. Image/video Captioning
2. Visual Question Answering (VQA)
3. Vision & Sports
4. Edge detection & semantic segmentation
5. Video / temporal analysis
6. Denoising/deblurring
8. Texture/style network
## Sensor & Calibration
*  A Practical Method for Fully **Automatic Intrinsic Camera Calibration** Using Directionally Encoded Light, Mahdi Abbaspour Tehrani, Thabo Beeler, Anselm Grundhöfer

*  **Radiometric Calibration** for Internet Photo Collections, Zhipeng Mo, Boxin Shi, Sai-Kit Yeung, Yasuyuki Matsushita

* Intel **RealSense Stereoscopic** Depth Cameras.   Intel

* Self-Calibration-Based Approach to Critical Motion Sequences of Rolling-Shutter Structure From Motion,
Eisuke Ito, Takayuki Okatani

* Dynamic **Time-Of-Flight**. Michael Schober, Amit Adam, Omer Yair, Shai Mazor, Sebastian Nowozin

## Multiple View Geometry
* A New Rank Constraint on **Multi-View Fundamental Matrices**, and Its Application to Camera Location
Recovery, Soumyadip Sengupta, Tal Amir, Meirav Galun, Tom Goldstein, David W. Jacobs, Amit Singer, Ronen Basri

* **Efficient Solvers** for Minimal Problems by Syzygy-Based Reduction, Viktor Larsson, Kalle Åström, Magnus
Oskarsson

* A Minimal Solution for **Two-View Focal-Length Estimation** Using Two Affine Correspondences, Daniel
Barath, Tekla Toth, Levente Hajder

* A Clever Elimination Strategy for **Efficient Minimal Solvers**. Zuzana Kukelova, Joe Kileel, Bernd Sturmfels,
Tomas Pajdla

* An Efficient Algebraic Solution to the **Perspective-Three-Point** Problem, Tong Ke, Stergios I. Roumeliotis

* The **Misty Three Point** Algorithm for Relative Pose, Tobias Palmér, Kalle Åström, Jan-Michael Frahm

* **Consensus Maximization** With Linear Matrix Inequality Constraints, Pablo Speciale, Danda Pani Paudel, Martin R. Oswald, Till Kroeger, Luc Van Gool, Marc Pollefeys

## 3D Reconstruction
#### Dataset & Benchmark
* **ScanNet**: Richly-Annotated 3D Reconstructions of Indoor Scenes, Angela Dai, Angel X. Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, Matthias Nießner

* A **Multi-View Stereo Benchmark** With High-Resolution Images and Multi-Camera Videos, Thomas Schöps,  Johannes L. Schönberger, Silvano Galliani, Torsten Sattler, Konrad Schindler, Marc Pollefeys, Andreas Geiger

#### Single View Reconstruction
* Using Locally Corresponding CAD Models for **Dense 3D Reconstructions from a Single Image**. Chen Kong, Chen-Hsuan Lin,Simon Lucey. Carnegie Mellon University

* Multi-View Supervision for **Single-View Reconstruction** via Differentiable Ray Consistency. Shubham Tulsiani, Tinghui Zhou, Alexei A. Efros, Jitendra  Malik

* A Point Set Generation Network for **3D Object Reconstruction From a Single Image**, Haoqiang Fan, Hao Su, Leonidas J. Guibas

* Transformation-Grounded Image Generation Network for **Novel 3D View Synthesis**, Eunbyung Park, Jimei Yang, Ersin
Yumer, Duygu Ceylan, Alexander C. Berg

* SurfNet: **Generating 3D Shape Surfaces** Using Deep Residual Networks, Ayan Sinha, Asim Unmesh, Qixing
Huang, Karthik Ramani

* **IM2CAD**, Hamid Izadinia, Qi Shan, Steven M. Seitz

* Learning **Category-Specific 3D Shape Models** From Weakly Labeled 2D Images, Dingwen Zhang, Junwei Han,
Yang Yang, Dong Huang

#### Monocular Depth Map Prediction

* **Unsupervised Monocular Depth Estimation** With Left-Right Consistency, Clément Godard, Oisin Mac Aodha, Gabriel J. Brostow

* Semi-Supervised Deep Learning for **Monocular Depth Map Prediction**, Yevhen Kuznietsov, Jörg Stückler,
Bastian Leibe

#### Traditional 3D Reconstruction
* **HSfM**: Hybrid Structure-from-Motion, Hainan Cui, Xiang Gao, Shuhan Shen, Zhanyi Hu

* KillingFusion: **Non-Rigid 3D Reconstruction** without Correspondences, Miroslava Slavcheva,
Maximilian Baust, Daniel Cremers, Slobodan Ilic

## 3D Vision and Deep Learning
* Convolutional Neural Network Architecture for **Geometric Matching**. INRIA. Ignacio Rocco, Relja Arandjelović, Josef Sivic

* FCSS: Fully Convolutional Self-Similarity for **Dense Semantic Correspondence**, Seungryong Kim, Dongbo Min,
Bumsub Ham, Sangryul Jeon, Stephen Lin, Kwanghoon Sohn

* Inverse Compositional **Spatial Transformer Networks**. Chen-Hsuan Lin, Simon Lucey.

* Geometric Loss Functions for **Camera Pose Regression** with Deep Learning. Alex Kendall, Roberto Cipolla.

* DSAC - Differentiable **RANSAC** for Camera Localization, Eric Brachmann, Alexander Krull, Sebastian
Nowozin, Jamie Shotton, Frank Michel, Stefan Gumhold, Carsten Rother

* Learning **Non-Maximum Suppression**, Jan Hosang, Rodrigo Benenson, Bernt Schiele

* Improved **Stereo Matching** With Constant Highway Networks and Reflective Confidence Learning, Amit Shaked, Lior Wolf

* End-To-End Training of Hybrid CNN-CRF Models for **Stereo**.  Patrick Knobelreiter, Christian Reinbacher, Alexander Shekhovtsov, Thomas Pock

## Computational Photography
* A Unified Approach of Multi-scale Deep and Hand-crafted Features for **Defocus Estimation**. KAIST & Tecent Youtu

* Photo-Realistic Single Image **Super-Resolution** Using a Generative Adversarial Network. Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, Wenzhe Shi.

* **Depth From Defocus** in the Wild, Huixuan Tang, Scott Cohen, Brian Price, Stephen Schiller, Kiriakos N. Kutulakos

## Optical Flow
* **FlowNet** 2.0: Evolution of Optical Flow Estimation With Deep Networks
Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, Thomas Brox

* Slow Flow: Exploiting **High-Speed Cameras** for Accurate and Diverse Optical Flow Reference Data, Joel
Janai, Fatma Güney, Jonas Wulff, Michael J. Black, Andreas Geiger

* CNN-Based **Patch Matching** for Optical Flow With Thresholded Hinge Embedding Loss, Christian Bailer,
Kiran Varanasi, Didier Stricker

* Optical Flow Estimation Using a **Spatial Pyramid Network**, Anurag Ranjan, Michael J. Black

* **CLKN**: Cascaded Lucas-Kanade Networks for Image Alignment, Che-Han Chang, Chun-Nan Chou, Edward Y.
Chang

* **S2F**: Slow-To-Fast Interpolator Flow, Yanchao Yang, Stefano Soatto

* **Filter Flow** Made Practical: Massively Parallel and Lock-Free, Sathya N. Ravi, Yunyang Xiong, Lopamudra
Mukherjee, Vikas Singh

* Accurate **Optical Flow** via Direct Cost Volume Processing, Jia Xu, René Ranftl, Vladlen Koltun

* InterpoNet, a Brain Inspired Neural Network for **Optical Flow Dense Interpolation**, Shay Zweig, Lior WolfI

* Optical Flow in **Mostly Rigid** Scenes, Jonas Wulff, Laura Sevilla-Lara, Michael J. Black

* Optical Flow Requires **Multiple Strategies (but Only One Network)**, Tal Schuster, Lior Wolf, David Gadot

## 2D/3D Feature Detection and Matching

#### Feature Detection
 * Learning Discriminative and Transformation Covariant Local **Feature Detectors**, Xu Zhang, Felix X. Yu, Svebor Karaman, Shih-Fu Chang

 * Quad-Networks: Unsupervised Learning to Rank for **Interest Point Detection**, Nikolay Savinov, Akihito Seki, Lubor Ladicky, Torsten Sattler, Marc Pollefeys
#### Feature descriptor
 * Learning **Deep Binary Descriptor** With Multi-Quantization, Yueqi Duan, Jiwen Lu, Ziwei Wang, Jianjiang Feng, Jie Zhou

* **L2-Net**: Deep Learning of Discriminative Patch Descriptor in Euclidean Space, Yurun Tian, Bin Fan, Fuchao Wu

* 3DMatch: Learning **Local Geometric Descriptors** From RGB-D Reconstructions. Andy Zeng, Shuran Song, Matthias Niessner, Matthew Fisher, Jianxiong Xiao, Thomas Funkhouser

#### Feature Matching
* GMS: Grid-based Motion Statistics for Fast, Ultra-robust **Feature Correspondence**. JiaWang Bian, Daniel Lin, Yasuyuki Matsushita, Sai-Kit Yeung, Tan Dat Nguyen, Ming-Ming Cheng

* Alternating Direction **Graph Matching**, D. Khuê Lê-Huu, Nikos Paragios

* SGM-Nets: **Semi-Global Matching** With Neural Networks, Akihito Seki, Marc Pollefey

#### Semantic Matching
* AnchorNet: A Weakly Supervised Network to Learn **Geometry-Sensitive Features** for Semantic Matching, David Novotny, Diane Larlus, Andrea Vedaldi

* Deep **Semantic Feature Matching**, Nikolai Ufer, Björn Ommer

#### Comparison
* **Comparative Evaluation** of Hand-Crafted and Learned Local Features. Johannes L. Schönberger,Hans Hardmeier, Torsten Sattler, **Marc Pollefeys**

* HPatches: A **benchmark and evaluation** of handcrafted and learned local descriptors, Vassileios Balntas*, Karel Lenc*, Andrea Vedaldi and **Krystian Mikolajczyk**.
## SLAM

#### SLAM System
* **CNN-SLAM**: Real-time dense monocular SLAM with learned depth prediction.

* **NID-SLAM**: Robust Monocular SLAM Using Normalised Information Distance.Geoffrey Pascoe, Will Maddern, Michael Tanner, Pedro Piniés, Paul Newman.

* **DeMoN**: Depth and Motion Network for Learning Monocular Stereo, Benjamin Ummenhofer, Huizhong Zhou, Jonas Uhrig, Nikolaus Mayer, Eddy Ilg, Alexey Dosovitskiy, Thomas Brox

* **Unsupervised Learning of Depth and Ego-Motion** From Video, Tinghui Zhou, Matthew Brown, Noah Snavely, David G. Lowe

#### Image base localization
* A **Dataset** for Benchmarking Image-Based Localization  Xun Sun, Yuanfan Xie, Pei Luo, Liang Wang

* On-The-Fly **Adaptation of Regression Forests** for Online Camera Relocalisation. Tommaso Cavallari, Stuart Golodetz, Nicholas A. Lord, Julien Valentin, Luigi Di Stefano, Philip H. S. Torr

* Are **Large-Scale 3D Models Really Necessary** for Accurate Visual Localization?  Torsten Sattler, Akihiko Torii, Josef Sivic, Marc Pollefeys, Hajime Taira, Masatoshi Okutomi, Tomas Pajdla

#### Event Camera
* **Event-Based** Visual Inertial Odometry, Alex Zihao Zhu, Nikolay Atanasov, Kostas Daniilidis

#### SLAM for X
* Cognitive Mapping and Planning for **Visual Navigation**. Saurabh Gupta, James Davidson, Sergey Levine, Rahul Sukthankar, Jitendra Malik

* **Visual-Inertial-Semantic Scene Representation** for 3D Object Detection. Jingming Dong, Xiaohan Fei, **Stefano Soatto**

## Image Retrieval
#### Hashing
* AMVH: Asymmetric **Multi-Valued Hashing**. Cheng Da, Shibiao Xu, Kun Ding, Gaofeng Meng, Shiming Xiang, Chunhong Pan

* **Deep Sketch Hashing**: Fast Free-Hand Sketch-Based Image Retrieval, Li Liu, Fumin Shen, Yuming Shen,
Xianglong Liu, Ling Shao

* **Bayesian Supervised Hashing**, Zihao Hu, Junxuan Chen, Hongtao Lu, Tongzhen Zhang

* **Simultaneous Feature Aggregating and Hashing** for Large-Scale Image Search, Thanh-Toan Do, Dang-Khoa Le Tan,
Trung T. Pham, Ngai-Man Cheung

* Discretely Coding Semantic Rank Orders for Supervised **Image Hashing**, Li Liu, Ling Shao, Fumin Shen, Mengyang Yu
#### Other
* Deep **Visual-Semantic Quantization** for Efficient Image Retrieval, Yue Cao, Mingsheng Long, Jianmin Wang,
Shichen Liu

* **Spatial-Semantic Image Search** by Visual Feature Synthesis, Long Mai, Hailin Jin, Zhe Lin, Chen Fang,
Jonathan Brandt, Feng Liu

* **Asymmetric Feature Maps** With Application to Sketch Based Retrieval, Giorgos Tolias, Ondřej Chum

* **Fried Binary Embedding** for High-Dimensional Visual Features, Weixiang Hong, Junsong Yuan, Sreyasee Das Bhattacharjee

* **Learning Multifunctional Binary Codes** for Both Category and Attribute Oriented Retrieval Tasks, Haomiao Liu, Ruiping Wang, Shiguang Shan, Xilin Chen

* **Kernel Square-Loss Exemplar Machines** for Image Retrieval, Rafael S. Rezende, Joaquin Zepeda, Jean Ponce, Francis Bach, Patrick Pérez
## Human Analysis

#### Bottom-up
* Realtime Multi-Person 2D Pose Estimation Using **Part Affinity Fields**, Zhe Cao, Tomas Simon, Shih-En Wei,
Yaser Sheikh

* Detangling People: Individuating Multiple Close People and Their Body Parts via **Region Assembly**, Hao Jiang, Kristen Grauman

#### TOP-Down
* Towards Accurate **Multi-Person Pose Estimation** in the Wild, George Papandreou, Tyler Zhu, Nori Kanazawa, Alexander Toshev, Jonathan Tompson, Chris Bregler, Kevin Murphy

* **Joint** Multi-Person Pose Estimation and **Semantic Part Segmentation**, Fangting Xia, Peng Wang, Xianjie Chen, Alan L. Yuille

#### Human in Video
* Thin-Slicing Network: A Deep **Structured Model** for Pose Estimation in Videos, Jie Song, Limin Wang, Luc Van Gool, Otmar Hilliges

* PoseTrack: Joint **Multi-Person Pose Estimation and Tracking**, Umar Iqbal, Anton Milan, Juergen Gall

* ArtTrack: Articulated **Multi-Person Tracking** in the Wild, Eldar Insafutdinov, Mykhaylo Andriluka, Leonid
Pishchulin, Siyu Tang, Evgeny Levinkov, Bjoern Andres, Bernt Schiele

* On Human **Motion Prediction** Using **Recurrent Neural Networks**, Julieta Martinez, Michael J. Black, Javier Romero

#### 3D Pose
* Unite the People: Closing the Loop **Between 3D and 2D Human Representations**, Christoph Lassner, Javier
Romero, Martin Kiefel, Federica Bogo, Michael J. Black, Peter V. Gehler

* Deep **Multitask Architecture** for Integrated 2D and 3D Human Sensing, Alin-Ionut Popa, Mihai Zanfir, Cristian
Sminchisescu

* Recurrent **3D Pose Sequence Machines**, Mude Lin, Liang Lin, Xiaodan Liang, Keze Wang, Hui Cheng

* 3D Human Pose Estimation **=** 2D Pose Estimation + Matching, Ching-Hang Chen, Deva Ramanan

* Lifting From the Deep: **Convolutional 3D Pose Estimation** From a Single Image, Denis Tome, Chris Russell, Lourdes Agapito

* Coarse-To-Fine Volumetric Prediction for **Single-Image 3D Human Pose**, Georgios Pavlakos, Xiaowei Zhou,
Konstantinos G. Derpanis, Kostas Daniilidis

* LCR-Net: **Localization-Classification-Regression** for Human Pose. Gregory Rogez, Philippe Weinzaepfel, Cordelia Schmid

* Learning From **Synthetic Humans**, Gül Varol, Javier Romero, Xavier Martin, Naureen Mahmood, Michael J.
Black, Ivan Laptev, Cordelia Schmid
#### Action Recognition
* Deep Learning on **Lie Groups** for Skeleton-Based Action Recognition, Zhiwu Huang, Chengde Wan, Thomas
Probst, Luc Van Gool

* Weakly Supervised Action Learning With **RNN Based Fine-To-Coarse Modeling**, Alexander Richard, Hilde
Kuehne, Juergen Gall

#### Hand

* **Hand Keypoint Detection** in Single Images Using Multiview Bootstrapping, Tomas Simon, Hanbyul Joo, Iain
Matthews, Yaser Sheikh

#### Dataset & Benchmark
* **BigHand2.2M** Benchmark: Hand Pose Dataset and State of the Art Analysis, Shanxin Yuan, Qi Ye, Björn Stenger,
Siddhant Jain, Tae-Kyun Kim

* Quo Vadis, **Action Recognition**? A New Model and the Kinetics Dataset, João Carreira, **Andrew Zisserman**

* Look Into Person: Self-Supervised Structure-Sensitive Learning and a **New Benchmark** for Human Parsing, Ke Gong, Xiaodan Liang, Dongyu Zhang, Xiaohui Shen, **Liang Lin**

## Face Analysis
#### Face Recognition
* Disentangled Representation Learning GAN for Pose-Invariant **Face Recognition**, Luan Tran, Xi Yin,
Xiaoming Liu

* Level Playing Field for **Million Scale Face recognition**, Aaron Nech, Ira Kemelmacher-Shlizerman

* Neural Aggregation Network for **Video Face Recognition**, Jiaolong Yang, Peiran Ren, Dongqing Zhang, Dong Chen, Fang Wen, Hongdong Li, Gang Hua

* Pose-Aware **Person Recognition**, Vijay Kumar, Anoop Namboodiri, Manohar Paluri, C. V. Jawahar
#### Face Synthesis
* Learning Residual Images for **Face Attribute Manipulation**, Wei Shen, Rujie Liu

* Photorealistic **Facial Texture Inference** Using Deep Neural Networks, Shunsuke Saito, Lingyu Wei, Liwen Hu,
Koki Nagano, Hao Li

* **Synthesizing Normalized Faces** From Facial Identity Features, Forrester Cole, David Belanger, Dilip Krishnan,
Aaron Sarna, Inbar Mosseri, William T. Freeman

* Neural **Face Editing **With Intrinsic Image Disentangling, Zhixin Shu, Ersin Yumer, Sunil Hadap,
Kalyan Sunkavalli, Eli Shechtman, Dimitris Samaras

* 3D **Face Morphable** Models "In-The-Wild", James Booth, Epameinondas Antonakos, Stylianos Ploumpis,
George Trigeorgis, Yannis Panagakis, Stefanos Zafeiriou

* Parametric T-Spline **Face Morphable Model** for Detailed Fitting in Shape Subspace, Weilong Peng, Zhiyong
Feng, Chao Xu, Yong Su

* Learning Detailed **Face Reconstruction** From a Single Image, Elad Richardson, Matan Sela, Roy Or-El, Ron
Kimmel
#### Other Face-related
* Reliable Crowdsourcing and Deep Locality-Preserving Learning for **Expression Recognition** in the Wild, Shan Li,
Weihong Deng, JunPing Du

* **DenseReg**: Fully Convolutional Dense Shape Regression In-The-Wild, Rıza Alp Güler, George Trigeorgis, Epameinondas Antonakos, Patrick Snape, Stefanos Zafeiriou, Iasonas Kokkinos

## Object Tracking
#### Correlation Filter
* Context-Aware **Correlation Filter** Tracking, Matthias Mueller, Neil Smith, Bernard Ghanem

* Discriminative **Correlation Filter** With Channel and Spatial Reliability, Alan Lukežič, Tomáš Vojíř, Luka Čehovin Zajc, Jiří Matas, Matej Kristan

*  End-To-End Representation Learning for **Correlation Filter**  Based Tracking, Jack Valmadre, Luca Bertinetto,
João Henriques, Andrea Vedaldi, **Philip H. S. Torr**

* **Attentional Correlation Filter** Network for Adaptive Visual Tracking, Jongwon Choi, Hyung Jin Chang, Sangdoo Yun, Tobias Fischer, Yiannis Demiris, Jin Young Choi

### Other Tracking

* **Template Matching** With Deformable Diversity Similarity, Itamar Talmi, Roey Mechrez, Lihi Zelnik-Mano

* **Large Margin Object Tracking** With Circulant Feature Maps, Mengmeng Wang, Yong Liu, Zeyi Huang

* Robust Visual Tracking Using **Oblique Random Forests**, Le Zhang, Jagannadan Varadarajan, Ponnuthurai Nagaratnam Suganthan, Narendra Ahuja, Pierre Moulin

* ECO: Efficient **Convolution Operators** for Tracking, Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, Michael Felsberg

## 6 DOF Object Detection & Tracking
#### Detection
* **PoseAgent**: Budget-Constrained 6D Object Pose Estimation via Reinforcement Learning. Alexander Krull, Eric Brachmann, Sebastian Nowozin, Frank

* **Global Hypothesis Generation** for 6D Object Pose Estimation. Frank Michel, Alexander Kirillov, Eric Brachmann, Alexander Krull, Stefan Gumhold, Bogdan Savchynskyy, Carsten Rother.

* BIND: **Binary Integrated Net Descriptors** for Texture-Less Object Recognition. Jacob Chan, Jimmy Addison Lee, Qian Kemao

* **3D Bounding Box Estimation** Using Deep Learning and Geometry, Arsalan Mousavian, Dragomir Anguelov, John Flynn, Jana Košecká

#### Tracking
*  Real-Time **3D Model Tracking** in Color and Depth on a Single CPU Core. Wadim Kehl, Federico Tombari, Slobodan Ilic, Nassir Navab

## Object Detection
#### Single-stage Systems
* **YOLO9000**: Better, Faster, Stronger, Joseph Redmon, Ali Farhadi

* Accurate Single Stage Detector Using **Recurrent Rolling Convolution**. SenseTime. Jimmy Ren, Xiaohao Chen, Jianbo Liu, Wenxiu Sun, Jiahao Pang, Qiong Yan, Yu-Wing Tai, Li Xu

#### Two-stage systems
* **Feature Pyramid Networks** for Object Detection. Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, Serge Belongie

* **Speed/Accuracy Trade-Offs** for Modern Convolutional Object Detectors. Jonathan Huang, Vivek Rathod, Chen Sun, Menglong Zhu, Anoop Korattikara, Alireza Fathi, Ian Fischer, Zbigniew Wojna, Yang Song, Sergio Guadarrama, Kevin Murphy

* Object Detection in Videos With **Tubelet Proposal Networks**, Kai Kang, Hongsheng Li, Tong Xiao, Wanli
Ouyang, Junjie Yan, Xihui Liu, Xiaogang Wang

* Perceptual Generative Adversarial Networks for **Small Object Detection**, Jianan Li, Xiaodan Liang, Yunchao Wei,
Tingfa Xu, Jiashi Feng, Shuicheng Yan

* **FastMask**: Segment Multi-Scale Object Candidates in One Shot, Hexiang Hu, Shiyi Lan, Yuning Jiang, Zhimin
Cao, Fei Sha

*  **Multiple Instance Detection** Network With Online Instance Classifier Refinement, Peng Tang, Xinggang
Wang, Xiang Bai, Wenyu Liu

* **Weakly Supervised** Cascaded Convolutional Networks, Ali Diba, Vivek Sharma, Ali Pazandeh, Hamed Pirsiavash, Luc
Van Gool

* RON: Reverse Connection With **Objectness Prior Networks** for Object Detection, Tao Kong, Fuchun Sun,
Anbang Yao, Huaping Liu, Ming Lu, Yurong Chen

* Learning Detection With **Diverse Proposals**, Samaneh Azadi, Jiashi Feng, Trevor Darrell

* **Amodal Detection of 3D Objects**: Inferring 3D Bounding Boxes From 2D Ones in RGB-Depth Images. Zhuo Deng,
Longin Jan Latecki

#### Datasets
* **YouTube-BoundingBoxes**: A Large High-Precision Human-Annotated Data Set for Object Detection in Video, Esteban Real, Jonathon Shlens, Stefano Mazzocchi, Xin Pan, Vincent Vanhoucke

#### Others
* Fast **Boosting Based Detection** Using Scale Invariant Multimodal Multiresolution Filtered Features, Arthur Daniel Costea, Robert Varga, Sergiu Nedevschi

* LCDet: Low-Complexity Fully-Convolutional Neural Networks for Object Detection in **Embedded Systems**.  Qualcomm & UCSD

* **Multi-View 3D Object Detection Network** for Autonomous Driving, Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, Tian Xia

* Straight to Shapes: Real-Time **Detection of Encoded Shapes**, Saumya Jetley, Michael Sapienza, Stuart Golodetz, Philip H. S. Torr

## Transfer Learning & Domain Adaptation
#### Zero-shot Learning
* Fine-Grained Recognition of Thousands of Object Categories With **Single-Example Training**, Leonid Karlinsky, Joseph Shtok, Yochay Tzur, Asaf Tzadok

*  Matrix Tri-Factorization With Manifold Regularizations for **Zero-Shot Learning**, Xing Xu, Fumin Shen, Yang Yang, Dongxiang Zhang, Heng Tao Shen, Jingkuan Song

* Semantically Consistent Regularization for **Zero-Shot Recognition**, Pedro Morgado, Nuno Vasconcelos

* Unified Embedding and Metric Learning for **Zero-Exemplar Event Detection**. Noureldien Hussein, Efstratios
Gavves, Arnold W.M. Smeulders

* Zero-Shot Learning - the Good, the Bad and the Ugly,Yongqin Xian, Bernt Schiele, Zeynep Akata

* Zero Shot Learning via **Multi-Scale Manifold Regularization**, Shay Deutsch, Soheil Kolouri, Kyungnam
Kim, Yuri Owechko, Stefano Soatto

* From Zero-Shot Learning to Conventional Supervised Classification: Unseen Visual Data Synthesis, Yang Long, Li Liu, Ling Shao, Fumin Shen, Guiguang Ding, Jungong Han

#### Transfer Learning
* Borrowing Treasures From the Wealthy: Deep Transfer Learning Through **Selective Joint Fine-Tuning**. Weifeng Ge, Yizhou Yu .

* Growing a Brain: Fine-Tuning by Increasing Model Capacity, Yu-Xiong Wang, Deva Ramanan, Martial Hebert

#### Domain Adaptation
* **Adversarial** Discriminative Domain Adaptation, Eric Tzeng, Judy Hoffman, Kate Saenko, Trevor Darrell

* Quality Aware Network for **Set to Set Recognition**, Yu Liu, Junjie Yan, Wanli Ouyang, **Sensetime**

* Correlational Gaussian Processes for **Cross-Domain Visual Recognition**, Chengjiang Long, Gang Hua

* Joint **Geometrical and Statistical Alignment** for Visual Domain Adaptation, Jing Zhang, Wanqing Li, Philip Ogunbona

* Deep Hashing Network for **Unsupervised Domain Adaptation**, Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, Sethuraman Panchanathan

* A Gift From **Knowledge Distillation**: Fast Optimization, Network Minimization and Transfer Learning, Junho Yim, Donggyu Joo, Jihoon Bae, Junmo Kim

* Domain Adaptation by **Mixture of Alignments** of Secondor Higher-Order Scatter Tensors, Piotr Koniusz, Yusuf Tas, Fatih Porikli

## DL Model Compression
#### Quantization
* Network Sketching: Exploiting **Binary Structure** in Deep CNNs, Yiwen Guo, Anbang Yao, Hao Zhao, Yurong Chen

* Deep Learning With Low Precision by Half-Wave Gaussian **Quantization**, Zhaowei Cai, Xiaodong He, Jian Sun, Nuno Vasconcelos

* Weighted-Entropy-Based **Quantization** for Deep Neural Networks, Eunhyeok Park, Junwhan Ahn, Sungjoo Yoo

* **Fixed-Point Factorized** Networks, Peisong Wang, Jian Cheng
#### Pruning
* Designing Energy-Efficient Convolutional Neural Networks Using **Energy-Aware Pruning**, Tien-Ju Yang, YuHsin Chen, Vivienne Sze

#### Low-rank Approximation
* On Compressing Deep Models by **Low Rank and Sparse Decomposition**, Xiyu Yu, Tongliang Liu, Xinchao Wang, Dacheng Tao

* LCNN: **Lookup-Based** Convolutional Neural Network, Hessam Bagherinezhad, Mohammad Rastegari, Ali Farhad

#### Distill
* **Mimicking Very Efficient** Network for Object Detection, Quanquan Li, Shengying Jin, Junjie Yan

## Machine Learning
* **Densely Connected** Convolutional Networks, Gao Huang, Zhuang Liu, Laurens van der Maaten, Kilian Q.
Weinberger

* Learning From Simulated and Unsupervised Images Through **Adversarial Training**, Ashish Shrivastava, Tomas
Pfister, Oncel Tuzel, Joshua Susskind, Wenda Wang, Russell Webb

* Network Dissection: **Quantifying Interpretability** of Deep Visual Representations, David Bau, Bolei Zhou, Aditya
Khosla, Aude Oliva, Antonio Torralba

* AGA: **Attribute-Guided Augmentation**, Mandar Dixit, Roland Kwitt, Marc Niethammer, Nuno Vasconcelos

* **Kernel Pooling** for Convolutional Neural Networks, Yin Cui, Feng Zhou, Jiang Wang, Xiao Liu, Yuanqing Lin, Serge
Belongie

* **Local Binary** Convolutional Neural Networks, Felix Juefei-Xu, Vishnu Naresh Boddeti, Marios Savvides

* All You Need Is Beyond a Good Init: Exploring Better Solution for Training Extremely Deep Convolutional
Neural Networks With **Orthonormality and Modulation**, Di Xie, Jiang Xiong, Shiliang Pu

* Newton-Type Methods for **Inference in Higher-Order Markov Random Fields**, Hariprasad Kannan, Nikos
Komodakis, Nikos Paragios


text:
.class public abstract Lcom/google/inject/matcher/AbstractMatcher;
.super Ljava/lang/Object;
.source "AbstractMatcher.java"

# interfaces
.implements Lcom/google/inject/matcher/Matcher;

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/google/inject/matcher/AbstractMatcher$OrMatcher;,
        Lcom/google/inject/matcher/AbstractMatcher$AndMatcher;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Lcom/google/inject/matcher/Matcher",
        "<TT;>;"
    }
.end annotation

# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 26
    .local p0, "this":Lcom/google/inject/matcher/AbstractMatcher;, "Lcom/google/inject/matcher/AbstractMatcher<TT;>;"
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 65
    return-void
.end method

# virtual methods
.method public and(Lcom/google/inject/matcher/Matcher;)Lcom/google/inject/matcher/Matcher;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/inject/matcher/Matcher",
            "<-TT;>;)",
            "Lcom/google/inject/matcher/Matcher",
            "<TT;>;"
        }
    .end annotation

    .prologue
    .line 29
    .local p0, "this":Lcom/google/inject/matcher/AbstractMatcher;, "Lcom/google/inject/matcher/AbstractMatcher<TT;>;"
    .local p1, "other":Lcom/google/inject/matcher/Matcher;, "Lcom/google/inject/matcher/Matcher<-TT;>;"
    new-instance v0, Lcom/google/inject/matcher/AbstractMatcher$AndMatcher;

    invoke-direct {v0, p0, p1}, Lcom/google/inject/matcher/AbstractMatcher$AndMatcher;-><init>(Lcom/google/inject/matcher/Matcher;Lcom/google/inject/matcher/Matcher;)V

    return-object v0
.end method

.method public or(Lcom/google/inject/matcher/Matcher;)Lcom/google/inject/matcher/Matcher;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/inject/matcher/Matcher",
            "<-TT;>;)",
            "Lcom/google/inject/matcher/Matcher",
            "<TT;>;"
        }
    .end annotation

    .prologue
    .line 33
    .local p0, "this":Lcom/google/inject/matcher/AbstractMatcher;, "Lcom/google/inject/matcher/AbstractMatcher<TT;>;"
    .local p1, "other":Lcom/google/inject/matcher/Matcher;, "Lcom/google/inject/matcher/Matcher<-TT;>;"
    new-instance v0, Lcom/google/inject/matcher/AbstractMatcher$OrMatcher;

    invoke-direct {v0, p0, p1}, Lcom/google/inject/matcher/AbstractMatcher$OrMatcher;-><init>(Lcom/google/inject/matcher/Matcher;Lcom/google/inject/matcher/Matcher;)V

    return-object v0
.end method


text:
<?php

namespace Askedio\Tests\IntegrationTests;

use Askedio\Tests\IntegrationTestCase;

class CrudTest extends IntegrationTestCase
{
    public function testCreate()
    {

        /*        $user = $this->createUserRaw();

         *
         * need some way to pass form/input data
         *     $results = $this->api()->index();
         */

        // ...
    }
}


text:
package com.easycode.receiver;

import android.annotation.SuppressLint;
import android.app.DownloadManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.text.TextUtils;

import com.easycode.event.UpdataEvent;
import com.easycode.util.PreferencesUtils;

import org.greenrobot.eventbus.EventBus;

import java.io.File;

/**
 * Created by yzz on 2017/2/3.
 */

public class UpdataBroadcastReceiver extends BroadcastReceiver {

    @SuppressLint("NewApi")
    public void onReceive(Context context, Intent intent) {
        long downLoadId = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
        long cacheDownLoadId =  PreferencesUtils.getLong(context,"download_id");

        if(DownloadManager.ACTION_NOTIFICATION_CLICKED.equals(intent.getAction())){
            DownloadManager downloader = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
            long downloadId = PreferencesUtils.getLong(context,"download_id");
            downloader.remove(downloadId);
            //eventbus 关闭dialog
            UpdataEvent updataEvent = new UpdataEvent();
            updataEvent.setResult("close dialog");
            updataEvent.setState(0);
            EventBus.getDefault().post(updataEvent);
        }else if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(intent.getAction()) && cacheDownLoadId == downLoadId) {
            try {
                Intent install = new Intent(Intent.ACTION_VIEW);
                File apkFile = queryDownloadedApk(context);
                install.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");
                install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                context.startActivity(install);
            }catch (Exception e){

            }
        }
    }

    //通过downLoadId查询下载的apk,解决6.0以后安装的问题
    public static File queryDownloadedApk(Context context) {
        File targetApkFile = null;
        DownloadManager downloader = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
        long downloadId = PreferencesUtils.getLong(context,"download_id");
        if (downloadId != -1) {
            DownloadManager.Query query = new DownloadManager.Query();
            query.setFilterById(downloadId);
            query.setFilterByStatus(DownloadManager.STATUS_SUCCESSFUL);
            Cursor cur = downloader.query(query);
            if (cur != null) {
                if (cur.moveToFirst()) {
                    String uriString = cur.getString(cur.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
                    if (!TextUtils.isEmpty(uriString)) {
                        targetApkFile = new File(Uri.parse(uriString).getPath());
                    }
                }
                cur.close();
            }
        }
        return targetApkFile;
    }
}


text:
package org.apache.qpid.proton.engine.impl;

import java.util.Iterator;
import org.apache.qpid.proton.engine.Delivery;
import org.apache.qpid.proton.engine.EndpointState;
import org.apache.qpid.proton.engine.Sender;

public class SenderImpl  extends LinkImpl implements Sender
{
    private int _offered;
    private TransportSender _transportLink;

    SenderImpl(SessionImpl session, String name)
    {
        super(session, name);
    }

    public void offer(final int credits)
    {
        _offered = credits;
    }

    public int send(final byte[] bytes, int offset, int length)
    {
        if( getLocalState() == EndpointState.CLOSED )
        {
            throw new IllegalStateException("send not allowed after the sender is closed.");
        }
        DeliveryImpl current = current();
        if(current == null || current.getLink() != this)
        {
            throw new IllegalArgumentException();//TODO.
        }
        int sent = current.send(bytes, offset, length);
        if (sent > 0) {
            getSession().incrementOutgoingBytes(sent);
        }
        return sent;
    }

    public void abort()
    {
        //TODO.
    }

    public Iterator<Delivery> unsettled()
    {
        return null;  //TODO.
    }

    public void free()
    {
        getSession().freeSender(this);
        super.free();

    }

    @Override
    public boolean advance()
    {
        DeliveryImpl delivery = current();
        if (delivery != null) {
            delivery.setComplete();
        }

        boolean advance = super.advance();
        if(advance && _offered > 0)
        {
            _offered--;
        }
        if(advance)
        {
            decrementCredit();
            delivery.addToTransportWorkList();
            getSession().incrementOutgoingDeliveries(1);
        }

        return advance;
    }

    boolean hasOfferedCredits()
    {
        return _offered > 0;
    }

    @Override
    TransportSender getTransportLink()
    {
        return _transportLink;
    }

    void setTransportLink(TransportSender transportLink)
    {
        _transportLink = transportLink;
    }

    @Override
    public void setCredit(int credit)
    {
        super.setCredit(credit);
       /* while(getQueued()>0 && getCredit()>0)
        {
            advance();
        }*/
    }

}


text:
require "Practica12/version"
#Archivo del módulo

module Practica12
  # Your code goes here...
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" id="com.example.helloworld" version="1.0.0">
  <name>SakkaNoHeya</name>
  <description>Made with Monaca (http://monaca.mobi)</description>
  <author/>
  <content src="index.html"/>
  <allow-navigation href="*"/>
  <allow-intent href="itms:*"/>
  <allow-intent href="itms-apps:*"/>
  <allow-intent href="http://*/*"/>
  <allow-intent href="https://*/*"/>
  <allow-intent href="*"/>
  <preference name="loglevel" value="DEBUG"/>
  <preference name="AndroidLaunchMode" value="singleTop"/>
  <preference name="ErrorUrl" value=""/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="AllowInlineMediaPlayback" value="false"/>
  <preference name="AutoHideSplashScreen" value="true"/>
  <preference name="BackupWebStorage" value="cloud"/>
  <preference name="EnableViewportScale" value="false"/>
  <preference name="FadeSplashScreen" value="true"/>
  <preference name="FadeSplashScreenDuration" value="250"/>
  <preference name="KeyboardDisplayRequiresUserAction" value="true"/>
  <preference name="MediaPlaybackRequiresUserAction" value="false"/>
  <preference name="ShowSplashScreenSpinner" value="false"/>
  <preference name="SuppressesIncrementalRendering" value="false"/>
  <preference name="TopActivityIndicator" value="gray"/>
  <preference name="GapBetweenPages" value="0"/>
  <preference name="PageLength" value="0"/>
  <preference name="PaginationBreakingMode" value="page"/>
  <preference name="PaginationMode" value="unpaginated"/>
  <feature name="LocalStorage">
    <param name="ios-package" value="CDVLocalStorage"/>
  </feature>
  <preference name="UIWebViewDecelerationSpeed" value="normal"/>
  <preference name="ios-XCBuildConfiguration-TARGETED_DEVICE_FAMILY" value="1,2"/>
  <platform name="ios">
    <icon src="/res/ios/icon/icon.png" width="57" height="57"/>
    <icon src="/res/ios/icon/icon@2x.png" width="114" height="114"/>
    <icon src="/res/ios/icon/icon-72.png" width="72" height="72"/>
    <icon src="/res/ios/icon/icon-72@2x.png" width="144" height="144"/>
    <icon src="/res/ios/icon/icon-60.png" width="60" height="60"/>
    <icon src="/res/ios/icon/icon-60@2x.png" width="120" height="120"/>
    <icon src="/res/ios/icon/icon-60@3x.png" width="180" height="180"/>
    <icon src="/res/ios/icon/icon-76.png" width="76" height="76"/>
    <icon src="/res/ios/icon/icon-76@2x.png" width="152" height="152"/>
    <icon src="/res/ios/icon/icon-40.png" width="40" height="40"/>
    <icon src="/res/ios/icon/icon-40@2x.png" width="80" height="80"/>
    <icon src="/res/ios/icon/icon-50.png" width="50" height="50"/>
    <icon src="/res/ios/icon/icon-50@2x.png" width="100" height="100"/>
    <icon src="/res/ios/icon/icon-small.png" width="29" height="29"/>
    <icon src="/res/ios/icon/icon-small@2x.png" width="58" height="58"/>
    <icon src="/res/ios/icon/icon-small@3x.png" width="87" height="87"/>
    <icon src="/res/ios/icon/icon-83.5@2x~ipad.png" width="167" height="167"/>
    <splash src="/res/ios/screen/Default~iphone.png" width="320" height="480"/>
    <splash src="/res/ios/screen/Default@2x~iphone.png" width="640" height="960"/>
    <splash src="/res/ios/screen/Default-568h@2x~iphone.png" width="640" height="1136"/>
    <splash src="/res/ios/screen/Default-667h.png" width="750" height="1334"/>
    <splash src="/res/ios/screen/Default-736h.png" width="1242" height="2208"/>
    <splash src="/res/ios/screen/Default-Landscape-736h.png" width="2208" height="1242"/>
    <splash src="/res/ios/screen/Default-Portrait~ipad.png" width="768" height="1024"/>
    <splash src="/res/ios/screen/Default-Landscape~ipad.png" width="1024" height="768"/>
    <splash src="/res/ios/screen/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
    <splash src="/res/ios/screen/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
    <config-file platform="ios" parent="CFBundleLocalizations" target="*-Info.plist">
      <array>
        <string>en</string>
      </array>
    </config-file>
  </platform>
  <platform name="android">
    <icon src="/res/android/icon/ldpi.png" density="ldpi"/>
    <icon src="/res/android/icon/mdpi.png" density="mdpi"/>
    <icon src="/res/android/icon/hdpi.png" density="hdpi"/>
    <icon src="/res/android/icon/xhdpi.png" density="xhdpi"/>
    <icon src="/res/android/icon/xxhdpi.png" density="xxhdpi"/>
    <icon src="/res/android/icon/xxxhdpi.png" density="xxxhdpi"/>
    <splash src="/res/android/screen/splash-port-hdpi.png" density="port-hdpi"/>
    <splash src="/res/android/screen/splash-port-mdpi.png" density="port-mdpi"/>
    <splash src="/res/android/screen/splash-port-ldpi.png" density="port-ldpi"/>
    <splash src="/res/android/screen/splash-port-xxxhdpi.png" density="port-xxxhdpi"/>
    <splash src="/res/android/screen/splash-port-xxhdpi.png" density="port-xxhdpi"/>
    <splash src="/res/android/screen/splash-port-xhdpi.png" density="port-xhdpi"/>
  </platform>
  <platform name="windows">
    <icon src="/res/winrt/icon/package_logo_winrt.png" target="StoreLogo"/>
    <icon src="/res/winrt/icon/app_logo_winrt.png" target="Square150x150Logo"/>
    <icon src="/res/winrt/icon/app_small_logo_winrt.png" target="Square30x30Logo"/>
    <icon src="/res/winrt/icon/app_tile_wide_logo_winrt.png" target="Wide315x150Logo"/>
    <splash src="/res/winrt/screen/app_splash_screen_winrt.png" width="620" height="300"/>
  </platform>
  <platform name="chrome">
    <icon src="/platforms/chrome/icon.png" width="128" height="128"/>
  </platform>
  <preference name="WindowsStorePublisherName" value="My Name"/>
  <preference name="WindowsStoreIdentityName" value="84da30eb-6c7c-cd17-fbfe-a3495f7ae48f"/>
  <access origin="*"/>
  <access origin="*"/>
  <preference name="KeepRunning" value="true"/>
  <preference name="monaca:AndroidIsPackageNameSeparate" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="Orientation" value="default"/>
  <preference name="SplashScreenDelay" value="2500"/>
  <preference name="Fullscreen" value="false"/>
</widget>


text:
<!DOCTYPE html>
<html manifest="File://foo/bar.html">
<meta charset=utf-8>
<title>valid manifest: scheme-file-uppercase</title>
</html>


text:
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.drools</groupId>
    <artifactId>drools-examples-android</artifactId>
    <version>6.4.0-SNAPSHOT</version>
  </parent>

  <artifactId>roboguice-kiecontainer</artifactId>
  <packaging>apk</packaging>

  <name>Drools Android examples - Roboguice KieContainer</name>

  <dependencies>
    <dependency>
      <groupId>com.google.android</groupId>
      <artifactId>android</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-android</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-compiler</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xmlpull</groupId>
          <artifactId>xmlpull</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xpp3</groupId>
          <artifactId>xpp3_min</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jdt.core.compiler</groupId>
          <artifactId>ecj</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codehaus.janino</groupId>
      <artifactId>janino</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-internal</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.tony19</groupId>
      <artifactId>logback-android-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.tony19</groupId>
      <artifactId>logback-android-classic</artifactId>
      <exclusions>
        <exclusion>
          <groupId>com.google.android</groupId>
          <artifactId>android</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>multidex</artifactId>
      <type>aar</type>
    </dependency>
    <dependency>
      <groupId>org.roboguice</groupId>
      <artifactId>roboguice</artifactId>
      <exclusions>
        <exclusion>
          <groupId>android.support</groupId>
          <artifactId>compatibility-v4</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.roboguice</groupId>
      <artifactId>roboblender</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- Testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.robolectric</groupId>
      <artifactId>robolectric</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.squareup</groupId>
      <artifactId>fest-android</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.kie</groupId>
        <artifactId>kie-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>compile-kbase</id>
            <goals>
              <goal>build</goal>
            </goals>
            <phase>compile</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.simpligility.maven.plugins</groupId>
        <artifactId>android-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <sdk>
            <platform>21</platform>
          </sdk>
          <manifest>
            <versionName/>
            <versionCodeUpdateFromVersion>true</versionCodeUpdateFromVersion>
            <debuggable>true</debuggable>
          </manifest>
          <dex>
            <coreLibrary>true</coreLibrary>
            <jvmArguments>
              <jvmArgument>-Xmx2048m</jvmArgument>
            </jvmArguments>
            <multiDex>true</multiDex>
            <mainDexList>maindex.txt</mainDexList>
          </dex>
          <extractDuplicates>true</extractDuplicates>
          <apk>
            <metaInf>
              <includes>
                <include>services/**</include>
                <include>kmodule.*</include>
                <include>HelloKB/**</include>
                <include>drools**</include>
                <include>maven/${project.groupId}/${project.artifactId}/**</include>
              </includes>
            </metaInf>
          </apk>
        </configuration>
        <executions>
          <execution>
            <id>manifest</id>
            <phase>process-resources</phase>
            <goals>
              <goal>manifest-update</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


text:
'use strict';

var servicesModule = require('./_index.js');

/**
 * @ngInject
 */
function JsonFieldAccessorService() {

	var service = {};
	// support "deep" field accessing : field is location.lat => result = json[location][lat]
	service.accessField = function(json, field) {
		if (!json) {
			return '';
		}
		var dotPos = field.indexOf(".");
		if (dotPos === -1) {
			if (json[field]) {
				return json[field];
			} else {
				return '';
			}
		}
		var firstPart = field.substr(0, dotPos);
		var secondPart = field.substr(dotPos+1);
		return service.accessField(json[firstPart], secondPart);
	}

	return service;
}

servicesModule.service('JsonFieldAccessorService', JsonFieldAccessorService);


text:
<fieldset class="form__group form-choice">

            <input name="choice" value="one" type="radio" class="form__control radio" />
            One

            <input name="choice" value="two" type="radio" class="form__control radio" />
            Two

            <input name="choice" value="three" type="radio" class="form__control radio" />
            Three

            <input name="choice" value="four" type="radio" class="form__control radio" />
            Four

            <input name="choice" value="five" type="radio" class="form__control radio" />
            Five

            <input name="choice" value="six" type="radio" class="form__control radio" />
            Six

</fieldset>


text:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools" tools:context=".EditActivity">

    <item
        android:id="@+id/action_copy"
        android:title="复制"
        android:icon="@drawable/copy"
        android:orderInCategory="60"
        app:showAsAction="ifRoom" />

    <item
        android:id="@+id/action_share"
        android:title="分享"
        android:icon="@drawable/share"
        android:orderInCategory="70"
        app:showAsAction="ifRoom" />
    <!--app:actionProviderClass="android.support.v7.widget.ShareActionProvider"-->
    <item
        android:id="@+id/action_empty"
        android:title="清空笔记"
        android:orderInCategory="80"
        app:showAsAction="never" />

    <item
        android:id="@+id/action_size"
        android:title="字体大小"
        android:orderInCategory="90"
        app:showAsAction="never" />

    <item
        android:id="@+id/action_delete"
        android:title="删除笔记"
        android:orderInCategory="100"
        app:showAsAction="never" />
</menu>


text:
<title>
On the picket line
</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>

<?php include "../../legacy-includes/TopLogo.htmlf" ?>

<?php include "../../legacy-includes/TopAd.htmlf" ?>

<?php include "../../legacy-includes/LeftButtons.htmlf" ?>

<?php include "../../legacy-includes/BodyInsert.htmlf" ?>

On the picket line

August 24, 2007 | Pages 10 and 11

ARTICLES BELOW:

Long Island, N.Y., home health aides

Smithfield Packing

Long Island, N.Y., home health aides

By Peter Lamphere

HEMPSTEAD, N.Y.--Banging pots and pans, shaking maracas and chanting, home health aides here led an inspiring picket of Premier Home Health Care in an effort to win their first union contract.

The spirited five-day strike, which began August 13, ended without an agreement, but the yearlong effort to organize the workers into SEIU Local 1115/SEIU United Health Care Workers East continues.

Overwhelmingly, those walking the picket line cited low wages and the need for health care and sick days as a motivating factor of the strike: most only make between $7 and $8 an hour.

"Whatever it takes, we have to do it because we care for these people, and nobody cares for us," said Jean Douglas, one of the members of the union organizing committee and a 20-year veteran of the home health care industry.

Four days into the strike, management finally responded to pressure to come to the bargaining table with a slap in the face: The company offered nothing for the first year, and a raise in the second only if Premier makes a profit. Another member of the union committee, Regina, summed up the sentiments of the workers about the offer: "It was disrespectful."

Workers refused the offer, but on August 17 voted to return to work. The membership had only planned for a five-day job action, but plans to go on another strike should it be necessary.

"I was ready for [organizing a union] because I had nothing," said Jean, "I still have nothing, because we don't have a contract yet, but at least I have hope. You've got to fight for what you want."

The effort in Long Island is part of a long-term campaign by SEIU to organize the home health care industry. New York City Premier workers were organized in 2002 because of a strike threat, and tens of thousands of aides struck in New York City in 2004 to successfully win wage gains.

Call Premier President Arthur Schwabe at 914-428-7722 and tell him that his workers deserve better.

Back to the top

Smithfield Packing

By Elizabeth Schulte

WILLIAMSBURG, Va.--Workers at Smithfield Packing Company in Tar Heel, N.C., and supporters from several cities will be taking their message to the company shareholders' meeting here August 29: We have the right to unionize!

The anti-union tactics at Smithfield--the world's largest pork-processing plant--are as vicious as their plant is dangerous. On August 6, management terminated Jose Ozorio Figueroa, claiming it was because he was four minutes late to his shift.

But Figueroa, who has worked at Smithfield since 2004, and other pro-union workers know it's because of his activism for rights on the job. He was among a group of workers who took part in a walkout in November 2006 to protest the company's firing of workers whose Social Security numbers did not match federal records.

Activists are working to build solidarity--inside the plant and around the country. Workers began circulating a petition five months ago inside the plant calling for clean drinking water to be made available at work, and walked out of the plant on August 7 after they had waited three hours for clean drinking water the day before in the unbearable 103-degree summer heat.

According to the Justice at Smithfield campaign, 40 percent of the livestock workers walked out and held a sit-in on the grass outside the livestock area.

"Basically, the workers decided that we are not going to work until we get this resolved," Keith Ludlum, one of the workers who walked out, told the Fayetteville Observer. "I think it is ridiculous to have to go to this measure in order to have clean drinking water for everyone."

Meanwhile, supporters are taking this fight to the road. In Boston, supporters helped pass a resolution on August 1 that asks the city to suspend any purchases of products made at the Tar Heel plant "until the company ends all form of abuse, intimidation and violence against its workers."

Activists from several cities will board buses to rally at the Smithfield's shareholders' meeting to present petitions signed by hundreds of supporters.

Visit www.smithfieldjustice.com for information or to sign the petition.

<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>

<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>


text:
class OrganizationsController < AuthenticatedController
  def index
    @organizations = OrganizationsPresenter.present :organizations => load_organizations
    render :json => @organizations
  end
private
  def load_organizations
    Organization.with_repositories_archiveable_by current_user
  end
end


text:
module Locomotive
  module Wagon
    module Liquid
      module Tags

        class PathTo < ::Liquid::Tag

          include PathHelper

          Syntax = /(#{::Liquid::Expression}+)(#{::Liquid::TagAttributes}?)/

          def initialize(tag_name, markup, tokens, context)
            if markup =~ Syntax
              @handle = $1
              @_options = {}
              markup.scan(::Liquid::TagAttributes) do |key, value|
                @_options[key] = value
              end
            else
              raise SyntaxError.new("Syntax Error in 'path_to' - Valid syntax: path_to <page|page_handle|content_entry>(, locale: [fr|de|...], with: <page_handle>")
            end

            super
          end

          def render(context)
            render_path(context)
          end

        end

        ::Liquid::Template.register_tag('path_to', PathTo)
      end
    end
  end
end


text:
// -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
#ifndef __PDF417_READER_H__
#define __PDF417_READER_H__

#include <zxing/Reader.h>
#include <zxing/pdf417/decoder/Decoder.h>
#include <zxing/DecodeHints.h>

namespace zxing {
namespace pdf417 {

class PDF417Reader : public Reader {
 private:
  decoder::Decoder decoder;

  static Ref<BitMatrix> extractPureBits(Ref<BitMatrix> image);
  static int moduleSize(ArrayRef<int> leftTopBlack, Ref<BitMatrix> image);
  static int findPatternStart(int x, int y, Ref<BitMatrix> image);
  static int findPatternEnd(int x, int y, Ref<BitMatrix> image);

 public:
  Ref<Result> decode(Ref<BinaryBitmap> image, DecodeHints hints);
  void reset();
};

}
}

#endif // __PDF417_READER_H__


text:
<?php

namespace SmartCafe\Exceptions;

use Exception;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;
use Whoops\Handler\JsonResponseHandler;
use Whoops\Handler\PrettyPageHandler;
use Whoops\Run;

class Handler extends ExceptionHandler
{
    /**
     * A list of the exception types that should not be reported.
     *
     * @var array
     */
    protected $dontReport = [
        HttpException::class,
        ModelNotFoundException::class,
    ];

    /**
     * Report or log an exception.
     *
     * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
     *
     * @param  \Exception  $e
     * @return void
     */
    public function report(Exception $e)
    {
        return parent::report($e);
    }

    /**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Exception  $e
     * @return \Illuminate\Http\Response
     */
    public function render($request, Exception $e)
    {
        if ($e instanceof ModelNotFoundException) {
            $e = new NotFoundHttpException($e->getMessage(), $e);
        }

        if ($e instanceof TooManyRequestsHttpException) {
            return response()
                    ->json([
                        'status' => false,
                        'message' => 'Too many requests.',
                    ], 429);
        }

        if (env('APP_DEBUG')) {
            $whoops = new Run();
            if (!$request->ajax()) {
                $whoops->pushHandler(new PrettyPageHandler());
            } else {
                $whoops->pushHandler(new JsonResponseHandler());
            }

            return $whoops->handleException($e);
        }

        return parent::render($request, $e);
    }
}