text:
#region SearchAThing.Sci, Copyright(C) 2016-2017 Lorenzo Delana, License under MIT

#endregion

using static System.Math;
using System.Collections.Generic;
using SearchAThing.Sci;
using System.Linq;
using System.Text;
using System;
using netDxf.Entities;
using netDxf;
using netDxf.Tables;

namespace SearchAThing
{

    namespace Sci
    {

        public class BBox3D
        {
            public bool IsEmpty { get { return Min == null; } }

            public Vector3D Min { get; private set; }
            public Vector3D Max { get; private set; }
            public Vector3D Size { get { return Max - Min; } }

            /// <summary>
            /// build a 4 point bbox coords for 2D using Z=Min.Z
            /// </summary>
            public IEnumerable<Vector3D> Coords2D
            {
                get
                {
                    yield return new Vector3D(Min.X, Min.Y, Min.Z);
                    yield return new Vector3D(Max.X, Min.Y, Min.Z);
                    yield return new Vector3D(Max.X, Max.Y, Min.Z);
                    yield return new Vector3D(Min.X, Max.Y, Min.Z);
                }
            }

            /// <summary>
            /// build 8 coords 3d of current bbox
            /// </summary>
            public IEnumerable<Vector3D> Coords3D
            {
                get
                {
                    var min = Min;
                    var max = Max;
                    var dx = new Vector3D(Size.X, 0, 0);
                    var dy = new Vector3D(0, Size.Y, 0);
                    var dz = new Vector3D(0, 0, Size.Z);

                    yield return min;
                    yield return min + dx;
                    yield return min + dx + dy;
                    yield return min + dy;

                    yield return min + dz;
                    yield return min + dx + dz;
                    yield return min + dx + dy + dz;
                    yield return min + dy + dz;
                }
            }

            public BBox3D()
            {
            }

            public BBox3D Scale(double factor)
            {
                var center = (Min + Max) / 2;

                return new BBox3D(new Vector3D[]
                {
                    Min.ScaleAbout(center, factor),
                    Max.ScaleAbout(center, factor)
                });
            }

            public BBox3D(IEnumerable<Vector3D> pts)
            {
                double xmin = 0, ymin = 0, zmin = 0;
                double xmax = 0, ymax = 0, zmax = 0;

                bool firstPt = true;

                foreach (var p in pts)
                {
                    if (firstPt)
                    {
                        xmin = xmax = p.X;
                        ymin = ymax = p.Y;
                        zmin = zmax = p.Z;
                        firstPt = false;
                    }
                    else
                    {
                        xmin = Min(xmin, p.X);
                        ymin = Min(ymin, p.Y);
                        zmin = Min(zmin, p.Z);

                        xmax = Max(xmax, p.X);
                        ymax = Max(ymax, p.Y);
                        zmax = Max(zmax, p.Z);
                    }
                }
                Min = new Vector3D(xmin, ymin, zmin);
                Max = new Vector3D(xmax, ymax, zmax);
            }

            public BBox3D Union(Vector3D p)
            {
                if (IsEmpty)
                {
                    return new BBox3D()
                    {
                        Min = p,
                        Max = p
                    };
                }
                else
                {
                    return new BBox3D()
                    {
                        Min = new Vector3D(Min(Min.X, p.X), Min(Min.Y, p.Y), Min(Min.Z, p.Z)),
                        Max = new Vector3D(Max(Max.X, p.X), Max(Max.Y, p.Y), Max(Max.Z, p.Z))
                    };
                }
            }

            public BBox3D Union(BBox3D other)
            {
                if (IsEmpty) return other;
                if (other.IsEmpty) return this;
                return this.Union(other.Min).Union(other.Max);
            }

            public bool EqualsTol(double tol, BBox3D other)
            {
                if (IsEmpty) return other.IsEmpty;
                if (other.IsEmpty) return false;
                return Min.EqualsTol(tol, other.Min) && Max.EqualsTol(tol, other.Max);
            }

            public bool Contains(double tol, BBox3D other)
            {
                if (IsEmpty) return false;
                if (other.IsEmpty) return true;
                return
                    other.Min.X.GreatThanOrEqualsTol(tol, Min.X) &&
                    other.Min.Y.GreatThanOrEqualsTol(tol, Min.Y) &&
                    other.Min.Z.GreatThanOrEqualsTol(tol, Min.Z) &&
                    other.Max.X.LessThanOrEqualsTol(tol, Max.X) &&
                    other.Max.Y.LessThanOrEqualsTol(tol, Max.Y) &&
                    other.Max.Z.LessThanOrEqualsTol(tol, Max.Z);
            }

            public bool Contains(double tol, Vector3D p)
            {
                if (IsEmpty) return false;

                return
                    p.X.GreatThanOrEqualsTol(tol, Min.X) &&
                    p.Y.GreatThanOrEqualsTol(tol, Min.Y) &&
                    p.Z.GreatThanOrEqualsTol(tol, Min.Z) &&
                    p.X.LessThanOrEqualsTol(tol, Max.X) &&
                    p.Y.LessThanOrEqualsTol(tol, Max.Y) &&
                    p.Z.LessThanOrEqualsTol(tol, Max.Z);
            }

            public bool Contains2D(double tol, Vector3D p)
            {
                if (IsEmpty) return false;

                return
                    p.X.GreatThanOrEqualsTol(tol, Min.X) &&
                    p.Y.GreatThanOrEqualsTol(tol, Min.Y) &&
                    p.X.LessThanOrEqualsTol(tol, Max.X) &&
                    p.Y.LessThanOrEqualsTol(tol, Max.Y);
            }

            /// <summary>
            /// create new bbox extending by subtract margin to Min and by add to Max
            /// </summary>
            public BBox3D AddMargin(Vector3D margin)
            {
                return new BBox3D(new Vector3D[]
                {
                    Min - margin,
                    Max + margin
                });
            }

            public override string ToString()
            {
                return $"{Min}-{Max}";
            }
        }

    }

    public static partial class Extensions
    {

        public static BBox3D BBox(this IEnumerable<Vector3D> pts)
        {
            return new BBox3D(pts);
        }

        public static BBox3D BBox(this EntityObject eo)
        {
            switch (eo.Type)
            {
                // TODO consider text width
                case EntityType.Text:
                // TODO consider text width
                case EntityType.MText:
                case EntityType.Line:
                case EntityType.Point:
                case EntityType.Insert:
                    return eo.Points().BBox();

                case EntityType.Arc:
                    {
                        var arc = (eo as Arc).ToArc3D();
                        return new BBox3D(new[] { arc.From, arc.To, arc.MidPoint });
                    }

                case EntityType.Circle: return ((Circle)eo).ToPolyline(4).BBox();

                case EntityType.LightWeightPolyline:
                    {
                        var lwpoly = (LwPolyline)eo;

                        var N = lwpoly.Normal;
                        var ocs = new CoordinateSystem3D(N * lwpoly.Elevation, N);

                        return new BBox3D(eo.Points().Select(k => k.ToWCS(ocs)));
                    }

                case EntityType.Hatch: return new BBox3D();

                default:
                    throw new NotImplementedException($"bbox not implemented for dxf entity type [{eo.Type.ToString()}]");
            }
        }

        public static BBox3D BBox(this IEnumerable<EntityObject> ents)
        {
            var bbox = new BBox3D();

            foreach (var x in ents)
            {
                bbox = bbox.Union(x.BBox());
            }

            return bbox;
        }

        public static string CadScript(this BBox3D bbox)
        {
            var sb = new StringBuilder();

            foreach (var x in bbox.ToFace3DList())
            {
                sb.AppendLine(x.CadScript());
            }

            return sb.ToString();
        }

        public static IEnumerable<Face3d> ToFace3DList(this BBox3D bbox)
        {
            var d = bbox.Max - bbox.Min;
            return DxfKit.Cuboid((bbox.Max + bbox.Min) / 2, d);
        }

        public static IEnumerable<Face3d> DrawCuboid(this BBox3D bbox, DxfObject dxfObj, Layer layer = null)
        {
            var ents = bbox.ToFace3DList().ToList();

            dxfObj.AddEntities(ents, layer);

            return ents;
        }

        public static IEnumerable<Vector3D> Points(this EntityObject eo)
        {
            switch (eo.Type)
            {
                case EntityType.Line:
                    {
                        var line = (Line)eo;
                        yield return line.StartPoint;
                        yield return line.EndPoint;
                    }
                    break;

                case EntityType.LightWeightPolyline:
                    {
                        var lw = (LwPolyline)eo;
                        foreach (var x in lw.Vertexes) yield return x.Position.ToVector3D();
                    }
                    break;

                case EntityType.Text:
                    {
                        var txt = (Text)eo;
                        yield return txt.Position;
                    }
                    break;

                case EntityType.MText:
                    {
                        var mtxt = (MText)eo;
                        yield return mtxt.Position;
                    }
                    break;

                case EntityType.Point:
                    {
                        var pt = (Point)eo;
                        yield return pt.Position;
                    }
                    break;

                case EntityType.Insert:
                    {
                        var ins = (Insert)eo;
                        var insPt = ins.Position;
                        var pts = ins.Block.Entities.SelectMany(w => w.Points());

                        pts = pts.Select(w => w.ScaleAbout(Vector3D.Zero, ins.Scale));

                        var N = ins.Normal;
                        var ocs = new CoordinateSystem3D(insPt, N).Rotate(N, ins.Rotation.ToRad());

                        pts = pts.Select(w => w.ToWCS(ocs));

                        foreach (var x in pts) yield return x;
                    };
                    break;

                case EntityType.Hatch:
                    {
                    }
                    break;

                case EntityType.Circle:
                    {
                        var circleLw = ((Circle)eo).ToPolyline(4);
                        foreach (var x in circleLw.Vertexes) yield return x.Position.ToVector3D();
                    }
                    break;

                default:
                    throw new NotImplementedException($"bbox not implemented for dxf entity type [{eo.Type.ToString()}]");
            }

        }

    }

}


