text:
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
#include <sstream>
#include <limits>

#include "ifcpp/model/AttributeObject.h"
#include "ifcpp/model/BuildingException.h"
#include "ifcpp/model/BuildingGuid.h"
#include "ifcpp/reader/ReaderUtil.h"
#include "ifcpp/writer/WriterUtil.h"
#include "ifcpp/IFC4/include/IfcLabel.h"
#include "ifcpp/IFC4/include/IfcPlanarForceMeasure.h"
#include "ifcpp/IFC4/include/IfcStructuralLoadPlanarForce.h"

// ENTITY IfcStructuralLoadPlanarForce
IfcStructuralLoadPlanarForce::IfcStructuralLoadPlanarForce( int id ) { m_entity_id = id; }
shared_ptr<BuildingObject> IfcStructuralLoadPlanarForce::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcStructuralLoadPlanarForce> copy_self( new IfcStructuralLoadPlanarForce() );
	if( m_Name ) { copy_self->m_Name = dynamic_pointer_cast<IfcLabel>( m_Name->getDeepCopy(options) ); }
	if( m_PlanarForceX ) { copy_self->m_PlanarForceX = dynamic_pointer_cast<IfcPlanarForceMeasure>( m_PlanarForceX->getDeepCopy(options) ); }
	if( m_PlanarForceY ) { copy_self->m_PlanarForceY = dynamic_pointer_cast<IfcPlanarForceMeasure>( m_PlanarForceY->getDeepCopy(options) ); }
	if( m_PlanarForceZ ) { copy_self->m_PlanarForceZ = dynamic_pointer_cast<IfcPlanarForceMeasure>( m_PlanarForceZ->getDeepCopy(options) ); }
	return copy_self;
}
void IfcStructuralLoadPlanarForce::getStepLine( std::stringstream& stream ) const
{
	stream << "#" << m_entity_id << "= IFCSTRUCTURALLOADPLANARFORCE" << "(";
	if( m_Name ) { m_Name->getStepParameter( stream ); } else { stream << "$"; }
	stream << ",";
	if( m_PlanarForceX ) { m_PlanarForceX->getStepParameter( stream ); } else { stream << "$"; }
	stream << ",";
	if( m_PlanarForceY ) { m_PlanarForceY->getStepParameter( stream ); } else { stream << "$"; }
	stream << ",";
	if( m_PlanarForceZ ) { m_PlanarForceZ->getStepParameter( stream ); } else { stream << "$"; }
	stream << ");";
}
void IfcStructuralLoadPlanarForce::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_entity_id; }
const std::wstring IfcStructuralLoadPlanarForce::toString() const { return L"IfcStructuralLoadPlanarForce"; }
void IfcStructuralLoadPlanarForce::readStepArguments( const std::vector<std::wstring>& args, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	const size_t num_args = args.size();
	if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadPlanarForce, expecting 4, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); }
	m_Name = IfcLabel::createObjectFromSTEP( args[0], map );
	m_PlanarForceX = IfcPlanarForceMeasure::createObjectFromSTEP( args[1], map );
	m_PlanarForceY = IfcPlanarForceMeasure::createObjectFromSTEP( args[2], map );
	m_PlanarForceZ = IfcPlanarForceMeasure::createObjectFromSTEP( args[3], map );
}
void IfcStructuralLoadPlanarForce::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes ) const
{
	IfcStructuralLoadStatic::getAttributes( vec_attributes );
	vec_attributes.emplace_back( std::make_pair( "PlanarForceX", m_PlanarForceX ) );
	vec_attributes.emplace_back( std::make_pair( "PlanarForceY", m_PlanarForceY ) );
	vec_attributes.emplace_back( std::make_pair( "PlanarForceZ", m_PlanarForceZ ) );
}
void IfcStructuralLoadPlanarForce::getAttributesInverse( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes_inverse ) const
{
	IfcStructuralLoadStatic::getAttributesInverse( vec_attributes_inverse );
}
void IfcStructuralLoadPlanarForce::setInverseCounterparts( shared_ptr<BuildingEntity> ptr_self_entity )
{
	IfcStructuralLoadStatic::setInverseCounterparts( ptr_self_entity );
}
void IfcStructuralLoadPlanarForce::unlinkFromInverseCounterparts()
{
	IfcStructuralLoadStatic::unlinkFromInverseCounterparts();
}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/nivel1_rl"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:background="@drawable/nivel1_fondo"
    android:fadingEdge="horizontal"
    android:paddingLeft="-4dp"
    android:paddingRight="-5dp"
    tools:context="${relativePackage}.${activityClass}" >

    <RelativeLayout
        android:id="@+id/rl_nivel1_juego"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >

        <LinearLayout
            android:id="@+id/nivel1_ll"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical" >

            <LinearLayout
                android:id="@+id/consigna_y_fruta"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_weight="85"
                android:background="#b2ffffe0" >

                <RelativeLayout
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_marginLeft="10dp"
                    android:layout_weight="20" >

                    <TextView
                        android:id="@+id/consigna"
                        style="@style/ConsignaFont"
                        android:layout_width="wrap_content"
                        android:layout_height="fill_parent"
                        android:layout_centerVertical="true"
                        android:layout_marginLeft="7dp"
                        android:layout_marginRight="7dp"
                        android:gravity="center_vertical"
                        android:text="Donde hay más" />

                    <ImageView
                        android:id="@+id/fruta"
                        android:layout_width="wrap_content"
                        android:layout_height="fill_parent"
                        android:layout_centerVertical="true"
                        android:layout_toRightOf="@id/consigna"
                        android:layout_weight="50"
                        android:visibility="visible" />

                    <TextView
                        android:id="@+id/signo"
                        style="@style/ConsignaFont"
                        android:layout_width="wrap_content"
                        android:layout_height="fill_parent"
                        android:layout_alignBaseline="@id/consigna"
                        android:layout_centerVertical="true"
                        android:layout_marginLeft="7dp"
                        android:layout_marginRight="7dp"
                        android:layout_toRightOf="@id/fruta"
                        android:layout_weight="50"
                        android:gravity="center_vertical"
                        android:text=" ?" />

                    <ImageView
                        android:id="@+id/masomenos"
                        android:layout_width="wrap_content"
                        android:layout_height="fill_parent"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:paddingRight="7dp"
                        android:visibility="visible" />
                </RelativeLayout>
            </LinearLayout>

            <View
                android:id="@+id/view1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="90" />

            <LinearLayout
                android:id="@+id/arboles"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="bottom"
                android:layout_weight="25"
                android:orientation="horizontal" >

                <RelativeLayout
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_gravity="center_horizontal"
                    android:layout_weight="33"
                    android:gravity="center_horizontal" >

                    <ImageView
                        android:id="@+id/arbol1"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentBottom="true"
                        android:layout_weight="33"
                        android:adjustViewBounds="true"
                        android:src="@drawable/nivel1_arbol"
                        android:visibility="visible" />

                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_gravity="center_horizontal"
                    android:layout_weight="33"
                    android:gravity="center_horizontal" >

                    <ImageView
                        android:id="@+id/arbol2"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentBottom="true"
                        android:layout_weight="33"
                        android:adjustViewBounds="true"
                        android:src="@drawable/nivel1_arbol"
                        android:visibility="visible" />

                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_gravity="center_horizontal"
                    android:layout_weight="33"
                    android:gravity="center_horizontal" >

                    <ImageView
                        android:id="@+id/arbol3"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentBottom="true"
                        android:layout_weight="33"
                        android:adjustViewBounds="true"
                        android:src="@drawable/nivel1_arbol"
                        android:visibility="visible" />

                </RelativeLayout>

            </LinearLayout>
        </LinearLayout>

        <ImageView
            android:id="@+id/logo"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_marginTop="10dp"
            android:layout_weight="33"
            android:adjustViewBounds="true"
            android:scaleType="fitXY"
            android:src="@drawable/nivel1_pasto" />

    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/rl_nivel1_festejo"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical" >

            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_weight="75" >

                <View
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_weight="90" />

                <ImageView
                    android:id="@+id/nivel1_correcto"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_weight="40"
                    android:adjustViewBounds="true"
                    android:scaleType="fitXY"
                    android:src="@drawable/nivel1_correcto" />

                <View
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_weight="90" />

            </LinearLayout>

            <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_weight="25"
                android:gravity="bottom|center_horizontal" >

                <ImageView
                    android:id="@+id/nivel1_nena_festejo"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />

            </RelativeLayout>

        </LinearLayout>

    </RelativeLayout>

</RelativeLayout>

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 25 March 2009), see www.w3.org">
<link rel="stylesheet" type="text/css" href=
"/static/css/w2ui-1.4.3.min.css">
<title></title>

$def with ( userdata )
<form name="searchform" method="post" action="searchajax" id=
"searchform">By Name <input type="text" name="sname">

By PatientID <input type="text" name="spid">

By Phone <input type="text" name="sphone">

By Address <input type="text" name="saddress">
</form>


text:
FROM archlinux

RUN pacman -Sy --noconfirm wireguard-tools wireguard-arch iproute2 iputils


text:
using System;
using Cake.Core;
using System.Collections.Generic;

namespace Cake.Yaml.Tests
{
    internal sealed class FakeCakeArguments : ICakeArguments
    {
        private readonly Dictionary<string, List<string>> _arguments;

        /// <summary>
        /// Gets the arguments.
        /// </summary>
        /// <value>The arguments.</value>
        public IReadOnlyDictionary<string, List<string>> Arguments => _arguments;

        /// <summary>
        /// Initializes a new instance of the <see cref="CakeArguments"/> class.
        /// </summary>
        public FakeCakeArguments()
        {
            _arguments = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
        }

        /// <summary>
        /// Initializes the argument list.
        /// </summary>
        /// <param name="arguments">The arguments.</param>
        public void SetArguments(IDictionary<string, List<string>> arguments)
        {
            if (arguments == null)
            {
                throw new ArgumentNullException(nameof(arguments));
            }
            _arguments.Clear();
            foreach (var argument in arguments)
            {
                _arguments.Add(argument.Key, argument.Value);
            }
        }

