text:
//
//  WHC_StackView.h
//  Github <https://github.com/netyouli/WHC_AutoLayoutKit>
//
//  Created by 吴海超 on 16/2/17.
//  Copyright © 2016年 吴海超. All rights reserved.
//

//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import <UIKit/UIKit.h>
#import "UIView+WHC_AutoLayout.h"

typedef NS_OPTIONS(NSUInteger, WHC_UILabelVerticalAlignment) {
    Top = 1 << 0, /// 顶部对齐
    Middle = 1 << 1, /// 居中对齐
    Bottom = 1 << 2, /// 底部对齐
};

@interface UIButton (WHC_StackView)

@end

@interface UILabel (WHC_StackView)
/************重载父类属性**************/
/// 自动高度
@property (nonatomic ,copy , readonly)HeightAuto whc_HeightAuto;

/// 自动宽度
@property (nonatomic ,copy , readonly)WidthAuto whc_WidthAuto;
@property (nonatomic, assign)CGFloat whc_LeftPadding;
@property (nonatomic, assign)CGFloat whc_TopPadding;
@property (nonatomic, assign)CGFloat whc_RightPadding;
@property (nonatomic, assign)CGFloat whc_BottomPadding;

/// 设置标签垂直方向对齐方式
@property (nonatomic, assign)WHC_UILabelVerticalAlignment whc_VerticalAlignment;
@end

#pragma mark - UI自动布局StackView容器 -

@interface UIView (WHC_StackViewCategory)
/**
 * 说明: 控件横向和垂直布局宽度或者高度权重比例
 */
@property (nonatomic , assign)CGFloat whc_WidthWeight;

@property (nonatomic , assign)CGFloat whc_HeightWeight;
@end

@interface WHC_StackView : UIView

/// 混合布局(同时垂直和横向)每行多少列
@property (nonatomic , assign) NSInteger whc_Column;
/// 容器内边距
@property (nonatomic , assign) UIEdgeInsets whc_Edge;
/// 容器内子控件横向间隙
@property (nonatomic , assign) CGFloat whc_HSpace;
/// 容器内子控件垂直间隙
@property (nonatomic , assign) CGFloat whc_VSpace;

/// 子元素高宽比
@property (nonatomic , assign) CGFloat whc_ElementHeightWidthRatio;

/// 子元素宽高比
@property (nonatomic , assign) CGFloat whc_ElementWidthHeightRatio;

/// 容器里子元素实际数量
@property (nonatomic , assign , readonly) NSInteger whc_SubViewCount;

/// 容器自动布局方向
@property (nonatomic , assign) WHC_LayoutOrientationOptions whc_Orientation;

/// 子视图固定宽度
@property (nonatomic , assign) CGFloat whc_SubViewWidth;

/// 子视图固定高度
@property (nonatomic , assign) CGFloat whc_SubViewHeight;

/// 设置分割线尺寸
@property (nonatomic , assign) CGFloat whc_SegmentLineSize;
/// 设置分割线内边距
@property (nonatomic , assign) CGFloat whc_SegmentLinePadding;
/// 设置分割线的颜色
@property (nonatomic , strong) UIColor * whc_SegmentLineColor;

/************重载父类属性**************/
/// 自动高度
@property (nonatomic ,copy , readonly)HeightAuto whc_HeightAuto;

/// 自动宽度
@property (nonatomic ,copy , readonly)WidthAuto whc_WidthAuto;

/************重载父类方法**************/
/**
 * 说明: 自动宽度
 */

- (void)whc_AutoWidth;

/**
 * 说明: 自动高度
 */

- (void)whc_AutoHeight;

/**
 * 说明:开始进行自动布局
 */
- (void)whc_StartLayout;

/**
 * 说明:清除所有子视图
 */
- (void)whc_RemoveAllSubviews;

/**
 移除所有空白站位视图(仅仅横向垂直混合布局有效)
 */
- (void)whc_RemoveAllVacntView;
@end


text:
package fr.jetlag.blogwithj.display.block;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import fr.jetlag.blogwithj.R;
import fr.jetlag.blogwithj.article.ArticleAdapter;
import fr.jetlag.blogwithj.article.Paragraph;

/**
 * Created by vince on 04/06/15.
 */
public class TextBlockDisplay implements BlockDisplay {

  private String title;

  private String content;

  public TextBlockDisplay(Paragraph p, String content) {
    this.title = p.getQuestion();
    this.content = content;
  }

  @Override
  public void onBindViewHolder(RecyclerView.ViewHolder holder) {
    if (holder instanceof TextBlockDisplay.ViewHolder) {
      ((ViewHolder) holder).titleView.setText(this.title);
      ((ViewHolder) holder).contentView.setText(this.content);
    }
  }

  public static class ViewHolder extends ArticleAdapter.ViewHolder {

    final TextView titleView;

    final TextView contentView;

    public ViewHolder(View cardView) {
      super(cardView);
      titleView = (TextView) cardView.findViewById(R.id.title);
      contentView = (TextView) cardView.findViewById(R.id.text_content);
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>G-Index</title>
<meta name="date" content="2017-01-29">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G H I L M P R S T U

G

getAccessToken() - Method in class com.rssaggregator.desktop.utils.TokenRequestInterceptor

Gets the Access Token.

getApiToken() - Method in class com.rssaggregator.desktop.model.AccessToken

getApiToken() - Static method in class com.rssaggregator.desktop.utils.PreferencesUtils

Gets the API token of the user.

getCategories() - Method in class com.rssaggregator.desktop.model.CategoriesWrapper

getCategoryByName(ObservableList<Category>, String) - Static method in class com.rssaggregator.desktop.utils.CategoriesUtils

Gets a category thanks to its name.

getCategoryByNameEmpty_Test() - Method in class com.rssaggregator.desktop.CategoriesUtilsTest

getCategoryByNameFilled_Test() - Method in class com.rssaggregator.desktop.CategoriesUtilsTest

getCategoryByNameNull_Test() - Method in class com.rssaggregator.desktop.CategoriesUtilsTest

getCategoryId() - Method in class com.rssaggregator.desktop.model.AddFeedWrapper

getCategoryId() - Method in class com.rssaggregator.desktop.model.Category

getCategoryId() - Method in class com.rssaggregator.desktop.model.CategoryAddedWrapper

getChannelId() - Method in class com.rssaggregator.desktop.model.Channel

getChannelId() - Method in class com.rssaggregator.desktop.model.FeedAddedWrapper

getChannelId() - Method in class com.rssaggregator.desktop.model.Item

getChannelName() - Method in class com.rssaggregator.desktop.model.Item

getChannels() - Method in class com.rssaggregator.desktop.model.Category

getChannels() - Method in class com.rssaggregator.desktop.model.ItemsWrapper

getCountStateItems(ObservableList<Category>) - Static method in class com.rssaggregator.desktop.utils.CategoriesUtils

Gets the number of unread and star items.

getData() - Method in class com.rssaggregator.desktop.network.event.BaseEvent

getDescription() - Method in class com.rssaggregator.desktop.model.Item

getEmail() - Method in class com.rssaggregator.desktop.model.Credentials

getError() - Method in class com.rssaggregator.desktop.model.ApiError

getError_code() - Method in class com.rssaggregator.desktop.model.ApiError

getEventBus() - Static method in class com.rssaggregator.desktop.MainApp

Gets the instance of the EventBus.

getExpirationDate() - Method in class com.rssaggregator.desktop.model.AccessToken

getFaviconUri() - Method in class com.rssaggregator.desktop.model.Channel

getFeedId() - Method in class com.rssaggregator.desktop.model.Item

getItemId() - Method in class com.rssaggregator.desktop.model.Item

getItems() - Method in class com.rssaggregator.desktop.model.Channel

getLink() - Method in class com.rssaggregator.desktop.model.Item

getMainApp() - Static method in class com.rssaggregator.desktop.MainApp

Gets the instance of the Main Class.

getName() - Method in class com.rssaggregator.desktop.model.AddCategoryWrapper

getName() - Method in class com.rssaggregator.desktop.model.Category

getName() - Method in class com.rssaggregator.desktop.model.CategoryAddedWrapper

getName() - Method in class com.rssaggregator.desktop.model.Channel

getOkHttpClient() - Static method in class com.rssaggregator.desktop.MainApp

Gets the instance of the OkHttpClient.

getPassword() - Method in class com.rssaggregator.desktop.model.Credentials

getPrimaryStage() - Method in class com.rssaggregator.desktop.MainApp

Gets the primary stage.

getPubDate() - Method in class com.rssaggregator.desktop.model.Item

getReadCount() - Method in class com.rssaggregator.desktop.model.StateCountWrapper

getRetrofit() - Static method in class com.rssaggregator.desktop.MainApp

Gets the instance of the Retrofit.

getRssApi() - Static method in class com.rssaggregator.desktop.MainApp

Gets the instance of the RSS API.

getRssLink() - Method in class com.rssaggregator.desktop.model.AddFeedWrapper

getStage() - Static method in class com.rssaggregator.desktop.MainApp

Gets the stage from everywhere in the app.

getStarCount() - Method in class com.rssaggregator.desktop.model.StateCountWrapper

getStatus() - Method in class com.rssaggregator.desktop.model.AccessToken

getStatus() - Method in class com.rssaggregator.desktop.model.CategoriesWrapper

getStatus() - Method in class com.rssaggregator.desktop.model.CategoryAddedWrapper

getStatus() - Method in class com.rssaggregator.desktop.model.FeedAddedWrapper

getStatus() - Method in class com.rssaggregator.desktop.model.ItemsWrapper

getThrowable() - Method in class com.rssaggregator.desktop.network.event.BaseEvent

getTitle() - Method in class com.rssaggregator.desktop.model.Item

getTokenRequestInterceptor() - Static method in class com.rssaggregator.desktop.MainApp

Gets the instance of the TokenRequestInterceptor.

getUnread() - Method in class com.rssaggregator.desktop.model.Category

getUnread() - Method in class com.rssaggregator.desktop.model.Channel

getUnreadArticles(Category) - Static method in class com.rssaggregator.desktop.utils.CategoriesUtils

Gets the number of unread articles in a category.

getUnreadArticlesEmpty_Test() - Method in class com.rssaggregator.desktop.CategoriesUtilsTest

getUnreadArticlesFilled_Test() - Method in class com.rssaggregator.desktop.CategoriesUtilsTest

getUnreadArticlesNull_Test() - Method in class com.rssaggregator.desktop.CategoriesUtilsTest

getUserEmail() - Static method in class com.rssaggregator.desktop.utils.PreferencesUtils

Gets the Email User.

getUserId() - Method in class com.rssaggregator.desktop.model.AccessToken

getUserId() - Static method in class com.rssaggregator.desktop.utils.PreferencesUtils

Gets the User Id

getUserPassword() - Static method in class com.rssaggregator.desktop.utils.PreferencesUtils

Gets the Password User.

Globals - Class in com.rssaggregator.desktop.utils

Class which regroups some global attributes.

Globals() - Constructor for class com.rssaggregator.desktop.utils.Globals

A B C D E F G H I L M P R S T U

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
layout: post
title: Book Review - "Learn Python The Hard Way"
comments: true
tags:
  - book reviews
  - python
---

I haven't read IT-books for a long-long period. I preferred to do humanitarian science instead.

Now it's time to get back to the IT sector.

My NEXT BIG THING (TM) for 2018 is Data Science. It's a no-brainer you can't grab the whole ML/NN/AI stuff in only one year, but I'd say it's real to learn basic algorithms/libraries in 1 year, even smaller period of time. So, this is where I go to.

My first book on this road is a famous [LPTHW by Z. Shaw](https://learnpythonthehardway.org/). It's written for SO newbies. But I haven't found any other short and concise introductions to Python. This introduction is so basic, but it's definitely good for grabbing easiest essentials (you have to omit big amount of text optional even for mid-level devs though).

You can read my LPTHW solutions here: [https://github.com/asiniy/lpthw](https://github.com/asiniy/lpthw)

My VERDICT: it's up to situation.


text:
<resources>
    <string name="app_name">FirebaseChat</string>

<!-- TODO: Remove or change this placeholder text -->
    <string name="hello_blank_fragment">Hello blank fragment</string>
</resources>


text:
package Games::Solitaire::Verify::VariantsMap;

use strict;
use warnings;

use Games::Solitaire::Verify::VariantParams;

use parent 'Games::Solitaire::Verify::Base';

our $VERSION = '0.1400';

sub _init
{
    return 0;
}

my %variants_map =
(
    "bakers_dozen" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 13,
                'num_freecells' => 0,
                'sequence_move' => "limited",
                'seq_build_by' => "rank",
                'empty_stacks_filled_by' => "none",
            }
        ),
    "bakers_game" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 8,
                'num_freecells' => 4,
                'sequence_move' => "limited",
                'seq_build_by' => "suit",
                'empty_stacks_filled_by' => "any",
            }
        ),
    "beleaguered_castle" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 8,
                'num_freecells' => 0,
                'sequence_move' => "limited",
                'seq_build_by' => "rank",
                'empty_stacks_filled_by' => "any",
            }
        ),
    "cruel" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 12,
                'num_freecells' => 0,
                'sequence_move' => "limited",
                'seq_build_by' => "suit",
                'empty_stacks_filled_by' => "none",
            }
        ),
    "der_katzenschwanz" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 2,
                'num_columns' => 9,
                'num_freecells' => 8,
                'sequence_move' => "unlimited",
                'seq_build_by' => "alt_color",
                'empty_stacks_filled_by' => "none",
            }
        ),
    "die_schlange" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 2,
                'num_columns' => 9,
                'num_freecells' => 8,
                'sequence_move' => "limited",
                'seq_build_by' => "alt_color",
                'empty_stacks_filled_by' => "none",
            }
        ),
    "eight_off" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 8,
                'num_freecells' => 8,
                'sequence_move' => "limited",
                'seq_build_by' => "suit",
                'empty_stacks_filled_by' => "kings",
            }
        ),
    "fan" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 18,
                'num_freecells' => 0,
                'sequence_move' => "limited",
                'seq_build_by' => "suit",
                'empty_stacks_filled_by' => "kings",
            }
        ),
    "forecell" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 8,
                'num_freecells' => 4,
                'sequence_move' => "limited",
                'seq_build_by' => "alt_color",
                'empty_stacks_filled_by' => "kings",
            }
        ),
    "freecell" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 8,
                'num_freecells' => 4,
                'sequence_move' => "limited",
                'seq_build_by' => "alt_color",
                'empty_stacks_filled_by' => "any",
            }
        ),
    "good_measure" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 10,
                'num_freecells' => 0,
                'sequence_move' => "limited",
                'seq_build_by' => "rank",
                'empty_stacks_filled_by' => "none",
            }
        ),
    "kings_only_bakers_game" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 8,
                'num_freecells' => 4,
                'sequence_move' => "limited",
                'seq_build_by' => "suit",
                'empty_stacks_filled_by' => "kings",
            }
        ),
    "relaxed_freecell" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 8,
                'num_freecells' => 4,
                'sequence_move' => "unlimited",
                'seq_build_by' => "alt_color",
                'empty_stacks_filled_by' => "any",
            }
        ),
    "relaxed_seahaven_towers" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 10,
                'num_freecells' => 4,
                'sequence_move' => "unlimited",
                'seq_build_by' => "suit",
                'empty_stacks_filled_by' => "kings",
            }
        ),
    "seahaven_towers" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 10,
                'num_freecells' => 4,
                'sequence_move' => "limited",
                'seq_build_by' => "suit",
                'empty_stacks_filled_by' => "kings",
            }
        ),
    "simple_simon" =>
        Games::Solitaire::Verify::VariantParams->new(
            {
                'num_decks' => 1,
                'num_columns' => 10,
                'num_freecells' => 0,
                'sequence_move' => "limited",
                'seq_build_by' => "suit",
                'empty_stacks_filled_by' => "any",
                'rules' => "simple_simon",
            }
        ),
);