text:
package com.example.archanaiyer.hungrypenguin.adapter;

import android.content.Context;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.example.archanaiyer.hungrypenguin.R;
import com.example.archanaiyer.hungrypenguin.entities.Checkout;

import java.util.List;

/**
 * Created by archanaiyer on 4/4/16.
 */
public class CheckoutActivityAdapter extends RecyclerView.Adapter<CheckoutActivityAdapter.CheckoutItemsHolder> {

    List<Checkout> dishes;

    public static class CheckoutItemsHolder extends RecyclerView.ViewHolder {
        CardView cv;
        ImageView imageUrl;
        TextView name;
        TextView cost;
        TextView quantity;

        public CheckoutItemsHolder(View itemView) {
            super(itemView);
            cv = (CardView) itemView.findViewById(R.id.checkoutcv);
            imageUrl = (ImageView) itemView.findViewById(R.id.thumbnail);
            name = (TextView) itemView.findViewById(R.id.title);
            cost = (TextView) itemView.findViewById(R.id.cost);
            quantity = (TextView) itemView.findViewById(R.id.qtyValue);
        }

    }

    public CheckoutActivityAdapter(List<Checkout> dishes) {
        this.dishes = dishes;
    }

    @Override
    public CheckoutItemsHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        LayoutInflater inflater = (LayoutInflater) parent.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View v = inflater.inflate(R.layout.checkout_card, parent, false);
        CheckoutItemsHolder sh = new CheckoutItemsHolder(v);
        return sh;
    }

    @Override
    public void onBindViewHolder(CheckoutItemsHolder holder, int position) {

        Checkout currDish = dishes.get(position);

        holder.name.setText(currDish.name);
        holder.cost.setText("$" + String.valueOf(currDish.cost));

        Glide.with(holder.itemView.getContext())
                .load(currDish.imageUrl)
                .diskCacheStrategy(DiskCacheStrategy.SOURCE)
                .into(holder.imageUrl);

        holder.quantity.setText(String.valueOf(currDish.qty));
    }

    @Override
    public int getItemCount() {
        return dishes.size();
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.querydsl.sql.codegen;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import com.mysema.codegen.model.Types;
import com.querydsl.codegen.EntityType;

public class OriginalNamingStrategyTest {

    private NamingStrategy namingStrategy = new OriginalNamingStrategy();

    private EntityType entityModel;

    @Before
    public void setUp() {
        entityModel = new EntityType(Types.OBJECT);
        //entityModel.addAnnotation(new TableImpl("OBJECT"));
        entityModel.getData().put("table", "OBJECT");
    }

    @Test
    public void getClassName() {
        assertEquals("user_data", namingStrategy.getClassName("user_data"));
        assertEquals("u", namingStrategy.getClassName("u"));
        assertEquals("us",namingStrategy.getClassName("us"));
        assertEquals("u_", namingStrategy.getClassName("u_"));
        assertEquals("us_",namingStrategy.getClassName("us_"));

        assertEquals("new_line", namingStrategy.getClassName("new line"));
    }

    @Test
    public void getPropertyName() {
        assertEquals("while_col", namingStrategy.getPropertyName("while", entityModel));
        assertEquals("name", namingStrategy.getPropertyName("name", entityModel));
        assertEquals("user_id", namingStrategy.getPropertyName("user_id", entityModel));
        assertEquals("accountEvent_id", namingStrategy.getPropertyName("accountEvent_id", entityModel));

        assertEquals("_123abc", namingStrategy.getPropertyName("123abc", entityModel));
        assertEquals("_123_abc", namingStrategy.getPropertyName("123 abc", entityModel));

        assertEquals("_123_abc_def", namingStrategy.getPropertyName("#123#abc#def", entityModel));

        assertEquals("new_line", namingStrategy.getPropertyName("new line", entityModel));
    }

    @Test
    public void getPropertyName_with_dashes() {
        assertEquals("A_FOOBAR", namingStrategy.getPropertyName("A-FOOBAR" , entityModel));
        assertEquals("A_FOOBAR", namingStrategy.getPropertyName("A_FOOBAR" , entityModel));
    }

    @Test
    public void getPropertyNameForInverseForeignKey() {
        assertEquals("_fk_superior", namingStrategy.getPropertyNameForInverseForeignKey("fk_superior", entityModel));
    }

    @Test
    public void getPropertyNameForForeignKey() {
        assertEquals("fk_superior", namingStrategy.getPropertyNameForForeignKey("fk_superior", entityModel));
        assertEquals("FK_SUPERIOR", namingStrategy.getPropertyNameForForeignKey("FK_SUPERIOR", entityModel));
    }

    @Test
    public void getDefaultVariableName() {
        assertEquals("OBJECT", namingStrategy.getDefaultVariableName(entityModel));
    }
}


text:
layout: post101
title:  MemoryXtend
categories: XAP101ADM
parent: none
weight: 430
---

{% section %}
{% column  width=10% %}
![flash-imdg.png](/attachment_files/subject/flash-imdg.png)
{% endcolumn %}
{%column width=90% %}
XAP 10 introduced a new storage model called BlobStore Storage Model (commonly reffered to as MemoryXtend), which allows an external storage medium (one that does not reside on the JVM heap) to store the IMDG data. This guide describes the general architecture and functionality of this storage model that and its off-heap RAM and SSD implementations.
{% endcolumn %}
{% endsection %}

{%fpanel%}

[Overview](./memoryxtend-overview.html)

The BlobStore Storage Model allows an external storage medium (one that does not reside on the JVM heap) to store the IMDG data.

[Solid State Drive](./memoryxtend-ssd.html)

All Enterprise flash drives are supported. SanDisk, Fusion-IO, Intel® SSD , etc are supported with the IMDG storage technology.

[Off Heap RAM](./memoryxtend-ohr.html)

XAP is using [MapDB](http://www.mapdb.org/), an embedded database engine which provides concurrent Maps, Sets and Queues backed by disk storage or off-heap memory.

{%endfpanel%}

#### Additional Resources

{%section%}
{%column width=30%  %}
{%youtube kAe-ZxFnIYc | XAP MemoryXtend %}
{%endcolumn%}

{%column width=30%  %}
[{%pdf%}](/download_files/White-Paper-ssd-V2.pdf)
This MemoryXtend white paper provides a high level overview of the technology and motivation behind MemoryXtend.
{%endcolumn%}

{%endsection%}


text:
class RecipeSerializer < ActiveModel::Serializer
  attributes :id, :user_id, :name, :photo_path, :description, :total_time, :average_stars
  has_one :author
  has_many :user_recipe_favorites
end


text:
@import Curbside;

@interface AppDelegate ()
@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
#warning Replace with a valid API Key and Secret generated from your Curbside ARRIVE platform

    CSMonitoringSession *sdksession = [CSMonitoringSession createSessionWithAPIKey:@"YOUR_API_KEY" secret:@"YOUR_SECRET_KEY" delegate:nil];

    // Call sessions method application:didFinishLaunchingWithOptions:
    [sdksession application:[UIApplication sharedApplication] didFinishLaunchingWithOptions:launchOptions];
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end


text:
package org.apache.activemq.artemis.jlibaio.util;

import org.apache.activemq.artemis.jlibaio.SubmitInfo;

/**
 * this is an utility class where you can reuse Callbackk objects for your LibaioContext usage.
 */
public class CallbackCache<Callback extends SubmitInfo> {

   private final SubmitInfo[] pool;

   private int put = 0;
   private int get = 0;
   private int available = 0;
   private final int size;

   private final Object lock = new Object();

   public CallbackCache(int size) {
      this.pool = new SubmitInfo[size];
      this.size = size;
   }

   public Callback get() {
      synchronized (lock) {
         if (available <= 0) {
            return null;
         } else {
            Callback retValue = (Callback) pool[get];
            pool[get] = null;
            if (retValue == null) {
               throw new NullPointerException("You should initialize the pool before using it");
            }
            available--;
            get++;
            if (get >= size) {
               get = 0;
            }
            return retValue;
         }
      }
   }

   public CallbackCache put(Callback callback) {
      if (callback == null) {
         return null;
      }
      synchronized (lock) {
         if (available < size) {
            available++;
            pool[put++] = callback;
            if (put >= size) {
               put = 0;
            }
         }
      }
      return this;
   }
}


text:
package jadx.gui.ui;

import ch.qos.logback.classic.Level;
import jadx.gui.settings.JadxSettings;
import jadx.gui.utils.LogCollector;
import jadx.gui.utils.NLS;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;

class LogViewer extends JDialog {
	private static final long serialVersionUID = -2188700277429054641L;
	private static final Level[] LEVEL_ITEMS = {Level.DEBUG, Level.INFO, Level.WARN, Level.ERROR};

	private static Level level = Level.WARN;
	private final JadxSettings settings;
	private RSyntaxTextArea textPane;

	public LogViewer(JadxSettings settings) {
		this.settings = settings;
		initUI();
		registerLogListener();
		settings.loadWindowPos(this);
	}

	public final void initUI() {
		textPane = new RSyntaxTextArea();
		textPane.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));

		JPanel controlPane = new JPanel();
		controlPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
		final JComboBox cb = new JComboBox(LEVEL_ITEMS);
		cb.setSelectedItem(level);
		cb.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				int i = cb.getSelectedIndex();
				level = LEVEL_ITEMS[i];
				registerLogListener();
			}
		});
		JLabel levelLabel = new JLabel(NLS.str("log.level"));
		levelLabel.setLabelFor(cb);
		controlPane.add(levelLabel);
		controlPane.add(cb);

		JScrollPane scrollPane = new JScrollPane(textPane);

		JButton close = new JButton(NLS.str("tabs.close"));
		close.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				close();
			}
		});
		close.setAlignmentX(0.5f);

		Container contentPane = getContentPane();
		contentPane.add(controlPane, BorderLayout.PAGE_START);
		contentPane.add(scrollPane, BorderLayout.CENTER);
		contentPane.add(close, BorderLayout.PAGE_END);

		setTitle("Log Viewer");
		pack();
		setSize(800, 600);
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		setModalityType(ModalityType.MODELESS);
		setLocationRelativeTo(null);
	}

	private void registerLogListener() {
		LogCollector logCollector = LogCollector.getInstance();
		logCollector.resetListener();
		textPane.setText("");
		logCollector.registerListener(new LogCollector.ILogListener() {
			@Override
			public Level getFilterLevel() {
				return level;
			}

			@Override
			public void onAppend(final String logStr) {
				SwingUtilities.invokeLater(new Runnable() {
					public void run() {
						textPane.append(logStr);
						textPane.updateUI();
					}
				});
			}
		});
	}

	private void close() {
		dispose();
	}

	@Override
	public void dispose() {
		LogCollector.getInstance().resetListener();
		settings.saveWindowPos(this);
		super.dispose();
	}
}


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

