text:
"""Beam pipeline to generate examples for a Score2Perf dataset."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import copy
import functools
import hashlib
import logging
import os
import random

from absl import flags
import apache_beam as beam
from apache_beam import typehints
from apache_beam.metrics import Metrics
from magenta.music import chord_inference
from magenta.music import melody_inference
from magenta.music import sequences_lib
from magenta.protobuf import music_pb2
import numpy as np
from tensor2tensor.data_generators import generator_utils
import tensorflow as tf

# TODO(iansimon): this should probably be defined in the problem
SCORE_BPM = 120.0

FLAGS = flags.FLAGS
flags.DEFINE_string(
    'pipeline_options', '',
    'Command line flags to use in constructing the Beam pipeline options.')

# TODO(iansimon): Figure out how to avoid explicitly serializing and
# deserializing NoteSequence protos.

@typehints.with_output_types(typehints.KV[str, str])
class ReadNoteSequencesFromTFRecord(beam.PTransform):
  """Beam PTransform that reads NoteSequence protos from TFRecord."""

  def __init__(self, tfrecord_path):
    super(ReadNoteSequencesFromTFRecord, self).__init__()
    self._tfrecord_path = tfrecord_path

  def expand(self, pcoll):
    # Awkward to use ReadAllFromTFRecord instead of ReadFromTFRecord here,
    # but for some reason ReadFromTFRecord doesn't work with gs:// URLs.
    pcoll |= beam.Create([self._tfrecord_path])
    pcoll |= beam.io.tfrecordio.ReadAllFromTFRecord()
    pcoll |= beam.Map(
        lambda ns_str: (music_pb2.NoteSequence.FromString(ns_str).id, ns_str))
    return pcoll

def select_split(cumulative_splits, kv, unused_num_partitions):
  """Select split for an `(id, _)` tuple using a hash of `id`."""
  key, _ = kv
  m = hashlib.md5(key)
  r = int(m.hexdigest(), 16) / (2 ** (8 * m.digest_size))
  for i, (name, p) in enumerate(cumulative_splits):
    if r < p:
      Metrics.counter('select_split', name).inc()
      return i
  assert False

def filter_invalid_notes(min_pitch, max_pitch, kv):
  """Filter notes with out-of-range pitch from NoteSequence protos."""
  key, ns_str = kv
  ns = music_pb2.NoteSequence.FromString(ns_str)
  valid_notes = [note for note in ns.notes
                 if min_pitch <= note.pitch <= max_pitch]
  if len(valid_notes) < len(ns.notes):
    del ns.notes[:]
    ns.notes.extend(valid_notes)
    Metrics.counter('filter_invalid_notes', 'out_of_range_pitch').inc()
  return key, ns.SerializeToString()

class DataAugmentationError(Exception):
  """Exception to be raised by augmentation functions on known failure."""
  pass

class ExtractExamplesDoFn(beam.DoFn):
  """Extracts Score2Perf examples from NoteSequence protos."""

  def __init__(self, min_hop_size_seconds, max_hop_size_seconds,
               num_replications, encode_performance_fn, encode_score_fns,
               augment_fns, absolute_timing, *unused_args, **unused_kwargs):
    """Initialize an ExtractExamplesDoFn.

    If any of the `encode_score_fns` or `encode_performance_fn` returns an empty
    encoding for a particular example, the example will be discarded.

    Args:
      min_hop_size_seconds: Minimum hop size in seconds at which input
          NoteSequence protos can be split.
      max_hop_size_seconds: Maximum hop size in seconds at which input
          NoteSequence protos can be split. If zero or None, will not split at
          all.
      num_replications: Number of times input NoteSequence protos will be
          replicated prior to splitting.
      encode_performance_fn: Performance encoding function. Will be applied to
          the performance NoteSequence and the resulting encoding will be stored
          as 'targets' in each example.
      encode_score_fns: Optional dictionary of named score encoding functions.
          If provided, each function will be applied to the score NoteSequence
          and the resulting encodings will be stored in each example.
      augment_fns: Optional list of data augmentation functions. If provided,
          each function will be applied to each performance NoteSequence (and
          score, when using scores), creating a separate example per
          augmentation function. Should not modify the NoteSequence.
      absolute_timing: If True, each score will use absolute instead of tempo-
          relative timing. Since chord inference depends on having beats, the
          score will only contain melody.

    Raises:
      ValueError: If the maximum hop size is less than twice the minimum hop
          size.
    """
    if (max_hop_size_seconds and
        max_hop_size_seconds != min_hop_size_seconds and
        max_hop_size_seconds < 2 * min_hop_size_seconds):
      raise ValueError(
          'Maximum hop size must be at least twice minimum hop size.')

    super(ExtractExamplesDoFn, self).__init__(*unused_args, **unused_kwargs)
    self._min_hop_size_seconds = min_hop_size_seconds
    self._max_hop_size_seconds = max_hop_size_seconds
    self._num_replications = num_replications
    self._encode_performance_fn = encode_performance_fn
    self._encode_score_fns = encode_score_fns
    self._augment_fns = augment_fns if augment_fns else [lambda ns: ns]
    self._absolute_timing = absolute_timing

  def process(self, kv):
    # Seed random number generator based on key so that hop times are
    # deterministic.
    key, ns_str = kv
    m = hashlib.md5(key)
    random.seed(int(m.hexdigest(), 16))

    # Deserialize NoteSequence proto.
    ns = music_pb2.NoteSequence.FromString(ns_str)

    # Apply sustain pedal.
    ns = sequences_lib.apply_sustain_control_changes(ns)

    # Remove control changes as there are potentially a lot of them and they are
    # no longer needed.
    del ns.control_changes[:]

    if (self._min_hop_size_seconds and
        ns.total_time < self._min_hop_size_seconds):
      Metrics.counter('extract_examples', 'sequence_too_short').inc()
      return

    sequences = []
    for _ in range(self._num_replications):
      if self._max_hop_size_seconds:
        if self._max_hop_size_seconds == self._min_hop_size_seconds:
          # Split using fixed hop size.
          sequences += sequences_lib.split_note_sequence(
              ns, self._max_hop_size_seconds)
        else:
          # Sample random hop positions such that each segment size is within
          # the specified range.
          hop_times = [0.0]
          while hop_times[-1] <= ns.total_time - self._min_hop_size_seconds:
            if hop_times[-1] + self._max_hop_size_seconds < ns.total_time:
              # It's important that we get a valid hop size here, since the
              # remainder of the sequence is too long.
              max_offset = min(
                  self._max_hop_size_seconds,
                  ns.total_time - self._min_hop_size_seconds - hop_times[-1])
            else:
              # It's okay if the next hop time is invalid (in which case we'll
              # just stop).
              max_offset = self._max_hop_size_seconds
            offset = random.uniform(self._min_hop_size_seconds, max_offset)
            hop_times.append(hop_times[-1] + offset)
          # Split at the chosen hop times (ignoring zero and the final invalid
          # time).
          sequences += sequences_lib.split_note_sequence(ns, hop_times[1:-1])
      else:
        sequences += [ns]

    for performance_sequence in sequences:
      if self._encode_score_fns:
        # We need to extract a score.
        if not self._absolute_timing:
          # Beats are required to extract a score with metric timing.
          beats = [
              ta for ta in performance_sequence.text_annotations
              if (ta.annotation_type ==
                  music_pb2.NoteSequence.TextAnnotation.BEAT)
              and ta.time <= performance_sequence.total_time
          ]
          if len(beats) < 2:
            Metrics.counter('extract_examples', 'not_enough_beats').inc()
            continue

          # Ensure the sequence starts and ends on a beat.
          performance_sequence = sequences_lib.extract_subsequence(
              performance_sequence,
              start_time=min(beat.time for beat in beats),
              end_time=max(beat.time for beat in beats)
          )

          # Infer beat-aligned chords (only for relative timing).
          try:
            chord_inference.infer_chords_for_sequence(
                performance_sequence,
                chord_change_prob=0.25,
                chord_note_concentration=50.0,
                add_key_signatures=True)
          except chord_inference.ChordInferenceError:
            Metrics.counter('extract_examples', 'chord_inference_failed').inc()
            continue

        # Infer melody regardless of relative/absolute timing.
        try:
          melody_instrument = melody_inference.infer_melody_for_sequence(
              performance_sequence,
              melody_interval_scale=2.0,
              rest_prob=0.1,
              instantaneous_non_max_pitch_prob=1e-15,
              instantaneous_non_empty_rest_prob=0.0,
              instantaneous_missing_pitch_prob=1e-15)
        except melody_inference.MelodyInferenceError:
          Metrics.counter('extract_examples', 'melody_inference_failed').inc()
          continue

        if not self._absolute_timing:
          # Now rectify detected beats to occur at fixed tempo.
          # TODO(iansimon): also include the alignment
          score_sequence, unused_alignment = sequences_lib.rectify_beats(
              performance_sequence, beats_per_minute=SCORE_BPM)
        else:
          # Score uses same timing as performance.
          score_sequence = copy.deepcopy(performance_sequence)

        # Remove melody notes from performance.
        performance_notes = []
        for note in performance_sequence.notes:
          if note.instrument != melody_instrument:
            performance_notes.append(note)
        del performance_sequence.notes[:]
        performance_sequence.notes.extend(performance_notes)

        # Remove non-melody notes from score.
        score_notes = []
        for note in score_sequence.notes:
          if note.instrument == melody_instrument:
            score_notes.append(note)
        del score_sequence.notes[:]
        score_sequence.notes.extend(score_notes)

        # Remove key signatures and beat/chord annotations from performance.
        del performance_sequence.key_signatures[:]
        del performance_sequence.text_annotations[:]

        Metrics.counter('extract_examples', 'extracted_score').inc()

      for augment_fn in self._augment_fns:
        # Augment and encode the performance.
        try:
          augmented_performance_sequence = augment_fn(performance_sequence)
        except DataAugmentationError:
          Metrics.counter(
              'extract_examples', 'augment_performance_failed').inc()
          continue
        example_dict = {
            'targets': self._encode_performance_fn(
                augmented_performance_sequence)
        }
        if not example_dict['targets']:
          Metrics.counter('extract_examples', 'skipped_empty_targets').inc()
          continue

        if self._encode_score_fns:
          # Augment the extracted score.
          try:
            augmented_score_sequence = augment_fn(score_sequence)
          except DataAugmentationError:
            Metrics.counter('extract_examples', 'augment_score_failed').inc()
            continue

          # Apply all score encoding functions.
          skip = False
          for name, encode_score_fn in self._encode_score_fns.items():
            example_dict[name] = encode_score_fn(augmented_score_sequence)
            if not example_dict[name]:
              Metrics.counter('extract_examples',
                              'skipped_empty_%s' % name).inc()
              skip = True
              break
          if skip:
            continue

        Metrics.counter('extract_examples', 'encoded_example').inc()
        Metrics.distribution(
            'extract_examples', 'performance_length_in_seconds').update(
                int(augmented_performance_sequence.total_time))

        yield generator_utils.to_example(example_dict)

def generate_examples(input_transform, output_dir, problem_name, splits,
                      min_hop_size_seconds, max_hop_size_seconds,
                      num_replications, min_pitch, max_pitch,
                      encode_performance_fn, encode_score_fns=None,
                      augment_fns=None, absolute_timing=False):
  """Generate data for a Score2Perf problem.

  Args:
    input_transform: The input PTransform object that reads input NoteSequence
        protos, or dictionary mapping split names to such PTransform objects.
        Should produce `(id, NoteSequence)` tuples.
    output_dir: The directory to write the resulting TFRecord file containing
        examples.
    problem_name: Name of the Tensor2Tensor problem, used as a base filename
        for generated data.
    splits: A dictionary of split names and their probabilities. Probabilites
        should add up to 1. If `input_filename` is a dictionary, this argument
        will be ignored.
    min_hop_size_seconds: Minimum hop size in seconds at which input
        NoteSequence protos can be split. Can also be a dictionary mapping split
        name to minimum hop size.
    max_hop_size_seconds: Maximum hop size in seconds at which input
        NoteSequence protos can be split. If zero or None, will not split at
        all. Can also be a dictionary mapping split name to maximum hop size.
    num_replications: Number of times input NoteSequence protos will be
        replicated prior to splitting.
    min_pitch: Minimum MIDI pitch value; notes with lower pitch will be dropped.
    max_pitch: Maximum MIDI pitch value; notes with greater pitch will be
        dropped.
    encode_performance_fn: Required performance encoding function.
    encode_score_fns: Optional dictionary of named score encoding functions.
    augment_fns: Optional list of data augmentation functions. Only applied in
        the 'train' split.
    absolute_timing: If True, each score will use absolute instead of tempo-
        relative timing. Since chord inference depends on having beats, the
        score will only contain melody.

  Raises:
    ValueError: If split probabilities do not add up to 1, or if splits are not
        provided but `input_filename` is not a dictionary.
  """
  # Make sure Beam's log messages are not filtered.
  logging.getLogger().setLevel(logging.INFO)

  if isinstance(input_transform, dict):
    split_names = input_transform.keys()
  else:
    if not splits:
      raise ValueError(
          'Split probabilities must be provided if input is not presplit.')
    split_names, split_probabilities = zip(*splits.items())
    cumulative_splits = zip(split_names, np.cumsum(split_probabilities))
    if cumulative_splits[-1][1] != 1.0:
      raise ValueError('Split probabilities must sum to 1; got %f' %
                       cumulative_splits[-1][1])

  # Check for existence of prior outputs. Since the number of shards may be
  # different, the prior outputs will not necessarily be overwritten and must
  # be deleted explicitly.
  output_filenames = [
      os.path.join(output_dir, '%s-%s.tfrecord' % (problem_name, split_name))
      for split_name in split_names
  ]
  for split_name, output_filename in zip(split_names, output_filenames):
    existing_output_filenames = tf.gfile.Glob(output_filename + '*')
    if existing_output_filenames:
      tf.logging.info(
          'Data files already exist for split %s in problem %s, deleting.',
          split_name, problem_name)
      for filename in existing_output_filenames:
        tf.gfile.Remove(filename)

  pipeline_options = beam.options.pipeline_options.PipelineOptions(
      FLAGS.pipeline_options.split(','))

  with beam.Pipeline(options=pipeline_options) as p:
    if isinstance(input_transform, dict):
      # Input data is already partitioned into splits.
      split_partitions = [
          p | 'input_transform_%s' % split_name >> input_transform[split_name]
          for split_name in split_names
      ]
    else:
      # Read using a single PTransform.
      p |= 'input_transform' >> input_transform
      split_partitions = p | 'partition' >> beam.Partition(
          functools.partial(select_split, cumulative_splits),
          len(cumulative_splits))

    for split_name, output_filename, s in zip(
        split_names, output_filenames, split_partitions):
      if isinstance(min_hop_size_seconds, dict):
        min_hop = min_hop_size_seconds[split_name]
      else:
        min_hop = min_hop_size_seconds
      if isinstance(max_hop_size_seconds, dict):
        max_hop = max_hop_size_seconds[split_name]
      else:
        max_hop = max_hop_size_seconds
      s |= 'preshuffle_%s' % split_name >> beam.Reshuffle()
      s |= 'filter_invalid_notes_%s' % split_name >> beam.Map(
          functools.partial(filter_invalid_notes, min_pitch, max_pitch))
      s |= 'extract_examples_%s' % split_name >> beam.ParDo(
          ExtractExamplesDoFn(
              min_hop, max_hop,
              num_replications if split_name == 'train' else 1,
              encode_performance_fn, encode_score_fns,
              augment_fns if split_name == 'train' else None, absolute_timing))
      s |= 'shuffle_%s' % split_name >> beam.Reshuffle()
      s |= 'write_%s' % split_name >> beam.io.WriteToTFRecord(
          output_filename, coder=beam.coders.ProtoCoder(tf.train.Example))


text:
using StackInterfaceClass;

namespace StackArrayRealisation
{
    /// <summary>
    /// stack array realisation class
    /// </summary>
    public class StackArray : StackInterface
    {
        /// <summary>
        /// counter of stack elements
        /// </summary>
        private int counter;

        /// <summary>
        /// array of stack elements
        /// </summary>
        private int[] stackArray;

        /// <summary>
        /// maximum number of stack elements
        /// </summary>
        private const int maxStackElements = 10;

        /// <summary>
        /// stack constructor
        /// </summary>
        public StackArray()
        {
            stackArray = new int[maxStackElements];
            counter = 0;
        }

        public bool IsEmpty()
        {
            return counter == 0;
        }

        public void Push(int number)
        {
            stackArray[counter] = number;
            counter++;
        }

        public int Pop()
        {
            counter--;
            return stackArray[counter];
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
using UnrealBuildTool;

public class SceneOutliner : ModuleRules
{
	public SceneOutliner(TargetInfo Target)
	{
		PrivateIncludePathModuleNames.AddRange(
			new string[] {
			}
		);

		PrivateDependencyModuleNames.AddRange(
			new string[] {
				"Core",
				"CoreUObject",
				"Engine",
				"InputCore",
				"Slate",
				"SlateCore",
				"EditorStyle",
				"UnrealEd",
			}
		);
	}
}


text:
django-radioportal-application
==============================

Django app to handle applying podcasts

Workflow
--------

Non-Registered users fill out an application form with roughly the following contents:
  * Name
  * Topic
  * Short Description
  * Homepage
  * (Number of existing episodes, avarage number of downloads, duration of episode, planned schedule)
  * Some kind of captcha (math preferred)

This applications should be voted by registered users. The voting form should consist of:
  * Vote: yes/no/maybe_later
  * Freetext review
  * Audio quality (1,2,3,4,5,-1)
  * Flag for review depth (looked at homepage, listened to episode, listened to several episodes)

TODO
----

  * summary view
  * accept view which creates real user, show, etc
  * edit review


text:
using System;
using System.Collections.Generic;
using Signum.Utilities.Reflection;
using System.Linq.Expressions;
using System.Reflection;
using Signum.Utilities.ExpressionTrees;
using Signum.Utilities;

namespace Signum.Entities.DynamicQuery
{
    [Serializable]
    public class DateToken : QueryToken
    {
        QueryToken parent;
        public override QueryToken? Parent => parent;

        internal DateToken(QueryToken parent)
        {
            this.parent = parent ?? throw new ArgumentNullException(nameof(parent));
        }

        public override string ToString()
        {
            return QueryTokenMessage.Date.NiceToString();
        }

        public override string NiceName()
        {
            return QueryTokenMessage.Date.NiceToString() + QueryTokenMessage.Of.NiceToString() + parent.ToString();
        }

        public override string? Format
        {
            get { return "d"; }
        }

        public override string? Unit
        {
            get { return null; }
        }

        public override Type Type
        {
            get { return typeof(DateTime?); }
        }

        public override string Key
        {
            get { return "Date"; }
        }

        protected override List<QueryToken> SubTokensOverride(SubTokensOptions options)
        {
            return new List<QueryToken>();
        }

        static PropertyInfo miDate = ReflectionTools.GetPropertyInfo((DateTime d) => d.Date);

        protected override Expression BuildExpressionInternal(BuildExpressionContext context)
        {
            var exp = parent.BuildExpression(context);

            return Expression.Property(exp.UnNullify(), miDate).Nullify();
        }

        public override PropertyRoute? GetPropertyRoute()
        {
            return parent.GetPropertyRoute();
        }

        public override Implementations? GetImplementations()
        {
            return null;
        }

        public override string? IsAllowed()
        {
            return parent.IsAllowed();
        }

        public override QueryToken Clone()
        {
            return new DateToken(parent.Clone());
        }

        public override bool IsGroupable
        {
            get { return true; }
        }
    }
}


text:
Enhance your website by fancy effects based on the user's scroll index. Pop-in, pop-out, sliding, sticky notes and much more. The plugin supports mobile devices and eldered browsers.
It was built using the jQuery library. Licensed under MIT and GPL licenses.

## Features

+ Eased animations for incremental mouse scroll-wheels
+ Adds fancy effects to your homepage
+ Customizable trough settings and CSS
+ Highly compatible
+ Highly customizable
+ Uses CSS3 transitions by default

## How to use

### 1. doctype

Make sure you are using valid DOCTYPE. This is required for ScrollFlow to look and function correctly.

```
<!DOCTYPE html>
```

### 2. include files

Loading jQuery from CDN (Content Delivery Network) is recommended.
Include all ScrollFlow JavaScript files in addition.

```
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/eskju.jquery.scrollflow.js"></script>
```

### 3. html markup

Add "scrollflow" and at least one of the following CSS classes to the desired object(s): slide-top, slide-left, slide-right, slide-bottom, -pop, -opacity

```
<h1 class="scrollflow -slide-top -opacity">Slide-Top with opacity fading</h1>
<p class="scrollflow -pop -opacity">Pop-Effect</p>
```

### 4. fire plugin

If you are not familiar with jQuery, please, read this tutorial for beginners.

```
$( document ).ready( function( )
{
	new ScrollFlow();
} );
```

## Options

Easy plugin, easy life. Configure things just to taste :)

```
$( document ).ready( function( )
{
	ScrollFlow( {
		your: "option",
		will: "be",
		the: "best"
	});
} );
```

| Option | Type | Default | Description |
|---------------------|---------|-------|---------------------------------------------------|
| durationOnLoad | int | 0 | Easing duration onLoad (important for page refresh) |
| durationOnResize | int | 250 | Easing duration on window resize |
| durationOnScroll | int | 500 | Easing duration on scroll |

## HTML Attributes

Customize single HTML objects

| Option | Type | Default | Description |
|---------------------|---------|-------|---------------------------------------------------|
| data-scrollflow-start | int | 25 | Define the scroll amount (in % of screen height) once the object is visible to start the animation |
| data-scrollflow-distance | int| 50 | Define the scroll amount (in % of screen height) once the object is visible to end the animation |

## Author & Help

For more information visit the author's page:

+ <http://www.cwdesigns.de> esKju's Playground
+ <http://www.cwdesigns.de/eskju-jquery-scrollflow.html> esKju's ScrollFlow Project Page


text:
#ifndef __GST_SF_SINK_H__
#define __GST_SF_SINK_H__

#include "gstsf.h"
#include <gst/base/gstbasesink.h>

G_BEGIN_DECLS

#define GST_TYPE_SF_SINK \
  (gst_sf_sink_get_type())
#define GST_SF_SINK(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SF_SINK,GstSFSink))
#define GST_SF_SINK_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SF_SINK,GstSFSinkClass))
#define GST_IS_SF_SINK(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SF_SINK))
#define GST_IS_SF_SINK_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SF_SINK))

typedef struct _GstSFSink GstSFSink;
typedef struct _GstSFSinkClass GstSFSinkClass;

typedef sf_count_t (*GstSFWriter)(SNDFILE *f, void *data, sf_count_t nframes);

struct _GstSFSink {
  GstBaseSink parent;

  gchar *location;
  SNDFILE *file;
  GstSFWriter writer;
  gint bytes_per_frame;

  gint channels;
  gint rate;

  gint format_major;
  gint format_subtype;
  gint format;
  gint buffer_frames;
};

struct _GstSFSinkClass {
  GstBaseSinkClass parent_class;
};

G_END_DECLS

#endif /* __GST_SF_SINK_H__ */


text:
{{{
  "title": "Cloud Optimization AWS Configuration - Manual",
  "date": "06-01-2017",
  "author": "Chris Meyer",
  "attachments": [],
  "contentIsHTML": false
}}}

### Overview
This process details the steps needed to manually configure your AWS account for Cloud Application Manager Analytics functionality.

If you prefer the set-up of your environment to be automated, you can find that procedure [here](CloudApplicationManagerAnalyticsAWSSetup.md).

#### Login to your AWS Account
1. Login to the target AWS account [here](https://console.aws.amazon.com/iam).
2. Access the IAM dashboard.

#### Create CenturyLink Cloud Optimization IAM Policy
1. Navigate to IAM "Policy."
2. Click "Create Policy."
3. Select "Create Your Own Policy."
4. Name the Policy as follows: CTLCloudOptimizationPolicy.
5. Add the following Description: Access Policy for CTL's Cloud Optimization Functionality.
6. Paste the CenturyLink Cloud Optimization IAM policy documented [below](#centuryLink-cloud-optimization-iam-policy).
7. Click "Validate Policy."
8. Click "Create Policy."

#### Create CenturyLink Cloud Optimization IAM Role
1. Navigate to IAM "Roles."
2. Click "Create New Role."
3. Click "Role for Cross-account access."
4. Select "Provide access between your AWS account and 3rd party AWS account."
5. Add Account ID as follows: 540339316802.
6. Add External ID as follows: [as provided by Cloud Optimization].
7. Do NOT check "require MFA."
8. Click "Next Steps."
9. Select "CTLCloudOptimizationPolicy."
10. Click "Next Step."
11. Name the Role as "CTLCloudOptimization."
12. Add the following Description: "CTL's Cloud Optimization Functionality."
13. Click "Create Role."

#### Retrieve ARN role
1. Select the CenturyLink Cloud Optimization AMI Role.
2. Record listed ARN.
3. Paste ARN into the Cloud Optimization Portal or send it to your on-boarding representative.

##### CenturyLink Cloud Optimization IAM Policy
```

{
  "Version": "2012-10-17",
  "Statement": [
  {
  "Sid": "FullPolicy",
    "Action": [
      "acm:DescribeCertificate",
      "acm:ListCertificates",
      "acm:GetCertificate",
      "autoscaling:Describe*",
      "cloudformation:DescribeStacks",
      "cloudformation:GetStackPolicy",
      "cloudformation:GetTemplate",
      "cloudformation:ListStackResources",
      "cloudfront:List*",
      "cloudfront:GetDistributionConfig",
      "cloudfront:GetStreamingDistributionConfig",
      "cloudhsm:Describe*",
      "cloudhsm:List*",
      "cloudsearch:Describe*",
      "cloudtrail:DescribeTrails",
      "cloudtrail:GetTrailStatus",
      "cloudwatch:DescribeAlarms",
      "cloudwatch:GetMetricStatistics",
      "cloudwatch:ListMetrics",
      "config:DescribeConfigRules",
      "config:GetComplianceDetailsByConfigRule",
      "config:Describe*",
      "datapipeline:ListPipelines",
      "datapipeline:GetPipelineDefinition",
      "datapipeline:DescribePipelines",
      "directconnect:DescribeLocations",
      "directconnect:DescribeConnections",
      "directconnect:DescribeVirtualInterfaces",
      "dynamodb:ListTables",
      "dynamodb:DescribeTable",
      "ec2:Describe*",
      "ec2:GetConsoleOutput",
      "ecs:ListClusters",
      "ecs:DescribeClusters",
      "ecs:ListContainerInstances",
      "ecs:DescribeContainerInstances",
      "ecs:ListServices",
      "ecs:DescribeServices",
      "ecs:ListTaskDefinitions",
      "ecs:DescribeTaskDefinition",
      "ecs:ListTasks",
      "ecs:DescribeTasks",
      "elasticache:Describe*",
      "elasticbeanstalk:Describe*",
      "elasticfilesystem:Describe*",
      "elasticloadbalancing:Describe*",
      "elasticmapreduce:Describe*",
      "elasticmapreduce:ListSteps",
      "elasticmapreduce:ListInstanceGroups",
      "elasticmapreduce:ListBootstrapActions",
      "elasticmapreduce:ListClusters",
      "elasticmapreduce:ListInstances",
      "es:ListDomainNames",
      "es:DescribeElasticsearchDomains",
      "glacier:List*",
      "glacier:DescribeVault",
      "glacier:GetVaultNotifications",
      "glacier:DescribeJob",
      "glacier:GetJobOutput",
      "iam:Get*",
      "iam:List*",
      "iot:DescribeThing",
      "iot:ListThings",
      "iam:GenerateCredentialReport",
      "kinesis:ListStreams",
      "kinesis:DescribeStream",
      "kinesis:GetShardIterator",
      "kinesis:GetRecords",
      "kms:Describe*",
      "kms:Get*",
      "kms:List*",
      "lambda:ListFunctions",
      "rds:Describe*",
      "rds:ListTagsForResource",
      "redshift:Describe*",
      "redshift:ViewQueriesInConsole",
      "route53:ListHealthChecks",
      "route53:ListHostedZones",
      "route53:ListResourceRecordSets",
      "s3:GetBucketACL",
      "s3:GetBucketLocation",
      "s3:GetBucketLogging",
      "s3:GetBucketPolicy",
      "s3:GetBucketTagging",
      "s3:GetBucketWebsite",
      "s3:GetBucketNotification",
      "s3:GetLifecycleConfiguration",
      "s3:GetNotificationConfiguration",
      "s3:GetObject",
      "s3:GetObjectMetadata",
      "s3:List*",
      "ses:ListIdentities",
      "ses:GetSendStatistics",
      "ses:GetIdentityDkimAttributes",
      "ses:GetIdentityVerificationAttributes",
      "ses:GetSendQuota",
      "sdb:ListDomains",
      "sdb:DomainMetadata",
      "support:*",
      "swf:ListClosedWorkflowExecutions",
      "swf:ListDomains",
      "swf:ListActivityTypes",
      "swf:ListWorkflowTypes",
      "sns:GetSnsTopic",
      "sns:GetTopicAttributes",
      "sns:GetSubscriptionAttributes",
      "sns:ListTopics",
      "sns:ListSubscriptionsByTopic",
      "sqs:ListQueues",
      "sqs:GetQueueAttributes",
      "storagegateway:Describe*",
      "storagegateway:List*",
      "workspaces:DescribeWorkspaceDirectories",
      "workspaces:DescribeWorkspaceBundles",
      "workspaces:DescribeWorkspaces"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Sid": "CloudWatchLogsSpecific",
      "Effect": "Allow",
      "Action": [
        "logs:GetLogEvents",
        "logs:DescribeLogGroups",
        "logs:DescribeLogStreams"
      ],
      "Resource": [
        "arn:aws:logs:*:*:*"
      ]
    }
  ]
}

```


text:
function vlc(path) {
	myPost("index.php", {m: "vlc", f: "start", path: path}, function (data) {
		if(!data) {
//			errorAlert("Ouverture de VLC impossible. Vérifiez vos paramètres de chemins.");
		}
	}, "json");
}


text:
import React, { Component } from 'react'
import { Dropdown } from 'semantic-ui-react'

const options = [
  { text: 'English', value: 'English' },
  { text: 'French', value: 'French' },
  { text: 'Spanish', value: 'Spanish' },
  { text: 'German', value: 'German' },
  { text: 'Chinese', value: 'Chinese' },
]

class DropdownExampleAllowAdditions extends Component {
  state = { options }

  handleAddition = (e, { value }) => {
    this.setState({
      options: [{ text: value, value }, ...this.state.options],
    })
  }

  handleChange = (e, { value }) => this.setState({ currentValues: value })

  render() {
    const { currentValues } = this.state

    return (
      <Dropdown
        options={this.state.options}
        placeholder='Choose Languages'
        search
        selection
        fluid
        multiple
        allowAdditions
        value={currentValues}
        onAddItem={this.handleAddition}
        onChange={this.handleChange}
      />
    )
  }
}

export default DropdownExampleAllowAdditions


text:
require 'omf-sfa/model/abstract_prop_description'

# An +ModelDataPropertyDescription+ holds all the relevant information
# for describing properties of entities.
#

module OMF::SFA
  module Model

    class ModelDataPropertyDescription < AbstractPropertyDescription

      # <owl:DatatypeProperty rdf:about="#numHop">
      #   <rdfs:domain rdf:resource="#NetworkTransportElement"/>
      #   <rdfs:range rdf:resource="&xsd;int"/>
      # </owl:DatatypeProperty>
      #
      def parse_el(node_name, res_name, el)
        case node_name
        when 'XXX'
        else
          super
        end
      end

    end # ModelClassDescription
  end # Model
end # OMF::SFA


text:
<?php
namespace Kemer\UPnP\DeviceDescription;

class IconList extends \ArrayObject
{
    protected $services = [];

    public function __construct(array $icon = [])
    {
        foreach ($icon as $icon) {
            $this->add($icon);
        }
    }

    public function add(IconInterface $service)
    {
        $this->services[] = $service;
    }

    public function get($type)
    {
        return array_filter($this->services, function($service) use ($type) {
            $service->getServiceType() == $type;
        });
    }
}

?>


text:
.class Landroid/accounts/AbstractAccountAuthenticator$Transport;
.super Landroid/accounts/IAccountAuthenticator$Stub;
.source "AbstractAccountAuthenticator.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/accounts/AbstractAccountAuthenticator;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "Transport"
.end annotation

# instance fields
.field final synthetic this$0:Landroid/accounts/AbstractAccountAuthenticator;

# direct methods
.method private constructor <init>(Landroid/accounts/AbstractAccountAuthenticator;)V
    .locals 0
    .parameter

    .prologue
    .line 117
    iput-object p1, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    invoke-direct {p0}, Landroid/accounts/IAccountAuthenticator$Stub;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/AbstractAccountAuthenticator$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 117
    invoke-direct {p0, p1}, Landroid/accounts/AbstractAccountAuthenticator$Transport;-><init>(Landroid/accounts/AbstractAccountAuthenticator;)V

    return-void
.end method

# virtual methods
.method public addAccount(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)V
    .locals 8
    .parameter "response"
    .parameter "accountType"
    .parameter "authTokenType"
    .parameter "features"
    .parameter "options"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v1, 0x2

    .line 121
    const-string v0, "AccountAuthenticator"

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

    move-result v0

    if-eqz v0, :cond_0

    .line 122
    const-string v1, "AccountAuthenticator"

    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v2, "addAccount: accountType "

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

    move-result-object v0

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

    move-result-object v0

    const-string v2, ", authTokenType "

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

    move-result-object v0

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

    move-result-object v0

    const-string v2, ", features "

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

    move-result-object v2

    if-nez p4, :cond_3

    const-string v0, "[]"

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

    move-result-object v0

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

    move-result-object v0

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

    .line 126
    :cond_0
    iget-object v0, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 128
    :try_start_0
    iget-object v0, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v1, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v1, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    move-object v2, p2

    move-object v3, p3

    move-object v4, p4

    move-object v5, p5

    invoke-virtual/range {v0 .. v5}, Landroid/accounts/AbstractAccountAuthenticator;->addAccount(Landroid/accounts/AccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v7

    .line 131
    .local v7, result:Landroid/os/Bundle;
    const-string v0, "AccountAuthenticator"

    const/4 v1, 0x2

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

    move-result v0

    if-eqz v0, :cond_1

    .line 132
    invoke-virtual {v7}, Landroid/os/Bundle;->keySet()Ljava/util/Set;

    .line 133
    const-string v0, "AccountAuthenticator"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "addAccount: result "

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

    move-result-object v1

    invoke-static {v7}, Landroid/accounts/AccountManager;->sanitizeResult(Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v2

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

    move-result-object v1

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

    move-result-object v1

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

    .line 135
    :cond_1
    if-eqz v7, :cond_2

    .line 136
    invoke-interface {p1, v7}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 141
    .end local v7           #result:Landroid/os/Bundle;
    :cond_2
    :goto_1
    return-void

    .line 122
    :cond_3
    invoke-static {p4}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 138
    :catch_0
    move-exception v6

    .line 139
    .local v6, e:Ljava/lang/Exception;
    iget-object v0, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v1, "addAccount"

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v0, p1, v1, p2, v6}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method

.method public addAccountFromCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)V
    .locals 5
    .parameter "response"
    .parameter "account"
    .parameter "accountCredentials"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 297
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 299
    :try_start_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v3, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v3, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    invoke-virtual {v2, v3, p2, p3}, Landroid/accounts/AbstractAccountAuthenticator;->addAccountFromCredentials(Landroid/accounts/AccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v1

    .line 303
    .local v1, result:Landroid/os/Bundle;
    if-eqz v1, :cond_0

    .line 304
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 309
    .end local v1           #result:Landroid/os/Bundle;
    :cond_0
    :goto_0
    return-void

    .line 306
    :catch_0
    move-exception v0

    .line 307
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v3, "addAccountFromCredentials"

    invoke-virtual {p2}, Landroid/accounts/Account;->toString()Ljava/lang/String;

    move-result-object v4

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, v4, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public confirmCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)V
    .locals 5
    .parameter "response"
    .parameter "account"
    .parameter "options"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v3, 0x2

    .line 145
    const-string v2, "AccountAuthenticator"

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

    move-result v2

    if-eqz v2, :cond_0

    .line 146
    const-string v2, "AccountAuthenticator"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "confirmCredentials: "

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

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

    .line 148
    :cond_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 150
    :try_start_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v3, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v3, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    invoke-virtual {v2, v3, p2, p3}, Landroid/accounts/AbstractAccountAuthenticator;->confirmCredentials(Landroid/accounts/AccountAuthenticatorResponse;Landroid/accounts/Account;Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v1

    .line 152
    .local v1, result:Landroid/os/Bundle;
    const-string v2, "AccountAuthenticator"

    const/4 v3, 0x2

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

    move-result v2

    if-eqz v2, :cond_1

    .line 153
    invoke-virtual {v1}, Landroid/os/Bundle;->keySet()Ljava/util/Set;

    .line 154
    const-string v2, "AccountAuthenticator"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "confirmCredentials: result "

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

    move-result-object v3

    invoke-static {v1}, Landroid/accounts/AccountManager;->sanitizeResult(Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v4

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

    move-result-object v3

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

    move-result-object v3

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

    .line 157
    :cond_1
    if-eqz v1, :cond_2

    .line 158
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 163
    .end local v1           #result:Landroid/os/Bundle;
    :cond_2
    :goto_0
    return-void

    .line 160
    :catch_0
    move-exception v0

    .line 161
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v3, "confirmCredentials"

    invoke-virtual {p2}, Landroid/accounts/Account;->toString()Ljava/lang/String;

    move-result-object v4

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, v4, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public editProperties(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;)V
    .locals 4
    .parameter "response"
    .parameter "accountType"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 239
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 241
    :try_start_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v3, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v3, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    invoke-virtual {v2, v3, p2}, Landroid/accounts/AbstractAccountAuthenticator;->editProperties(Landroid/accounts/AccountAuthenticatorResponse;Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v1

    .line 243
    .local v1, result:Landroid/os/Bundle;
    if-eqz v1, :cond_0

    .line 244
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 249
    .end local v1           #result:Landroid/os/Bundle;
    :cond_0
    :goto_0
    return-void

    .line 246
    :catch_0
    move-exception v0

    .line 247
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v3, "editProperties"

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, p2, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public getAccountCredentialsForCloning(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;)V
    .locals 5
    .parameter "response"
    .parameter "account"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 281
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 283
    :try_start_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v3, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v3, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    invoke-virtual {v2, v3, p2}, Landroid/accounts/AbstractAccountAuthenticator;->getAccountCredentialsForCloning(Landroid/accounts/AccountAuthenticatorResponse;Landroid/accounts/Account;)Landroid/os/Bundle;

    move-result-object v1

    .line 286
    .local v1, result:Landroid/os/Bundle;
    if-eqz v1, :cond_0

    .line 287
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 292
    .end local v1           #result:Landroid/os/Bundle;
    :cond_0
    :goto_0
    return-void

    .line 289
    :catch_0
    move-exception v0

    .line 290
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v3, "getAccountCredentialsForCloning"

    invoke-virtual {p2}, Landroid/accounts/Account;->toString()Ljava/lang/String;

    move-result-object v4

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, v4, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public getAccountRemovalAllowed(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;)V
    .locals 5
    .parameter "response"
    .parameter "account"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 267
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 269
    :try_start_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v3, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v3, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    invoke-virtual {v2, v3, p2}, Landroid/accounts/AbstractAccountAuthenticator;->getAccountRemovalAllowed(Landroid/accounts/AccountAuthenticatorResponse;Landroid/accounts/Account;)Landroid/os/Bundle;

    move-result-object v1

    .line 271
    .local v1, result:Landroid/os/Bundle;
    if-eqz v1, :cond_0

    .line 272
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 277
    .end local v1           #result:Landroid/os/Bundle;
    :cond_0
    :goto_0
    return-void

    .line 274
    :catch_0
    move-exception v0

    .line 275
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v3, "getAccountRemovalAllowed"

    invoke-virtual {p2}, Landroid/accounts/Account;->toString()Ljava/lang/String;

    move-result-object v4

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, v4, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public getAuthToken(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)V
    .locals 6
    .parameter "response"
    .parameter "account"
    .parameter "authTokenType"
    .parameter "loginOptions"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v3, 0x2

    .line 190
    const-string v2, "AccountAuthenticator"

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

    move-result v2

    if-eqz v2, :cond_0

    .line 191
    const-string v2, "AccountAuthenticator"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "getAuthToken: "

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

    move-result-object v3

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

    move-result-object v3

    const-string v4, ", authTokenType "

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

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

    .line 194
    :cond_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 196
    :try_start_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v3, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v3, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    invoke-virtual {v2, v3, p2, p3, p4}, Landroid/accounts/AbstractAccountAuthenticator;->getAuthToken(Landroid/accounts/AccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v1

    .line 199
    .local v1, result:Landroid/os/Bundle;
    const-string v2, "AccountAuthenticator"

    const/4 v3, 0x2

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

    move-result v2

    if-eqz v2, :cond_1

    .line 200
    invoke-virtual {v1}, Landroid/os/Bundle;->keySet()Ljava/util/Set;

    .line 201
    const-string v2, "AccountAuthenticator"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "getAuthToken: result "

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

    move-result-object v3

    invoke-static {v1}, Landroid/accounts/AccountManager;->sanitizeResult(Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v4

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

    move-result-object v3

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

    move-result-object v3

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

    .line 203
    :cond_1
    if-eqz v1, :cond_2

    .line 204
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 210
    .end local v1           #result:Landroid/os/Bundle;
    :cond_2
    :goto_0
    return-void

    .line 206
    :catch_0
    move-exception v0

    .line 207
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v3, "getAuthToken"

    new-instance v4, Ljava/lang/StringBuilder;

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

    invoke-virtual {p2}, Landroid/accounts/Account;->toString()Ljava/lang/String;

    move-result-object v5

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

    move-result-object v4

    const-string v5, ","

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

    move-result-object v4

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

    move-result-object v4

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

    move-result-object v4

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, v4, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public getAuthTokenLabel(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;)V
    .locals 5
    .parameter "response"
    .parameter "authTokenType"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v3, 0x2

    .line 168
    const-string v2, "AccountAuthenticator"

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

    move-result v2

    if-eqz v2, :cond_0

    .line 169
    const-string v2, "AccountAuthenticator"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "getAuthTokenLabel: authTokenType "

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

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

    .line 171
    :cond_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 173
    :try_start_0
    new-instance v1, Landroid/os/Bundle;

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

    .line 174
    .local v1, result:Landroid/os/Bundle;
    const-string v2, "authTokenLabelKey"

    iget-object v3, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    invoke-virtual {v3, p2}, Landroid/accounts/AbstractAccountAuthenticator;->getAuthTokenLabel(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 176
    const-string v2, "AccountAuthenticator"

    const/4 v3, 0x2

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

    move-result v2

    if-eqz v2, :cond_1

    .line 177
    invoke-virtual {v1}, Landroid/os/Bundle;->keySet()Ljava/util/Set;

    .line 178
    const-string v2, "AccountAuthenticator"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "getAuthTokenLabel: result "

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

    move-result-object v3

    invoke-static {v1}, Landroid/accounts/AccountManager;->sanitizeResult(Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v4

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

    move-result-object v3

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

    move-result-object v3

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

    .line 181
    :cond_1
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 185
    .end local v1           #result:Landroid/os/Bundle;
    :goto_0
    return-void

    .line 182
    :catch_0
    move-exception v0

    .line 183
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v3, "getAuthTokenLabel"

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, p2, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public hasFeatures(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;[Ljava/lang/String;)V
    .locals 5
    .parameter "response"
    .parameter "account"
    .parameter "features"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 253
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 255
    :try_start_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v3, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v3, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    invoke-virtual {v2, v3, p2, p3}, Landroid/accounts/AbstractAccountAuthenticator;->hasFeatures(Landroid/accounts/AccountAuthenticatorResponse;Landroid/accounts/Account;[Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v1

    .line 257
    .local v1, result:Landroid/os/Bundle;
    if-eqz v1, :cond_0

    .line 258
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 263
    .end local v1           #result:Landroid/os/Bundle;
    :cond_0
    :goto_0
    return-void

    .line 260
    :catch_0
    move-exception v0

    .line 261
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string v3, "hasFeatures"

    invoke-virtual {p2}, Landroid/accounts/Account;->toString()Ljava/lang/String;

    move-result-object v4

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, v4, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method public updateCredentials(Landroid/accounts/IAccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)V
    .locals 6
    .parameter "response"
    .parameter "account"
    .parameter "authTokenType"
    .parameter "loginOptions"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v3, 0x2

    .line 214
    const-string v2, "AccountAuthenticator"

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

    move-result v2

    if-eqz v2, :cond_0

    .line 215
    const-string v2, "AccountAuthenticator"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string/jumbo v4, "updateCredentials: "

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

    move-result-object v3

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

    move-result-object v3

    const-string v4, ", authTokenType "

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

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

    .line 218
    :cond_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->checkBinderPermission()V
    invoke-static {v2}, Landroid/accounts/AbstractAccountAuthenticator;->access$000(Landroid/accounts/AbstractAccountAuthenticator;)V

    .line 220
    :try_start_0
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    new-instance v3, Landroid/accounts/AccountAuthenticatorResponse;

    invoke-direct {v3, p1}, Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V

    invoke-virtual {v2, v3, p2, p3, p4}, Landroid/accounts/AbstractAccountAuthenticator;->updateCredentials(Landroid/accounts/AccountAuthenticatorResponse;Landroid/accounts/Account;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v1

    .line 223
    .local v1, result:Landroid/os/Bundle;
    const-string v2, "AccountAuthenticator"

    const/4 v3, 0x2

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

    move-result v2

    if-eqz v2, :cond_1

    .line 224
    invoke-virtual {v1}, Landroid/os/Bundle;->keySet()Ljava/util/Set;

    .line 225
    const-string v2, "AccountAuthenticator"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string/jumbo v4, "updateCredentials: result "

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

    move-result-object v3

    invoke-static {v1}, Landroid/accounts/AccountManager;->sanitizeResult(Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v4

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

    move-result-object v3

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

    move-result-object v3

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

    .line 228
    :cond_1
    if-eqz v1, :cond_2

    .line 229
    invoke-interface {p1, v1}, Landroid/accounts/IAccountAuthenticatorResponse;->onResult(Landroid/os/Bundle;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 235
    .end local v1           #result:Landroid/os/Bundle;
    :cond_2
    :goto_0
    return-void

    .line 231
    :catch_0
    move-exception v0

    .line 232
    .local v0, e:Ljava/lang/Exception;
    iget-object v2, p0, Landroid/accounts/AbstractAccountAuthenticator$Transport;->this$0:Landroid/accounts/AbstractAccountAuthenticator;

    const-string/jumbo v3, "updateCredentials"

    new-instance v4, Ljava/lang/StringBuilder;

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

    invoke-virtual {p2}, Landroid/accounts/Account;->toString()Ljava/lang/String;

    move-result-object v5

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

    move-result-object v4

    const-string v5, ","

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

    move-result-object v4

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

    move-result-object v4

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

    move-result-object v4

    #calls: Landroid/accounts/AbstractAccountAuthenticator;->handleException(Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    invoke-static {v2, p1, v3, v4, v0}, Landroid/accounts/AbstractAccountAuthenticator;->access$100(Landroid/accounts/AbstractAccountAuthenticator;Landroid/accounts/IAccountAuthenticatorResponse;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method


text:
layout:     post
title:      "When I met River Terns..!!"
subtitle:   "When I met River Terns..!!"
author:     "Kiran Kashyap"
tags:       ["Birding Destinations", "Bangalore Wildlife"]
seo:		["Birding Destinations", "Bangalore"]
comments:   true
header-img: "img/2016-02-17/River_Terns--orange_beaks_everywhere.JPG"
---

I had got adopted to the routine life; work, house and pollution. Me and my wife badly needed a good solid outing to freshen up our souls. So we headed towards Chikamagalur where my uncle stays. My intention was to visit only River Tern lodge maintained by Jungle lodges and resorts. But we had to change the plan as slots were not available. Nevertheless, we first went to Sirimane Falls near Sringeri. I knew about this place as it is one of the popular tourist spot specially during monsoon season, but never had been there. It is about 90kms from Chikamagalur and is worth a visit.

The first birding experience started here, a loud crackling voice came from top of a tree. I ran towards the tree and learnt that it was Hill Myna. It was my first experience with Hill Mynas, they have a shrill voice but an attractive one.

Hill Myna

One of the myna's had found food and others wanted a share. I believe the one which caught the lizard did not agree to it, hence there were few verbal fights. It was an amazing sighting.

We left from that location to visit the Sharadamba Temple @ Sringeri. Such a divine place.!

Hill Myna with a kill.

The second day was reserved for River Tern Lodge in Lakkavalli --70kms from Chikamagalur. I had been to Lakkavalli previously also, it's a nice place. Due to Bhadra River Project, there is no scarcity for water and electricity. Nearby places like Bhadravathi, Shimoga and other small towns are dependent on BRP water reservoir.
This reservoir is widely known for River Terns. An intelligent and interesting species of birds which reside mainly near water bodies.

River Terns--orange beaks everywhere.!

We opted for boating just because of River Terns and Ospreys. While we were travelling towards the island where the birds had made their habitat, naturalist started explaining about River tern's nature.

Watching someone..?

It's summer, the water level would go down which shows up a delta. This delta appears to be a good habitat for the birds. These birds would start breeding during this time, and they would not lay eggs by building nests.! they lay eggs on the ground. Eggs would be hatched into new born babies in six-seven days.

Female River Terns: taking care of their eggs and young ones.

I was shocked to see plenty of River terns on that delta. They were fishing, feasting, feeding their young ones. The naturalist continued with the facts; female's would not leave the ground and their job is to take care of the eggs and the young birds. Male's would go fishing, pick fish and feed the babies.

Mobbed by River Terns.

Male birds would scout the entire reservoir to get food. While carrying the food (fish) from a far distance it gets dried. A dried fish cannot be fed to the babies hence, the birds softens the food by dipping into the water before feeding. Such a brilliant gesture.!

Time to Hunt.

An attempt to catch a fish.!

I also noticed how sweet was the courtship between the male and female birds. Orange beaks everywhere made an awesome scene.

I caught one.!

They were fearless probably because we did not enter the delta and disturb them. We watched their actions from far which made them feel comfortable.

I gulped it.

We waited for sometime to check if Osprey would show up, but no luck. However, these little birds caught our attention all the while. Relishing their actions and with other fond memories we headed back to Bangalore, just to start our normal routine.


text:
describe("Localization", function() {
  it("value should be 'passed'", function() {
    var node = document.querySelector('[l10n-id="test"]');
    expect(node.getAttribute('value')).toEqual('passed');
  });
  it("title should be 'color should be green'", function() {
    var node = document.querySelector('[l10n-id="test"]');
    expect(node.getAttribute('title')).toEqual('color should be green');
  });
  it("style should be 'color:green'", function() {
    var node = document.querySelector('[l10n-id="test"]');
    expect(node.getAttribute('style')).toEqual('color:green');
  });
});


text:
package acceptance.task;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import acceptance.AbstractAccTest;
import java.time.Instant;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import pro.taskana.BaseQuery.SortDirection;
import pro.taskana.TaskService;
import pro.taskana.TaskSummary;
import pro.taskana.TimeInterval;
import pro.taskana.security.JaasExtension;
import pro.taskana.security.WithAccessId;

/** Acceptance test for all "query tasks with sorting" scenarios. */
@ExtendWith(JaasExtension.class)
class QueryTasksByTimeIntervalsAccTest extends AbstractAccTest {

  private static SortDirection asc = SortDirection.ASCENDING;

  QueryTasksByTimeIntervalsAccTest() {
    super();
  }

  @WithAccessId(
      userName = "teamlead_1",
      groupNames = {"group_1", "group_2"})
  @Test
  void testCreatedWithin2Intervals() {
    TaskService taskService = taskanaEngine.getTaskService();

    TimeInterval interval1 =
        new TimeInterval(getInstant("2018-01-29T15:55:10"), getInstant("2018-01-29T15:55:17"));
    TimeInterval interval2 =
        new TimeInterval(getInstant("2018-01-29T15:55:23"), getInstant("2018-01-29T15:55:25"));

    List<TaskSummary> results =
        taskService
            .createTaskQuery()
            .createdWithin(interval1, interval2)
            .orderByCreated(asc)
            .list();

    assertThat(results.size(), equalTo(40));
    TaskSummary previousSummary = null;
    for (TaskSummary taskSummary : results) {
      Instant cr = taskSummary.getCreated();
      assertTrue(interval1.contains(cr) || interval2.contains(cr));

      if (previousSummary != null) {
        assertFalse(previousSummary.getCreated().isAfter(taskSummary.getCreated()));
      }
      previousSummary = taskSummary;
    }
  }

  @WithAccessId(
      userName = "teamlead_1",
      groupNames = {"group_1", "group_2"})
  @Test
  void testCreatedBefore() {
    TaskService taskService = taskanaEngine.getTaskService();

    TimeInterval interval1 = new TimeInterval(null, getInstant("2018-01-29T15:55:17"));

    List<TaskSummary> results =
        taskService.createTaskQuery().createdWithin(interval1).orderByCreated(asc).list();

    assertThat(results.size(), equalTo(37));
    TaskSummary previousSummary = null;
    for (TaskSummary taskSummary : results) {
      Instant cr = taskSummary.getCreated();
      assertTrue(interval1.contains(cr));

      if (previousSummary != null) {
        assertFalse(previousSummary.getCreated().isAfter(taskSummary.getCreated()));
      }
      previousSummary = taskSummary;
    }
  }

  @WithAccessId(
      userName = "teamlead_1",
      groupNames = {"group_1", "group_2"})
  @Test
  void testCreatedAfter() {
    TaskService taskService = taskanaEngine.getTaskService();

    TimeInterval interval1 = new TimeInterval(getInstant("2018-01-29T15:55:17"), null);

    List<TaskSummary> results =
        taskService.createTaskQuery().createdWithin(interval1).orderByCreated(asc).list();

    assertThat(results.size(), equalTo(38));
    TaskSummary previousSummary = null;
    for (TaskSummary taskSummary : results) {
      Instant cr = taskSummary.getCreated();
      assertTrue(interval1.contains(cr));

      if (previousSummary != null) {
        assertFalse(previousSummary.getCreated().isAfter(taskSummary.getCreated()));
      }
      previousSummary = taskSummary;
    }
  }

  @WithAccessId(
      userName = "teamlead_1",
      groupNames = {"group_1", "group_2"})
  @Test
  void testClaimedWithin2Intervals() {
    TaskService taskService = taskanaEngine.getTaskService();

    TimeInterval interval1 =
        new TimeInterval(getInstant("2018-01-30T15:55:00"), getInstant("2018-01-30T15:55:10"));
    TimeInterval interval2 =
        new TimeInterval(getInstant("2018-01-30T15:55:23"), getInstant("2018-01-30T15:55:25"));

    List<TaskSummary> results =
        taskService
            .createTaskQuery()
            .claimedWithin(interval1, interval2)
            .orderByCreated(asc)
            .list();

    assertThat(results.size(), equalTo(25));
    TaskSummary previousSummary = null;
    for (TaskSummary taskSummary : results) {
      Instant cr = taskSummary.getClaimed();
      assertTrue(interval1.contains(cr) || interval2.contains(cr));

      if (previousSummary != null) {
        assertFalse(previousSummary.getClaimed().isAfter(taskSummary.getClaimed()));
      }
      previousSummary = taskSummary;
    }
  }

  @WithAccessId(
      userName = "teamlead_1",
      groupNames = {"group_1", "group_2"})
  @Test
  void testCompletedWithin() {
    TaskService taskService = taskanaEngine.getTaskService();

    TimeInterval interval =
        new TimeInterval(getInstant("2018-01-30T16:55:23"), getInstant("2018-01-30T16:55:25"));
    List<TaskSummary> results =
        taskService.createTaskQuery().completedWithin(interval).orderByCompleted(asc).list();

    assertThat(results.size(), equalTo(5));
    TaskSummary previousSummary = null;
    for (TaskSummary taskSummary : results) {
      Instant cr = taskSummary.getCompleted();
      assertTrue(interval.contains(cr));

      if (previousSummary != null) {
        assertFalse(previousSummary.getCompleted().isAfter(taskSummary.getCompleted()));
      }
      previousSummary = taskSummary;
    }
  }

  @WithAccessId(
      userName = "teamlead_1",
      groupNames = {"group_1", "group_2"})
  @Test
  void testModifiedWithin() {
    TaskService taskService = taskanaEngine.getTaskService();

    TimeInterval interval =
        new TimeInterval(getInstant("2018-01-30T15:55:00"), getInstant("2018-01-30T15:55:22"));
    List<TaskSummary> results =
        taskService.createTaskQuery().modifiedWithin(interval).orderByModified(asc).list();

    assertThat(results.size(), equalTo(6));
    TaskSummary previousSummary = null;
    for (TaskSummary taskSummary : results) {
      Instant cr = taskSummary.getModified();
      assertTrue(interval.contains(cr));

      if (previousSummary != null) {
        assertFalse(previousSummary.getModified().isAfter(taskSummary.getModified()));
      }
      previousSummary = taskSummary;
    }
  }

  @WithAccessId(
      userName = "teamlead_1",
      groupNames = {"group_1", "group_2"})
  @Test
  void testPlannedWithin() {
    TaskService taskService = taskanaEngine.getTaskService();

    TimeInterval interval =
        new TimeInterval(getInstant("2018-01-29T15:55:00"), getInstant("2018-01-30T15:55:22"));
    List<TaskSummary> results =
        taskService.createTaskQuery().plannedWithin(interval).orderByPlanned(asc).list();

    assertThat(results.size(), equalTo(71));
    TaskSummary previousSummary = null;
    for (TaskSummary taskSummary : results) {
      Instant cr = taskSummary.getPlanned();
      assertTrue(interval.contains(cr));

      if (previousSummary != null) {
        assertFalse(previousSummary.getPlanned().isAfter(taskSummary.getPlanned()));
      }
      previousSummary = taskSummary;
    }
  }

  @WithAccessId(
      userName = "teamlead_1",
      groupNames = {"group_1", "group_2"})
  @Test
  void testDueWithin() {
    TaskService taskService = taskanaEngine.getTaskService();

    TimeInterval interval =
        new TimeInterval(getInstant("2018-01-29T15:55:00"), getInstant("2018-01-30T15:55:22"));
    List<TaskSummary> results =
        taskService.createTaskQuery().dueWithin(interval).orderByPlanned(asc).list();

    assertThat(results.size(), equalTo(71));
    TaskSummary previousSummary = null;
    for (TaskSummary taskSummary : results) {
      Instant cr = taskSummary.getDue();
      assertTrue(interval.contains(cr));

      if (previousSummary != null) {
        assertFalse(previousSummary.getPlanned().isAfter(taskSummary.getPlanned()));
      }
      previousSummary = taskSummary;
    }
  }
}


text:
namespace Shambhoora.RulesDescriptor
{
    /// <summary>
    /// Implement this interface if you need the ability to describe rules
    /// </summary>
    public interface IRule<in T>
    {
        bool IsSatisfiedBy(T candidate);
    }
}


text:
package structures.data.actions.logic;

import structures.data.DataAction;
import structures.data.actions.params.CheckboxParam;
import structures.data.actions.params.SpriteParam;

public class IfSprite extends DataAction {

	public IfSprite() {
		init(new SpriteParam("Sprite"), new CheckboxParam("NOT"));
	}

	@Override
	public String getTitle() {
		return "If Current Sprite";
	}

	@Override
	public String getDescription() {
		String not = (boolean)get("NOT").getValue() ? " NOT" : "";
		return String.format("If current sprite is%s '%s'", not, get("Sprite").getValue());
	}

	@Override
	protected String getSyntax() {
		return "engine.with();\n if (current().get_sprite_name().equals('%s') != %b) ";
	}

}


text:
layout: post
title: Grading on a Curve
description: "Everyone's happy to hear that a test will be curved, but what does that even mean?"
category: blog
tags: [math, teaching, grading]
image:
  feature: texture-feature-grating.jpg
---

When you curve a test, how do the scores actually change? You might decide that the top scorer (with 89/100, say) should get 100%, but do you add 11 points to everyone's score, or change the denominator to be 89? Maybe you want to drop a particularly hard question, but doesn't that hurt people who got it right?

I was all geared up to explore these questions, but as it happens someone [beat me to it](http://divisbyzero.com/2008/12/22/how-to-curve-an-exam-and-assign-grades/)!

Rather than reiterate what that article already says very nicely, I made a little toy example. Using made up data, see what happens to the score distribution when you apply different curves.

Grading on a Curve


text:
package org.magicdgs.thaplv.haplotypes.model;

import org.magicdgs.thaplv.cmd.ThaplvArgumentDefinitions;

import com.google.common.annotations.VisibleForTesting;
import htsjdk.variant.variantcontext.Genotype;
import htsjdk.variant.variantcontext.VariantContext;
import org.apache.logging.log4j.Logger;
import org.broadinstitute.hellbender.exceptions.UserException;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * Singleton {@link VariantHaplotypeConverter} for check every {@link #samplingFrequency} variants
 * if the Genotypes are real haploids.
 *
 * @author Daniel Gomez-Sanchez (magicDGS)
 */
class CheckOnlyHaplotypeConverter implements VariantHaplotypeConverter {

    // sample 1 variant for every 100 encountered
    @VisibleForTesting
    static final int samplingFrequency = 100;

    @VisibleForTesting
    final AtomicInteger counter = new AtomicInteger(0);

    /** Use always the singleton for avoid constructing new objects */
    private final static CheckOnlyHaplotypeConverter SINGLETON = new CheckOnlyHaplotypeConverter();

    /** Get this variant haplotype converter. */
    public static CheckOnlyHaplotypeConverter getSingleton() {
        return SINGLETON;
    }

    /** Can't be instantiated. */
    private CheckOnlyHaplotypeConverter() {}

    @Override
    public void log(final Logger logger) {
        logger.info("Haploid genotypes are expected an no transformation will be done.");
        logger.info("Genotypes will be checked every {} variants for haploid state.",
                samplingFrequency);
        logger.warn(
                "No transformation is discouraged if the haplotypes were obtained with diploid callers or not converted before.");
        logger.warn(
                "Most of the tools assume haploid individuals (only the first allele in the Genotypes is considered) and results could be wrong if they are not.");
    }

    @Override
    public VariantContext apply(final VariantContext variant) {
        if (counter.getAndIncrement() % samplingFrequency == 0) {
            for (final Genotype g : variant.getGenotypes()) {
                if (g.getAlleles().stream().distinct().count() != 1) {
                    throw new UserException.BadArgumentValue(
                            ThaplvArgumentDefinitions.HAPLOTYPE_MODEL_LONG,
                            HaplotypeModel.CHECK_ONLY.toString(),
                            String.format(
                                    "found no haploid individual (%s %s) at %s:%s-%s. Please, convert to haplotypes before using this option.",
                                    g.getSampleName(), g.getGenotypeString(),
                                    variant.getContig(), variant.getStart(), variant.getEnd()));
                }
            }
        }
        return variant;
    }
}


text:
package foodtruck.appengine.dao.appengine;

import com.google.appengine.api.datastore.Entity;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;

/**
 * @author aviolette
 * @since 8/1/16
 */
public class FluidEntity {
  private Entity entity;

  FluidEntity(Entity entity) {
    this.entity = entity;
  }

  public Entity toEntity() {
    return entity;
  }

  public FluidEntity prop(String label, DateTime dateTime) {
    Attributes.setDateProperty(label, entity, dateTime);
    return this;
  }

  public FluidEntity prop(String label, Object value) {
    entity.setProperty(label, value);
    return this;
  }

  double doubleVal(String label) {
    return Attributes.getDoubleProperty(entity, label, 0);
  }

  String stringVal(String label) {
    return Attributes.getStringProperty(entity, label);
  }

  DateTime dateVal(String label) {
    return Attributes.getDateTime(entity, label, null);
  }

  DateTime dateVal(String label, DateTimeZone zone) {
    return Attributes.getDateTime(entity, label, zone);
  }

  boolean booleanVal(String propertyName) {
    if (!entity.hasProperty(propertyName)) {
      return false;
    }
    return (Boolean) entity.getProperty(propertyName);
  }

  long longId() {
    return entity.getKey().getId();
  }

  int intValue(String propertyName) {
    return Attributes.getIntProperty(entity, propertyName, 0);
  }
}


text:
package org.red5.server.api.stream;

/**
 * Extends stream to add methods for on demand access.
 *
 * @author The Red5 Project
 * @author Luke Hubbard (luke@codegent.com)
 */
public interface IOnDemandStream extends IStream {

	/**
	 * Start playback
	 */
	public void play();

	/**
	 * Start playback with a given maximum duration.
	 *
	 * @param length maximum duration in milliseconds
	 */
	public void play(int length);

	/**
	 * Seek to the keyframe nearest to position
	 *
	 * @param position position in milliseconds
	 */
	public void seek(int position);

	/**
	 * Pause the stream
	 */
	public void pause();

	/**
	 * Resume a paused stream
	 */
	public void resume();

	/**
	 * Stop the stream, this resets the position to the start
	 */
	public void stop();

	/**
	 * Is the stream paused
	 *
	 * @return true if the stream is paused
	 */
	public boolean isPaused();

	/**
	 * Is the stream stopped
	 *
	 * @return true if the stream is stopped
	 */
	public boolean isStopped();

	/**
	 * Is the stream playing
	 *
	 * @return true if the stream is playing
	 */
	public boolean isPlaying();

}


text:
    <?php dynamic_sidebar('sidebar-footer'); ?>
    <?php if ( of_get_option('theme_supporter_logo') ) : ?>

              <?php if ( of_get_option('theme_supporter_text') ) :
                echo of_get_option('theme_supporter_text');
              endif; ?>
	            <a target="_blank" href="<?php echo of_get_option('theme_supporter_link'); ?>" title="Link to supporter">
	            	<img src="<?php echo of_get_option('theme_supporter_logo'); ?>" alt="Support by" />

    <?php endif; ?>

        © <?php echo date('Y'); ?> <?php echo of_get_option('theme_copyright'); ?>
        <img src="<?php bloginfo('template_url')?>/assets/img/ZWN-logo-marker-60px.png" class="footer-marker hidden-xs hidden-sm" alt="Footer logo">

     <img src="<?php bloginfo('template_url')?>/assets/img/ZWN-logo-marker-60px.png" alt="Footer logo">

<?php wp_footer(); ?>


text:
package org.apache.skywalking.apm.collector.ui.graphql;

import com.coxautodev.graphql.tools.GraphQLQueryResolver;

/**
 * @author peng-yongsheng
 */
public interface Query extends GraphQLQueryResolver {
}


text:
宝藏类型管理

    创建分类

                 图标
                分类名
                注册时间
                 操作

                {{ treasureType.name }}
                {{ treasureType.createdAt }}

                    <button class="btn btn-warning btn-xs" ng-click="scope.disableCouponCategory(treasureType)" ng-show="treasureType.status === 'valid'">禁用此分类</button>
                    <button class="btn btn-warning btn-xs" ng-click="scope.enableCouponCategory(treasureType)" ng-show="treasureType.status === 'invalid'">启用此分类</button>


text:
import urllib

from fjord.base.urlresolvers import reverse

class Redirector(object):
    def load(self):
        """Implement this to perform any startup work"""
        pass

    def handle_redirect(self, request, redirect):
        """Implement this to handle redirects for a given request

        :returns: None or url to redirect to

        """
        raise NotImplementedError

def build_redirect_url(redirect):
    return reverse('redirect-view') + '?' + urllib.urlencode({'r': redirect})


text:
<?xml version="1.0" encoding="UTF-8"?>
<GeocodeResponse>
 <status>OK</status>
 <result>
  <type>locality</type>
  <type>political</type>
  <formatted_address>Crawley, West Sussex, UK</formatted_address>
  <address_component>
   <long_name>Crawley</long_name>
   <short_name>Crawley</short_name>
   <type>locality</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>Crawley</long_name>
   <short_name>Crawley</short_name>
   <type>administrative_area_level_3</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>West Sussex</long_name>
   <short_name>West Sussex</short_name>
   <type>administrative_area_level_2</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>England</long_name>
   <short_name>England</short_name>
   <type>administrative_area_level_1</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>United Kingdom</long_name>
   <short_name>GB</short_name>
   <type>country</type>
   <type>political</type>
  </address_component>
  <geometry>
   <location>
    <lat>51.1091401</lat>
    <lng>-0.1872275</lng>
   </location>
   <location_type>APPROXIMATE</location_type>
   <viewport>
    <southwest>
     <lat>51.0867581</lat>
     <lng>-0.2322959</lng>
    </southwest>
    <northeast>
     <lat>51.1527353</lat>
     <lng>-0.1337784</lng>
    </northeast>
   </viewport>
   <bounds>
    <southwest>
     <lat>51.0867581</lat>
     <lng>-0.2322959</lng>
    </southwest>
    <northeast>
     <lat>51.1527353</lat>
     <lng>-0.1337784</lng>
    </northeast>
   </bounds>
  </geometry>
  <place_id>ChIJNf8TD5PtdUgR20o2Up6T-RI</place_id>
 </result>
</GeocodeResponse>