sub calc_variants_map
{
    my $self = shift;

    return \%variants_map;
}

sub get_variant_by_id
{
    my $self = shift;
    my $id = shift;

    my $map = $self->calc_variants_map();

    if (!exists($map->{$id}))
    {
        return;
    }
    else
    {
        return $map->{$id}->clone();
    }
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Games::Solitaire::Verify::VariantsMap - a mapping from the variants to
their parameters.

=head1 VERSION

version 0.1400

=head1 FUNCTIONS

=head2 $self->calc_variants_map()

Returns the variants map - a hash reference mapping the variant ID to its
parameters.

=head2 my $variant_params = $self->get_variant_by_id($id)

Returns the variant from its ID or undef if it does not exist.

=head1 PARAMETERS

=head2 Variants IDs

This is a list of the available variant IDs.

=over 4

=item * bakers_dozen

=item * bakers_game

=item * beleaguered_castle

=item * cruel

=item * der_katzenschwanz

=item * die_schlange

=item * eight_off

=item * fan

=item * forecell

=item * freecell

=item * good_measure

=item * kings_only_bakers_game

=item * relaxed_freecell

=item * relaxed_seahaven_towers

=item * seahaven_towers

=item * simple_simon

=back

=head1 SEE ALSO

L<Games::Solitaire::Verify::VariantParams> .

=head1 AUTHOR

Shlomi Fish, L<http://www.shlomifish.org/>.

=head1 BUGS

Please report any bugs or feature requests to C<bug-games-solitaire-verifysolution-move at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-Solitaire-Verify>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Games::Solitaire::Verify::VariantsMap

You can also look for information at:

=over 4

=item * RT: CPAN's request tracker

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-Solitaire-Verify>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/Games-Solitaire-Verify>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/Games-Solitaire-Verify>

=item * Search CPAN

L<http://search.cpan.org/dist/Games-Solitaire-Verify>

=back

=head1 ACKNOWLEDGEMENTS

=head1 COPYRIGHT & LICENSE

Copyright 2008 Shlomi Fish.

This program is released under the following license: MIT/X11
( L<http://www.opensource.org/licenses/mit-license.php> ).

=head1 AUTHOR

Shlomi Fish <shlomif@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by Shlomi Fish.

This is free software, licensed under:

  The MIT (X11) License

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-Solitaire-Verify or by email
to bug-games-solitaire-verify@rt.cpan.org.

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan

=head1 SUPPORT

=head2 Perldoc

You can find documentation for this module with the perldoc command.

  perldoc Games::Solitaire::Verify

=head2 Websites

The following websites have more information about this module, and may be of help to you. As always,
in addition to those websites please use your favorite search engine to discover more resources.

=over 4

=item *

MetaCPAN

A modern, open-source CPAN search engine, useful to view POD in HTML format.

L<http://metacpan.org/release/Games-Solitaire-Verify>

=item *

Search CPAN

The default CPAN search engine, useful to view POD in HTML format.

L<http://search.cpan.org/dist/Games-Solitaire-Verify>

=item *

RT: CPAN's Bug Tracker

The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-Solitaire-Verify>

=item *

AnnoCPAN

The AnnoCPAN is a website that allows community annotations of Perl module documentation.

L<http://annocpan.org/dist/Games-Solitaire-Verify>

=item *

CPAN Ratings

The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.

L<http://cpanratings.perl.org/d/Games-Solitaire-Verify>

=item *

CPAN Forum

The CPAN Forum is a web forum for discussing Perl modules.

L<http://cpanforum.com/dist/Games-Solitaire-Verify>

=item *

CPANTS

The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.

L<http://cpants.perl.org/dist/overview/Games-Solitaire-Verify>

=item *

CPAN Testers

The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions.

L<http://www.cpantesters.org/distro/G/Games-Solitaire-Verify>

=item *

CPAN Testers Matrix

The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.

L<http://matrix.cpantesters.org/?dist=Games-Solitaire-Verify>

=item *

CPAN Testers Dependencies

The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.

L<http://deps.cpantesters.org/?module=Games::Solitaire::Verify>

=back

=head2 Bugs / Feature Requests

Please report any bugs or feature requests by email to C<bug-games-solitaire-verify at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-Solitaire-Verify>. You will be automatically notified of any
progress on the request by the system.

=head2 Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play
with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
from your repository :)

L<http://bitbucket.org/shlomif/fc-solve>

  git clone http://bitbucket.org/shlomif/fc-solve

=cut


text:
export const EvCallbackTypes = {
  ACK: 'acknowledgeResponse',
  ADD_SESSION: 'addSessionNotification',
  AGENT_DEBUG_EMAIL_NOTIF: 'agentDebugEmailNotification',
  AGENT_STATE: 'agentStateResponse',
  AUTHENTICATE: 'authenticateResponse',
  BARGE_IN: 'bargeInResponse',
  CALLBACK_CANCEL: 'callbackCancelResponse',
  CALLBACK_PENDING: 'callbacksPendingResponse',
  CALL_NOTES: 'callNotesResponse',
  CAMPAIGN_DISPOSITIONS: 'campaignDispositionsResponse',
  CHAT: 'chatResponse', // internal chat
  CHAT_ACTIVE: 'chatActiveNotification', // external chat
  CHAT_ADD_SESSION: 'addChatSessionNotification', // external chat
  CHAT_CANCELLED: 'chatCancelledNotification', // external chat
  CHAT_CLIENT_RECONNECT: 'chatClientReconnectNotification',
  CHAT_INACTIVE: 'chatInactiveNotification', // external chat
  CHAT_LIST: 'chatListResponse', // external chat
  CHAT_MESSAGE: 'chatMessageNotification', // external chat
  CHAT_NEW: 'chatNewNotification', // external chat
  CHAT_PRESENTED: 'chatPresentedNotification', // external chat
  CHAT_ROOM_STATE: 'chatRoomStateResponse',
  CHAT_STATE: 'chatStateResponse', // external chat
  CHAT_STOP_MONITOR: 'stopAgentChatMonitorNotification', // external chat
  CHAT_TYPING: 'chatTypingNotification', // external chat
  CLOSE_SOCKET: 'closeResponse',
  COACH_CALL: 'coachResponse',
  CONFIG: 'configureResponse',
  DIAL_GROUP_CHANGE: 'dialGroupChangeNotification',
  DIAL_GROUP_CHANGE_PENDING: 'dialGroupChangePendingNotification',
  DIRECT_AGENT_TRANSFER: 'directAgentTransferResponse',
  DIRECT_AGENT_TRANSFER_LIST: 'directAgentTransferListResponse',
  DIRECT_AGENT_TRANSFER_NOTIF: 'directAgentTransferNotification',
  DROP_SESSION: 'dropSessionNotification',
  EARLY_UII: 'earlyUiiNotification',
  END_CALL: 'endCallNotification',
  GATES_CHANGE: 'gatesChangeNotification',
  GENERIC_NOTIFICATION: 'genericNotification',
  GENERIC_RESPONSE: 'genericResponse',
  HOLD: 'holdResponse',
  LEAD_HISTORY: 'leadHistoryResponse',
  LEAD_INSERT: 'leadInsertResponse',
  LEAD_SEARCH: 'leadSearchResponse',
  LEAD_UPDATE: 'leadUpdateResponse',
  LOGIN: 'loginResponse',
  LOGIN_PHASE_1: 'loginPhase1Response',
  LOGIN_MULTISOCKET: 'multiSocketResponse',
  LOGOUT: 'logoutResponse',
  LOG_CONSOLE_RESULTS: 'logConsoleResultsResponse',
  LOG_RESULTS: 'logResultsResponse',
  NEW_CALL: 'newCallNotification',
  OFFHOOK_INIT: 'offhookInitResponse',
  OFFHOOK_TERM: 'offhookTermNotification',
  OPEN_SOCKET: 'openResponse',
  PAUSE_RECORD: 'pauseRecordResponse',
  PENDING_CHAT_DISP: 'pendingChatDispNotification',
  PENDING_DISP: 'pendingDispNotification',
  PREVIEW_FETCH: 'previewFetchResponse',
  PREVIEW_LEAD_STATE: 'previewLeadStateNotification',
  RECORD: 'recordResponse',
  REQUEUE: 'requeueResponse',
  REVERSE_MATCH: 'reverseMatchNotification',
  SAFE_MODE_FETCH: 'safeModeFetchResponse',
  SAFE_MODE_SEARCH: 'safeModeSearchResponse',
  SCRIPT_CONFIG: 'scriptConfigResponse',
  SILENT_MONITOR: 'monitorResponse',
  STATS_AGENT: 'agentStats',
  STATS_AGENT_DAILY: 'agentDailyStats',
  STATS_CAMPAIGN: 'campaignStats',
  STATS_CHAT_QUEUE: 'chatQueueStats',
  STATS_QUEUE: 'queueStats',
  SUPERVISOR_LIST: 'supervisorListResponse',
  TCPA_SAFE_LEAD_STATE: 'tcpaSafeLeadStateNotification',
  WEBRTC_INFO: 'webRtcInfoResponse',
  XFER_COLD: 'coldXferResponse',
  XFER_WARM: 'warmXferResponse',
  SEARCH_DIR: 'searchDirectoryResponse',
  EXTENSION_PRESENCE: 'extensionPresenceInfo',

  // SOFTPHONE Callbacks
  SIP_CONNECTED: 'sipConnectedNotification',
  SIP_DIAL_DEST_CHANGED: 'sipDialDestChangedNotification',
  SIP_ENDED: 'sipEndedNotification',
  SIP_MUTE: 'sipMuteResponse',
  SIP_REGISTERED: 'sipRegisteredNotification',
  SIP_REGISTRATION_FAILED: 'sipRegistrationFailedNotification',
  SIP_RINGING: 'sipRingingNotification',
  SIP_SWITCH_REGISTRAR: 'sipSwitchRegistrarNotification',
  SIP_UNMUTE: 'sipUnmuteResponse',
  SIP_UNREGISTERED: 'sipUnregisteredNotification',
} as const;


text:
package dalicia.rsvp;

import static dalicia.rsvp.JsonHelper.newLenientObjectMapper;

import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Locale;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.appengine.repackaged.com.google.common.base.Throwables;
import com.google.common.base.Optional;
import dalicia.rsvp.protocol.ErrorResponse;
import dalicia.rsvp.protocol.SuccessResponse;

public class RsvpServlet extends HttpServlet {
    private static final Logger log = Logger.getLogger(LoginServlet.class.getName());

    private static final ObjectMapper objectMapper = newLenientObjectMapper();

    private static final InvitationDao invitationDao = new InvitationDaoImpl();

    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        doPost(request, response);
    }

    @Override
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.setContentType("application/json");

        String code = request.getParameter("code");
        if (code == null) {
            response.getWriter().println(objectMapper.writeValueAsString(new ErrorResponse("badRequest", "missing 'code' parameter")));
            return;
        }

        code = code.toLowerCase(Locale.ENGLISH);
        Optional<Invitation> invitation = invitationDao.load(code);

        if (!invitation.isPresent()) {
            log.info("bad code: '" + code + "'");
            response.getWriter().println(objectMapper.writeValueAsString(new ErrorResponse("badCode", "unrecognized code: '" + code + "'")));
            return;
        }

        log.info("got invitation: " + invitation.get());

        String numAttendingStr = request.getParameter("numGuests");
        if (numAttendingStr == null) {
            response.getWriter().println(objectMapper.writeValueAsString(new ErrorResponse("badRequest", "missing 'numAttending' parameter")));
            return;
        }

        final int numAttending;
        try {
            numAttending = Integer.parseInt(numAttendingStr);
        } catch (NumberFormatException e) {
            response.getWriter().println(objectMapper.writeValueAsString(new ErrorResponse("badRequest", "'numAttending' must be an integer")));
            return;
        }

        int maxGuests = invitation.get().getPrimaryGuests();
        if (invitation.get().isAdditionalGuestAllowed()) {
            maxGuests ++;
        }
        if (maxGuests < numAttending) {
            response.getWriter().println(objectMapper.writeValueAsString(new ErrorResponse("badRequest", "'numAttending' must be <= max guests (" + maxGuests + ")")));
            return;
        }

        invitation.get().setSeatsReserved(numAttending);

        try {
            log.info("Saving response {code='" + code + "' numAttending='" + numAttending + "'}");
            invitationDao.saveResponse(code, numAttending);
        } catch (Exception e) {
            sendErrorEmail(e);
            log.log(Level.SEVERE, "failed to save response", e);
            response.getWriter().println(objectMapper.writeValueAsString(new ErrorResponse("rsvpFailed",
                    "Oops, something went wrong -- sorry about that! If it happens again, please get in touch with us by email at daveandalicia2015@icloud.com or by phone at 650-242-8376.")));
            return;
        }

        response.getWriter().println(objectMapper.writeValueAsString(new SuccessResponse(invitation.get())));
        sendEmail(invitation.get());
    }

    private void sendErrorEmail(Exception error) {
        sendEmail("RSVP failure: " + error.getMessage(), Throwables.getStackTraceAsString(error));
    }

    private void sendEmail(String subject, String body) {
        Properties props = new Properties();
        Session session = Session.getDefaultInstance(props, null);
        try {
            Message msg = new MimeMessage(session);
            msg.setFrom(new InternetAddress("dnault@gmail.com", "Dave Nault"));
            msg.addRecipient(Message.RecipientType.TO, new InternetAddress("aradia@gmail.com", "Alicia Ong"));
            msg.addRecipient(Message.RecipientType.TO, new InternetAddress("dnault@mac.com", "Dave Nault"));
            msg.setSubject(subject);
            msg.setText(body);
            Transport.send(msg);

        } catch (Exception e) {
            log.log(Level.SEVERE, "failed to send email", e);
        }
    }

    private void sendEmail(Invitation invitation) {
        try {
            String subject = "RSVP: " + invitation.getName() + " (" + invitation.getSeatsReserved() + ")";
            String body = objectMapper.writeValueAsString(invitation.getSeatsReserved());
            sendEmail(subject, body);
        } catch (Exception e) {
            log.log(Level.SEVERE, "failed to send email", e);
        }
    }
}