<tableInfo>
  <headerDetails headerStyle="drawtablerowboldnoline"/>
  <row totWidth="100" bottomLineRequired="true">
	<column label="FeeType" value="feeName" valueType="method" columnType="text">
         <columnDetails  rowStyle="drawtablerow" colWidth="50" />
    </column>
	<column label="Amount"    value="amount"  valueType="method"   columnType="text">
	    <columnDetails   rowStyle="drawtablerow" colWidth="50"/>
    </column>
  </row>

</tableInfo>


text:
<TITLE>Review for Edge, The (1997)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Edge, The (1997)

reviewed by
Ben Hoffman

                                 THE EDGE

At last a thriller with a protagonist who could be a contestant on
Jeopardy.  That is billionaire Charles Morse (Anthony Hopkins).
Charles thinks it is a wasted talent to know every kind of trivia;
nothing one can use in real life.

Real life is his wife, very much younger than he, the stunning
Mickey who is a model on a shoot in Alaska with Robert Green (Alec
Baldwin) the high fashion photographer;  her husband has been
invited to come along..  Green is in love with Mickey, as who could
resist her incredible smile?   When a new site for  the shoot is
needed, Robert, accompanied by Charles, take off by plane to scout
other locales.  The plane crashes in an Alaskan wilderness, and now
Charles and Robert have to depend on each other for survival. What
complicates matters is that Charles is certain his wife and Robert
have been having an affair.

Suddenly, Charles' knowledge of  trivia becomes the only thing
between living and dying.   There is little of which he is unable to
take advantage, from making fire to warding off a bear who is intent
on tracking them.  The question is, does Charles really want to save
Robert; another question is, would Robert kill Charles if there was
a chance to get back to civilization without him?   The two are as
unlike personalities as ever have been thrown together in a struggle
for life.     This is equally true of the acting styles of Hopkins
and Baldwin.   Add that the director chose a famous super-model to
portray a famous super-model and Macpherson came through very
nicely.

THE EDGE is a tensely fascinating thriller with two  men wary of
each other, a determined bear who does not care which of the two he
tears apart, the weather and the isolation of being lost and
probably never found.    Exceptional performance by Hopkins . . . as
always.

                     Directed by Lee Tamahori..

3 Bytes

4 Bytes = Superb
3 Bytes = Too good to miss
2 Bytes = Average
1 Byte  = Save your money

              Copyright 1997               Ben Hoffman

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2009 University of Washington
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Leonard Tracy <lentracy@gmail.com>
 */

#ifndef UAN_PROP_MODEL_H
#define UAN_PROP_MODEL_H

#include "ns3/object.h"
#include "ns3/mobility-model.h"
#include "ns3/nstime.h"

#include <vector>
#include <complex>
#include <utility>

namespace ns3 {

class UanTxMode;

/**
 * \class Tap
 * \brief Holds PDP Tap information (amplitude and delay)
 */
class Tap
{
public:
  /**
   * Default constructor.  Creates Tap with delay=0, amp=0
   */
  Tap ();
  /**
   * \param delay Time delay (usually from first arrival) of signal
   * \param amp Complex amplitude of arrival
   */
  Tap (Time delay, std::complex<double> amp);
  /**
   * \returns Complex amplitude of arrival
   */
  std::complex<double> GetAmp (void) const;
  /**
   * \returns Time delay (usually from first arrival) of signal
   */
  Time GetDelay (void) const;

private:
  std::complex<double> m_amplitude;
  Time m_delay;
};

/**
 * \class UanPdp
 *
 * Container class to describe power delay profile returned
 * from UAN propagation models using tapped delay line model.
 * This should model a channel impulse response as a set of
 * equally spaced signal arrivals.
 *
 * Generally, the profile should be normalized, such that
 * the sum of all taps should equal 1.  The received signal
 * power on any interval (t1, t2) can then be found from
 * summing the taps on the interval and multiplying by
 * the total received power at the receiver.
 *
 *
 */
class UanPdp
{
public:
  /**
   * \brief Iterator is a standard template library constant interator
   */
  typedef std::vector<Tap>::const_iterator Iterator;
  /**
   * \brief Create empty PDP object
   */
  UanPdp ();
  /**
   * \brief Create PDP object from a vector of Tap objects
   * \param taps Taps to include in this PDP
   * \param resolution Resolution of PDP object
   */
  UanPdp (std::vector<Tap> taps, Time resolution);
  /**
   * \brief Create PDP object from vector of arrival amplitudes
   * \param arrivals  Vector of complex amplitude arrivals
   * \param resolution Time duration between arrivals in vector
   */
  UanPdp (std::vector<std::complex<double > > arrivals, Time resolution);
  /**
   * \brief Create PDP object from real valued arrival amplitudes
   * \param arrivals vector of real valued arrivals
   * \param resolution Time duration between arrivals in vector
   */
  UanPdp (std::vector<double> arrivals, Time resolution);
  ~UanPdp ();

  /**
   * \param arrival complex arrival value
   * \param index index of arrival
   */
  void SetTap (std::complex<double> arrival, uint32_t index);
  /**
   * \param nTaps number of taps in this PDP
   */
  void SetNTaps (uint32_t nTaps);
  /**
   * \param resolution Resolution of PDP (time between arrivals)
   */
  void SetResolution (Time resolution);
  /**
   * \returns Iterator positioned at first arrival
   */
  Iterator GetBegin (void) const;
  /**
   * \returns Iterator positioned after last arrival
   */
  Iterator GetEnd (void) const;
  /**
   * \returns Number of taps in PDP
   */
  uint32_t GetNTaps (void) const;
  /**
   * \returns Tap object at index i
   * \param i Index number of tap to return (0 based)
   */
  const Tap &GetTap (uint32_t i) const;
  /**
   * \returns Resolution of PDP (time duration between arrivals)
   */
  Time GetResolution (void) const;
  /**
   * \param begin Time value to begin summing arrivals
   * \param end Time value to end summing arrivals
   * \returns Returns Non-coherent sum of arrivals between two time values
   *
   * Assuming that Tap at index 0 arrives at time 0,
   * this function sums non-coherently (sums amplitude of arrivals
   * ignoring phase difference) all arrivals between a start
   * and end time.
   */
  double SumTapsNc (Time begin, Time end) const;
  /**
   * \param begin Time value to begin summing arrivals
   * \param end Time value to end summing arrivals
   * \returns Returns coherent sum of arrivals between two time values
   *
   * Assuming that Tap at index 0 arrives at time 0,
   * this function sums coherently (sums amplitude of arrivals
   * considering phase difference) all arrivals between a start
   * and end time.
   */
  std::complex<double> SumTapsC (Time begin, Time end) const;
  /**
   * \param delay Time duratation after max to begin summing arrivals
   * \param duration Time duration to sum arrivals for
   * \returns non-coherent sum of arrivals after max in given window
   *
   * this function sums non-coherently (sums amplitude of arrivals
   * ignoring phase difference) all arrivals in a given duration
   * starting the given time after the maximum amplitude arrival received
   */
  double SumTapsFromMaxNc (Time delay, Time duration) const;
  /**
   * \param delay Time duratation after max to begin summing arrivals
   * \param duration Time duration to sum arrivals for
   * \returns coherent sum of arrivals after max in given window
   *
   * this function sums coherently (sums amplitude of arrivals
   * considering phase difference) all arrivals in a given duration
   * starting the given time after the maximum amplitude arrival received
   */
  std::complex<double> SumTapsFromMaxC (Time delay, Time duration) const;