        /// <summary>
        /// Determines whether or not the specified argument exist.
        /// </summary>
        /// <param name="name">The argument name.</param>
        /// <returns>
        ///   <c>true</c> if the argument exist; otherwise <c>false</c>.
        /// </returns>
        public bool HasArgument(string name)
        {
            return _arguments.ContainsKey(name);
        }

        /// <summary>
        /// Gets an argument.
        /// </summary>
        /// <param name="name">The argument name.</param>
        /// <returns>The argument values.</returns>
        public ICollection<string> GetArguments(string name)
        {
            _arguments.TryGetValue(name, out List<string> value);
            ICollection<string> collection = value;
            return collection ?? Array.Empty<string>();
        }
    }
}


text:
.class public Lcom/tencent/qrom/theme/QromIconManager;
.super Ljava/lang/Object;
.source "QromIconManager.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;
    }
.end annotation

# static fields
.field public static final AUTHORITY:Ljava/lang/String; = "com.tencent.qrom.iconmanager"

.field private static final COVER_ICON_DISPOSE_TYPE:I = 0x2

.field private static final DEFAULT_ICON_DISPOSE_TYPE:I = 0x1

.field public static final DEFAULT_PAINT_FLAGS:I = 0x6

.field public static final KEY_BITMAP_CONFIG:Ljava/lang/String; = "KEY_BITMAP_CONFIG"

.field public static final KEY_BITMAP_HEIGHT:Ljava/lang/String; = "KEY_BITMAP_HEIGHT"

.field public static final KEY_BITMAP_WIDTH:Ljava/lang/String; = "KEY_BITMAP_WIDTH"

.field public static final KEY_CLASS_NAME:Ljava/lang/String; = "KEY_CLASS_NAME"

.field public static final KEY_COPY_REMOTE_FILE_STATUS:Ljava/lang/String; = "KEY_COPY_REMOTE_FILE_STATUS"

.field public static final KEY_DST_APP_ICON:Ljava/lang/String; = "KEY_DST_APP_ICON"

.field public static final KEY_PACKAGE_NAME:Ljava/lang/String; = "KEY_PACKAGE_NAME"

.field public static final KEY_RES_ID:Ljava/lang/String; = "KEY_RES_ID"

.field public static final KEY_SRC_APP_ICON:Ljava/lang/String; = "KEY_SRC_APP_ICON"

.field public static final KEY_SYSTEM_ICON_IS_DEFAULT:Ljava/lang/String; = "KEY_SYSTEM_ICON_IS_DEFAULT"

.field public static final KEY_THEME_ID:Ljava/lang/String; = "KEY_THEME_ID"

.field private static final MIN_VALID_ALPHA:I = 0x1c