text:
<?php

namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\View\Model\FeedModel;
use Zend\Feed\Writer\Feed;

class IndexController extends AbstractActionController
{

    public function indexAction()
    {
        $posts = $this->getServiceLocator()->get('postList');

        return new ViewModel(array(
            'posts' => $posts,
        ));
    }

    public function rssAction()
    {
        $feed = new Feed();
        $feed->setTitle('EricHutson.com');
        $feed->setFeedLink('http://erichutson.com/rss', 'rss');
        $feed->addAuthor(array(
            'name' => 'Eric Hutson',
            'email' => 'ehutson@gmail.com',
            'uri' => 'http://erichutson.com',
        ));
        $feed->setDescription('Eric Hutson\'s Blog');
        $feed->setLink('http://erichutson.com');

        $latest = null;

        $posts = $this->getServiceLocator()->get('postList');
        foreach ($posts as $post) {
            $entry = $feed->createEntry();
            if (is_null($latest)) {
                $latest = $post;
            }
            $entry->setTitle($post->getTitle());
            $entry->setLink('http://erichutson.com/post/' . $post->getSlug());
            $entry->setDescription($post->getExcerpt());
            $entry->setDateModified($post->getTimestamp());
            $entry->setDateCreated($post->getTimestamp());
            $feed->addEntry($entry);
        }

        $feed->setDateModified($latest->getTimestamp());

        $feed->export('rss');
        $feedModel = new FeedModel();
        $feedModel->setFeed($feed);
        return $feedModel;
    }

    public function readAction()
    {
        $id = $this->params()->fromRoute('post');
        if (is_null($id)) {
            return $this->redirect()->toRoute('home');
        }
        $posts = $this->getServiceLocator()->get('postList');
        foreach ($posts as $post) {
            if ($post->getSlug() == $id) {
                return new ViewModel(array(
                    'post' => $post
                ));
            }
        }

        // looks like we didn't find it...
        $this->getResponse()->setStatusCode(404);
    }

    public function aboutAction()
    {
        return new ViewModel();
    }
}


text:
layout:     post
title:      "LLVM build and pass"
date:       2017-07-24 12:00:00
author:     "MAW"
---

# Instructions for building LLVM