  /**
   * \returns A PDP with a singlue unit impulse arrival at time 0
   */
  static UanPdp CreateImpulsePdp (void);
private:
  friend std::ostream &operator<< (std::ostream &os, UanPdp &pdp);
  friend std::istream &operator>> (std::istream &is, UanPdp &pdp);
  std::vector<Tap> m_taps;
  Time m_resolution;

};
/**
 * \brief Writes PDP to stream as list of arrivals
 */
std::ostream &operator<< (std::ostream &os, UanPdp &pdp);
/**
 * \brief Reads in list of arrivals from stream is
 */
std::istream &operator>> (std::ostream &is, UanPdp &pdp);

/**
 * \class UanPropModel
 *
 * Base class for implemented underwater propagation models
 */
class UanPropModel : public Object
{
public:
  static TypeId GetTypeId (void);

  /**
   * Computes pathloss between nodes a and b.
   * \returns Pathloss in dB re 1 uPa
   * \param a Ptr to mobility model of node a
   * \param b Ptr to mobility model of node b
   * \param txMode TX mode of transmission between a and b
   */
  virtual double GetPathLossDb (Ptr<MobilityModel> a, Ptr<MobilityModel> b, UanTxMode txMode) = 0;

  /**
   * \returns PDP for link between nodes a and b
   * \param a Ptr to mobility model of node a
   * \param b Ptr to mobility model of node b
   * \param mode TX mode of transmission from a to b
   */
  virtual UanPdp GetPdp (Ptr<MobilityModel> a, Ptr<MobilityModel> b, UanTxMode mode) = 0;
  /**
   * Finds propagation delay between nodes a and b
   * \param a Ptr to mobility model of node a
   * \param b Ptr to mobility model of node b
   * \param mode TX mode of transmission
   * \returns Propagation delay
   */
  virtual Time GetDelay (Ptr<MobilityModel> a, Ptr<MobilityModel> b, UanTxMode mode) = 0;

  /**
   * Clears all pointer references
   */
  virtual void Clear (void);

  virtual void DoDispose (void);
};

}

#endif /* UAN_PROP_MODEL_H */


text:
package org.kaleidofoundry.messaging;

import org.kaleidofoundry.core.context.ProviderException;
import org.kaleidofoundry.core.context.RuntimeContext;

public class ProducerFactory {

   private static final ProducerProvider PROVIDER = new ProducerProvider(Producer.class);

   public static Producer provides(String name) {
	return PROVIDER.provides(name);
   }

   public static Producer provides(String name, RuntimeContext<?> context) {
	return PROVIDER.provides(name, context);
   }

   public static Producer provides(RuntimeContext<Producer> context) throws ProviderException {
	return PROVIDER.provides(context);
   }

   public static void stopAll() throws TransportException {
	PROVIDER.stopAll();
   }

}


text:
AWS::Core::Configuration.module_eval do

  add_service 'IAM', 'iam', 'iam.amazonaws.com'

end


text:
class CreateArticles < ActiveRecord::Migration
  def change
    create_table :articles do |t|
      t.string :title
      t.text :intro
      t.text :content
      t.integer :author_id

      t.timestamps
    end
  end
end


text:
package cn.enilu.flash.code;

import org.junit.Assert;
import org.junit.Test;

public class StrKitTest {

    @Test
    public void testFirstCharToLowerCase() {
        Assert.assertEquals("foo", StrKit.firstCharToLowerCase("foo"));
        Assert.assertEquals("1234", StrKit.firstCharToLowerCase("1234"));
        Assert.assertEquals("bar", StrKit.firstCharToLowerCase("Bar"));
    }

    @Test
    public void testFirstCharToUpperCase() {
        Assert.assertEquals("BAZ", StrKit.firstCharToUpperCase("BAZ"));
        Assert.assertEquals("Foo", StrKit.firstCharToUpperCase("foo"));
    }

    @Test
    public void testIsEmpty() {
        Assert.assertTrue(StrKit.isEmpty(null));
        Assert.assertTrue(StrKit.isEmpty(""));

        Assert.assertFalse(StrKit.isEmpty("1a 2b 3c"));
    }

    @Test
    public void testIsNotEmpty() {
        Assert.assertTrue(StrKit.isNotEmpty(","));

        Assert.assertFalse(StrKit.isNotEmpty(null));
    }

    @Test
    public void testNullToEmpty() {
        Assert.assertEquals("1a 2b 3c", StrKit.nullToEmpty("1a 2b 3c"));
    }

    @Test
    public void testNullToDefault() {
        Assert.assertNull(StrKit.nullToDefault(null, null));

        Assert.assertEquals("3", StrKit.nullToDefault("3", "1a 2b 3c"));
    }

    @Test
    public void testToUnderlineCase() {
        Assert.assertNull(StrKit.toUnderlineCase(null));

        Assert.assertEquals("1", StrKit.toUnderlineCase("1"));
        Assert.assertEquals("foo", StrKit.toUnderlineCase("foo"));
        Assert.assertEquals("bar", StrKit.toUnderlineCase("Bar"));
        Assert.assertEquals("baz", StrKit.toUnderlineCase("BAZ"));
        Assert.assertEquals("a1_b2_c3", StrKit.toUnderlineCase("A1B2C3"));
    }

    @Test
    public void testToCamelCase() {
        Assert.assertNull(StrKit.toCamelCase(null));

        Assert.assertEquals("a\'b\'c", StrKit.toCamelCase("a\'b\'c"));
        Assert.assertEquals("fooBar", StrKit.toCamelCase("foo_bar"));
    }
}


text:
<?php
	require_once __DIR__.'/_puff/sitewide.php';
	$Page['Type']  = 'Index';
	$Page['Title'] = 'Puff Sys';
	$Page['Description'] = 'Puff is Awesome';
	require_once $Sitewide['Templates']['Header'];
?>

Welcome to Puff.

<?php
	require_once $Sitewide['Templates']['Footer'];


text:
package innerclasses;
//: innerclasses/Parcel6.java
// Nesting a class within a scope.

public class Parcel6 {
  private void internalTracking(boolean b) {
    if(b) {
      class TrackingSlip {
        private String id;
        TrackingSlip(String s) {
          id = s;
        }
        String getSlip() { return id; }
      }
      TrackingSlip ts = new TrackingSlip("slip");
      String s = ts.getSlip();
    }
    // Can't use it here! Out of scope:
    //! TrackingSlip ts = new TrackingSlip("x");
  }
  public void track() { internalTracking(true); }
  public static void main(String[] args) {
    Parcel6 p = new Parcel6();
    p.track();
  }
} ///:~


text:
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# [Backup for GKE API: Node.js Samples](https://github.com/googleapis/google-cloud-node)

[![Open in Cloud Shell][shell_img]][shell_link]

## Table of Contents