.field public static final TABLE_ICON_BLOB_COLS:[Ljava/lang/String;

.field public static final TABLE_UNUSED_COLS:[Ljava/lang/String;

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

.field public static final _CLASS_NAME:Ljava/lang/String; = "_class_name"

.field public static final _ICON_BLOB:Ljava/lang/String; = "_icon_blob"

.field public static final _PACKAGE_NAME:Ljava/lang/String; = "_package_name"

.field public static final _SYSICON_DEFAULT:Ljava/lang/String; = "_sysicon_default"

.field private static final mPixelsLock:[B

.field private static mRefPixels:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference",
            "<[I>;"
        }
    .end annotation
.end field

.field private static mSysDefAppIcon:Landroid/graphics/Bitmap;

# direct methods
.method static constructor <clinit>()V
    .locals 4

    .prologue
    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 41
    const/4 v0, 0x2

    new-array v0, v0, [Ljava/lang/String;

    const-string v1, "_package_name"

    aput-object v1, v0, v2

    const-string v1, "_class_name"

    aput-object v1, v0, v3

    sput-object v0, Lcom/tencent/qrom/theme/QromIconManager;->TABLE_ICON_BLOB_COLS:[Ljava/lang/String;

    .line 43
    new-array v0, v3, [Ljava/lang/String;

    const-string v1, "_unused"

    aput-object v1, v0, v2

    sput-object v0, Lcom/tencent/qrom/theme/QromIconManager;->TABLE_UNUSED_COLS:[Ljava/lang/String;

    .line 415
    new-array v0, v2, [B

    sput-object v0, Lcom/tencent/qrom/theme/QromIconManager;->mPixelsLock:[B

    .line 416
    const/4 v0, 0x0

    sput-object v0, Lcom/tencent/qrom/theme/QromIconManager;->mRefPixels:Ljava/lang/ref/WeakReference;

    return-void
.end method

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

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

    .line 340
    return-void
.end method

.method public static analyzeBitmap1(Landroid/graphics/Bitmap;)Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;
    .locals 22
    .param p0, "srcBmp"    # Landroid/graphics/Bitmap;

    .prologue
    .line 424
    new-instance v19, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;

    invoke-direct/range {v19 .. v19}, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;-><init>()V

    .line 426
    .local v19, "result":Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;
    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v4

    .line 427
    .local v4, "width":I
    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v8

    .line 430
    .local v8, "height":I
    sget-object v21, Lcom/tencent/qrom/theme/QromIconManager;->mPixelsLock:[B

    monitor-enter v21

    .line 431
    mul-int v15, v4, v8

    .line 433
    .local v15, "len":I
    :try_start_0
    sget-object v1, Lcom/tencent/qrom/theme/QromIconManager;->mRefPixels:Ljava/lang/ref/WeakReference;

    if-eqz v1, :cond_0

    sget-object v1, Lcom/tencent/qrom/theme/QromIconManager;->mRefPixels:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    if-eqz v1, :cond_0

    sget-object v1, Lcom/tencent/qrom/theme/QromIconManager;->mRefPixels:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [I

    array-length v1, v1

    if-ge v1, v15, :cond_3

    .line 435
    :cond_0
    new-array v2, v15, [I

    .line 436
    .local v2, "pixels":[I
    new-instance v1, Ljava/lang/ref/WeakReference;

    invoke-direct {v1, v2}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    sput-object v1, Lcom/tencent/qrom/theme/QromIconManager;->mRefPixels:Ljava/lang/ref/WeakReference;

    .line 440
    :goto_0
    const/4 v3, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    move-object/from16 v1, p0

    move v7, v4

    invoke-virtual/range {v1 .. v8}, Landroid/graphics/Bitmap;->getPixels([IIIIIII)V

    .line 443
    const/4 v11, 0x0

    .line 444
    .local v11, "flag1":Z
    const/4 v12, 0x0

    .line 446
    .local v12, "flag2":Z
    const/4 v13, 0x0

    .local v13, "i":I
    :goto_1
    div-int/lit8 v1, v4, 0x2

    if-ge v13, v1, :cond_5

    .line 447
    const/4 v14, 0x0

    .local v14, "j":I
    :goto_2
    if-ge v14, v8, :cond_4

    .line 449
    if-nez v11, :cond_1

    .line 450
    mul-int v1, v14, v4

    add-int/2addr v1, v13

    aget v16, v2, v1

    .line 451
    .local v16, "pixelColor":I
    invoke-static/range {v16 .. v16}, Landroid/graphics/Color;->alpha(I)I

    move-result v9

    .line 452
    .local v9, "alpha":I
    const/16 v1, 0x1c

    if-le v9, v1, :cond_1

    .line 453
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    iput v13, v1, Landroid/graphics/Rect;->left:I

    .line 454
    const/4 v11, 0x1

    .line 458
    .end local v9    # "alpha":I
    .end local v16    # "pixelColor":I
    :cond_1
    if-nez v12, :cond_2

    .line 459
    mul-int v1, v14, v4

    add-int/2addr v1, v4

    add-int/lit8 v1, v1, -0x1

    sub-int/2addr v1, v13

    aget v16, v2, v1

    .line 460
    .restart local v16    # "pixelColor":I
    invoke-static/range {v16 .. v16}, Landroid/graphics/Color;->alpha(I)I

    move-result v9

    .line 461
    .restart local v9    # "alpha":I
    const/16 v1, 0x1c

    if-le v9, v1, :cond_2

    .line 463
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    sub-int v3, v4, v13

    iput v3, v1, Landroid/graphics/Rect;->right:I

    .line 464
    const/4 v12, 0x1

    .line 447
    .end local v9    # "alpha":I
    .end local v16    # "pixelColor":I
    :cond_2
    add-int/lit8 v14, v14, 0x1

    goto :goto_2

    .line 438
    .end local v2    # "pixels":[I
    .end local v11    # "flag1":Z
    .end local v12    # "flag2":Z
    .end local v13    # "i":I
    .end local v14    # "j":I
    :cond_3
    sget-object v1, Lcom/tencent/qrom/theme/QromIconManager;->mRefPixels:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, [I

    .restart local v2    # "pixels":[I
    goto :goto_0

    .line 469
    .restart local v11    # "flag1":Z
    .restart local v12    # "flag2":Z
    .restart local v13    # "i":I
    .restart local v14    # "j":I
    :cond_4
    if-eqz v11, :cond_8

    if-eqz v12, :cond_8

    .line 474
    .end local v14    # "j":I
    :cond_5
    const/4 v11, 0x0

    .line 475
    const/4 v12, 0x0

    .line 477
    const/4 v14, 0x0

    .restart local v14    # "j":I
    :goto_3
    div-int/lit8 v1, v8, 0x2

    if-ge v14, v1, :cond_a

    .line 478
    const/4 v13, 0x0

    :goto_4
    if-ge v13, v4, :cond_9

    .line 480
    if-nez v11, :cond_6

    .line 481
    mul-int v1, v14, v4

    add-int/2addr v1, v13

    aget v16, v2, v1

    .line 482
    .restart local v16    # "pixelColor":I
    invoke-static/range {v16 .. v16}, Landroid/graphics/Color;->alpha(I)I

    move-result v9

    .line 483
    .restart local v9    # "alpha":I
    const/16 v1, 0x1c

    if-le v9, v1, :cond_6

    .line 484
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    iput v14, v1, Landroid/graphics/Rect;->top:I

    .line 485
    const/4 v11, 0x1

    .line 489
    .end local v9    # "alpha":I
    .end local v16    # "pixelColor":I
    :cond_6
    if-nez v12, :cond_7

    .line 490
    sub-int v1, v8, v14

    add-int/lit8 v1, v1, -0x1

    mul-int/2addr v1, v4

    add-int/2addr v1, v13

    aget v16, v2, v1

    .line 491
    .restart local v16    # "pixelColor":I
    invoke-static/range {v16 .. v16}, Landroid/graphics/Color;->alpha(I)I

    move-result v9

    .line 492
    .restart local v9    # "alpha":I
    const/16 v1, 0x1c

    if-le v9, v1, :cond_7

    .line 493
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    sub-int v3, v8, v14

    iput v3, v1, Landroid/graphics/Rect;->bottom:I

    .line 494
    const/4 v12, 0x1

    .line 478
    .end local v9    # "alpha":I
    .end local v16    # "pixelColor":I
    :cond_7
    add-int/lit8 v13, v13, 0x1

    goto :goto_4

    .line 446
    :cond_8
    add-int/lit8 v13, v13, 0x1

    goto/16 :goto_1

    .line 499
    :cond_9
    if-eqz v11, :cond_c

    if-eqz v12, :cond_c

    .line 503
    :cond_a
    const/16 v17, 0x0

    .line 504
    .local v17, "pixelNum":I
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v1}, Landroid/graphics/Rect;->width()I

    move-result v18

    .line 507
    .local v18, "rectWidth":I
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    iget v14, v1, Landroid/graphics/Rect;->top:I

    :goto_5
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    iget v1, v1, Landroid/graphics/Rect;->bottom:I

    if-ge v14, v1, :cond_e

    .line 508
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    iget v13, v1, Landroid/graphics/Rect;->left:I

    :goto_6
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    iget v1, v1, Landroid/graphics/Rect;->right:I

    if-ge v13, v1, :cond_d

    .line 509
    mul-int v1, v14, v18

    add-int/2addr v1, v13

    aget v16, v2, v1

    .line 510
    .restart local v16    # "pixelColor":I
    if-eqz v16, :cond_b

    .line 511
    invoke-static/range {v16 .. v16}, Landroid/graphics/Color;->alpha(I)I

    move-result v9

    .line 512
    .restart local v9    # "alpha":I
    mul-int v1, v14, v18

    add-int/2addr v1, v13

    aput v9, v2, v1

    .line 513
    mul-int v1, v14, v18

    add-int/2addr v1, v13

    aget v1, v2, v1

    const/16 v3, 0xb2

    if-le v1, v3, :cond_b

    .line 514
    add-int/lit8 v17, v17, 0x1

    .line 508
    .end local v9    # "alpha":I
    :cond_b
    add-int/lit8 v13, v13, 0x1

    goto :goto_6

    .line 477
    .end local v16    # "pixelColor":I
    .end local v17    # "pixelNum":I
    .end local v18    # "rectWidth":I
    :cond_c
    add-int/lit8 v14, v14, 0x1

    goto/16 :goto_3

    .line 507
    .restart local v17    # "pixelNum":I
    .restart local v18    # "rectWidth":I
    :cond_d
    add-int/lit8 v14, v14, 0x1

    goto :goto_5

    .line 520
    :cond_e
    move-object/from16 v0, v19

    iget-object v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v1}, Landroid/graphics/Rect;->width()I

    move-result v1

    int-to-float v1, v1

    move-object/from16 v0, v19

    iget-object v3, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v3}, Landroid/graphics/Rect;->height()I

    move-result v3

    int-to-float v3, v3

    div-float v20, v1, v3

    .line 521
    .local v20, "scale":F
    move/from16 v0, v17

    int-to-float v1, v0

    move-object/from16 v0, v19

    iget-object v3, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v3}, Landroid/graphics/Rect;->width()I

    move-result v3

    move-object/from16 v0, v19

    iget-object v5, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v5}, Landroid/graphics/Rect;->height()I

    move-result v5

    mul-int/2addr v3, v5

    int-to-float v3, v3

    div-float v10, v1, v3

    .line 523
    .local v10, "availability":F
    const v1, 0x3f4ccccd    # 0.8f

    cmpl-float v1, v20, v1

    if-ltz v1, :cond_f

    const/high16 v1, 0x3fa00000    # 1.25f

    cmpg-float v1, v20, v1

    if-gtz v1, :cond_f

    const v1, 0x3f59999a    # 0.85f

    cmpl-float v1, v10, v1

    if-ltz v1, :cond_f

    const/4 v1, 0x1

    :goto_7
    move-object/from16 v0, v19

    iput-boolean v1, v0, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->isSquare:Z

    .line 525
    monitor-exit v21

    .line 528
    return-object v19

    .line 523
    :cond_f
    const/4 v1, 0x0

    goto :goto_7

    .line 525
    .end local v2    # "pixels":[I
    .end local v10    # "availability":F
    .end local v11    # "flag1":Z
    .end local v12    # "flag2":Z
    .end local v13    # "i":I
    .end local v14    # "j":I
    .end local v17    # "pixelNum":I
    .end local v18    # "rectWidth":I
    .end local v20    # "scale":F
    :catchall_0
    move-exception v1

    monitor-exit v21
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public static bitmap2Bytes(Landroid/graphics/Bitmap;)[B
    .locals 6
    .param p0, "bm"    # Landroid/graphics/Bitmap;

    .prologue
    .line 77
    :try_start_0
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getByteCount()I

    move-result v3

    invoke-static {v3}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v0

    .line 78
    .local v0, "buffer":Ljava/nio/ByteBuffer;
    invoke-virtual {p0, v0}, Landroid/graphics/Bitmap;->copyPixelsToBuffer(Ljava/nio/Buffer;)V

    .line 79
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->array()[B
    :try_end_0
    .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    move-result-object v3

    .line 87
    .end local v0    # "buffer":Ljava/nio/ByteBuffer;
    :goto_0
    return-object v3

    .line 80
    :catch_0
    move-exception v2

    .line 81
    .local v2, "oom":Ljava/lang/OutOfMemoryError;
    const-string v3, "QromIconManager"

    const-string v4, "bitmap2Bytes|oom"

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 87
    .end local v2    # "oom":Ljava/lang/OutOfMemoryError;
    :goto_1
    const/4 v3, 0x0

    goto :goto_0

    .line 82
    :catch_1
    move-exception v1

    .line 83
    .local v1, "e":Ljava/lang/Exception;
    const-string v3, "QromIconManager"

    new-instance v4, Ljava/lang/StringBuilder;

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

    const-string v5, "bitmap2Bytes|exp:"

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

    move-result-object v4

    invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v5

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

    move-result-object v4

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

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 84
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1
.end method

.method public static blendIcon(Landroid/content/res/Resources;Landroid/graphics/Bitmap;Z)Landroid/graphics/Bitmap;
    .locals 21
    .param p0, "resources"    # Landroid/content/res/Resources;
    .param p1, "scrBitmap"    # Landroid/graphics/Bitmap;
    .param p2, "needIconLayer"    # Z

    .prologue
    .line 155
    const/4 v5, 0x0

    .line 156
    .local v5, "dstBitmap":Landroid/graphics/Bitmap;
    const/4 v9, 0x0

    .line 157
    .local v9, "launcherIconMask":Landroid/graphics/Bitmap;
    const/4 v7, 0x0

    .line 158
    .local v7, "launcherIconBg":Landroid/graphics/Bitmap;
    const/4 v8, 0x0

    .line 159
    .local v8, "launcherIconCover":Landroid/graphics/Bitmap;
    const/4 v10, 0x0

    .line 160
    .local v10, "launcherMaskOrCover":Landroid/graphics/Bitmap;
    const/4 v6, -0x1

    .line 161
    .local v6, "iconDisposeType":I
    const v15, 0x3f59999a    # 0.85f

    .line 162
    .local v15, "scale":F
    sget-object v12, Landroid/graphics/PorterDuff$Mode;->DST_IN:Landroid/graphics/PorterDuff$Mode;

    .line 163
    .local v12, "mode":Landroid/graphics/PorterDuff$Mode;
    const-string v17, "QromIconManager"

    new-instance v18, Ljava/lang/StringBuilder;

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

    const-string v19, "blendIcon needIconLayer = "

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    move-object/from16 v0, v18

    move/from16 v1, p2

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

    move-result-object v18

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

    move-result-object v18

    invoke-static/range {v17 .. v18}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 164
    if-eqz p2, :cond_1

    .line 165
    move-object/from16 v5, p1

    .line 246
    :cond_0
    :goto_0
    return-object v5

    .line 167
    :cond_1
    if-eqz p1, :cond_4

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

    move-result v17

    if-nez v17, :cond_4

    .line 168
    invoke-static {}, Landroid/content/res/Resources;->getSystem()Landroid/content/res/Resources;

    move-result-object v17

    const v18, 0x7a020148

    invoke-static/range {v17 .. v18}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v9

    .line 170
    invoke-static {}, Landroid/content/res/Resources;->getSystem()Landroid/content/res/Resources;

    move-result-object v17

    const v18, 0x7a0202d4

    invoke-static/range {v17 .. v18}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v8

    .line 172
    invoke-static {}, Landroid/content/res/Resources;->getSystem()Landroid/content/res/Resources;

    move-result-object v17

    const v18, 0x7a020142

    invoke-static/range {v17 .. v18}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v7

    .line 174
    invoke-static {}, Landroid/content/res/Resources;->getSystem()Landroid/content/res/Resources;

    move-result-object v17

    const v18, 0x7a0c0024

    invoke-virtual/range {v17 .. v18}, Landroid/content/res/Resources;->getInteger(I)I

    move-result v6

    .line 175
    packed-switch v6, :pswitch_data_0

    .line 189
    :goto_1
    const-string v17, "QromIconManager"

    new-instance v18, Ljava/lang/StringBuilder;

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

    const-string v19, "iconDisposeType = "

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    move-object/from16 v0, v18

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

    move-result-object v18

    const-string v19, "; scale = "

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    move-object/from16 v0, v18

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

    move-result-object v18

    const-string v19, "; mode = "

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    move-object/from16 v0, v18

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

    move-result-object v18

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

    move-result-object v18

    invoke-static/range {v17 .. v18}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 190
    if-eqz v7, :cond_2

    invoke-virtual {v7}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v17

    if-nez v17, :cond_2

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

    const/16 v18, 0x1

    move-object/from16 v0, v17

    move/from16 v1, v18

    invoke-virtual {v7, v0, v1}, Landroid/graphics/Bitmap;->copy(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;

    move-result-object v5

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

    move-result v17

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

    move-result v18

    const/16 v19, 0x0

    invoke-static/range {v17 .. v19}, Lcom/tencent/qrom/theme/QromIconManager;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v16

    .line 197
    .local v16, "tmpSrcBitmap":Landroid/graphics/Bitmap;
    if-eqz v5, :cond_3

    invoke-virtual {v5}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v17

    if-nez v17, :cond_3

    if-eqz v16, :cond_3

    invoke-virtual/range {v16 .. v16}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v17

    if-nez v17, :cond_3

    .line 199
    new-instance v4, Landroid/graphics/Canvas;

    move-object/from16 v0, v16

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

    .line 200
    .local v4, "canvas":Landroid/graphics/Canvas;
    new-instance v13, Landroid/graphics/Paint;

    const/16 v17, 0x6

    move/from16 v0, v17

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

    .line 201
    .local v13, "paint":Landroid/graphics/Paint;
    new-instance v11, Landroid/graphics/Matrix;

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

    .line 202
    .local v11, "matrix":Landroid/graphics/Matrix;
    invoke-virtual/range {p1 .. p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v17

    div-int/lit8 v17, v17, 0x2

    move/from16 v0, v17

    int-to-float v0, v0

    move/from16 v17, v0

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

    move-result v18

    div-int/lit8 v18, v18, 0x2

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    move/from16 v0, v17

    move/from16 v1, v18

    invoke-virtual {v11, v15, v15, v0, v1}, Landroid/graphics/Matrix;->setScale(FFFF)V

    .line 206
    move-object/from16 v0, p1

    invoke-virtual {v4, v0, v11, v13}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V

    .line 208
    new-instance v14, Landroid/graphics/Rect;

    const/16 v17, 0x0

    const/16 v18, 0x0

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

    move-result v19

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

    move-result v20

    move/from16 v0, v17

    move/from16 v1, v18

    move/from16 v2, v19

    move/from16 v3, v20

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

    .line 210
    .local v14, "rect":Landroid/graphics/Rect;
    new-instance v17, Landroid/graphics/PorterDuffXfermode;

    move-object/from16 v0, v17

    invoke-direct {v0, v12}, Landroid/graphics/PorterDuffXfermode;-><init>(Landroid/graphics/PorterDuff$Mode;)V

    move-object/from16 v0, v17

    invoke-virtual {v13, v0}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;

    .line 211
    const/16 v17, 0x0

    move-object/from16 v0, v17

    invoke-virtual {v4, v10, v0, v14, v13}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 212
    const/16 v17, 0x0

    move-object/from16 v0, v17

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

    .line 213
    const/16 v17, 0x0

    move-object/from16 v0, v17

    invoke-virtual {v13, v0}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;

    .line 214
    const-string v17, "QromIconManager"

    new-instance v18, Ljava/lang/StringBuilder;

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

    const-string v19, "iconDisposeType = "

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    move-object/from16 v0, v18

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

    move-result-object v18

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

    move-result-object v18

    invoke-static/range {v17 .. v18}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 216
    invoke-virtual {v4, v5}, Landroid/graphics/Canvas;->setBitmap(Landroid/graphics/Bitmap;)V

    .line 217
    const/16 v17, 0x0

    const/16 v18, 0x0

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

    move-result v19

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

    move-result v20

    move/from16 v0, v17

    move/from16 v1, v18

    move/from16 v2, v19

    move/from16 v3, v20

    invoke-virtual {v14, v0, v1, v2, v3}, Landroid/graphics/Rect;->set(IIII)V

    .line 218
    const/16 v17, 0x0

    move-object/from16 v0, v16

    move-object/from16 v1, v17

    invoke-virtual {v4, v0, v1, v14, v13}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 219
    const/16 v17, 0x0

    move-object/from16 v0, v17

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

    .line 222
    .end local v4    # "canvas":Landroid/graphics/Canvas;
    .end local v11    # "matrix":Landroid/graphics/Matrix;
    .end local v13    # "paint":Landroid/graphics/Paint;
    .end local v14    # "rect":Landroid/graphics/Rect;
    :cond_3
    if-eqz v16, :cond_4

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

    .line 228
    .end local v16    # "tmpSrcBitmap":Landroid/graphics/Bitmap;
    :cond_4
    if-eqz v9, :cond_5

    .line 229
    invoke-virtual {v9}, Landroid/graphics/Bitmap;->recycle()V

    .line 230
    const/4 v9, 0x0

    .line 233
    :cond_5
    if-eqz v8, :cond_6

    .line 234
    invoke-virtual {v8}, Landroid/graphics/Bitmap;->recycle()V

    .line 235
    const/4 v8, 0x0

    .line 237
    :cond_6
    if-eqz v7, :cond_7

    .line 238
    invoke-virtual {v7}, Landroid/graphics/Bitmap;->recycle()V

    .line 239
    const/4 v7, 0x0

    .line 241
    :cond_7
    if-eqz v10, :cond_0

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

    .line 243
    const/4 v10, 0x0

    goto/16 :goto_0

    .line 177
    :pswitch_0
    const v15, 0x3f59999a    # 0.85f

    .line 178
    sget-object v12, Landroid/graphics/PorterDuff$Mode;->DST_IN:Landroid/graphics/PorterDuff$Mode;

    .line 179
    move-object v10, v9

    .line 180
    goto/16 :goto_1

    .line 182
    :pswitch_1
    const/high16 v15, 0x3f400000    # 0.75f

    .line 183
    sget-object v12, Landroid/graphics/PorterDuff$Mode;->SRC_OVER:Landroid/graphics/PorterDuff$Mode;

    .line 184
    move-object v10, v8

    .line 185
    goto/16 :goto_1

    .line 175
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public static bytes2Bitmap([BIILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
    .locals 6
    .param p0, "bytes"    # [B
    .param p1, "width"    # I
    .param p2, "height"    # I
    .param p3, "config"    # Landroid/graphics/Bitmap$Config;

    .prologue
    .line 94
    :try_start_0
    invoke-static {p1, p2, p3}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 95
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    invoke-static {p0}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/graphics/Bitmap;->copyPixelsFromBuffer(Ljava/nio/Buffer;)V
    :try_end_0
    .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 104
    .end local v0    # "bitmap":Landroid/graphics/Bitmap;
    :goto_0
    return-object v0

    .line 97
    :catch_0
    move-exception v2

    .line 98
    .local v2, "oom":Ljava/lang/OutOfMemoryError;
    const-string v3, "QromIconManager"

    const-string v4, "bytes2Bitmap|oom"

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 104
    .end local v2    # "oom":Ljava/lang/OutOfMemoryError;
    :goto_1
    const/4 v0, 0x0

    goto :goto_0

    .line 99
    :catch_1
    move-exception v1

    .line 100
    .local v1, "e":Ljava/lang/Exception;
    const-string v3, "QromIconManager"

    new-instance v4, Ljava/lang/StringBuilder;

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

    const-string v5, "bytes2Bitmap|exp:"

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

    move-result-object v4

    invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v5

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

    move-result-object v4

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

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 101
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1
.end method

.method public static clearIconCache(Landroid/content/Context;)I
    .locals 4
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    const/4 v3, 0x0

    .line 335
    const-string v2, "content://com.tencent.qrom.iconmanager/iconblob"

    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    .line 336
    .local v1, "uri":Landroid/net/Uri;
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 337
    .local v0, "cr":Landroid/content/ContentResolver;
    invoke-virtual {v0, v1, v3, v3}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    move-result v2

    return v2
.end method

.method public static createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
    .locals 5
    .param p0, "width"    # I
    .param p1, "height"    # I
    .param p2, "config"    # Landroid/graphics/Bitmap$Config;

    .prologue
    const/4 v1, 0x0

    .line 375
    if-lez p0, :cond_0

    if-gtz p1, :cond_1

    .line 388
    :cond_0
    :goto_0
    return-object v1

    .line 379
    :cond_1
    const-string v2, "QromIconManager"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "createBitmap|width="

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

    move-result-object v3

    invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ",height="

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

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ",config="

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

    move-result-object v3

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

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

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 381
    if-eqz p2, :cond_2

    .line 382
    :try_start_0
    invoke-static {p0, p1, p2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v1

    goto :goto_0

    .line 384
    :cond_2
    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {p0, p1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
    :try_end_0
    .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    goto :goto_0

    .line 386
    :catch_0
    move-exception v0

    .line 387
    .local v0, "ex":Ljava/lang/OutOfMemoryError;
    invoke-static {}, Ljava/lang/System;->gc()V

    goto :goto_0
.end method

.method public static getCopyFileStatus()Z
    .locals 4

    .prologue
    .line 327
    const-string v1, "persist.sys.themestatus"

    const/4 v2, 0x0

    invoke-static {v1, v2}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    .line 329
    .local v0, "status":Z
    const-string v1, "QromIconManager"

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "getCopyFileStatus|status="

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

    move-result-object v2

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

    move-result-object v2

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

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 331
    return v0
.end method

.method public static getCurrentThemeId()I
    .locals 2

    .prologue
    .line 315
    const-string v0, "persist.sys.themeid"

    const/16 v1, 0x107

    invoke-static {v0, v1}, Landroid/os/SystemProperties;->getInt(Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public static getSystemIconIsDefault()Z
    .locals 4

    .prologue
    .line 303
    const-string v1, "persist.sys.theme"

    const/4 v2, 0x1

    invoke-static {v1, v2}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    .line 305
    .local v0, "isDefault":Z
    const-string v1, "QromIconManager"

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "getSystemIconIsDefault|isDefault="

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

    move-result-object v2

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

    move-result-object v2

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

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 307
    return v0
.end method

.method public static processIcon(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    .locals 13
    .param p0, "resources"    # Landroid/content/res/Resources;
    .param p1, "srcBitmap"    # Landroid/graphics/Bitmap;

    .prologue
    const/high16 v12, 0x40000000    # 2.0f

    .line 346
    const/4 v7, 0x0

    .line 349
    .local v7, "dstBitmap":Landroid/graphics/Bitmap;
    if-eqz p1, :cond_0

    invoke-virtual {p1}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v9

    if-nez v9, :cond_0

    .line 350
    const v9, 0x7a0d0069

    invoke-virtual {p0, v9}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v2

    .line 351
    .local v2, "IconOuterSize":I
    const v9, 0x7a0d006a

    invoke-virtual {p0, v9}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v3

    .line 352
    .local v3, "IconSquareSize":I
    const v9, 0x7a0d0001

    invoke-virtual {p0, v9}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 353
    .local v1, "IconNotSquareSize":I
    invoke-static {p1}, Lcom/tencent/qrom/theme/QromIconManager;->analyzeBitmap1(Landroid/graphics/Bitmap;)Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;

    move-result-object v4

    .line 355
    .local v4, "analyzedResult":Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;
    if-eqz v4, :cond_1

    iget-boolean v9, v4, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->isSquare:Z

    if-eqz v9, :cond_1

    .line 356
    move v0, v3

    .line 360
    .local v0, "IconInnerSize":I
    :goto_0
    if-eqz v4, :cond_0

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

    invoke-static {v2, v2, v9}, Lcom/tencent/qrom/theme/QromIconManager;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v7

    .line 362
    new-instance v5, Landroid/graphics/Canvas;

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

    .line 363
    .local v5, "canvas":Landroid/graphics/Canvas;
    new-instance v8, Landroid/graphics/Paint;

    const/4 v9, 0x6

    invoke-direct {v8, v9}, Landroid/graphics/Paint;-><init>(I)V

    .line 364
    .local v8, "paint":Landroid/graphics/Paint;
    invoke-static {v0, v4}, Lcom/tencent/qrom/theme/QromIconManager;->scaleInnerIcon(ILcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;)Landroid/graphics/RectF;

    move-result-object v6

    .line 365
    .local v6, "desRect":Landroid/graphics/RectF;
    int-to-float v9, v2

    invoke-virtual {v6}, Landroid/graphics/RectF;->width()F

    move-result v10

    sub-float/2addr v9, v10

    div-float/2addr v9, v12

    int-to-float v10, v2

    invoke-virtual {v6}, Landroid/graphics/RectF;->height()F

    move-result v11

    sub-float/2addr v10, v11

    div-float/2addr v10, v12

    invoke-virtual {v6, v9, v10}, Landroid/graphics/RectF;->offset(FF)V

    .line 366
    iget-object v9, v4, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v5, p1, v9, v6, v8}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/RectF;Landroid/graphics/Paint;)V

    .line 367
    const/4 v9, 0x0

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

    .line 371
    .end local v0    # "IconInnerSize":I
    .end local v1    # "IconNotSquareSize":I
    .end local v2    # "IconOuterSize":I
    .end local v3    # "IconSquareSize":I
    .end local v4    # "analyzedResult":Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;
    .end local v5    # "canvas":Landroid/graphics/Canvas;
    .end local v6    # "desRect":Landroid/graphics/RectF;
    .end local v8    # "paint":Landroid/graphics/Paint;
    :cond_0
    return-object v7

    .line 358
    .restart local v1    # "IconNotSquareSize":I
    .restart local v2    # "IconOuterSize":I
    .restart local v3    # "IconSquareSize":I
    .restart local v4    # "analyzedResult":Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;
    :cond_1
    move v0, v1

    .restart local v0    # "IconInnerSize":I
    goto :goto_0
.end method

.method public static qromDisposeIcon(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Landroid/graphics/Bitmap;
    .locals 9
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "pkgName"    # Ljava/lang/String;
    .param p2, "clzName"    # Ljava/lang/String;

    .prologue
    const/4 v2, 0x0

    .line 250
    if-nez p0, :cond_1

    .line 267
    :cond_0
    :goto_0
    return-object v2

    .line 254
    :cond_1
    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "content://com.tencent.qrom.iconmanager/iconblob/"

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

    move-result-object v3

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

    move-result-object v3

    const-string v4, "/"

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    .line 256
    .local v1, "uri":Landroid/net/Uri;
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .local v0, "cr":Landroid/content/ContentResolver;
    move-object v3, v2

    move-object v4, v2

    move-object v5, v2

    .line 257
    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 258
    .local v6, "cursor":Landroid/database/Cursor;
    if-eqz v6, :cond_0

    .line 262
    invoke-interface {v6}, Landroid/database/Cursor;->getExtras()Landroid/os/Bundle;

    move-result-object v8

    .line 263
    .local v8, "extras":Landroid/os/Bundle;
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 265
    const-string v2, "KEY_DST_APP_ICON"

    invoke-virtual {v8, v2}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v7

    check-cast v7, Landroid/graphics/Bitmap;

    .local v7, "dstBitmap":Landroid/graphics/Bitmap;
    move-object v2, v7

    .line 267
    goto :goto_0
.end method

.method public static qromDispostDefaultIcon(Landroid/content/res/Resources;Landroid/graphics/drawable/BitmapDrawable;)Landroid/graphics/Bitmap;
    .locals 5
    .param p0, "resources"    # Landroid/content/res/Resources;
    .param p1, "drawable"    # Landroid/graphics/drawable/BitmapDrawable;

    .prologue
    .line 134
    invoke-static {}, Lcom/tencent/qrom/theme/QromIconManager;->getSystemIconIsDefault()Z

    move-result v0

    .line 135
    .local v0, "isDefault":Z
    if-nez v0, :cond_0

    .line 136
    invoke-virtual {p1}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v2

    .line 151
    :goto_0
    return-object v2

    .line 139
    :cond_0
    sget-object v2, Lcom/tencent/qrom/theme/QromIconManager;->mSysDefAppIcon:Landroid/graphics/Bitmap;

    if-nez v2, :cond_2

    .line 140
    const-class v3, Lcom/tencent/qrom/theme/QromIconManager;

    monitor-enter v3

    .line 141
    :try_start_0
    sget-object v2, Lcom/tencent/qrom/theme/QromIconManager;->mSysDefAppIcon:Landroid/graphics/Bitmap;

    if-nez v2, :cond_1

    .line 142
    invoke-virtual {p1}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v1

    .line 143
    .local v1, "srcBitmap":Landroid/graphics/Bitmap;
    invoke-static {p0, v1}, Lcom/tencent/qrom/theme/QromIconManager;->processIcon(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    move-result-object v2

    invoke-static {p0, v2, v0}, Lcom/tencent/qrom/theme/QromIconManager;->blendIcon(Landroid/content/res/Resources;Landroid/graphics/Bitmap;Z)Landroid/graphics/Bitmap;

    move-result-object v2

    sput-object v2, Lcom/tencent/qrom/theme/QromIconManager;->mSysDefAppIcon:Landroid/graphics/Bitmap;

    .line 144
    const-string v2, "QromIconManager"

    const-string v4, "qromDispostDefaultIcon|blend sys default appIcon"

    invoke-static {v2, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 146
    .end local v1    # "srcBitmap":Landroid/graphics/Bitmap;
    :cond_1
    monitor-exit v3
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 149
    :cond_2
    const-string v3, "QromIconManager"

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v4, "qromDispostDefaultIcon|got mSysDefAppIcon != null?"

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

    move-result-object v4

    sget-object v2, Lcom/tencent/qrom/theme/QromIconManager;->mSysDefAppIcon:Landroid/graphics/Bitmap;

    if-eqz v2, :cond_3

    const/4 v2, 0x1

    :goto_1
    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v2

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

    move-result-object v2

    invoke-static {v3, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 151
    sget-object v2, Lcom/tencent/qrom/theme/QromIconManager;->mSysDefAppIcon:Landroid/graphics/Bitmap;

    goto :goto_0

    .line 146
    :catchall_0
    move-exception v2

    :try_start_1
    monitor-exit v3
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v2

    .line 149
    :cond_3
    const/4 v2, 0x0

    goto :goto_1
.end method

.method public static qromProcessIcon(Landroid/content/Context;Landroid/graphics/Bitmap;Ljava/lang/String;Ljava/lang/String;)Landroid/graphics/Bitmap;
    .locals 7
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "srcBitmap"    # Landroid/graphics/Bitmap;
    .param p2, "pkgName"    # Ljava/lang/String;
    .param p3, "clzName"    # Ljava/lang/String;

    .prologue
    const/4 v4, 0x0

    .line 271
    if-nez p0, :cond_1

    .line 293
    :cond_0
    :goto_0
    return-object v4

    .line 275
    :cond_1
    new-instance v5, Ljava/lang/StringBuilder;

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

    const-string v6, "content://com.tencent.qrom.iconmanager/iconblob/"

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

    move-result-object v5

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

    move-result-object v5

    const-string v6, "/"

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

    move-result-object v5

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

    move-result-object v5

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

    move-result-object v5

    invoke-static {v5}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 277
    .local v3, "uri":Landroid/net/Uri;
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    .line 278
    .local v1, "cr":Landroid/content/ContentResolver;
    invoke-static {p1}, Lcom/tencent/qrom/theme/QromIconManager;->bitmap2Bytes(Landroid/graphics/Bitmap;)[B

    move-result-object v0

    .line 279
    .local v0, "blob":[B
    if-eqz v0, :cond_0

    .line 283
    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    .line 284
    .local v2, "cv":Landroid/content/ContentValues;
    const-string v5, "KEY_SRC_APP_ICON"

    invoke-virtual {v2, v5, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;[B)V

    .line 285
    const-string v5, "KEY_BITMAP_WIDTH"

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

    move-result v6

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

    move-result-object v6

    invoke-virtual {v2, v5, v6}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 286
    const-string v5, "KEY_BITMAP_HEIGHT"

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

    move-result v6

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

    move-result-object v6

    invoke-virtual {v2, v5, v6}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 287
    const-string v5, "KEY_BITMAP_CONFIG"

    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getConfig()Landroid/graphics/Bitmap$Config;

    move-result-object v6

    invoke-virtual {v6}, Landroid/graphics/Bitmap$Config;->name()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v2, v5, v6}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 288
    invoke-virtual {v1, v3, v2}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    move-result-object v3

    .line 289
    if-eqz v3, :cond_0

    .line 293
    invoke-static {p0, p2, p3}, Lcom/tencent/qrom/theme/QromIconManager;->qromDisposeIcon(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v4

    goto :goto_0
.end method

.method public static scaleInnerIcon(ILcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;)Landroid/graphics/RectF;
    .locals 6
    .param p0, "size"    # I
    .param p1, "result"    # Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;

    .prologue
    const/high16 v5, 0x3f800000    # 1.0f

    const/4 v4, 0x0

    .line 395
    iget-object v2, p1, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v2}, Landroid/graphics/Rect;->width()I

    move-result v2

    int-to-float v2, v2

    iget-object v3, p1, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v3}, Landroid/graphics/Rect;->height()I

    move-result v3

    int-to-float v3, v3

    div-float v1, v2, v3

    .line 396
    .local v1, "scale":F
    cmpl-float v2, v1, v5

    if-lez v2, :cond_0

    div-float v1, v5, v1

    .line 397
    :cond_0
    iget-boolean v2, p1, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->isSquare:Z

    if-eqz v2, :cond_2

    .line 399
    iget-object v2, p1, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v2}, Landroid/graphics/Rect;->width()I

    move-result v2

    iget-object v3, p1, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v3}, Landroid/graphics/Rect;->height()I

    move-result v3

    if-le v2, v3, :cond_1

    .line 400
    new-instance v0, Landroid/graphics/RectF;

    int-to-float v2, p0

    div-float/2addr v2, v1

    int-to-float v3, p0

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

    .line 412
    .local v0, "rect":Landroid/graphics/RectF;
    :goto_0
    return-object v0

    .line 402
    .end local v0    # "rect":Landroid/graphics/RectF;
    :cond_1
    new-instance v0, Landroid/graphics/RectF;

    int-to-float v2, p0

    int-to-float v3, p0

    div-float/2addr v3, v1

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

    .restart local v0    # "rect":Landroid/graphics/RectF;
    goto :goto_0

    .line 406
    .end local v0    # "rect":Landroid/graphics/RectF;
    :cond_2
    iget-object v2, p1, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v2}, Landroid/graphics/Rect;->width()I

    move-result v2

    iget-object v3, p1, Lcom/tencent/qrom/theme/QromIconManager$IconAnalyzedResult;->rect:Landroid/graphics/Rect;

    invoke-virtual {v3}, Landroid/graphics/Rect;->height()I

    move-result v3

    if-le v2, v3, :cond_3

    .line 407
    new-instance v0, Landroid/graphics/RectF;

    int-to-float v2, p0

    int-to-float v3, p0

    mul-float/2addr v3, v1

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

    .restart local v0    # "rect":Landroid/graphics/RectF;
    goto :goto_0

    .line 409
    .end local v0    # "rect":Landroid/graphics/RectF;
    :cond_3
    new-instance v0, Landroid/graphics/RectF;

    int-to-float v2, p0

    mul-float/2addr v2, v1

    int-to-float v3, p0

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

    .restart local v0    # "rect":Landroid/graphics/RectF;
    goto :goto_0
.end method

.method public static setCopyFileStatus(Z)V
    .locals 3
    .param p0, "status"    # Z

    .prologue
    .line 319
    const-string v0, "persist.sys.themestatus"

    invoke-static {p0}, Ljava/lang/String;->valueOf(Z)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/os/SystemProperties;->set(Ljava/lang/String;Ljava/lang/String;)V

    .line 321
    const-string v0, "QromIconManager"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "setCopyFileStatus|status="

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

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

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

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 322
    return-void
.end method

.method public static setCurrentThemeId(I)V
    .locals 2
    .param p0, "themeId"    # I

    .prologue
    .line 311
    const-string v0, "persist.sys.themeid"

    invoke-static {p0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/os/SystemProperties;->set(Ljava/lang/String;Ljava/lang/String;)V

    .line 312
    return-void
.end method

.method public static setSystemIconIsDefault(Landroid/content/Context;Z)V
    .locals 3
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "isdefault"    # Z

    .prologue
    .line 297
    const-string v0, "persist.sys.theme"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, ""

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

    move-result-object v1

    invoke-static {p1}, Ljava/lang/String;->valueOf(Z)Ljava/lang/String;

    move-result-object v2

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

    move-result-object v1

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

    move-result-object v1

    invoke-static {v0, v1}, Landroid/os/SystemProperties;->set(Ljava/lang/String;Ljava/lang/String;)V

    .line 299
    const-string v0, "QromIconManager"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "setSystemIconIsDefault|isDefault="

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

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

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

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 300
    return-void
.end method


text:
'use strict';

var path = require('path');
var _ = require('lodash');
var gulp = require('gulp');
var gulpUtil = require('gulp-util');
var combiner = require('stream-combiner2');
var watch = require('gulp-watch');
var batch = require('gulp-batch');
var sourcemaps = require('gulp-sourcemaps');
var less = require('gulp-less');
var npmImportPlugin = require('less-plugin-npm-import');
var LessPluginAutoPrefix = require('less-plugin-autoprefix');
var autoprefix= new LessPluginAutoPrefix({ browsers: ["last 2 versions"] });
var eslint = require('gulp-eslint');
var del = require('del');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var hjsonify = require('hjsonify');
var bulkify = require('bulkify');
var nodeResolve = require('resolve');
var babelify = require('babelify');
var partialify = require('partialify/custom');

gulp.task('default', ['development']);
gulp.task('development',
	['clean', 'javascript:vendor', 'javascript:app', 'css', 'html']
);
//TODO: gulp task for distribution

function runBatchTasks(tasks)
{
	return batch(function (events, done) {
		events
			.on('error', done)
			.on('end', done)
			.on('close', done)
			.on('data', function (){
				gulp.start(tasks);
			});
	});
}

gulp.task('watch', function () {
	gulp.start(['default']);
	watch('src/scripts/**', runBatchTasks('javascript:app'));
	watch('src/data/**', runBatchTasks('javascript:app'));
	watch('package.json', runBatchTasks('javascript:vendor'));
	watch('src/styles/**', runBatchTasks('css'));
	watch('src/index.html', runBatchTasks('html'));
	watch('tests/**', runBatchTasks('test:javascript'));
});

gulp.task('clean', function (done) {
	del(['dist/**', '!dist'], done);
});

var getBundleName = function () {
	// var version = require('./package.json').version;
	// var name = require('./package.json').name;
	// return version + '.' + name + '.' + 'min';
	return 'bundle';
};

gulp.task('javascript:vendor', function () {
	var bundler = browserify({
		noParse: ['jquery']
	});
	var npmPackage = require('./package.json');
	var bundle = function () {
		_(npmPackage.dependencies)
			.keys()
			.each(function (moduleName) {
				bundler.require(nodeResolve.sync(moduleName), { expose: moduleName });
			})
			.value();
		return bundler
				.bundle()
				.on('error', function (error) {
					gulpUtil.log(gulpUtil.colors.red('Browserify Error:'), error.message);
				})
				.pipe(source('vendor.js'))
				.pipe(buffer())
				.pipe(gulp.dest('./dist'));
	};
	return bundle();
});

gulp.task('javascript:app', ['lint:javascript', 'test:javascript'], function (done) {
	var bundler = browserify({
		entries: ['./src/scripts/'],
		debug: true
	});
	var npmPackage = require('./package.json');
	var bundle = function () {
		_(npmPackage.dependencies)
			.keys()
			.each(function (moduleName) {
				bundler.external(moduleName);
			})
			.value();
		return bundler
				.transform(babelify)
				.transform(partialify.alsoAllow(['vue']))
				.transform(bulkify)
				.transform(hjsonify)
				.bundle()
				.on('error', function (error) {
					gulpUtil.log(gulpUtil.colors.red('Browserify Error:'), error.message);
					done(error);
				})
				.pipe(source(getBundleName() + '.js'))
				.pipe(buffer())
				.pipe(sourcemaps.init({loadMaps: true}))
				.pipe(sourcemaps.write('./'))
				.pipe(gulp.dest('./dist'));
	};
	return bundle();
});

gulp.task('css', function () {
	var combined = combiner.obj([
		gulp.src('./src/styles/main.less'),
		sourcemaps.init(),
		less({
			paths: [ path.join(__dirname, 'src', 'styles') ],
			plugins: [autoprefix, npmImportPlugin]
		}),
		sourcemaps.write('./'),
		gulp.dest('./dist')
	]);
	return combined;
})

gulp.task('html', function () {
	gulp.src('./src/index.html')
		.pipe(gulp.dest('./dist'));
})

gulp.task('lint:javascript', function () {
	return gulp.src(['src/scripts/**/*.js'])
			.pipe(eslint())
			.pipe(eslint.format())
			.pipe(eslint.failOnError());
});

gulp.task('test:javascript', function (done) {
	done();
});


text:
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/interrupt.h>
#include <sys/pcpu.h>
#include <sys/timetc.h>
#ifdef SMP
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#endif

#include <dev/ofw/openfirm.h>

#include <machine/clock.h>
#include <machine/frame.h>
#include <machine/intr_machdep.h>
#include <machine/tick.h>
#ifdef SMP
#include <machine/cpu.h>
#endif

int tick_missed;	/* statistics */

#define	TICK_GRACE	1000

void
cpu_initclocks(void)
{
	tick_start(tick_hardclock);
}

static __inline void
tick_process(struct clockframe *cf)
{

#ifdef SMP
	if (PCPU_GET(cpuid) == 0)
		hardclock(cf);
	else {
		CTR1(KTR_CLK, "tick_process: AP, cpuid=%d", PCPU_GET(cpuid));
		mtx_lock_spin_flags(&sched_lock, MTX_QUIET);
		hardclock_process(curthread, CLKF_USERMODE(cf));
		statclock_process(curthread->td_kse, CLKF_PC(cf),
		    CLKF_USERMODE(cf));
		mtx_unlock_spin_flags(&sched_lock, MTX_QUIET);
	}
#else
	hardclock(cf);
#endif
}

void
tick_hardclock(struct clockframe *cf)
{
	int missed;
	u_long next;

	tick_process(cf);
	/*
	 * Avoid stopping of hardclock in case we missed one tick period by
	 * ensuring that the the value of the next tick is at least TICK_GRACE
	 * ticks in the future.
	 * Missed ticks need to be accounted for by repeatedly calling
	 * hardclock.
	 */
	missed = 0;
	next = rd(asr23) + tick_increment;
	critical_enter();
	while (next < rd(tick) + TICK_GRACE) {
		next += tick_increment;
		missed++;
	}
	atomic_add_int(&tick_missed, missed);
	wr(asr23, next, 0);
	critical_exit();
	for (; missed > 0; missed--)
		tick_process(cf);
}

void
tick_init(u_long clock)
{
	tick_freq = clock;
	tick_MHz = clock / 1000000;
	tick_increment = clock / hz;
}

void
tick_start(tick_func_t *func)
{
	intr_setup(PIL_TICK, (ih_func_t *)func, -1, NULL, NULL);
	wrpr(tick, 0, 0);
	wr(asr23, tick_increment, 0);
}

#ifdef SMP
void
tick_start_ap(void)
{
	u_long base;

	/*
	 * Try to make the ticks interrupt as synchronously as possible to
	 * avoid inaccuracies for migrating processes. Leave out one tick to
	 * make sure that it is not missed.
	 */
	base = rd(tick);
	wr(asr23, roundup(base, tick_increment) + tick_increment, 0);
}
#endif

void
tick_stop(void)
{
	wrpr(tick, 0, 0);
	wr(asr23, 1L << 63, 0);
}


text:
package main

import (
	"fmt"
	"log"
	"os"
	"path/filepath"
	"strconv"
	"syscall"

	flag "github.com/spf13/pflag"

	"golang.org/x/sys/unix"
)

const (
	// CommFD is the environment variable which contains the comms fd.
	CommFD  = "_FUSE_COMMFD"
	fuseDev = "/dev/fuse"
)

var (
	unmount = flag.BoolP("unmount", "u", false, "unmount")
	lazy    = flag.BoolP("lazy", "z", false, "lazy unmount")
	verbose = flag.BoolP("verbose", "v", false, "verbose")
	debug   = func(string, ...interface{}) {}
	mpt     string
)

var (
	help = "usage: fusermount [-u|--unmount] [-z|--lazy] [-v|--verbose] <mountpoint>"
)

func usage() {
	log.Fatalf(help)
}

func umount(n string) error {
	// we're not doing all the folderol of standard
	// fusermount for euid() == 0.
	// Let's see how that works out.
	flags := 0
	if *lazy {
		flags |= unix.MNT_DETACH
	}

	// TODO: anything we need here if unit.Getuid() == 0.
	// So far there is nothing.
	err := unix.Unmount(n, flags)
	return err
}

func openFUSE() (int, error) {
	return unix.Open("/dev/fuse", unix.O_RDWR, 0)
}

// MountPointOK performs validation on the mountpoint.
// Bury all your magic in here.
func MountPointOK(mpt string) error {
	// We wait until we can drop privs to test the mpt
	// parameter, since ability to walk the path can
	// differ for root and the real user id.
	if err := dropPrivs(); err != nil {
		return err
	}
	defer restorePrivs()
	mpt = filepath.Clean(mpt)
	r, err := filepath.EvalSymlinks(mpt)
	if err != nil {
		return err
	}
	if r != mpt {
		return fmt.Errorf("resolved path %q and mountpoint %q are not the same", r, mpt)
	}
	// I'm not sure why fusermount wants to open the mountpoint, so let's mot for now.
	// And, for now, directories only? We don't see a current need to mount
	// FUSE on any other type of file.
	if err := os.Chdir(mpt); err != nil {
		return err
	}

	return nil
}

func getCommFD() (int, error) {
	commfd, ok := os.LookupEnv(CommFD)
	if !ok {
		return -1, fmt.Errorf(CommFD + "was not set and this program can't be used interactively")
	}
	debug("CommFD %v", commfd)

	cfd, err := strconv.Atoi(commfd)
	if err != nil {
		return -1, fmt.Errorf("%s: %v", CommFD, err)
	}
	debug("CFD is %v", cfd)
	var st unix.Stat_t
	if err := unix.Fstat(cfd, &st); err != nil {
		return -1, fmt.Errorf("_FUSE_COMMFD: %d: %v", cfd, err)
	}
	debug("cfd stat is %v", st)

	return cfd, nil
}

func doMount(fd int) error {
	var flags = uintptr(unix.MS_NODEV | unix.MS_NOSUID)
	// From the kernel:
	//if (!d->fd_present || !d->rootmode_present ||
	//	!d->user_id_present || !d->group_id_present)
	//		return 0;
	// Yeah. You get EINVAL if any one of these is not set.
	// Docs? what? Docs?
	return unix.Mount("nodev", ".", "fuse", flags, fmt.Sprintf("rootmode=%o,user_id=0,group_id=0,fd=%d", unix.S_IFDIR, fd))
}

// returnResult returns the result from earlier operations.
// It is called with the control fd, a FUSE fd, and an error.
// If the error is not nil, then we are shutting down the cfd;
// If it is nil then we try to send the fd back.
// We return either e or the error result and e
func returnResult(cfd, ffd int, e error) error {
	if e != nil {
		if err := unix.Shutdown(cfd, unix.SHUT_RDWR); err != nil {
			return fmt.Errorf("Shutting down after failed mount with %v: %v", e, err)
		}
		return e
	}
	oob := unix.UnixRights(int(ffd))
	if err := unix.Sendmsg(cfd, []byte(""), oob, nil, 0); err != nil {
		return fmt.Errorf("%s: %d: %v", CommFD, cfd, err)
	}
	return nil
}

func main() {
	flag.Parse()

	if *verbose {
		debug = log.Printf
	}

	if len(flag.Args()) != 1 {
		usage()
	}
	mpt = flag.Arg(0)
	debug("mpt %v", mpt)

	// We let "ability to open /dev/fuse" stand in as an indicator or
	// "we support FUSE".
	FuseFD, err := openFUSE()
	if err != nil {
		log.Printf("%v", err)
		os.Exit(int(syscall.ENOENT))
	}
	debug("FuseFD %v", FuseFD)

	// Bad design. All they had to do was make a -z and -u and have
	// them both mean unmount. Oh well.
	if *lazy && !*unmount {
		log.Fatalf("-z can only be used with -u")
	}

	// Fuse has to be seen to be believed.
	// The only interactive use of fusermount is to unmount
	if *unmount {
		if err := umount(mpt); err != nil {
			log.Fatal(err)
		}
		return
	}

	if err := MountPointOK(mpt); err != nil {
		log.Fatal(err)
	}

	if err := preMount(); err != nil {
		log.Fatal(err)
	}

	cfd, err := getCommFD()
	if err != nil {
		log.Fatal(err)
	}

	if err := doMount(FuseFD); err != nil {
		log.Fatal(err)
	}

	if err := returnResult(cfd, FuseFD, err); err != nil {
		log.Fatal(err)
	}
}


text:
<?php

namespace LoSo\Symfony\Component\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder as SymfonyContainerBuilder;

/**
 * Add magic methods support to Symfony's ContainerBuilder.
 *
 * @author Loïc Frering <loic.frering@gmail.com>
 */
class ContainerBuilder extends SymfonyContainerBuilder
{
    /**
     * Returns true if the container has a service with the given identifier.
     *
     * @param  string  The service identifier
     *
     * @return boolean true if the container has a service with the given identifier, false otherwise
     */
    public function __isset($id)
    {
        return $this->has($id);
    }

    /**
     * Gets the service associated with the given identifier.
     *
     * @param  string The service identifier
     *
     * @return mixed  The service instance associated with the given identifier
     */
    public function __get($id)
    {
        return $this->get($id);
    }

    /**
     * Sets a service.
     *
     * @param string The service identifier
     * @param mixed  A service instance
     */
    public function __set($id, $service)
    {
        $this->set($id, $service);
    }

}


text:
package kafka.bridge.hadoop;

import kafka.javaapi.producer.Producer;
import kafka.javaapi.producer.ProducerData;
import kafka.message.Message;

import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;

import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

public class KafkaRecordWriter<W extends BytesWritable> extends RecordWriter<NullWritable, W>
{
  protected Producer<Integer, Message> producer;
  protected String topic;

  protected List<ProducerData<Integer, Message>> msgList = new LinkedList<ProducerData<Integer, Message>>();
  protected int totalSize = 0;
  protected int queueSize;

  public KafkaRecordWriter(Producer<Integer, Message> producer, String topic, int queueSize)
  {
    this.producer = producer;
    this.topic = topic;
    this.queueSize = queueSize;
  }

  protected void sendMsgList()
  {
    if (msgList.size() > 0) {
      producer.send(msgList);
      msgList.clear();
      totalSize = 0;
    }
  }

  @Override
  public void write(NullWritable key, BytesWritable value) throws IOException, InterruptedException
  {
    Message msg = new Message(value.getBytes());
    msgList.add(new ProducerData<Integer, Message>(this.topic, msg));
    totalSize += msg.size();

    // MultiProducerRequest only supports sending up to Short.MAX_VALUE messages in one batch
    if (totalSize > queueSize || msgList.size() >= Short.MAX_VALUE)
      sendMsgList();
  }

  @Override
  public void close(TaskAttemptContext taskAttemptContext) throws IOException, InterruptedException
  {
    sendMsgList();
    producer.close();
  }
}


text:
from . import Device, Command
import random

class DummyDevice(Device):
    command_fields = ['result']

    def __init__(self, path):
        super().__init__(path,
                         b'DUMMY', b'1.00', b'DUMMYDISK',  # vendor, revision, model
                         "{:010x}".format(id(self)).encode('ascii'),  # serial
                         2048576, 512)  # capacity, sector_size

    def _open(self):
        print("open {}".format(self.path))

    def _close(self):
        print("close {}".format(self.path))

    def create_command(self, **kwargs):
        return DummyCommand(**kwargs)

    def send(self, command):
        print(command.__dict__)
        command.result = True

class DummyCommand(Command):
    def __init__(self, **kwargs):
        self.__dict__.update(kwargs)

@Device.register_enumerator
def dummy_devices():
    for dev in range(random.randint(1, 10)):
        dev_path = "/dev/dummy/" + bytes((dev + 97,)).decode('ascii')
        yield DummyDevice(dev_path)


text:
package com.planet_ink.coffee_mud.Items.Armor;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;

import java.util.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;

public class GenThinArmor extends StdThinArmor
{
	@Override
	public String ID()
	{
		return "GenThinArmor";
	}

	protected String	readableText="";
	public GenThinArmor()
	{
		super();

		setName("a generic wearable thing");
		basePhyStats.setWeight(25);
		setDisplayText("a generic wearable thing sits here.");
		setDescription("");
		baseGoldValue=5;
		properWornBitmap=Wearable.IN_INVENTORY;
		wornLogicalAnd=false;
		basePhyStats().setLevel(1);
		basePhyStats().setArmor(10);
		recoverPhyStats();
		material=RawMaterial.RESOURCE_LEATHER;
	}

	@Override
	public boolean isGeneric()
	{
		return true;
	}

	@Override
	public String text()
	{
		return CMLib.coffeeMaker().getEnvironmentalMiscTextXML(this,false);
	}

	@Override
	public String readableText()
	{
		return readableText;
	}

	@Override
	public void setReadableText(final String text)
	{
		readableText=text;
	}

	@Override
	public void setMiscText(final String newText)
	{
		miscText="";
		CMLib.coffeeMaker().unpackEnvironmentalMiscTextXML(this,newText,false);
		recoverPhyStats();
	}

	private final static String[] MYCODES={"LAYER","LAYERATTRIB"};
	@Override
	public String getStat(final String code)
	{
		if(CMLib.coffeeMaker().getGenItemCodeNum(code)>=0)
			return CMLib.coffeeMaker().getGenItemStat(this,code);
		switch(getInternalCodeNum(code))
		{
		case 0:
			return "" + getClothingLayer();
		case 1:
			return "" + getLayerAttributes();
		default:
			return CMProps.getStatCodeExtensionValue(getStatCodes(), xtraValues, code);
		}
	}

	@Override
	public void setStat(final String code, final String val)
	{
		if(CMLib.coffeeMaker().getGenItemCodeNum(code)>=0)
			CMLib.coffeeMaker().setGenItemStat(this,code,val);
		else
		switch(getInternalCodeNum(code))
		{
		case 0:
			setClothingLayer((short) CMath.s_parseIntExpression(val));
			break;
		case 1:
			setLayerAttributes((short) CMath.s_parseListLongExpression(Armor.LAYERMASK_DESCS, val));
			break;
		default:
			CMProps.setStatCodeExtensionValue(getStatCodes(), xtraValues, code, val);
			break;
		}
	}

	private int getInternalCodeNum(final String code)
	{
		for(int i=0;i<MYCODES.length;i++)
		{
			if(code.equalsIgnoreCase(MYCODES[i]))
				return i;
		}
		return -1;
	}

	private static String[] codes=null;

	@Override
	public String[] getStatCodes()
	{
		if(codes!=null)
			return codes;
		final String[] MYCODES=CMProps.getStatCodesList(GenThinArmor.MYCODES,this);
		final String[] superCodes=CMParms.toStringArray(GenericBuilder.GenItemCode.values());
		codes=new String[superCodes.length+MYCODES.length];
		int i=0;
		for(;i<superCodes.length;i++)
			codes[i]=superCodes[i];
		for(int x=0;x<MYCODES.length;i++,x++)
			codes[i]=MYCODES[x];
		return codes;
	}

	@Override
	public boolean sameAs(final Environmental E)
	{
		if(!(E instanceof GenThinArmor))
			return false;
		final String[] codes=getStatCodes();
		for(int i=0;i<codes.length;i++)
		{
			if(!E.getStat(codes[i]).equals(getStat(codes[i])))
				return false;
		}
		return true;
	}
}


text: search_result['4331']=["topic_0000000000000A4E.html","StatusVm.Badge Property",""];


text:
import xml.etree.ElementTree as ET
import time

class ReceiveMessage(object):
    def __init__(self, msg):
        xml_data = ET.fromstring(msg)
        self.__find(["ToUserName", "FromUserName", "CreateTime", "MsgType", "MsgId"], xml_data)
        getattr(self, self.MsgType)(xml_data)

    def text(self, xml_data):
        self.__find("Content", xml_data)

    def image(self, xml_data):
        self.__find(["PicUrl", "MediaId"], xml_data)

    def voice(self, xml_data):
        self.__find(['MediaId', 'Format'], xml_data)

    def video(self, xml_data):
        self.__find(['MediaId', 'ThumbMediaId'], xml_data)

    def shortvideo(self, xml_data):
        self.video(xml_data)

    def location(self, xml_data):
        self.__find(['Location_X', 'Location_Y', 'Scale', 'Label'], xml_data)

    def link(self, xml_data):
        self.__find(['Title', 'Description', 'Url'], xml_data)

    def event(self, xml_data):
        self.__find(["Event", "EventKey"], xml_data, is_lower=True)
        getattr(self, "event_" + self.Event)(xml_data)

    def event_click(self, xml_data):
        pass

    def event_view(self, xml_data):
        self.__find("MenuId", xml_data)

    def event_scancode_push(self, xml_data):
        scan_code_info = xml_data.find("ScanCodeInfo")
        self.__find(["ScanType", "ScanResult"], scan_code_info)

    def event_scancode_waitmsg(self, xml_data):
        self.scancode_push(xml_data)

    def event_pic_sysphoto(self, xml_data):
        send_pics_info = xml_data.find("SendPicsInfo")
        self.__find("Count", send_pics_info)
        pic_list = send_pics_info.find("PicList")
        pics = []
        for item in pic_list:
            pics.append(item.find("PicMd5Sum").text)
        setattr(self, "PicList", pics)

    def event_pic_photo_or_album(self, xml_data):
        self.pic_sysphoto(xml_data)

    def event_pic_weixin(self, xml_data):
        self.pic_sysphoto(xml_data)

    def event_location_select(self, xml_data):
        location_info = xml_data.find("SendLocationInfo")
        self.__find(["Location_X", "Location_Y", "Scale", "Label", "Poiname"], location_info)

    def event_subscribe(self, xml_data):
        self.__find("Ticket", xml_data)

    def event_unsubscribe(self, xml_data):
        pass

    def event_scan(self, xml_data):
        self.__find('Ticket', xml_data)

    def event_location(self, xml_data):
        self.__find(['Latitude', 'Longitude', 'Precision'], xml_data)

    def __find(self, keys, xml_data, is_lower=False):
        if isinstance(keys, str):
            keys = [keys]
        for key in keys:
            element = xml_data.find(key)
            if element is not None:
                value = element.text
                value = value.lower() if is_lower else value
                value = value.encode('utf-8')
           	setattr(self, key, value)

REPLAY_MESSAGE = """
                <xml>
                <ToUserName><![CDATA[{0}]]></ToUserName>
                <FromUserName><![CDATA[{1}]]></FromUserName>
                <CreateTime>{2}</CreateTime>
                <MsgType><![CDATA[{3}]]></MsgType>
                {4}
                </xml>
                """

class ReplayMessage(object):
    def __init__(self, message_type, to_user_name, from_user_name):
        self.message = REPLAY_MESSAGE.format(to_user_name, from_user_name, int(time.time()), message_type, '{0}')

    def send(self):
        return "success"

class ReplayTextMessage(ReplayMessage):
    def __init__(self, to_user_name, from_user_name, content):
        super(ReplayTextMessage, self).__init__("text", to_user_name, from_user_name)
        self.content = content

    def send(self):
        return self.message.format("<Content><![CDATA[{0}]]></Content>").format(self.content)

class ReplayImageMessage(ReplayMessage):
    def __init__(self, to_user_name, from_user_name, media_id):
        super(ReplayImageMessage, self).__init__('image', to_user_name, from_user_name)
        self.media_id = media_id

    def send(self):
        return self.message.format("<Image><MediaId><![CDATA[{0}]]></MediaId></Image>").format(self.media_id)

class ReplayVoiceMessage(ReplayMessage):
    def __init__(self, to_user_name, from_user_name, media_id):
        super(ReplayVoiceMessage, self).__init__('voice', to_user_name, from_user_name)
        self.media_id = media_id

    def send(self):
        return self.message.format("<Voice><MediaId><![CDATA[{0}]]></MediaId></Voice>").format(self.media_id)

class ReplayVideoMessage(ReplayMessage):
    def __init__(self, to_user_name, from_user_name, media_id, title, description):
        super(ReplayVideoMessage, self).__init__('video', to_user_name, from_user_name)
        self.media_id = media_id
        self.title = title
        self.description = description

    def send(self):
        return self.message.format("<Video><MediaId><![CDATA[{0}]]></MediaId><Title><![CDATA[{1}]]></Title><Description><![CDATA[{2}]]></Description></Video>")\
            .format(self.media_id, self.title, self.description)

class ReplayMusicMessage(ReplayMessage):
    def __init__(self, to_user_name, from_user_name, title, description, music_url, HQ_music_url, thumb_media_id):
        super(ReplayMusicMessage, self).__init__('music', to_user_name, from_user_name)
        self.title = title
        self.description = description
        self.music_url = music_url
        self.HQ_music_url = HQ_music_url
        self.thumb_media_id = thumb_media_id

    def send(self):
        return self.message.format("<Music><Title><![CDATA[{0}]]></Title><Description><![CDATA[{1}]]></Description><MusicUrl><![CDATA[{2}]]></MusicUrl><HQMusicUrl><![CDATA[{3}]]></HQMusicUrl><ThumbMediaId><![CDATA[{4}]]></ThumbMediaId></Music>")\
            .format(self.title, self.description, self.music_url, self.HQ_music_url, self.thumb_media_id)

class ReplayNewsMessage(ReplayMessage):
    def __init__(self, to_user_name, from_user_name, items):
        assert isinstance(items, list)
        super(ReplayNewsMessage, self).__init__('news', to_user_name, from_user_name)
        self.items = items

    def send(self):
        items_xml = ""
        for item in self.items:
            items_xml += """
                        <item>
                        <Title><![CDATA[{0}]]></Title>
                        <Description><![CDATA[{1}]]></Description>
                        <PicUrl><![CDATA[{2}]]></PicUrl>
                        <Url><![CDATA[{3}]]></Url>
                        </item>
                    """.format(item.get('title',''), item.get('description',''), item.get('pic_url',''), item.get('url',''))
        return self.message.format("<ArticleCount>{0}</ArticleCount><Articles>{1}</Articles>").format(len(self.items), items_xml)