For more detailed version, have a look at the following [link](http://llvm.org/docs/GettingStarted.html#an-example-using-the-llvm-tool-chain).

1. Download and unzip llvm sources
```shell
  wget http://llvm.org/releases/3.9.1/llvm-3.9.1.src.tar.xz
  tar xfv llvm-3.9.1.src.tar.xz
```
2. Create a build folder for llvm build
```shell
  mkdir llvm-build
```
3. Generate CMake files
```
  cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=prefix=/install/path
```
4. Make with one of the following commands (serial or parallel)
```
  make
  make -j4 # multiple threads
```

5. Install
```
  sudo make install
```

## Creating LLVM Pass

The structure of the pass should look like the following link
[LLVM pass](https://github.com/abenkhadra/llvm-pass-tutorial).

It is a good starting point for learning how to add LLVM passes.
The following commands must be run from *llvm-pass-skeleton/passName/*. (Make sure that CMakeLists.txt exists in llvm-pass-skeleton and passName folders. )

```
  cmake ..
  make
  clang -Xclang -load -Xclang /path/to/libpass*.so *.c
```


text:
.class public Landroid/media/ThumbnailUtils;
.super Ljava/lang/Object;
.source "ThumbnailUtils.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;
    }
.end annotation

# static fields
.field private static final MAX_NUM_PIXELS_MICRO_THUMBNAIL:I = 0x4b00

.field private static final MAX_NUM_PIXELS_THUMBNAIL:I = 0x30000

.field private static final OPTIONS_NONE:I = 0x0

.field public static final OPTIONS_RECYCLE_INPUT:I = 0x2

.field private static final OPTIONS_SCALE_UP:I = 0x1

.field private static final TAG:Ljava/lang/String; = "ThumbnailUtils"

.field public static final TARGET_SIZE_MICRO_THUMBNAIL:I = 0x60

.field public static final TARGET_SIZE_MINI_THUMBNAIL:I = 0x140

.field private static final UNCONSTRAINED:I = -0x1

# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 40
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private static closeSilently(Landroid/os/ParcelFileDescriptor;)V
    .registers 2
    .param p0, "c"    # Landroid/os/ParcelFileDescriptor;

    .prologue
    .line 336
    if-nez p0, :cond_3

    return-void

    .line 338
    :cond_3
    :try_start_3
    invoke-virtual {p0}, Landroid/os/ParcelFileDescriptor;->close()V
    :try_end_6
    .catch Ljava/lang/Throwable; {:try_start_3 .. :try_end_6} :catch_7

    .line 335
    :goto_6
    return-void

    .line 339
    :catch_7
    move-exception v0

    .local v0, "t":Ljava/lang/Throwable;
    goto :goto_6
.end method

.method private static computeInitialSampleSize(Landroid/graphics/BitmapFactory$Options;II)I
    .registers 14
    .param p0, "options"    # Landroid/graphics/BitmapFactory$Options;
    .param p1, "minSideLength"    # I
    .param p2, "maxNumOfPixels"    # I

    .prologue
    const/4 v10, -0x1

    .line 270
    iget v6, p0, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    int-to-double v4, v6

    .line 271
    .local v4, "w":D
    iget v6, p0, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    int-to-double v0, v6

    .line 273
    .local v0, "h":D
    if-ne p2, v10, :cond_11

    const/4 v2, 0x1

    .line 275
    .local v2, "lowerBound":I
    :goto_a
    if-ne p1, v10, :cond_1f

    const/16 v3, 0x80

    .line 279
    .local v3, "upperBound":I
    :goto_e
    if-ge v3, v2, :cond_33

    .line 281
    return v2

    .line 274
    .end local v2    # "lowerBound":I
    .end local v3    # "upperBound":I
    :cond_11
    mul-double v6, v4, v0

    int-to-double v8, p2

    div-double/2addr v6, v8

    invoke-static {v6, v7}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v6

    invoke-static {v6, v7}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v6

    double-to-int v2, v6

    .restart local v2    # "lowerBound":I
    goto :goto_a

    .line 276
    :cond_1f
    int-to-double v6, p1

    div-double v6, v4, v6

    invoke-static {v6, v7}, Ljava/lang/Math;->floor(D)D

    move-result-wide v6

    .line 277
    int-to-double v8, p1

    div-double v8, v0, v8

    invoke-static {v8, v9}, Ljava/lang/Math;->floor(D)D

    move-result-wide v8

    .line 276
    invoke-static {v6, v7, v8, v9}, Ljava/lang/Math;->min(DD)D

    move-result-wide v6

    double-to-int v3, v6

    .restart local v3    # "upperBound":I
    goto :goto_e

    .line 284
    :cond_33
    if-ne p2, v10, :cond_39

    .line 285
    if-ne p1, v10, :cond_39

    .line 286
    const/4 v6, 0x1

    return v6

    .line 287
    :cond_39
    if-ne p1, v10, :cond_3c

    .line 288
    return v2

    .line 290
    :cond_3c
    return v3
.end method

.method private static computeSampleSize(Landroid/graphics/BitmapFactory$Options;II)I
    .registers 6
    .param p0, "options"    # Landroid/graphics/BitmapFactory$Options;
    .param p1, "minSideLength"    # I
    .param p2, "maxNumOfPixels"    # I

    .prologue
    .line 252
    invoke-static {p0, p1, p2}, Landroid/media/ThumbnailUtils;->computeInitialSampleSize(Landroid/graphics/BitmapFactory$Options;II)I

    move-result v0

    .line 256
    .local v0, "initialSize":I
    const/16 v2, 0x8

    if-gt v0, v2, :cond_e

    .line 257
    const/4 v1, 0x1

    .line 258
    .local v1, "roundedSize":I
    :goto_9
    if-ge v1, v0, :cond_14

    .line 259
    shl-int/lit8 v1, v1, 0x1

    goto :goto_9

    .line 262
    .end local v1    # "roundedSize":I
    :cond_e
    add-int/lit8 v2, v0, 0x7

    div-int/lit8 v2, v2, 0x8

    mul-int/lit8 v1, v2, 0x8

    .line 265
    .restart local v1    # "roundedSize":I
    :cond_14
    return v1
.end method

.method public static createImageThumbnail(Ljava/lang/String;I)Landroid/graphics/Bitmap;
    .registers 18
    .param p0, "filePath"    # Ljava/lang/String;
    .param p1, "kind"    # I

    .prologue
    .line 85
    const/4 v13, 0x1

    move/from16 v0, p1

    if-ne v0, v13, :cond_55

    const/4 v12, 0x1

    .line 86
    .local v12, "wantMini":Z
    :goto_6
    if-eqz v12, :cond_57

    .line 87
    const/16 v11, 0x140

    .line 89
    .local v11, "targetSize":I
    :goto_a
    if-eqz v12, :cond_5a

    .line 90
    const/high16 v5, 0x30000

    .line 92
    .local v5, "maxPixels":I
    :goto_e
    new-instance v8, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;

    const/4 v13, 0x0

    invoke-direct {v8, v13}, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;-><init>(Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;)V

    .line 93
    .local v8, "sizedThumbnailBitmap":Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;
    const/4 v1, 0x0

    .line 94
    .local v1, "bitmap":Landroid/graphics/Bitmap;
    invoke-static/range {p0 .. p0}, Landroid/media/MediaFile;->getFileType(Ljava/lang/String;)Landroid/media/MediaFile$MediaFileType;

    move-result-object v4

    .line 95
    .local v4, "fileType":Landroid/media/MediaFile$MediaFileType;
    if-eqz v4, :cond_28

    iget v13, v4, Landroid/media/MediaFile$MediaFileType;->fileType:I

    const/16 v14, 0x1f

    if-ne v13, v14, :cond_28

    .line 96
    move-object/from16 v0, p0

    invoke-static {v0, v11, v5, v8}, Landroid/media/ThumbnailUtils;->createThumbnailFromEXIF(Ljava/lang/String;IILandroid/media/ThumbnailUtils$SizedThumbnailBitmap;)V

    .line 97
    iget-object v1, v8, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;->mBitmap:Landroid/graphics/Bitmap;

    .line 100
    .end local v1    # "bitmap":Landroid/graphics/Bitmap;
    :cond_28
    if-nez v1, :cond_7c

    .line 101
    const/4 v9, 0x0

    .line 103
    .local v9, "stream":Ljava/io/FileInputStream;
    :try_start_2b
    new-instance v10, Ljava/io/FileInputStream;

    move-object/from16 v0, p0

    invoke-direct {v10, v0}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V
    :try_end_32
    .catch Ljava/io/IOException; {:try_start_2b .. :try_end_32} :catch_d6
    .catch Ljava/lang/OutOfMemoryError; {:try_start_2b .. :try_end_32} :catch_a1
    .catchall {:try_start_2b .. :try_end_32} :catchall_f1

    .line 104
    .end local v9    # "stream":Ljava/io/FileInputStream;
    .local v10, "stream":Ljava/io/FileInputStream;
    :try_start_32
    invoke-virtual {v10}, Ljava/io/FileInputStream;->getFD()Ljava/io/FileDescriptor;

    move-result-object v3

    .line 105
    .local v3, "fd":Ljava/io/FileDescriptor;
    new-instance v7, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v7}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 106
    .local v7, "options":Landroid/graphics/BitmapFactory$Options;
    const/4 v13, 0x1

    iput v13, v7, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 107
    const/4 v13, 0x1

    iput-boolean v13, v7, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 108
    const/4 v13, 0x0

    invoke-static {v3, v13, v7}, Landroid/graphics/BitmapFactory;->decodeFileDescriptor(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 109
    iget-boolean v13, v7, Landroid/graphics/BitmapFactory$Options;->mCancel:Z

    if-nez v13, :cond_4e

    iget v13, v7, Landroid/graphics/BitmapFactory$Options;->outWidth:I
    :try_end_4b
    .catch Ljava/io/IOException; {:try_start_32 .. :try_end_4b} :catch_106
    .catch Ljava/lang/OutOfMemoryError; {:try_start_32 .. :try_end_4b} :catch_109
    .catchall {:try_start_32 .. :try_end_4b} :catchall_103

    const/4 v14, -0x1

    if-ne v13, v14, :cond_5d

    .line 111
    :cond_4e
    const/4 v13, 0x0

    .line 126
    if-eqz v10, :cond_54

    .line 127
    :try_start_51
    invoke-virtual {v10}, Ljava/io/FileInputStream;->close()V
    :try_end_54
    .catch Ljava/io/IOException; {:try_start_51 .. :try_end_54} :catch_8b

    .line 111
    :cond_54
    :goto_54
    return-object v13

    .line 85
    .end local v3    # "fd":Ljava/io/FileDescriptor;
    .end local v4    # "fileType":Landroid/media/MediaFile$MediaFileType;
    .end local v5    # "maxPixels":I
    .end local v7    # "options":Landroid/graphics/BitmapFactory$Options;
    .end local v8    # "sizedThumbnailBitmap":Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;
    .end local v10    # "stream":Ljava/io/FileInputStream;
    .end local v11    # "targetSize":I
    .end local v12    # "wantMini":Z
    :cond_55
    const/4 v12, 0x0

    .restart local v12    # "wantMini":Z
    goto :goto_6

    .line 88
    :cond_57
    const/16 v11, 0x60

    .restart local v11    # "targetSize":I
    goto :goto_a

    .line 91
    :cond_5a
    const/16 v5, 0x4b00

    .restart local v5    # "maxPixels":I
    goto :goto_e

    .line 110
    .restart local v3    # "fd":Ljava/io/FileDescriptor;
    .restart local v4    # "fileType":Landroid/media/MediaFile$MediaFileType;
    .restart local v7    # "options":Landroid/graphics/BitmapFactory$Options;
    .restart local v8    # "sizedThumbnailBitmap":Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;
    .restart local v10    # "stream":Ljava/io/FileInputStream;
    :cond_5d
    :try_start_5d
    iget v13, v7, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    const/4 v14, -0x1

    if-eq v13, v14, :cond_4e

    .line 113
    invoke-static {v7, v11, v5}, Landroid/media/ThumbnailUtils;->computeSampleSize(Landroid/graphics/BitmapFactory$Options;II)I

    move-result v13

    iput v13, v7, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 115
    const/4 v13, 0x0

    iput-boolean v13, v7, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 117
    const/4 v13, 0x0

    iput-boolean v13, v7, Landroid/graphics/BitmapFactory$Options;->inDither:Z

    .line 118
    sget-object v13, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    iput-object v13, v7, Landroid/graphics/BitmapFactory$Options;->inPreferredConfig:Landroid/graphics/Bitmap$Config;

    .line 119
    const/4 v13, 0x0

    invoke-static {v3, v13, v7}, Landroid/graphics/BitmapFactory;->decodeFileDescriptor(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_76
    .catch Ljava/io/IOException; {:try_start_5d .. :try_end_76} :catch_106
    .catch Ljava/lang/OutOfMemoryError; {:try_start_5d .. :try_end_76} :catch_109
    .catchall {:try_start_5d .. :try_end_76} :catchall_103

    move-result-object v1

    .line 126
    .local v1, "bitmap":Landroid/graphics/Bitmap;
    if-eqz v10, :cond_7c

    .line 127
    :try_start_79
    invoke-virtual {v10}, Ljava/io/FileInputStream;->close()V
    :try_end_7c
    .catch Ljava/io/IOException; {:try_start_79 .. :try_end_7c} :catch_96

    .line 136
    .end local v1    # "bitmap":Landroid/graphics/Bitmap;
    .end local v3    # "fd":Ljava/io/FileDescriptor;
    .end local v7    # "options":Landroid/graphics/BitmapFactory$Options;
    .end local v10    # "stream":Ljava/io/FileInputStream;
    :cond_7c
    :goto_7c
    const/4 v13, 0x3

    move/from16 v0, p1

    if-ne v0, v13, :cond_8a

    .line 139
    const/16 v13, 0x60

    .line 140
    const/16 v14, 0x60

    const/4 v15, 0x2

    .line 138
    invoke-static {v1, v13, v14, v15}, Landroid/media/ThumbnailUtils;->extractThumbnail(Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 142
    :cond_8a
    return-object v1

    .line 129
    .restart local v3    # "fd":Ljava/io/FileDescriptor;
    .restart local v7    # "options":Landroid/graphics/BitmapFactory$Options;
    .restart local v10    # "stream":Ljava/io/FileInputStream;
    :catch_8b
    move-exception v2

    .line 130
    .local v2, "ex":Ljava/io/IOException;
    const-string/jumbo v14, "ThumbnailUtils"

    const-string/jumbo v15, ""

    invoke-static {v14, v15, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_54

    .line 129
    .end local v2    # "ex":Ljava/io/IOException;
    .restart local v1    # "bitmap":Landroid/graphics/Bitmap;
    :catch_96
    move-exception v2

    .line 130
    .restart local v2    # "ex":Ljava/io/IOException;
    const-string/jumbo v13, "ThumbnailUtils"

    const-string/jumbo v14, ""

    invoke-static {v13, v14, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_7c

    .line 122
    .end local v1    # "bitmap":Landroid/graphics/Bitmap;
    .end local v2    # "ex":Ljava/io/IOException;
    .end local v3    # "fd":Ljava/io/FileDescriptor;
    .end local v7    # "options":Landroid/graphics/BitmapFactory$Options;
    .end local v10    # "stream":Ljava/io/FileInputStream;
    .restart local v9    # "stream":Ljava/io/FileInputStream;
    :catch_a1
    move-exception v6

    .line 123
    .end local v9    # "stream":Ljava/io/FileInputStream;
    .local v6, "oom":Ljava/lang/OutOfMemoryError;
    :goto_a2
    :try_start_a2
    const-string/jumbo v13, "ThumbnailUtils"

    new-instance v14, Ljava/lang/StringBuilder;

    invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v15, "Unable to decode file "

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    move-object/from16 v0, p0

    invoke-virtual {v14, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    const-string/jumbo v15, ". OutOfMemoryError."

    invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v14

    invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v14

    invoke-static {v13, v14, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_c5
    .catchall {:try_start_a2 .. :try_end_c5} :catchall_f1

    .line 126
    if-eqz v9, :cond_7c

    .line 127
    :try_start_c7
    invoke-virtual {v9}, Ljava/io/FileInputStream;->close()V
    :try_end_ca
    .catch Ljava/io/IOException; {:try_start_c7 .. :try_end_ca} :catch_cb

    goto :goto_7c

    .line 129
    :catch_cb
    move-exception v2

    .line 130
    .restart local v2    # "ex":Ljava/io/IOException;
    const-string/jumbo v13, "ThumbnailUtils"

    const-string/jumbo v14, ""

    invoke-static {v13, v14, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_7c

    .line 120
    .end local v2    # "ex":Ljava/io/IOException;
    .end local v6    # "oom":Ljava/lang/OutOfMemoryError;
    .restart local v9    # "stream":Ljava/io/FileInputStream;
    :catch_d6
    move-exception v2

    .line 121
    .end local v9    # "stream":Ljava/io/FileInputStream;
    .restart local v2    # "ex":Ljava/io/IOException;
    :goto_d7
    :try_start_d7
    const-string/jumbo v13, "ThumbnailUtils"

    const-string/jumbo v14, ""

    invoke-static {v13, v14, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_e0
    .catchall {:try_start_d7 .. :try_end_e0} :catchall_f1

    .line 126
    if-eqz v9, :cond_7c

    .line 127
    :try_start_e2
    invoke-virtual {v9}, Ljava/io/FileInputStream;->close()V
    :try_end_e5
    .catch Ljava/io/IOException; {:try_start_e2 .. :try_end_e5} :catch_e6

    goto :goto_7c

    .line 129
    :catch_e6
    move-exception v2

    .line 130
    const-string/jumbo v13, "ThumbnailUtils"

    const-string/jumbo v14, ""

    invoke-static {v13, v14, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_7c

    .line 124
    .end local v2    # "ex":Ljava/io/IOException;
    :catchall_f1
    move-exception v13

    .line 126
    :goto_f2
    if-eqz v9, :cond_f7

    .line 127
    :try_start_f4
    invoke-virtual {v9}, Ljava/io/FileInputStream;->close()V
    :try_end_f7
    .catch Ljava/io/IOException; {:try_start_f4 .. :try_end_f7} :catch_f8

    .line 124
    :cond_f7
    :goto_f7
    throw v13

    .line 129
    :catch_f8
    move-exception v2

    .line 130
    .restart local v2    # "ex":Ljava/io/IOException;
    const-string/jumbo v14, "ThumbnailUtils"

    const-string/jumbo v15, ""

    invoke-static {v14, v15, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_f7

    .line 124
    .end local v2    # "ex":Ljava/io/IOException;
    .restart local v10    # "stream":Ljava/io/FileInputStream;
    :catchall_103
    move-exception v13

    move-object v9, v10

    .end local v10    # "stream":Ljava/io/FileInputStream;
    .local v9, "stream":Ljava/io/FileInputStream;
    goto :goto_f2

    .line 120
    .end local v9    # "stream":Ljava/io/FileInputStream;
    .restart local v10    # "stream":Ljava/io/FileInputStream;
    :catch_106
    move-exception v2

    .restart local v2    # "ex":Ljava/io/IOException;
    move-object v9, v10

    .end local v10    # "stream":Ljava/io/FileInputStream;
    .restart local v9    # "stream":Ljava/io/FileInputStream;
    goto :goto_d7

    .line 122
    .end local v2    # "ex":Ljava/io/IOException;
    .end local v9    # "stream":Ljava/io/FileInputStream;
    .restart local v10    # "stream":Ljava/io/FileInputStream;
    :catch_109
    move-exception v6

    .restart local v6    # "oom":Ljava/lang/OutOfMemoryError;
    move-object v9, v10

    .end local v10    # "stream":Ljava/io/FileInputStream;
    .restart local v9    # "stream":Ljava/io/FileInputStream;
    goto :goto_a2
.end method

.method private static createThumbnailFromEXIF(Ljava/lang/String;IILandroid/media/ThumbnailUtils$SizedThumbnailBitmap;)V
    .registers 16
    .param p0, "filePath"    # Ljava/lang/String;
    .param p1, "targetSize"    # I
    .param p2, "maxPixels"    # I
    .param p3, "sizedThumbBitmap"    # Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;

    .prologue
    .line 474
    if-nez p0, :cond_3

    return-void

    .line 476
    :cond_3
    const/4 v1, 0x0

    .line 477
    .local v1, "exif":Landroid/media/ExifInterface;
    const/4 v8, 0x0

    .line 479
    .local v8, "thumbData":[B
    :try_start_5
    new-instance v2, Landroid/media/ExifInterface;

    invoke-direct {v2, p0}, Landroid/media/ExifInterface;-><init>(Ljava/lang/String;)V
    :try_end_a
    .catch Ljava/io/IOException; {:try_start_5 .. :try_end_a} :catch_61

    .line 480
    .local v2, "exif":Landroid/media/ExifInterface;
    :try_start_a
    invoke-virtual {v2}, Landroid/media/ExifInterface;->getThumbnail()[B
    :try_end_d
    .catch Ljava/io/IOException; {:try_start_a .. :try_end_d} :catch_73

    .end local v1    # "exif":Landroid/media/ExifInterface;
    move-result-object v8

    .local v8, "thumbData":[B
    move-object v1, v2

    .line 485
    .end local v2    # "exif":Landroid/media/ExifInterface;
    .end local v8    # "thumbData":[B
    :goto_f
    new-instance v5, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v5}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 486
    .local v5, "fullOptions":Landroid/graphics/BitmapFactory$Options;
    new-instance v3, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v3}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 487
    .local v3, "exifOptions":Landroid/graphics/BitmapFactory$Options;
    const/4 v4, 0x0

    .line 488
    .local v4, "exifThumbWidth":I
    const/4 v6, 0x0

    .line 491
    .local v6, "fullThumbWidth":I
    if-eqz v8, :cond_31

    .line 492
    const/4 v10, 0x1

    iput-boolean v10, v3, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 493
    array-length v10, v8

    const/4 v11, 0x0

    invoke-static {v8, v11, v10, v3}, Landroid/graphics/BitmapFactory;->decodeByteArray([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 494
    invoke-static {v3, p1, p2}, Landroid/media/ThumbnailUtils;->computeSampleSize(Landroid/graphics/BitmapFactory$Options;II)I

    move-result v10

    iput v10, v3, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 495
    iget v10, v3, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    iget v11, v3, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    div-int v4, v10, v11

    .line 499
    :cond_31
    const/4 v10, 0x1

    iput-boolean v10, v5, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 500
    invoke-static {p0, v5}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 501
    invoke-static {v5, p1, p2}, Landroid/media/ThumbnailUtils;->computeSampleSize(Landroid/graphics/BitmapFactory$Options;II)I

    move-result v10

    iput v10, v5, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 502
    iget v10, v5, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    iget v11, v5, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    div-int v6, v10, v11

    .line 505
    if-eqz v8, :cond_69

    if-lt v4, v6, :cond_69

    .line 506
    iget v9, v3, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    .line 507
    .local v9, "width":I
    iget v7, v3, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    .line 508
    .local v7, "height":I
    const/4 v10, 0x0

    iput-boolean v10, v3, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 510
    array-length v10, v8

    .line 509
    const/4 v11, 0x0

    invoke-static {v8, v11, v10, v3}, Landroid/graphics/BitmapFactory;->decodeByteArray([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    move-result-object v10

    iput-object v10, p3, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;->mBitmap:Landroid/graphics/Bitmap;

    .line 511
    iget-object v10, p3, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;->mBitmap:Landroid/graphics/Bitmap;

    if-eqz v10, :cond_60

    .line 512
    iput-object v8, p3, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;->mThumbnailData:[B

    .line 513
    iput v9, p3, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;->mThumbnailWidth:I

    .line 514
    iput v7, p3, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;->mThumbnailHeight:I

    .line 473
    .end local v7    # "height":I
    .end local v9    # "width":I
    :cond_60
    :goto_60
    return-void

    .line 481
    .end local v3    # "exifOptions":Landroid/graphics/BitmapFactory$Options;
    .end local v4    # "exifThumbWidth":I
    .end local v5    # "fullOptions":Landroid/graphics/BitmapFactory$Options;
    .end local v6    # "fullThumbWidth":I
    .restart local v1    # "exif":Landroid/media/ExifInterface;
    .local v8, "thumbData":[B
    :catch_61
    move-exception v0

    .line 482
    .end local v1    # "exif":Landroid/media/ExifInterface;
    .local v0, "ex":Ljava/io/IOException;
    :goto_62
    const-string/jumbo v10, "ThumbnailUtils"

    invoke-static {v10, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_f

    .line 517
    .end local v0    # "ex":Ljava/io/IOException;
    .end local v8    # "thumbData":[B
    .restart local v3    # "exifOptions":Landroid/graphics/BitmapFactory$Options;
    .restart local v4    # "exifThumbWidth":I
    .restart local v5    # "fullOptions":Landroid/graphics/BitmapFactory$Options;
    .restart local v6    # "fullThumbWidth":I
    :cond_69
    const/4 v10, 0x0

    iput-boolean v10, v5, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 518
    invoke-static {p0, v5}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    move-result-object v10

    iput-object v10, p3, Landroid/media/ThumbnailUtils$SizedThumbnailBitmap;->mBitmap:Landroid/graphics/Bitmap;

    goto :goto_60

    .line 481
    .end local v3    # "exifOptions":Landroid/graphics/BitmapFactory$Options;
    .end local v4    # "exifThumbWidth":I
    .end local v5    # "fullOptions":Landroid/graphics/BitmapFactory$Options;
    .end local v6    # "fullThumbWidth":I
    .restart local v2    # "exif":Landroid/media/ExifInterface;
    .restart local v8    # "thumbData":[B
    :catch_73
    move-exception v0

    .restart local v0    # "ex":Ljava/io/IOException;
    move-object v1, v2

    .end local v2    # "exif":Landroid/media/ExifInterface;
    .local v1, "exif":Landroid/media/ExifInterface;
    goto :goto_62
.end method

.method public static createVideoThumbnail(Ljava/lang/String;I)Landroid/graphics/Bitmap;
    .registers 15
    .param p0, "filePath"    # Ljava/lang/String;
    .param p1, "kind"    # I

    .prologue
    .line 153
    const/4 v0, 0x0

    .line 154
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    new-instance v6, Landroid/media/MediaMetadataRetriever;

    invoke-direct {v6}, Landroid/media/MediaMetadataRetriever;-><init>()V

    .line 156
    .local v6, "retriever":Landroid/media/MediaMetadataRetriever;
    :try_start_6
    invoke-virtual {v6, p0}, Landroid/media/MediaMetadataRetriever;->setDataSource(Ljava/lang/String;)V

    .line 157
    const-wide/16 v10, -0x1

    invoke-virtual {v6, v10, v11}, Landroid/media/MediaMetadataRetriever;->getFrameAtTime(J)Landroid/graphics/Bitmap;
    :try_end_e
    .catch Ljava/lang/IllegalArgumentException; {:try_start_6 .. :try_end_e} :catch_1f
    .catch Ljava/lang/RuntimeException; {:try_start_6 .. :try_end_e} :catch_18
    .catchall {:try_start_6 .. :try_end_e} :catchall_26

    move-result-object v0

    .line 164
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    :try_start_f
    invoke-virtual {v6}, Landroid/media/MediaMetadataRetriever;->release()V
    :try_end_12
    .catch Ljava/lang/RuntimeException; {:try_start_f .. :try_end_12} :catch_16

    .line 170
    .end local v0    # "bitmap":Landroid/graphics/Bitmap;
    :goto_12
    if-nez v0, :cond_2d

    const/4 v10, 0x0

    return-object v10

    .line 165
    .restart local v0    # "bitmap":Landroid/graphics/Bitmap;
    :catch_16
    move-exception v2

    .local v2, "ex":Ljava/lang/RuntimeException;
    goto :goto_12

    .line 160
    .end local v2    # "ex":Ljava/lang/RuntimeException;
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    :catch_18
    move-exception v2

    .line 164
    .restart local v2    # "ex":Ljava/lang/RuntimeException;
    :try_start_19
    invoke-virtual {v6}, Landroid/media/MediaMetadataRetriever;->release()V
    :try_end_1c
    .catch Ljava/lang/RuntimeException; {:try_start_19 .. :try_end_1c} :catch_1d

    goto :goto_12

    .line 165
    :catch_1d
    move-exception v2

    goto :goto_12

    .line 158
    .end local v2    # "ex":Ljava/lang/RuntimeException;
    :catch_1f
    move-exception v1

    .line 164
    .local v1, "ex":Ljava/lang/IllegalArgumentException;
    :try_start_20
    invoke-virtual {v6}, Landroid/media/MediaMetadataRetriever;->release()V
    :try_end_23
    .catch Ljava/lang/RuntimeException; {:try_start_20 .. :try_end_23} :catch_24

    goto :goto_12

    .line 165
    :catch_24
    move-exception v2

    .restart local v2    # "ex":Ljava/lang/RuntimeException;
    goto :goto_12

    .line 162
    .end local v1    # "ex":Ljava/lang/IllegalArgumentException;
    .end local v2    # "ex":Ljava/lang/RuntimeException;
    :catchall_26
    move-exception v10

    .line 164
    :try_start_27
    invoke-virtual {v6}, Landroid/media/MediaMetadataRetriever;->release()V
    :try_end_2a
    .catch Ljava/lang/RuntimeException; {:try_start_27 .. :try_end_2a} :catch_2b

    .line 162
    :goto_2a
    throw v10

    .line 165
    :catch_2b
    move-exception v2

    .restart local v2    # "ex":Ljava/lang/RuntimeException;
    goto :goto_2a

    .line 172
    .end local v0    # "bitmap":Landroid/graphics/Bitmap;
    .end local v2    # "ex":Ljava/lang/RuntimeException;
    :cond_2d
    const/4 v10, 0x1

    if-ne p1, v10, :cond_57

    .line 174
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v9

    .line 175
    .local v9, "width":I
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    .line 176
    .local v4, "height":I
    invoke-static {v9, v4}, Ljava/lang/Math;->max(II)I

    move-result v5

    .line 177
    .local v5, "max":I
    const/16 v10, 0x200

    if-le v5, v10, :cond_56

    .line 178
    int-to-float v10, v5

    const/high16 v11, 0x44000000    # 512.0f

    div-float v7, v11, v10

    .line 179
    .local v7, "scale":F
    int-to-float v10, v9

    mul-float/2addr v10, v7

    invoke-static {v10}, Ljava/lang/Math;->round(F)I

    move-result v8

    .line 180
    .local v8, "w":I
    int-to-float v10, v4

    mul-float/2addr v10, v7

    invoke-static {v10}, Ljava/lang/Math;->round(F)I

    move-result v3

    .line 181
    .local v3, "h":I
    const/4 v10, 0x1

    invoke-static {v0, v8, v3, v10}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 189
    .end local v3    # "h":I
    .end local v4    # "height":I
    .end local v5    # "max":I
    .end local v7    # "scale":F
    .end local v8    # "w":I
    .end local v9    # "width":I
    :cond_56
    :goto_56
    return-object v0

    .line 183
    :cond_57
    const/4 v10, 0x3

    if-ne p1, v10, :cond_56

    .line 185
    const/16 v10, 0x60

    .line 186
    const/16 v11, 0x60

    .line 187
    const/4 v12, 0x2

    .line 184
    invoke-static {v0, v10, v11, v12}, Landroid/media/ThumbnailUtils;->extractThumbnail(Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;

    move-result-object v0

    .local v0, "bitmap":Landroid/graphics/Bitmap;
    goto :goto_56
.end method

.method public static extractThumbnail(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap;
    .registers 4
    .param p0, "source"    # Landroid/graphics/Bitmap;
    .param p1, "width"    # I
    .param p2, "height"    # I

    .prologue
    .line 201
    const/4 v0, 0x0

    invoke-static {p0, p1, p2, v0}, Landroid/media/ThumbnailUtils;->extractThumbnail(Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;

    move-result-object v0

    return-object v0
.end method

.method public static extractThumbnail(Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;
    .registers 9
    .param p0, "source"    # Landroid/graphics/Bitmap;
    .param p1, "width"    # I
    .param p2, "height"    # I
    .param p3, "options"    # I

    .prologue
    const/4 v3, 0x0

    .line 214
    if-nez p0, :cond_4

    .line 215
    return-object v3

    .line 219
    :cond_4
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    if-ge v3, v4, :cond_25

    .line 220
    int-to-float v3, p1

    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v4

    int-to-float v4, v4

    div-float v1, v3, v4

    .line 224
    .local v1, "scale":F
    :goto_16
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    .line 225
    .local v0, "matrix":Landroid/graphics/Matrix;
    invoke-virtual {v0, v1, v1}, Landroid/graphics/Matrix;->setScale(FF)V

    .line 227
    or-int/lit8 v3, p3, 0x1

    .line 226
    invoke-static {v0, p0, p1, p2, v3}, Landroid/media/ThumbnailUtils;->transform(Landroid/graphics/Matrix;Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;

    move-result-object v2

    .line 228
    .local v2, "thumbnail":Landroid/graphics/Bitmap;
    return-object v2

    .line 222
    .end local v0    # "matrix":Landroid/graphics/Matrix;
    .end local v1    # "scale":F
    .end local v2    # "thumbnail":Landroid/graphics/Bitmap;
    :cond_25
    int-to-float v3, p2

    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    int-to-float v4, v4

    div-float v1, v3, v4

    .restart local v1    # "scale":F
    goto :goto_16
.end method

.method private static makeBitmap(IILandroid/net/Uri;Landroid/content/ContentResolver;Landroid/os/ParcelFileDescriptor;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    .registers 13
    .param p0, "minSideLength"    # I
    .param p1, "maxNumOfPixels"    # I
    .param p2, "uri"    # Landroid/net/Uri;
    .param p3, "cr"    # Landroid/content/ContentResolver;
    .param p4, "pfd"    # Landroid/os/ParcelFileDescriptor;
    .param p5, "options"    # Landroid/graphics/BitmapFactory$Options;

    .prologue
    const/4 v5, -0x1

    const/4 v6, 0x0

    .line 305
    const/4 v0, 0x0

    .line 307
    .local v0, "b":Landroid/graphics/Bitmap;
    if-nez p4, :cond_9

    :try_start_5
    invoke-static {p2, p3}, Landroid/media/ThumbnailUtils;->makeInputStream(Landroid/net/Uri;Landroid/content/ContentResolver;)Landroid/os/ParcelFileDescriptor;
    :try_end_8
    .catch Ljava/lang/OutOfMemoryError; {:try_start_5 .. :try_end_8} :catch_4e
    .catchall {:try_start_5 .. :try_end_8} :catchall_5c

    move-result-object p4

    .line 308
    :cond_9
    if-nez p4, :cond_f

    .line 330
    invoke-static {p4}, Landroid/media/ThumbnailUtils;->closeSilently(Landroid/os/ParcelFileDescriptor;)V

    .line 308
    return-object v6

    .line 309
    :cond_f
    if-nez p5, :cond_17

    :try_start_11
    new-instance v3, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v3}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .end local p5    # "options":Landroid/graphics/BitmapFactory$Options;
    .local v3, "options":Landroid/graphics/BitmapFactory$Options;
    move-object p5, v3

    .line 311
    .end local v3    # "options":Landroid/graphics/BitmapFactory$Options;
    .restart local p5    # "options":Landroid/graphics/BitmapFactory$Options;
    :cond_17
    invoke-virtual {p4}, Landroid/os/ParcelFileDescriptor;->getFileDescriptor()Ljava/io/FileDescriptor;

    move-result-object v2

    .line 312
    .local v2, "fd":Ljava/io/FileDescriptor;
    const/4 v4, 0x1

    iput v4, p5, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 313
    const/4 v4, 0x1

    iput-boolean v4, p5, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 314
    const/4 v4, 0x0

    invoke-static {v2, v4, p5}, Landroid/graphics/BitmapFactory;->decodeFileDescriptor(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 315
    iget-boolean v4, p5, Landroid/graphics/BitmapFactory$Options;->mCancel:Z

    if-nez v4, :cond_2d

    iget v4, p5, Landroid/graphics/BitmapFactory$Options;->outWidth:I
    :try_end_2b
    .catch Ljava/lang/OutOfMemoryError; {:try_start_11 .. :try_end_2b} :catch_4e
    .catchall {:try_start_11 .. :try_end_2b} :catchall_5c

    if-ne v4, v5, :cond_31

    .line 330
    :cond_2d
    invoke-static {p4}, Landroid/media/ThumbnailUtils;->closeSilently(Landroid/os/ParcelFileDescriptor;)V

    .line 317
    return-object v6

    .line 316
    :cond_31
    :try_start_31
    iget v4, p5, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    if-eq v4, v5, :cond_2d

    .line 319
    invoke-static {p5, p0, p1}, Landroid/media/ThumbnailUtils;->computeSampleSize(Landroid/graphics/BitmapFactory$Options;II)I

    move-result v4

    iput v4, p5, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 321
    const/4 v4, 0x0

    iput-boolean v4, p5, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 323
    const/4 v4, 0x0

    iput-boolean v4, p5, Landroid/graphics/BitmapFactory$Options;->inDither:Z

    .line 324
    sget-object v4, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    iput-object v4, p5, Landroid/graphics/BitmapFactory$Options;->inPreferredConfig:Landroid/graphics/Bitmap$Config;

    .line 325
    const/4 v4, 0x0

    invoke-static {v2, v4, p5}, Landroid/graphics/BitmapFactory;->decodeFileDescriptor(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_49
    .catch Ljava/lang/OutOfMemoryError; {:try_start_31 .. :try_end_49} :catch_4e
    .catchall {:try_start_31 .. :try_end_49} :catchall_5c

    move-result-object v0

    .line 330
    .local v0, "b":Landroid/graphics/Bitmap;
    invoke-static {p4}, Landroid/media/ThumbnailUtils;->closeSilently(Landroid/os/ParcelFileDescriptor;)V

    .line 332
    return-object v0

    .line 326
    .end local v2    # "fd":Ljava/io/FileDescriptor;
    .local v0, "b":Landroid/graphics/Bitmap;
    :catch_4e
    move-exception v1

    .line 327
    .local v1, "ex":Ljava/lang/OutOfMemoryError;
    :try_start_4f
    const-string/jumbo v4, "ThumbnailUtils"

    const-string/jumbo v5, "Got oom exception "

    invoke-static {v4, v5, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_58
    .catchall {:try_start_4f .. :try_end_58} :catchall_5c

    .line 330
    invoke-static {p4}, Landroid/media/ThumbnailUtils;->closeSilently(Landroid/os/ParcelFileDescriptor;)V

    .line 328
    return-object v6

    .line 329
    .end local v1    # "ex":Ljava/lang/OutOfMemoryError;
    :catchall_5c
    move-exception v4

    .line 330
    invoke-static {p4}, Landroid/media/ThumbnailUtils;->closeSilently(Landroid/os/ParcelFileDescriptor;)V

    .line 329
    throw v4
.end method

.method private static makeInputStream(Landroid/net/Uri;Landroid/content/ContentResolver;)Landroid/os/ParcelFileDescriptor;
    .registers 4
    .param p0, "uri"    # Landroid/net/Uri;
    .param p1, "cr"    # Landroid/content/ContentResolver;

    .prologue
    .line 347
    :try_start_0
    const-string/jumbo v1, "r"

    invoke-virtual {p1, p0, v1}, Landroid/content/ContentResolver;->openFileDescriptor(Landroid/net/Uri;Ljava/lang/String;)Landroid/os/ParcelFileDescriptor;
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_6} :catch_8

    move-result-object v1

    return-object v1

    .line 348
    :catch_8
    move-exception v0

    .line 349
    .local v0, "ex":Ljava/io/IOException;
    const/4 v1, 0x0

    return-object v1
.end method

.method private static transform(Landroid/graphics/Matrix;Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;
    .registers 35
    .param p0, "scaler"    # Landroid/graphics/Matrix;
    .param p1, "source"    # Landroid/graphics/Bitmap;
    .param p2, "targetWidth"    # I
    .param p3, "targetHeight"    # I
    .param p4, "options"    # I

    .prologue
    .line 361
    and-int/lit8 v3, p4, 0x1

    if-eqz v3, :cond_91

    const/16 v27, 0x1

    .line 362
    .local v27, "scaleUp":Z
    :goto_6
    and-int/lit8 v3, p4, 0x2

    if-eqz v3, :cond_95

    const/16 v25, 0x1

    .line 364
    .local v25, "recycle":Z
    :goto_c
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    sub-int v16, v3, p2

    .line 365
    .local v16, "deltaX":I
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    sub-int v18, v3, p3

    .line 366
    .local v18, "deltaY":I
    if-nez v27, :cond_99

    if-ltz v16, :cond_1e

    if-gez v18, :cond_99

    .line 374
    :cond_1e
    sget-object v3, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    .line 373
    move/from16 v0, p2

    move/from16 v1, p3

    invoke-static {v0, v1, v3}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v11

    .line 375
    .local v11, "b2":Landroid/graphics/Bitmap;
    new-instance v15, Landroid/graphics/Canvas;

    invoke-direct {v15, v11}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 377
    .local v15, "c":Landroid/graphics/Canvas;
    div-int/lit8 v3, v16, 0x2

    const/4 v4, 0x0

    invoke-static {v4, v3}, Ljava/lang/Math;->max(II)I

    move-result v17

    .line 378
    .local v17, "deltaXHalf":I
    div-int/lit8 v3, v18, 0x2

    const/4 v4, 0x0

    invoke-static {v4, v3}, Ljava/lang/Math;->max(II)I

    move-result v19

    .line 379
    .local v19, "deltaYHalf":I
    new-instance v28, Landroid/graphics/Rect;

    .line 382
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    move/from16 v0, p2

    invoke-static {v0, v3}, Ljava/lang/Math;->min(II)I

    move-result v3

    add-int v3, v3, v17

    .line 383
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    move/from16 v0, p3

    invoke-static {v0, v4}, Ljava/lang/Math;->min(II)I

    move-result v4

    add-int v4, v4, v19

    .line 379
    move-object/from16 v0, v28

    move/from16 v1, v17

    move/from16 v2, v19

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 384
    .local v28, "src":Landroid/graphics/Rect;
    invoke-virtual/range {v28 .. v28}, Landroid/graphics/Rect;->width()I

    move-result v3

    sub-int v3, p2, v3

    div-int/lit8 v21, v3, 0x2

    .line 385
    .local v21, "dstX":I
    invoke-virtual/range {v28 .. v28}, Landroid/graphics/Rect;->height()I

    move-result v3

    sub-int v3, p3, v3

    div-int/lit8 v22, v3, 0x2

    .line 386
    .local v22, "dstY":I
    new-instance v20, Landroid/graphics/Rect;

    .line 389
    sub-int v3, p2, v21

    .line 390
    sub-int v4, p3, v22

    .line 386
    move-object/from16 v0, v20

    move/from16 v1, v21

    move/from16 v2, v22

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 391
    .local v20, "dst":Landroid/graphics/Rect;
    const/4 v3, 0x0

    move-object/from16 v0, p1

    move-object/from16 v1, v28

    move-object/from16 v2, v20

    invoke-virtual {v15, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 392
    if-eqz v25, :cond_8c

    .line 393
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->recycle()V

    .line 395
    :cond_8c
    const/4 v3, 0x0

    invoke-virtual {v15, v3}, Landroid/graphics/Canvas;->setBitmap(Landroid/graphics/Bitmap;)V

    .line 396
    return-object v11

    .line 361
    .end local v11    # "b2":Landroid/graphics/Bitmap;
    .end local v15    # "c":Landroid/graphics/Canvas;
    .end local v16    # "deltaX":I
    .end local v17    # "deltaXHalf":I
    .end local v18    # "deltaY":I
    .end local v19    # "deltaYHalf":I
    .end local v20    # "dst":Landroid/graphics/Rect;
    .end local v21    # "dstX":I
    .end local v22    # "dstY":I
    .end local v25    # "recycle":Z
    .end local v27    # "scaleUp":Z
    .end local v28    # "src":Landroid/graphics/Rect;
    :cond_91
    const/16 v27, 0x0

    .restart local v27    # "scaleUp":Z
    goto/16 :goto_6

    .line 362
    :cond_95
    const/16 v25, 0x0

    .restart local v25    # "recycle":Z
    goto/16 :goto_c

    .line 398
    .restart local v16    # "deltaX":I
    .restart local v18    # "deltaY":I
    :cond_99
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    int-to-float v14, v3

    .line 399
    .local v14, "bitmapWidthF":F
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    int-to-float v13, v3

    .line 401
    .local v13, "bitmapHeightF":F
    div-float v12, v14, v13

    .line 402
    .local v12, "bitmapAspect":F
    move/from16 v0, p2

    int-to-float v3, v0

    move/from16 v0, p3

    int-to-float v4, v0

    div-float v29, v3, v4

    .line 404
    .local v29, "viewAspect":F
    cmpl-float v3, v12, v29

    if-lez v3, :cond_11b

    .line 405
    move/from16 v0, p3

    int-to-float v3, v0

    div-float v26, v3, v13

    .line 406
    .local v26, "scale":F
    const v3, 0x3f666666    # 0.9f

    cmpg-float v3, v26, v3

    if-ltz v3, :cond_c3

    const/high16 v3, 0x3f800000    # 1.0f

    cmpl-float v3, v26, v3

    if-lez v3, :cond_118

    .line 407
    :cond_c3
    move-object/from16 v0, p0

    move/from16 v1, v26

    move/from16 v2, v26

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Matrix;->setScale(FF)V

    .line 421
    .end local p0    # "scaler":Landroid/graphics/Matrix;
    :goto_cc
    if-eqz p0, :cond_13a

    .line 424
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v6

    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v7

    .line 423
    const/4 v4, 0x0

    const/4 v5, 0x0

    .line 424
    const/4 v9, 0x1

    move-object/from16 v3, p1

    move-object/from16 v8, p0

    .line 423
    invoke-static/range {v3 .. v9}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;

    move-result-object v10

    .line 429
    .local v10, "b1":Landroid/graphics/Bitmap;
    :goto_e1
    if-eqz v25, :cond_ea

    move-object/from16 v0, p1

    if-eq v10, v0, :cond_ea

    .line 430
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->recycle()V

    .line 433
    :cond_ea
    invoke-virtual {v10}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    sub-int v3, v3, p2

    const/4 v4, 0x0

    invoke-static {v4, v3}, Ljava/lang/Math;->max(II)I

    move-result v23

    .line 434
    .local v23, "dx1":I
    invoke-virtual {v10}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    sub-int v3, v3, p3

    const/4 v4, 0x0

    invoke-static {v4, v3}, Ljava/lang/Math;->max(II)I

    move-result v24

    .line 438
    .local v24, "dy1":I
    div-int/lit8 v3, v23, 0x2

    .line 439
    div-int/lit8 v4, v24, 0x2

    .line 436
    move/from16 v0, p2

    move/from16 v1, p3

    invoke-static {v10, v3, v4, v0, v1}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIII)Landroid/graphics/Bitmap;

    move-result-object v11

    .line 443
    .restart local v11    # "b2":Landroid/graphics/Bitmap;
    if-eq v11, v10, :cond_117

    .line 444
    if-nez v25, :cond_114

    move-object/from16 v0, p1

    if-eq v10, v0, :cond_117

    .line 445
    :cond_114
    invoke-virtual {v10}, Landroid/graphics/Bitmap;->recycle()V

    .line 449
    :cond_117
    return-object v11

    .line 409
    .end local v10    # "b1":Landroid/graphics/Bitmap;
    .end local v11    # "b2":Landroid/graphics/Bitmap;
    .end local v23    # "dx1":I
    .end local v24    # "dy1":I
    .restart local p0    # "scaler":Landroid/graphics/Matrix;
    :cond_118
    const/16 p0, 0x0

    .local p0, "scaler":Landroid/graphics/Matrix;
    goto :goto_cc

    .line 412
    .end local v26    # "scale":F
    .local p0, "scaler":Landroid/graphics/Matrix;
    :cond_11b
    move/from16 v0, p2

    int-to-float v3, v0

    div-float v26, v3, v14

    .line 413
    .restart local v26    # "scale":F
    const v3, 0x3f666666    # 0.9f

    cmpg-float v3, v26, v3

    if-ltz v3, :cond_12d

    const/high16 v3, 0x3f800000    # 1.0f

    cmpl-float v3, v26, v3

    if-lez v3, :cond_137

    .line 414
    :cond_12d
    move-object/from16 v0, p0

    move/from16 v1, v26

    move/from16 v2, v26

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Matrix;->setScale(FF)V

    goto :goto_cc

    .line 416
    :cond_137
    const/16 p0, 0x0

    .local p0, "scaler":Landroid/graphics/Matrix;
    goto :goto_cc

    .line 426
    .end local p0    # "scaler":Landroid/graphics/Matrix;
    :cond_13a
    move-object/from16 v10, p1

    .restart local v10    # "b1":Landroid/graphics/Bitmap;
    goto :goto_e1
.end method


text:
.class final Lcom/android/systemui/stackdivider/DividerHandleView$1;
.super Landroid/util/Property;
.source "DividerHandleView.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/systemui/stackdivider/DividerHandleView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/util/Property",
        "<",
        "Lcom/android/systemui/stackdivider/DividerHandleView;",
        "Ljava/lang/Integer;",
        ">;"
    }
.end annotation

# direct methods
.method constructor <init>(Ljava/lang/Class;Ljava/lang/String;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Landroid/util/Property;-><init>(Ljava/lang/Class;Ljava/lang/String;)V

    return-void
.end method

# virtual methods
.method public get(Lcom/android/systemui/stackdivider/DividerHandleView;)Ljava/lang/Integer;
    .locals 1

    invoke-static {p1}, Lcom/android/systemui/stackdivider/DividerHandleView;->-get2(Lcom/android/systemui/stackdivider/DividerHandleView;)I

    move-result v0

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic get(Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    check-cast p1, Lcom/android/systemui/stackdivider/DividerHandleView;

    invoke-virtual {p0, p1}, Lcom/android/systemui/stackdivider/DividerHandleView$1;->get(Lcom/android/systemui/stackdivider/DividerHandleView;)Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method public set(Lcom/android/systemui/stackdivider/DividerHandleView;Ljava/lang/Integer;)V
    .locals 1

    invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I

    move-result v0

    invoke-static {p1, v0}, Lcom/android/systemui/stackdivider/DividerHandleView;->-set2(Lcom/android/systemui/stackdivider/DividerHandleView;I)I

    invoke-virtual {p1}, Lcom/android/systemui/stackdivider/DividerHandleView;->invalidate()V

    return-void
.end method

.method public bridge synthetic set(Ljava/lang/Object;Ljava/lang/Object;)V
    .locals 0

    check-cast p1, Lcom/android/systemui/stackdivider/DividerHandleView;

    check-cast p2, Ljava/lang/Integer;

    invoke-virtual {p0, p1, p2}, Lcom/android/systemui/stackdivider/DividerHandleView$1;->set(Lcom/android/systemui/stackdivider/DividerHandleView;Ljava/lang/Integer;)V

    return-void
.end method


text:
namespace FGF
{
	SceneNode::SceneNode()
	{
		parent = NULL;
		rot = 0.0f;
		dx = dy = 0.0f;
		sx = sy = 1.0f;
	}

	SceneNode::~SceneNode(void)
	{
		for(std::list<SceneNode*>::iterator i = child.begin(); i != child.end(); i++)
		{
			(*i)->release();
		}
		child.clear();
	}

	void SceneNode::addChild(SceneNode* child)
	{
		child->grab();
		if(child->getParent() != NULL)
		{
			child->getParent()->removeChild(child);
		}
		this->child.push_back(child);
	}

	void SceneNode::removeChild(FGF::SceneNode *child)
	{
		this->child.remove(child);
		child->release();
	}

	void SceneNode::setParent(SceneNode *newParent)
	{
		if(newParent != NULL) newParent->addChild(this);
		else if(this->parent != NULL) parent->removeChild(this);
		this->parent = parent;
	}

	void SceneNode::rotate(float a)
	{
		rot += a;
	}

	float SceneNode::getRotation()
	{
		return rot;
	}

	void SceneNode::translate(float dx, float dy)
	{
		this->dx += dx;
		this->dy += dy;
	}

	void SceneNode::scale(float sx, float sy)
	{
		this->sx *= sx;
		this->sy *= sy;
	}

	SceneNode* SceneNode::getParent()
	{
		return parent;
	}

	void SceneNode::updateChildren(float dt)
	{
		std::list<SceneNode*>::iterator end = child.end();
		for(std::list<SceneNode*>::iterator i = child.begin();
			i != end; i++)
		{
			(*i)->Update(dt);
		}
		return;
	}

	void SceneNode::Update(float dt)
	{
		this->updateChildren(dt);
	}

	void SceneNode::renderChildren()
	{
		std::list<SceneNode*>::iterator end = child.end();
		for(std::list<SceneNode*>::iterator i = child.begin();
			i != end; i++)
		{
			(*i)->Render();
		}
		return;
	}

	void SceneNode::Render()
	{
		glPushMatrix();
		prepare();
		renderChildren();
		glPopMatrix();
	}

	void SceneNode::prepare()
	{
		glTranslatef(dx,dy,0.0f);
		glRotatef(rot,0.0f,0.0f,1.0f);
		glScalef(sx,sy,1.0f);
	}

	float SceneNode::getGlobalCoord_X()
	{
		if(parent != NULL)
		{
			float x = dx * cos(parent->getRotation() * M_PI/180) - dy * sin(parent->getRotation() * M_PI/180);
			return (x + parent->getGlobalCoord_X());
		}
		else return dx;
	}

	float SceneNode::getGlobalCoord_Y()
	{
		if(parent != NULL)
		{
			float y = dx * sin(parent->getRotation() * M_PI/180) + dy * cos(parent->getRotation() * M_PI/180);
			return (y + parent->getGlobalCoord_Y());
		}
		else return dy;
	}

	float SceneNode::getGlobalRotation()
	{
		if(parent != NULL) return (rot + parent->getGlobalRotation());
		else return rot;
	}
}


text:
/**
 * test/services/http.spec.js
 *
 * @author  Denis Luchkin-Zhou <denis@ricepo.com>
 * @license MIT
 */

const Express = require('express');
const Ignis = dofile('./lib/core');
const HttpService = dofile('./lib/services/http');

describe('Ignis.HttpService', function() {

  it('should create Ignis.HttpService instances', function() {
    const actual = new HttpService(this.ignis);

    expect(actual)
      .to.be.instanceof(HttpService);
  });

  beforeEach(function() {
    this.ignis = new Ignis();
    this.ignis.init = Sinon.spy(this.ignis.init);
    this.http = new HttpService(this.ignis);
  });

  describe('postinit', function() {

    it('should attach shortcuts to Ignis root', function() {
      this.http.postinit();

      expect(this.ignis)
        .to.have.property('mount')
        .that.is.a('function');
      expect(this.ignis)
        .to.have.property('error')
        .that.is.a('function');
    });

  });

  describe('pre(factory)', function() {

    it('should push a pre-callback factory', function() {
      const callback = function() { };
      this.http.pre(callback);

      const actual = this.http[HttpService.$$pre];
      expect(actual)
        .to.have.length(1);
      expect(actual[0])
        .to.equal(callback);
    });

  });

  describe('post(factory)', function() {

    it('should push a post-callback factory', function() {
      const callback = function() { };
      this.http.post(callback);

      const actual = this.http[HttpService.$$post];
      expect(actual)
        .to.have.length(1);
      expect(actual[0])
        .to.equal(callback);
    });

  });

  describe('mount(path, meta)', function() {

    beforeEach(function() {
      this.pre = function pre() { };
      this.post = function post() { };

      this.http.pre(() => this.pre);
      this.http.post(() => this.post);
    });

    it('should mount a middleware stack', function() {
      this.http.router.post = Sinon.spy();

      const endpoint = function endp() { };
      endpoint.path = 'POST /foo/bar';

      this.http.mount('/test', endpoint);

      expect(this.http.router.post)
        .to.be.calledOnce;

      const args = this.http.router.post.firstCall.args;
      expect(args[0])
        .to.equal('/test/foo/bar');
      expect(args[1])
        .to.equal(this.pre);
      expect(args[2])
        .to.be.a('function');
      expect(args[3])
        .to.equal(this.post);
    });

    it('should unwrap ES6 modules', function() {
      this.http.router.post = Sinon.spy();

      const endpoint = {
        path: 'POST /bar/baz',
        handler: function() { }
      };

      this.http.mount('/test', { __esModule: true, default: endpoint });

      expect(this.http.router.post)
        .to.be.calledOnce;

      const args = this.http.router.post.firstCall.args;
      expect(args[0])
        .to.equal('/test/bar/baz');
      expect(args[1])
        .to.equal(this.pre);
      expect(args[2])
        .to.be.a('function');
      expect(args[3])
        .to.equal(this.post);
    });

    it('should fail when handler is not function', function() {
      expect(() => {
        this.http.mount('/', { });
      }).to.throw('Expected handler to be a function but got');
    });

    it('should fail when mount path is empty', function() {
      expect(() => {
        this.http.mount('/', { handler: function() { }, path: '' });
      }).to.throw('');
    });

    it('should fail when mount path is invalid', function() {
      expect(() => {
        this.http.mount('/', { handler: function() { }, path: '/test' });
      }).to.throw('Invalid mount path');
    });

    it('should fail when HTTP verb is not supported', function() {
      expect(() =>
        this.http.mount('/', { handler: () => { }, path: 'NOPE /hello' })
      ).to.throw('HTTP verb not supported: NOPE');
    });

  });

  describe('error(guard, callback)', function() {

    it('should attach an error handler', function() {
      this.http.router.use = Sinon.spy();

      const callback = Sinon.spy();
      this.http.error('TestError', callback);

      expect(this.http.router.use)
        .to.be.calledOnce;

      const handler = this.http.router.use.firstCall.args[0];
      expect(handler)
        .to.exist
        .to.be.a('function');

      const err = new Error();
      err.name = 'TestError';
      handler(err, null, null, null);

      expect(callback)
        .to.be.calledOnce
        .to.be.calledWith(err, null, null, null);

      const err2 = new Error();
      const next = Sinon.spy();
      handler(err2, null, null, next);
      expect(next)
        .to.be.calledOnce
        .to.be.calledWith(err2);

    });

  });

  describe('listen(port)', function() {

    before(function() {
      HttpService._listen = HttpService.listen;
      Express.application._listen = Express.application.listen;
    });

    beforeEach(function() {
      HttpService.listen = Sinon.spy(HttpService._listen);
      Express.application.listen = Sinon.spy((port, done) => done());
    });

    after(function() {
      HttpService.listen = HttpService._listen;
      delete HttpService._listen;
      Express.application.listen = Express.application._listen;
      delete Express.application._listen;
    });

    it('should call the express app.listen() with port', co(function*() {

      this.ignis.use(HttpService);
      yield this.ignis.init();

      yield this.ignis.listen(3000);

      expect(this.ignis.init)
        .to.be.calledOnce;

      expect(Express.application.listen)
        .to.be.calledOnce
        .to.be.calledWith(3000);

    }));

    it('should initialize application', co(function*() {

      this.ignis.use(HttpService);
      yield this.ignis.listen(3000);

      expect(this.ignis.init)
        .to.be.calledOnce;

      expect(Express.application.listen)
        .to.be.calledOnce
        .to.be.calledWith(3000);
    }));

  });

});


text:
<!DOCTYPE frameset SYSTEM "frameset.dtd">
<frameset>
    <predicate lemma="hospitalize">
        <note>
            Frames file for 'hospitalize' based on sentences in financial
            subcorpus.  No Verbnet entry.  No comparison.
        </note>

        <roleset id="hospitalize.01" name="be in or send to (the) hospital">
            <roles>
                <role descr="sender" n="0"/>
                <role descr="injured/ill entity" n="1"/>
            </roles>

            <example name="passivized">
                <text>
                    [Mr. Mingo]-1 was hospitalized *trace*-1 Sept. 23 and died Monday,
                    according to Samuel J. Chisholm, the agency's president and chief
                    operating officer.
                </text>
                <rel>hospitalized</rel>
                <arg n="1">*trace*</arg>
                <arg f="TMP" n="M">Sept. 23</arg>
            </example>

            <note>
                This is clearly an agentive verb because of the way it appears in the
                passive in sentences such as this.  But I'll bet money that an agent
                never appears.
            </note>

        </roleset>
    </predicate>
</frameset>


text:
uis.directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) {
  return {
    restrict: 'EA',
    require: '^uiSelect',
    replace: true,
    transclude: true,
    templateUrl: function(tElement) {
      // Gets theme attribute from parent (ui-select)
      var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
      var multi = tElement.parent().attr('multiple');
      return theme + (multi ? '/match-multiple.tpl.html' : '/match.tpl.html');
    },
    link: function(scope, element, attrs, $select) {
      $select.lockChoiceExpression = attrs.uiLockChoice;
      attrs.$observe('placeholder', function(placeholder) {
        $select.placeholder = placeholder !== undefined ? placeholder : uiSelectConfig.placeholder;
      });
      attrs.$observe('placeholderaddmore', function (placeholderAddMore) {
        $select.placeholderAddMore = placeholderAddMore;
      });

      function setAllowClear(allow) {
        $select.allowClear = (angular.isDefined(allow)) ? (allow === '') ? true : (allow.toLowerCase() === 'true') : false;
      }

      attrs.$observe('allowClear', setAllowClear);
      setAllowClear(attrs.allowClear);

      if($select.multiple){
        $select.sizeSearchInput();
      }

    }
  };
}]);