* [Before you begin](#before-you-begin)
* [Samples](#samples)
  * [Backup_for_g_k_e.create_backup](#backup_for_g_k_e.create_backup)
  * [Backup_for_g_k_e.create_backup_plan](#backup_for_g_k_e.create_backup_plan)
  * [Backup_for_g_k_e.create_restore](#backup_for_g_k_e.create_restore)
  * [Backup_for_g_k_e.create_restore_plan](#backup_for_g_k_e.create_restore_plan)
  * [Backup_for_g_k_e.delete_backup](#backup_for_g_k_e.delete_backup)
  * [Backup_for_g_k_e.delete_backup_plan](#backup_for_g_k_e.delete_backup_plan)
  * [Backup_for_g_k_e.delete_restore](#backup_for_g_k_e.delete_restore)
  * [Backup_for_g_k_e.delete_restore_plan](#backup_for_g_k_e.delete_restore_plan)
  * [Backup_for_g_k_e.get_backup](#backup_for_g_k_e.get_backup)
  * [Backup_for_g_k_e.get_backup_plan](#backup_for_g_k_e.get_backup_plan)
  * [Backup_for_g_k_e.get_restore](#backup_for_g_k_e.get_restore)
  * [Backup_for_g_k_e.get_restore_plan](#backup_for_g_k_e.get_restore_plan)
  * [Backup_for_g_k_e.get_volume_backup](#backup_for_g_k_e.get_volume_backup)
  * [Backup_for_g_k_e.get_volume_restore](#backup_for_g_k_e.get_volume_restore)
  * [Backup_for_g_k_e.list_backup_plans](#backup_for_g_k_e.list_backup_plans)
  * [Backup_for_g_k_e.list_backups](#backup_for_g_k_e.list_backups)
  * [Backup_for_g_k_e.list_restore_plans](#backup_for_g_k_e.list_restore_plans)
  * [Backup_for_g_k_e.list_restores](#backup_for_g_k_e.list_restores)
  * [Backup_for_g_k_e.list_volume_backups](#backup_for_g_k_e.list_volume_backups)
  * [Backup_for_g_k_e.list_volume_restores](#backup_for_g_k_e.list_volume_restores)
  * [Backup_for_g_k_e.update_backup](#backup_for_g_k_e.update_backup)
  * [Backup_for_g_k_e.update_backup_plan](#backup_for_g_k_e.update_backup_plan)
  * [Backup_for_g_k_e.update_restore](#backup_for_g_k_e.update_restore)
  * [Backup_for_g_k_e.update_restore_plan](#backup_for_g_k_e.update_restore_plan)
  * [Quickstart](#quickstart)
  * [Quickstart](#quickstart)

## Before you begin

Before running the samples, make sure you've followed the steps outlined in
[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library).

`cd samples`

`npm install`

`cd ..`

## Samples

### Backup_for_g_k_e.create_backup

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_backup.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_backup.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_backup.js`

-----

### Backup_for_g_k_e.create_backup_plan

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_backup_plan.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_backup_plan.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_backup_plan.js`

-----

### Backup_for_g_k_e.create_restore

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_restore.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_restore.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_restore.js`

-----

### Backup_for_g_k_e.create_restore_plan

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_restore_plan.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_restore_plan.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.create_restore_plan.js`

-----

### Backup_for_g_k_e.delete_backup

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_backup.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_backup.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_backup.js`

-----

### Backup_for_g_k_e.delete_backup_plan

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_backup_plan.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_backup_plan.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_backup_plan.js`

-----

### Backup_for_g_k_e.delete_restore

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_restore.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_restore.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_restore.js`

-----

### Backup_for_g_k_e.delete_restore_plan

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_restore_plan.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_restore_plan.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.delete_restore_plan.js`

-----

### Backup_for_g_k_e.get_backup

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_backup.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_backup.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_backup.js`

-----

### Backup_for_g_k_e.get_backup_plan

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_backup_plan.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_backup_plan.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_backup_plan.js`

-----

### Backup_for_g_k_e.get_restore

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_restore.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_restore.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_restore.js`

-----

### Backup_for_g_k_e.get_restore_plan

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_restore_plan.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_restore_plan.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_restore_plan.js`

-----

### Backup_for_g_k_e.get_volume_backup

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_volume_backup.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_volume_backup.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_volume_backup.js`

-----

### Backup_for_g_k_e.get_volume_restore

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_volume_restore.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_volume_restore.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.get_volume_restore.js`

-----

### Backup_for_g_k_e.list_backup_plans

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_backup_plans.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_backup_plans.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_backup_plans.js`

-----

### Backup_for_g_k_e.list_backups

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_backups.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_backups.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_backups.js`

-----

### Backup_for_g_k_e.list_restore_plans

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_restore_plans.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_restore_plans.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_restore_plans.js`

-----

### Backup_for_g_k_e.list_restores

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_restores.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_restores.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_restores.js`

-----

### Backup_for_g_k_e.list_volume_backups

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_volume_backups.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_volume_backups.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_volume_backups.js`

-----

### Backup_for_g_k_e.list_volume_restores

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_volume_restores.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_volume_restores.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.list_volume_restores.js`

-----

### Backup_for_g_k_e.update_backup

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_backup.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_backup.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_backup.js`

-----

### Backup_for_g_k_e.update_backup_plan

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_backup_plan.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_backup_plan.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_backup_plan.js`

-----

### Backup_for_g_k_e.update_restore

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_restore.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_restore.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_restore.js`

-----

### Backup_for_g_k_e.update_restore_plan

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_restore_plan.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_restore_plan.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/generated/v1/backup_for_g_k_e.update_restore_plan.js`

-----

### Quickstart

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/quickstart.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/quickstart.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/quickstart.js`

-----

### Quickstart

View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkebackup/samples/test/quickstart.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkebackup/samples/test/quickstart.js,samples/README.md)

__Usage:__

`node packages/google-cloud-gkebackup/samples/test/quickstart.js`

[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md
[product-docs]: https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke


text:
 // JavaScript Olympics

// I paired [with: Jordan ] on this challenge.

// This challenge took me [1] hours.

// Warm Up

var athl = ["Sahah Hughes", "Ladies' Singles", "Michael Phelps", "Freestyle"];

// Bulk Up
function win(athletes) {
  for (var i = 0; i < athletes.length; i += 2) {
    console.log(athletes[i], "won the", athletes[i + 1]);
}
}

win(athl)
// Jumble your words

function jumble(str) {
  var str_arr = str.split("").reverse();
  return str_arr.join("");
}

jumble("sdrawkcab")

// 2,4,6,8
function evenNums(array) {
  for (var i = 0; i < array.length; i++){
    if (array[i] % 2 == 0)
      console.log(array[i]);
  }
}

evenNums([1, 2, 3, 4, 5, 6]);

// "We built this city
function Athlete(){
  this.name = "Michael Phelps";
  this.sport = "swimming";
  this.quote = "It's medicinal I swear!";
}

var michaelPhelps = new Athlete("Michael Phelps", 29, "swimming", "It's medicinal I swear!")
console.log(michaelPhelps.constructor === Athlete)
console.log(michaelPhelps.name + " " + michaelPhelps.sport + " " + michaelPhelps.quote)
// Reflection

// // What JavaScript knowledge did you solidify in this challenge?
//   - Knowledge of how to create functions and looping through arrays.

// // What are constructor functions?
//   - constructor functions are ways to create objects that have properties and methods defined with the keyword 'this' using an equal sign to define its values.

// // How are constructors different from Ruby classes (in your research)?
//   - They seem very similar other than the need for an initialize method. Differences are the use of 'this' instead of instance variables.


text:
/**
 * Image Histogram
 * Compilation Command: g++ -Wall -Wextra -lOpenCL opencl1.cpp -o opencl1
 * This program was originally written in serial method by the teacher.
 */

#include <iostream>
#include <fstream>
#include <sstream>
#include <string>

#ifdef __APPLE__
	#include <OpenCL/opencl.h>
#else
	#include <CL/cl.h>
#endif

const char *clGetErrorString(cl_int);

int main() {
	std::fstream source("opencl2.cl", std::ios_base::in);
	std::fstream input("opencl3.in", std::ios_base::in);
	std::fstream output("opencl4.out", std::ios_base::out);

	unsigned int index = 0, temp, size, *image, *result;
	input >> size;
	image = new unsigned int[size];
	result = new unsigned int[768];
	while (input >> temp)
		image[index++] = temp;

	std::stringstream ss;
	std::string code_str;
	const char *code_char;
	size_t code_len;
	ss << source.rdbuf();
	code_str = ss.str();
	code_char = code_str.c_str();
	code_len = code_str.size();

//----------------------------------------------------------------------------//
//               OpenCL is the most ugly API I have ever seen.                //
//----------------------------------------------------------------------------//

	cl_platform_id   platform_id  = 0;
	cl_uint          platform_num = 0;
	cl_device_id     device_id    = 0;
	cl_uint          devices_num  = 0;
	cl_context       context      = 0;
	cl_command_queue cmd_queue    = 0;
	cl_mem           rst_mem      = 0;
	cl_mem           img_mem      = 0;
	cl_mem           sz_mem       = 0;
	cl_program       program      = 0;
	cl_kernel        kernel       = 0;
	cl_int           ret          = 0;
	cl_build_status  status       = 0;
	char             *log_char    = 0;
	size_t           log_len      = 0;
	size_t           work_size    = 1;

	ret = clGetPlatformIDs(1, &platform_id, &platform_num);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_DEFAULT, 1, &device_id, &devices_num);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	context = clCreateContext(0, 1, &device_id, 0, 0, &ret);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	cmd_queue = clCreateCommandQueue(context, device_id, 0, &ret);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	rst_mem = clCreateBuffer(context, CL_MEM_WRITE_ONLY, 768 * sizeof(unsigned int), 0, &ret);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	img_mem = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, size * sizeof(unsigned int), image, &ret);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	sz_mem = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, sizeof(unsigned int), &size, &ret);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	program = clCreateProgramWithSource(context, 1, &code_char, &code_len, &ret);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clBuildProgram(program, 1, &device_id, "-Werror", 0, 0);
	if (ret != CL_SUCCESS) {
		clGetProgramBuildInfo(program, device_id, CL_PROGRAM_BUILD_STATUS, sizeof(cl_build_status), &status, 0);
		clGetProgramBuildInfo(program, device_id, CL_PROGRAM_BUILD_LOG, 0, 0, &log_len);
		log_char = new char[log_len + 1];
		clGetProgramBuildInfo(program, device_id, CL_PROGRAM_BUILD_LOG, log_len + 1, log_char, 0);
		std::cerr << clGetErrorString(ret) << ", status = " << status << ", message: " << std::endl << log_char;
		delete log_char;
	}
	kernel = clCreateKernel(program, "histogram", &ret);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clSetKernelArg(kernel, 0, sizeof(cl_mem), &rst_mem);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clSetKernelArg(kernel, 1, sizeof(cl_mem), &img_mem);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clSetKernelArg(kernel, 2, sizeof(cl_mem), &sz_mem);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clEnqueueNDRangeKernel(cmd_queue, kernel, 1, 0, &work_size, 0, 0, 0, 0);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clEnqueueReadBuffer(cmd_queue, rst_mem, CL_TRUE, 0, 768 * sizeof(unsigned int), result, 0, 0, 0);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clFlush(cmd_queue);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clFinish(cmd_queue);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clReleaseKernel(kernel);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clReleaseProgram(program);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clReleaseMemObject(rst_mem);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clReleaseMemObject(img_mem);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clReleaseMemObject(sz_mem);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clReleaseCommandQueue(cmd_queue);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;
	ret = clReleaseContext(context);
	if (ret != CL_SUCCESS) std::cerr << clGetErrorString(ret) << std::endl;

//----------------------------------------------------------------------------//
//                          End of these ugly codes.                          //
//----------------------------------------------------------------------------//

	for (index = 0; index < 768; ++index) {
		if (index % 256 == 0 && index != 0)
			output << std::endl;
		output << result[index] << ' ';
	}

	delete image;
	delete result;

	source.close();
	input.close();
	output.close();
	return 0;
}

const char *clGetErrorString(cl_int code) {
	switch(code) {
		case 0: return "CL_SUCCESS";
		case -1: return "CL_DEVICE_NOT_FOUND";
		case -2: return "CL_DEVICE_NOT_AVAILABLE";
		case -3: return "CL_COMPILER_NOT_AVAILABLE";
		case -4: return "CL_MEM_OBJECT_ALLOCATION_FAILURE";
		case -5: return "CL_OUT_OF_RESOURCES";
		case -6: return "CL_OUT_OF_HOST_MEMORY";
		case -7: return "CL_PROFILING_INFO_NOT_AVAILABLE";
		case -8: return "CL_MEM_COPY_OVERLAP";
		case -9: return "CL_IMAGE_FORMAT_MISMATCH";
		case -10: return "CL_IMAGE_FORMAT_NOT_SUPPORTED";
		case -11: return "CL_BUILD_PROGRAM_FAILURE";
		case -12: return "CL_MAP_FAILURE";
		case -13: return "CL_MISALIGNED_SUB_BUFFER_OFFSET";
		case -14: return "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST";
		case -15: return "CL_COMPILE_PROGRAM_FAILURE";
		case -16: return "CL_LINKER_NOT_AVAILABLE";
		case -17: return "CL_LINK_PROGRAM_FAILURE";
		case -18: return "CL_DEVICE_PARTITION_FAILED";
		case -19: return "CL_KERNEL_ARG_INFO_NOT_AVAILABLE";
		case -30: return "CL_INVALID_VALUE";
		case -31: return "CL_INVALID_DEVICE_TYPE";
		case -32: return "CL_INVALID_PLATFORM";
		case -33: return "CL_INVALID_DEVICE";
		case -34: return "CL_INVALID_CONTEXT";
		case -35: return "CL_INVALID_QUEUE_PROPERTIES";
		case -36: return "CL_INVALID_COMMAND_QUEUE";
		case -37: return "CL_INVALID_HOST_PTR";
		case -38: return "CL_INVALID_MEM_OBJECT";
		case -39: return "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR";
		case -40: return "CL_INVALID_IMAGE_SIZE";
		case -41: return "CL_INVALID_SAMPLER";
		case -42: return "CL_INVALID_BINARY";
		case -43: return "CL_INVALID_BUILD_OPTIONS";
		case -44: return "CL_INVALID_PROGRAM";
		case -45: return "CL_INVALID_PROGRAM_EXECUTABLE";
		case -46: return "CL_INVALID_KERNEL_NAME";
		case -47: return "CL_INVALID_KERNEL_DEFINITION";
		case -48: return "CL_INVALID_KERNEL";
		case -49: return "CL_INVALID_ARG_INDEX";
		case -50: return "CL_INVALID_ARG_VALUE";
		case -51: return "CL_INVALID_ARG_SIZE";
		case -52: return "CL_INVALID_KERNEL_ARGS";
		case -53: return "CL_INVALID_WORK_DIMENSION";
		case -54: return "CL_INVALID_WORK_GROUP_SIZE";
		case -55: return "CL_INVALID_WORK_ITEM_SIZE";
		case -56: return "CL_INVALID_GLOBAL_OFFSET";
		case -57: return "CL_INVALID_EVENT_WAIT_LIST";
		case -58: return "CL_INVALID_EVENT";
		case -59: return "CL_INVALID_OPERATION";
		case -60: return "CL_INVALID_GL_OBJECT";
		case -61: return "CL_INVALID_BUFFER_SIZE";
		case -62: return "CL_INVALID_MIP_LEVEL";
		case -63: return "CL_INVALID_GLOBAL_WORK_SIZE";
		case -64: return "CL_INVALID_PROPERTY";
		case -65: return "CL_INVALID_IMAGE_DESCRIPTOR";
		case -66: return "CL_INVALID_COMPILER_OPTIONS";
		case -67: return "CL_INVALID_LINKER_OPTIONS";
		case -68: return "CL_INVALID_DEVICE_PARTITION_COUNT";
		case -1000: return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
		case -1001: return "CL_PLATFORM_NOT_FOUND_KHR";
		case -1002: return "CL_INVALID_D3D10_DEVICE_KHR";
		case -1003: return "CL_INVALID_D3D10_RESOURCE_KHR";
		case -1004: return "CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR";
		case -1005: return "CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR";
		default: return "CL_UNKNOWN_ERROR";
	}
}


text:
001
032
033    package com.jeantessier.classreader.impl;
034
035    import java.io.*;
036
037    import org.apache.log4j.*;
038
039    import com.jeantessier.classreader.*;
040
041    public class Synthetic_attribute extends Attribute_info implements com.jeantessier.classreader.Synthetic_attribute {
042        public Synthetic_attribute(Classfile classfile, Visitable owner, DataInputStream in) throws IOException {
043            super(classfile, owner);
044
045            int byteCount = in.readInt();
046            Logger.getLogger(getClass()).debug("Attribute length: " + byteCount);
047        }
048
049        public String toString() {
050            return "Synthetic";
051        }
052
053        public void accept(Visitor visitor) {
054            visitor.visitSynthetic_attribute(this);
055        }
056    }


text:
.class public Landroid/support/v4/view/PagerTabStrip;
.super Landroid/support/v4/view/PagerTitleStrip;
.source "PagerTabStrip.java"

# static fields
.field private static final FULL_UNDERLINE_HEIGHT:I = 0x1

.field private static final INDICATOR_HEIGHT:I = 0x3

.field private static final MIN_PADDING_BOTTOM:I = 0x6

.field private static final MIN_STRIP_HEIGHT:I = 0x20

.field private static final MIN_TEXT_SPACING:I = 0x40

.field private static final TAB_PADDING:I = 0x10

.field private static final TAB_SPACING:I = 0x20

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

# instance fields
.field private mDrawFullUnderline:Z

.field private mDrawFullUnderlineSet:Z

.field private mFullUnderlineHeight:I

.field private mIgnoreTap:Z

.field private mIndicatorColor:I

.field private mIndicatorHeight:I

.field private mInitialMotionX:F

.field private mInitialMotionY:F

.field private mMinPaddingBottom:I

.field private mMinStripHeight:I

.field private mMinTextSpacing:I

.field private mTabAlpha:I

.field private mTabPadding:I

.field private final mTabPaint:Landroid/graphics/Paint;

.field private final mTempRect:Landroid/graphics/Rect;

.field private mTouchSlop:I

# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;

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

    invoke-direct {p0, p1, v0}, Landroid/support/v4/view/PagerTabStrip;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 81
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 7
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    const/4 v6, 0x1

    const/4 v5, 0x0

    const/high16 v3, 0x3f000000    # 0.5f

    .line 84
    invoke-direct {p0, p1, p2}, Landroid/support/v4/view/PagerTitleStrip;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 65
    new-instance v1, Landroid/graphics/Paint;

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

    iput-object v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPaint:Landroid/graphics/Paint;

    .line 66
    new-instance v1, Landroid/graphics/Rect;

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

    iput-object v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTempRect:Landroid/graphics/Rect;

    .line 68
    const/16 v1, 0xff

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTabAlpha:I

    .line 70
    iput-boolean v5, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderline:Z

    .line 71
    iput-boolean v5, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderlineSet:Z

    .line 86
    iget v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTextColor:I

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorColor:I

    .line 87
    iget-object v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPaint:Landroid/graphics/Paint;

    iget v2, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorColor:I

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 91
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    iget v0, v1, Landroid/util/DisplayMetrics;->density:F

    .line 92
    .local v0, "density":F
    const/high16 v1, 0x40400000    # 3.0f

    mul-float/2addr v1, v0

    add-float/2addr v1, v3

    float-to-int v1, v1

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorHeight:I

    .line 93
    const/high16 v1, 0x40c00000    # 6.0f

    mul-float/2addr v1, v0

    add-float/2addr v1, v3

    float-to-int v1, v1

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mMinPaddingBottom:I

    .line 94
    const/high16 v1, 0x42800000    # 64.0f

    mul-float/2addr v1, v0

    float-to-int v1, v1

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mMinTextSpacing:I

    .line 95
    const/high16 v1, 0x41800000    # 16.0f

    mul-float/2addr v1, v0

    add-float/2addr v1, v3

    float-to-int v1, v1

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    .line 96
    const/high16 v1, 0x3f800000    # 1.0f

    mul-float/2addr v1, v0

    add-float/2addr v1, v3

    float-to-int v1, v1

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mFullUnderlineHeight:I

    .line 97
    const/high16 v1, 0x42000000    # 32.0f

    mul-float/2addr v1, v0

    add-float/2addr v1, v3

    float-to-int v1, v1

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mMinStripHeight:I

    .line 98
    invoke-static {p1}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;

    move-result-object v1

    invoke-virtual {v1}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I

    move-result v1

    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTouchSlop:I

    .line 101
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getPaddingLeft()I

    move-result v1

    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getPaddingTop()I

    move-result v2

    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getPaddingRight()I

    move-result v3

    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getPaddingBottom()I

    move-result v4

    invoke-virtual {p0, v1, v2, v3, v4}, Landroid/support/v4/view/PagerTabStrip;->setPadding(IIII)V

    .line 102
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getTextSpacing()I

    move-result v1

    invoke-virtual {p0, v1}, Landroid/support/v4/view/PagerTabStrip;->setTextSpacing(I)V

    .line 104
    invoke-virtual {p0, v5}, Landroid/support/v4/view/PagerTabStrip;->setWillNotDraw(Z)V

    .line 106
    iget-object v1, p0, Landroid/support/v4/view/PagerTabStrip;->mPrevText:Landroid/widget/TextView;

    invoke-virtual {v1, v6}, Landroid/widget/TextView;->setFocusable(Z)V

    .line 107
    iget-object v1, p0, Landroid/support/v4/view/PagerTabStrip;->mPrevText:Landroid/widget/TextView;

    new-instance v2, Landroid/support/v4/view/PagerTabStrip$1;

    invoke-direct {v2, p0}, Landroid/support/v4/view/PagerTabStrip$1;-><init>(Landroid/support/v4/view/PagerTabStrip;)V

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 114
    iget-object v1, p0, Landroid/support/v4/view/PagerTabStrip;->mNextText:Landroid/widget/TextView;

    invoke-virtual {v1, v6}, Landroid/widget/TextView;->setFocusable(Z)V

    .line 115
    iget-object v1, p0, Landroid/support/v4/view/PagerTabStrip;->mNextText:Landroid/widget/TextView;

    new-instance v2, Landroid/support/v4/view/PagerTabStrip$2;

    invoke-direct {v2, p0}, Landroid/support/v4/view/PagerTabStrip$2;-><init>(Landroid/support/v4/view/PagerTabStrip;)V

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 122
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-nez v1, :cond_0

    .line 123
    iput-boolean v6, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderline:Z

    .line 125
    :cond_0
    return-void
.end method

# virtual methods
.method public getDrawFullUnderline()Z
    .locals 1

    .prologue
    .line 215
    iget-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderline:Z

    return v0
.end method

.method getMinHeight()I
    .locals 2

    .prologue
    .line 220
    invoke-super {p0}, Landroid/support/v4/view/PagerTitleStrip;->getMinHeight()I

    move-result v0

    iget v1, p0, Landroid/support/v4/view/PagerTabStrip;->mMinStripHeight:I

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

    move-result v0

    return v0
.end method

.method public getTabIndicatorColor()I
    .locals 1
    .annotation build Landroid/support/annotation/ColorInt;
    .end annotation

    .prologue
    .line 152
    iget v0, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorColor:I

    return v0
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 12
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .prologue
    const v11, 0xffffff

    .line 262
    invoke-super {p0, p1}, Landroid/support/v4/view/PagerTitleStrip;->onDraw(Landroid/graphics/Canvas;)V

    .line 264
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getHeight()I

    move-result v7

    .line 265
    .local v7, "height":I
    move v6, v7

    .line 266
    .local v6, "bottom":I
    iget-object v0, p0, Landroid/support/v4/view/PagerTabStrip;->mCurrText:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getLeft()I

    move-result v0

    iget v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    sub-int v8, v0, v1

    .line 267
    .local v8, "left":I
    iget-object v0, p0, Landroid/support/v4/view/PagerTabStrip;->mCurrText:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getRight()I

    move-result v0

    iget v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    add-int v9, v0, v1

    .line 268
    .local v9, "right":I
    iget v0, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorHeight:I

    sub-int v10, v6, v0

    .line 270
    .local v10, "top":I
    iget-object v0, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPaint:Landroid/graphics/Paint;

    iget v1, p0, Landroid/support/v4/view/PagerTabStrip;->mTabAlpha:I

    shl-int/lit8 v1, v1, 0x18

    iget v2, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorColor:I

    and-int/2addr v2, v11

    or-int/2addr v1, v2

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 271
    int-to-float v1, v8

    int-to-float v2, v10

    int-to-float v3, v9

    int-to-float v4, v6

    iget-object v5, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPaint:Landroid/graphics/Paint;

    move-object v0, p1

    invoke-virtual/range {v0 .. v5}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    .line 273
    iget-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderline:Z

    if-eqz v0, :cond_0

    .line 274
    iget-object v0, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPaint:Landroid/graphics/Paint;

    const/high16 v1, -0x1000000

    iget v2, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorColor:I

    and-int/2addr v2, v11

    or-int/2addr v1, v2

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 275
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getPaddingLeft()I

    move-result v0

    int-to-float v1, v0

    iget v0, p0, Landroid/support/v4/view/PagerTabStrip;->mFullUnderlineHeight:I

    sub-int v0, v7, v0

    int-to-float v2, v0

    .line 276
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getWidth()I

    move-result v0

    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getPaddingRight()I

    move-result v3

    sub-int/2addr v0, v3

    int-to-float v3, v0

    int-to-float v4, v7

    iget-object v5, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPaint:Landroid/graphics/Paint;

    move-object v0, p1

    .line 275
    invoke-virtual/range {v0 .. v5}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    .line 278
    :cond_0
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 6
    .param p1, "ev"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 225
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    .line 226
    .local v0, "action":I
    if-eqz v0, :cond_0

    iget-boolean v5, p0, Landroid/support/v4/view/PagerTabStrip;->mIgnoreTap:Z

    if-eqz v5, :cond_0

    .line 257
    :goto_0
    return v3

    .line 232
    :cond_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    .line 233
    .local v1, "x":F
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v2

    .line 234
    .local v2, "y":F
    packed-switch v0, :pswitch_data_0

    :cond_1
    :goto_1
    move v3, v4

    .line 257
    goto :goto_0

    .line 236
    :pswitch_0
    iput v1, p0, Landroid/support/v4/view/PagerTabStrip;->mInitialMotionX:F

    .line 237
    iput v2, p0, Landroid/support/v4/view/PagerTabStrip;->mInitialMotionY:F

    .line 238
    iput-boolean v3, p0, Landroid/support/v4/view/PagerTabStrip;->mIgnoreTap:Z

    goto :goto_1

    .line 242
    :pswitch_1
    iget v3, p0, Landroid/support/v4/view/PagerTabStrip;->mInitialMotionX:F

    sub-float v3, v1, v3

    invoke-static {v3}, Ljava/lang/Math;->abs(F)F

    move-result v3

    iget v5, p0, Landroid/support/v4/view/PagerTabStrip;->mTouchSlop:I

    int-to-float v5, v5

    cmpl-float v3, v3, v5

    if-gtz v3, :cond_2

    iget v3, p0, Landroid/support/v4/view/PagerTabStrip;->mInitialMotionY:F

    sub-float v3, v2, v3

    .line 243
    invoke-static {v3}, Ljava/lang/Math;->abs(F)F

    move-result v3

    iget v5, p0, Landroid/support/v4/view/PagerTabStrip;->mTouchSlop:I

    int-to-float v5, v5

    cmpl-float v3, v3, v5

    if-lez v3, :cond_1

    .line 244
    :cond_2
    iput-boolean v4, p0, Landroid/support/v4/view/PagerTabStrip;->mIgnoreTap:Z

    goto :goto_1

    .line 249
    :pswitch_2
    iget-object v3, p0, Landroid/support/v4/view/PagerTabStrip;->mCurrText:Landroid/widget/TextView;

    invoke-virtual {v3}, Landroid/widget/TextView;->getLeft()I

    move-result v3

    iget v5, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    sub-int/2addr v3, v5

    int-to-float v3, v3

    cmpg-float v3, v1, v3

    if-gez v3, :cond_3

    .line 250
    iget-object v3, p0, Landroid/support/v4/view/PagerTabStrip;->mPager:Landroid/support/v4/view/ViewPager;

    iget-object v5, p0, Landroid/support/v4/view/PagerTabStrip;->mPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v5}, Landroid/support/v4/view/ViewPager;->getCurrentItem()I

    move-result v5

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

    invoke-virtual {v3, v5}, Landroid/support/v4/view/ViewPager;->setCurrentItem(I)V

    goto :goto_1

    .line 251
    :cond_3
    iget-object v3, p0, Landroid/support/v4/view/PagerTabStrip;->mCurrText:Landroid/widget/TextView;

    invoke-virtual {v3}, Landroid/widget/TextView;->getRight()I

    move-result v3

    iget v5, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    add-int/2addr v3, v5

    int-to-float v3, v3

    cmpl-float v3, v1, v3

    if-lez v3, :cond_1

    .line 252
    iget-object v3, p0, Landroid/support/v4/view/PagerTabStrip;->mPager:Landroid/support/v4/view/ViewPager;

    iget-object v5, p0, Landroid/support/v4/view/PagerTabStrip;->mPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v5}, Landroid/support/v4/view/ViewPager;->getCurrentItem()I

    move-result v5

    add-int/lit8 v5, v5, 0x1

    invoke-virtual {v3, v5}, Landroid/support/v4/view/ViewPager;->setCurrentItem(I)V

    goto :goto_1

    .line 234
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
    .end packed-switch
.end method

.method public setBackgroundColor(I)V
    .locals 1
    .param p1, "color"    # I
        .annotation build Landroid/support/annotation/ColorInt;
        .end annotation
    .end param

    .prologue
    .line 181
    invoke-super {p0, p1}, Landroid/support/v4/view/PagerTitleStrip;->setBackgroundColor(I)V

    .line 182
    iget-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderlineSet:Z

    if-nez v0, :cond_0

    .line 183
    const/high16 v0, -0x1000000

    and-int/2addr v0, p1

    if-nez v0, :cond_1

    const/4 v0, 0x1

    :goto_0
    iput-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderline:Z

    .line 185
    :cond_0
    return-void

    .line 183
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
    .locals 1
    .param p1, "d"    # Landroid/graphics/drawable/Drawable;

    .prologue
    .line 173
    invoke-super {p0, p1}, Landroid/support/v4/view/PagerTitleStrip;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 174
    iget-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderlineSet:Z

    if-nez v0, :cond_0

    .line 175
    if-nez p1, :cond_1

    const/4 v0, 0x1

    :goto_0
    iput-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderline:Z

    .line 177
    :cond_0
    return-void

    .line 175
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public setBackgroundResource(I)V
    .locals 1
    .param p1, "resId"    # I
        .annotation build Landroid/support/annotation/DrawableRes;
        .end annotation
    .end param

    .prologue
    .line 189
    invoke-super {p0, p1}, Landroid/support/v4/view/PagerTitleStrip;->setBackgroundResource(I)V

    .line 190
    iget-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderlineSet:Z

    if-nez v0, :cond_0

    .line 191
    if-nez p1, :cond_1

    const/4 v0, 0x1

    :goto_0
    iput-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderline:Z

    .line 193
    :cond_0
    return-void

    .line 191
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public setDrawFullUnderline(Z)V
    .locals 1
    .param p1, "drawFull"    # Z

    .prologue
    .line 202
    iput-boolean p1, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderline:Z

    .line 203
    const/4 v0, 0x1

    iput-boolean v0, p0, Landroid/support/v4/view/PagerTabStrip;->mDrawFullUnderlineSet:Z

    .line 204
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->invalidate()V

    .line 205
    return-void
.end method

.method public setPadding(IIII)V
    .locals 1
    .param p1, "left"    # I
    .param p2, "top"    # I
    .param p3, "right"    # I
    .param p4, "bottom"    # I

    .prologue
    .line 157
    iget v0, p0, Landroid/support/v4/view/PagerTabStrip;->mMinPaddingBottom:I

    if-ge p4, v0, :cond_0

    .line 158
    iget p4, p0, Landroid/support/v4/view/PagerTabStrip;->mMinPaddingBottom:I

    .line 160
    :cond_0
    invoke-super {p0, p1, p2, p3, p4}, Landroid/support/v4/view/PagerTitleStrip;->setPadding(IIII)V

    .line 161
    return-void
.end method

.method public setTabIndicatorColor(I)V
    .locals 2
    .param p1, "color"    # I
        .annotation build Landroid/support/annotation/ColorInt;
        .end annotation
    .end param

    .prologue
    .line 133
    iput p1, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorColor:I

    .line 134
    iget-object v0, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPaint:Landroid/graphics/Paint;

    iget v1, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorColor:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 135
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->invalidate()V

    .line 136
    return-void
.end method

.method public setTabIndicatorColorResource(I)V
    .locals 1
    .param p1, "resId"    # I
        .annotation build Landroid/support/annotation/ColorRes;
        .end annotation
    .end param

    .prologue
    .line 144
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0, p1}, Landroid/support/v4/content/ContextCompat;->getColor(Landroid/content/Context;I)I

    move-result v0

    invoke-virtual {p0, v0}, Landroid/support/v4/view/PagerTabStrip;->setTabIndicatorColor(I)V

    .line 145
    return-void
.end method

.method public setTextSpacing(I)V
    .locals 1
    .param p1, "textSpacing"    # I

    .prologue
    .line 165
    iget v0, p0, Landroid/support/v4/view/PagerTabStrip;->mMinTextSpacing:I

    if-ge p1, v0, :cond_0

    .line 166
    iget p1, p0, Landroid/support/v4/view/PagerTabStrip;->mMinTextSpacing:I

    .line 168
    :cond_0
    invoke-super {p0, p1}, Landroid/support/v4/view/PagerTitleStrip;->setTextSpacing(I)V

    .line 169
    return-void
.end method

.method updateTextPositions(IFZ)V
    .locals 7
    .param p1, "position"    # I
    .param p2, "positionOffset"    # F
    .param p3, "force"    # Z

    .prologue
    .line 282
    iget-object v2, p0, Landroid/support/v4/view/PagerTabStrip;->mTempRect:Landroid/graphics/Rect;

    .line 283
    .local v2, "r":Landroid/graphics/Rect;
    invoke-virtual {p0}, Landroid/support/v4/view/PagerTabStrip;->getHeight()I

    move-result v0

    .line 284
    .local v0, "bottom":I
    iget-object v5, p0, Landroid/support/v4/view/PagerTabStrip;->mCurrText:Landroid/widget/TextView;

    invoke-virtual {v5}, Landroid/widget/TextView;->getLeft()I

    move-result v5

    iget v6, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    sub-int v1, v5, v6

    .line 285
    .local v1, "left":I
    iget-object v5, p0, Landroid/support/v4/view/PagerTabStrip;->mCurrText:Landroid/widget/TextView;

    invoke-virtual {v5}, Landroid/widget/TextView;->getRight()I

    move-result v5

    iget v6, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    add-int v3, v5, v6

    .line 286
    .local v3, "right":I
    iget v5, p0, Landroid/support/v4/view/PagerTabStrip;->mIndicatorHeight:I

    sub-int v4, v0, v5

    .line 288
    .local v4, "top":I
    invoke-virtual {v2, v1, v4, v3, v0}, Landroid/graphics/Rect;->set(IIII)V

    .line 290
    invoke-super {p0, p1, p2, p3}, Landroid/support/v4/view/PagerTitleStrip;->updateTextPositions(IFZ)V

    .line 291
    const/high16 v5, 0x3f000000    # 0.5f

    sub-float v5, p2, v5

    invoke-static {v5}, Ljava/lang/Math;->abs(F)F

    move-result v5

    const/high16 v6, 0x40000000    # 2.0f

    mul-float/2addr v5, v6

    const/high16 v6, 0x437f0000    # 255.0f

    mul-float/2addr v5, v6

    float-to-int v5, v5

    iput v5, p0, Landroid/support/v4/view/PagerTabStrip;->mTabAlpha:I

    .line 293
    iget-object v5, p0, Landroid/support/v4/view/PagerTabStrip;->mCurrText:Landroid/widget/TextView;

    invoke-virtual {v5}, Landroid/widget/TextView;->getLeft()I

    move-result v5

    iget v6, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    sub-int v1, v5, v6

    .line 294
    iget-object v5, p0, Landroid/support/v4/view/PagerTabStrip;->mCurrText:Landroid/widget/TextView;

    invoke-virtual {v5}, Landroid/widget/TextView;->getRight()I

    move-result v5

    iget v6, p0, Landroid/support/v4/view/PagerTabStrip;->mTabPadding:I

    add-int v3, v5, v6

    .line 295
    invoke-virtual {v2, v1, v4, v3, v0}, Landroid/graphics/Rect;->union(IIII)V

    .line 297
    invoke-virtual {p0, v2}, Landroid/support/v4/view/PagerTabStrip;->invalidate(Landroid/graphics/Rect;)V

    .line 298
    return-void
.end method