text:
package types2

import (
	"fmt"
	"go/constant"
	"unicode"
)

// Conversion type-checks the conversion T(x).
// The result is in x.
func (check *Checker) conversion(x *operand, T Type) {
	constArg := x.mode == constant_

	constConvertibleTo := func(T Type, val *constant.Value) bool {
		switch t, _ := under(T).(*Basic); {
		case t == nil:
			// nothing to do
		case representableConst(x.val, check, t, val):
			return true
		case isInteger(x.typ) && isString(t):
			codepoint := unicode.ReplacementChar
			if i, ok := constant.Uint64Val(x.val); ok && i <= unicode.MaxRune {
				codepoint = rune(i)
			}
			if val != nil {
				*val = constant.MakeString(string(codepoint))
			}
			return true
		}
		return false
	}

	var ok bool
	var cause string
	switch {
	case constArg && isConstType(T):
		// constant conversion
		ok = constConvertibleTo(T, &x.val)
	case constArg && isTypeParam(T):
		// x is convertible to T if it is convertible
		// to each specific type in the type set of T.
		// If T's type set is empty, or if it doesn't
		// have specific types, constant x cannot be
		// converted.
		ok = T.(*TypeParam).underIs(func(u Type) bool {
			// u is nil if there are no specific type terms
			if u == nil {
				cause = check.sprintf("%s does not contain specific types", T)
				return false
			}
			if isString(x.typ) && isBytesOrRunes(u) {
				return true
			}
			if !constConvertibleTo(u, nil) {
				cause = check.sprintf("cannot convert %s to %s (in %s)", x, u, T)
				return false
			}
			return true
		})
		x.mode = value // type parameters are not constants
	case x.convertibleTo(check, T, &cause):
		// non-constant conversion
		ok = true
		x.mode = value
	}

	if !ok {
		var err error_
		if check.conf.CompilerErrorMessages {
			if cause != "" {
				// Add colon at end of line if we have a following cause.
				err.errorf(x, "cannot convert %s to type %s:", x, T)
				err.errorf(nopos, cause)
			} else {
				err.errorf(x, "cannot convert %s to type %s", x, T)
			}
		} else {
			err.errorf(x, "cannot convert %s to %s", x, T)
			if cause != "" {
				err.errorf(nopos, cause)
			}
		}
		check.report(&err)
		x.mode = invalid
		return
	}

	// The conversion argument types are final. For untyped values the
	// conversion provides the type, per the spec: "A constant may be
	// given a type explicitly by a constant declaration or conversion,...".
	if isUntyped(x.typ) {
		final := T
		// - For conversions to interfaces, except for untyped nil arguments,
		//   use the argument's default type.
		// - For conversions of untyped constants to non-constant types, also
		//   use the default type (e.g., []byte("foo") should report string
		//   not []byte as type for the constant "foo").
		// - For constant integer to string conversions, keep the argument type.
		//   (See also the TODO below.)
		if x.typ == Typ[UntypedNil] {
			// ok
		} else if IsInterface(T) && !isTypeParam(T) || constArg && !isConstType(T) {
			final = Default(x.typ)
		} else if x.mode == constant_ && isInteger(x.typ) && allString(T) {
			final = x.typ
		}
		check.updateExprType(x.expr, final, true)
	}

	x.typ = T
}

// TODO(gri) convertibleTo checks if T(x) is valid. It assumes that the type
// of x is fully known, but that's not the case for say string(1<<s + 1.0):
// Here, the type of 1<<s + 1.0 will be UntypedFloat which will lead to the
// (correct!) refusal of the conversion. But the reported error is essentially
// "cannot convert untyped float value to string", yet the correct error (per
// the spec) is that we cannot shift a floating-point value: 1 in 1<<s should
// be converted to UntypedFloat because of the addition of 1.0. Fixing this
// is tricky because we'd have to run updateExprType on the argument first.
// (Issue #21982.)

// convertibleTo reports whether T(x) is valid. In the failure case, *cause
// may be set to the cause for the failure.
// The check parameter may be nil if convertibleTo is invoked through an
// exported API call, i.e., when all methods have been type-checked.
func (x *operand) convertibleTo(check *Checker, T Type, cause *string) bool {
	// "x is assignable to T"
	if ok, _ := x.assignableTo(check, T, cause); ok {
		return true
	}

	// "V and T have identical underlying types if tags are ignored
	// and V and T are not type parameters"
	V := x.typ
	Vu := under(V)
	Tu := under(T)
	Vp, _ := V.(*TypeParam)
	Tp, _ := T.(*TypeParam)
	if IdenticalIgnoreTags(Vu, Tu) && Vp == nil && Tp == nil {
		return true
	}

	// "V and T are unnamed pointer types and their pointer base types
	// have identical underlying types if tags are ignored
	// and their pointer base types are not type parameters"
	if V, ok := V.(*Pointer); ok {
		if T, ok := T.(*Pointer); ok {
			if IdenticalIgnoreTags(under(V.base), under(T.base)) && !isTypeParam(V.base) && !isTypeParam(T.base) {
				return true
			}
		}
	}

	// "V and T are both integer or floating point types"
	if isIntegerOrFloat(Vu) && isIntegerOrFloat(Tu) {
		return true
	}

	// "V and T are both complex types"
	if isComplex(Vu) && isComplex(Tu) {
		return true
	}

	// "V is an integer or a slice of bytes or runes and T is a string type"
	if (isInteger(Vu) || isBytesOrRunes(Vu)) && isString(Tu) {
		return true
	}

	// "V is a string and T is a slice of bytes or runes"
	if isString(Vu) && isBytesOrRunes(Tu) {
		return true
	}

	// package unsafe:
	// "any pointer or value of underlying type uintptr can be converted into a unsafe.Pointer"
	if (isPointer(Vu) || isUintptr(Vu)) && isUnsafePointer(Tu) {
		return true
	}
	// "and vice versa"
	if isUnsafePointer(Vu) && (isPointer(Tu) || isUintptr(Tu)) {
		return true
	}

	// "V a slice, T is a pointer-to-array type,
	// and the slice and array types have identical element types."
	if s, _ := Vu.(*Slice); s != nil {
		if p, _ := Tu.(*Pointer); p != nil {
			if a, _ := under(p.Elem()).(*Array); a != nil {
				if Identical(s.Elem(), a.Elem()) {
					if check == nil || check.allowVersion(check.pkg, 1, 17) {
						return true
					}
					// check != nil
					if cause != nil {
						*cause = "conversion of slices to array pointers requires go1.17 or later"
						if check.conf.CompilerErrorMessages {
							*cause += fmt.Sprintf(" (-lang was set to %s; check go.mod)", check.conf.GoVersion)
						}
					}
					return false
				}
			}
		}
	}

	// optimization: if we don't have type parameters, we're done
	if Vp == nil && Tp == nil {
		return false
	}

	errorf := func(format string, args ...interface{}) {
		if check != nil && cause != nil {
			msg := check.sprintf(format, args...)
			if *cause != "" {
				msg += "\n\t" + *cause
			}
			*cause = msg
		}
	}

	// generic cases with specific type terms
	// (generic operands cannot be constants, so we can ignore x.val)
	switch {
	case Vp != nil && Tp != nil:
		x := *x // don't clobber outer x
		return Vp.is(func(V *term) bool {
			if V == nil {
				return false // no specific types
			}
			x.typ = V.typ
			return Tp.is(func(T *term) bool {
				if T == nil {
					return false // no specific types
				}
				if !x.convertibleTo(check, T.typ, cause) {
					errorf("cannot convert %s (in %s) to %s (in %s)", V.typ, Vp, T.typ, Tp)
					return false
				}
				return true
			})
		})
	case Vp != nil:
		x := *x // don't clobber outer x
		return Vp.is(func(V *term) bool {
			if V == nil {
				return false // no specific types
			}
			x.typ = V.typ
			if !x.convertibleTo(check, T, cause) {
				errorf("cannot convert %s (in %s) to %s", V.typ, Vp, T)
				return false
			}
			return true
		})
	case Tp != nil:
		return Tp.is(func(T *term) bool {
			if T == nil {
				return false // no specific types
			}
			if !x.convertibleTo(check, T.typ, cause) {
				errorf("cannot convert %s to %s (in %s)", x.typ, T.typ, Tp)
				return false
			}
			return true
		})
	}

	return false
}

func isUintptr(typ Type) bool {
	t, _ := under(typ).(*Basic)
	return t != nil && t.kind == Uintptr
}

func isUnsafePointer(typ Type) bool {
	t, _ := under(typ).(*Basic)
	return t != nil && t.kind == UnsafePointer
}

func isPointer(typ Type) bool {
	_, ok := under(typ).(*Pointer)
	return ok
}

func isBytesOrRunes(typ Type) bool {
	if s, _ := under(typ).(*Slice); s != nil {
		t, _ := under(s.elem).(*Basic)
		return t != nil && (t.kind == Byte || t.kind == Rune)
	}
	return false
}


text:
package org.kukucorp.kukubaplayer.io;

import java.io.File;

/**
 * Created by Frazer on 24/04/14.
 */
public interface IDecompressor
{
    File decompress(File file, String outputFolder);
}

redpajama_set_name: RedPajamaGithub


text:
* [Setup](./setup.md)
* [Adding Your Own Content](./adding-your-own-content.md)
* [Tutorial](./tutorials/picoprimer-custom-challenge.md)
  * [Buffer Overflow Challenge (Beginner)](./tutorials/buffer-overflow-challenge-beginner.md)
  * [Cryptography Challenge (Intermediate)](./tutorials/crypto-challenge-intermediate.md)
  * [Web Challenge (Advanced)](./tutorials/web-challenge-advanced.md)
* [API Documentation](./api-documentation.md)
* Specifications
  * [problem.json](./specs/problem.json.md)
  * [challenge.py](./specs/challenge.py.md)
  * [File class](./specs/file-class.md)
  * [bundle.json](./specs/bundle.json.md)


text:
require 'rails_reverse_db/rails_reverse_db_helper'

module RailsReverseDb
  raise "This gem must be run from a Rails Application" if not defined?(Rails)
  require 'rails_reverse_db/railtie.rb'
  class RailsReverseDb

    delegate :connection, :establish_connection, to: ActiveRecord::Base

    def initialize(options = {})
      @pk = options[:pk] || 'id'
      @models = options[:models] || false
      @exclude = options[:exclude] || false
      @interactive = options[:i] || false
      environments = [Rails.env]

      configurations = ActiveRecord::Base.configurations.values_at(*environments)
      @configuration = configurations.first
      establish_connection @configuration
    end

    def get_tables
      tables = ActiveRecord::Base.connection.tables
      # remove some tables that are used for migrations
      tables - ["schema_migrations", "propel_migration", "migration_version"]
    end

    def generate
      tables = self.get_tables
      tables.each do |table|
        if RailsReverseDbHelper::RailsReverseDbHelper.test_singularity(table)
          # already singular
          singular ||= table
          plural ||= table.pluralize()
        else
          # already plural
          singular ||= table.singularize()
          plural ||= table
        end

        singular = RailsReverseDbHelper::RailsReverseDbHelper.ucwords(singular)
        singular.gsub!(' ', '')

        # Credit to Anthony Heukmes for the next few lines
        # Modified to work with my gem
        eval "class #{singular} < ActiveRecord::Base; set_table_name '#{table}' end"
        klass = eval "#{singular}"
        reverse_command = "rails generate scaffold #{singular} "
        klass.columns.each do |col|
          reverse_command << col.name + ":" + col.type.to_s + " " unless col.name == @pk
        end
        system reverse_command
      end
    end
  end
end


text:
package com.example.seniorproject.falling;

import java.util.List;

import android.graphics.Color;
import android.util.Log;

import com.example.seniorproject.framework.Game;
import com.example.seniorproject.framework.Graphics;
import com.example.seniorproject.framework.Screen;
import com.example.seniorproject.framework.Input.TouchEvent;
import com.example.seniorproject.main.GameSelector;

public class FallingScreen extends Screen{
	Falling falling;
	int currentPointer;
	TouchEvent nextEvent;

	public FallingScreen(Game game)
	{
		super(game);
		falling = new Falling();
		currentPointer = 0;
		nextEvent = null;
	}

	@Override
	public void update(float deltaTime) {
		try {
			Thread.sleep(100);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		List<TouchEvent> touchEvents = game.getInput().getTouchEvents();
		game.getInput().getKeyEvents();
		int len = touchEvents.size();

		for (int i = 0; i < len; i++) {
			TouchEvent event = touchEvents.get(i);

			if(event.x> 15 && event.x<45 && event.y>440 && event.y<470)
			{
				game.setScreen(new GameSelector(game));
				i=len;
			}
			if(event.pointer!=currentPointer)
			{
				if(event.type == TouchEvent.TOUCH_DRAGGED ||event.type == TouchEvent.TOUCH_DOWN)
				{
					nextEvent = event;
				}
				else if(event.type == TouchEvent.TOUCH_UP)
				{
					nextEvent = null;
				}
			}
			else if (event.type == TouchEvent.TOUCH_DOWN || event.type == TouchEvent.TOUCH_DRAGGED)
			{
				if(falling.getMovement() == 0)
				{
					if (event.x <= 160)
						falling.setMovement("left");
					else if (event.x > 160)
						falling.setMovement("right");
				}
			}
			else if (event.type == TouchEvent.TOUCH_UP)
			{
				falling.setMovement("none");
				if(currentPointer == 1)
					currentPointer = 0;
				if(nextEvent != null)
				{
					currentPointer = nextEvent.pointer;
					touchEvents.remove(i);
					touchEvents.add(i, nextEvent);
					nextEvent = null;
					i--;
				}
			}
		}

		falling.updateBoard(game);

	}

	@Override
	public void present(float deltaTime) {
		Graphics g = game.getGraphics();
		g.clear(Color.WHITE);

		int size = 30;
		g.drawText("Falling", 15, 45, size);
		falling.drawBoard(game);

		g.drawLine(0, 60, 320, 60, Color.BLACK);
		g.drawLine(0, 380, 320, 380, Color.BLACK);

		g.drawText("Score: "+falling.getScore(), 15, 420, size);
		g.drawText("<-",15,470, size);

	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub

	}
}


text:
 Credits

  The following libraries, tools and plugins have been used in making Ace admin template.

multiselect
  You can find documentation and examples for each one on their respective pages or you may want to check out Ace demo files.

 jQuery v2.1.1

 jQuery UI v1.11.2

 Twitter Bootstrap v3.3.0

 FontAwesome v4.2.0

 LESS v1.7.5

 Mustache

 Twitter Hogan.js v3.0.2

 Mustache.php v2.7.0

 Grunt.js v0.4.5

 Google Fonts "Open Sans"

 jQuery Flot Charts v0.8.3

 jQuery Sparklines v2.1.2

 Easy Pie Chart v1.2.5

 jQuery Knob v1.2.11

 Mindmup Wysiwyg Editor

 Toopay Markdown Editor v2.7.0

 jQuery Validate v1.13.1

 FuelUX v3.2.1 (Spinner, Wizard & Treeview)

 Dropzone.js v3.10.2

 FullCalendar v2.1.1

 jQuery ColorBox v1.5.14

 jQuery dataTables v1.10.4

 jQuery jqGrid v4.6.0

 X-editable v1.5.1

 Select2 v3.5.2

 jQuery Chosen v1.2.0

 jQuery Masked Input v1.4.0

 jQuery Input Limiter v1.3.1

 jQuery AutoSize v1.18.14

 Bootstrap Tags v2.2.5

 Nestable Lists

 Typeahead.js v0.10.5

 Dual Listbox v3.0.2

 Bootstrap Multiselect v0.9.10

 Bootstrap Colorpicker

 Bootstrap Datepicker v1.3

 Bootstrap Timepicker v0.2.3

 Bootstrap DateRange Picker v1.3.15

 Bootstrap DateTime Picker v3.1.3

 jQuery Raty v2.7.0

 Bootbox.js v4.3.0

 jQuery Gritter v1.2

 jQuery slimScroll v1.3.3

 Spin.js v2.0.1

 jQuery Mobile v1.4.5 (Custom Build)

 jQuery UI Touch Punch v0.2.3

 Google Code Prettify

 Rainbow v1.1.9

 jQuery Mousewheel v3.1.12

 Respond v1.4.2

 html5shiv v3.7.2

 ExplorerCanvas

 UglifyJS v2.4.15

 CleanCSS v2.2.16

 CodeMirror v4.7.0


text:
require 'rails_helper'

RSpec.describe CartItem, type: :model do
  context "#associations" do
    it {should belong_to :cart}
    it {should belong_to :item}
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <summaries>
      <billSummaries />
    </summaries>
    <constitutionalAuthorityStatementText><![CDATA[
From the Congressional Record Online through the Government Publishing Office [www.gpo.gov]By Ms. ROS-LEHTINEN:H.R. 2061.Congress has the power to enact this legislation pursuantto the following:Article I, Section 8[Page H2792]
]]></constitutionalAuthorityStatementText>
    <congress>115</congress>
    <cboCostEstimates />
    <updateDate>2017-10-13T07:17:24Z</updateDate>
    <latestAction>
      <actionDate>2017-09-28</actionDate>
      <text>Referred to the House Committee on Financial Services.</text>
      <links />
    </latestAction>
    <committees>
      <billCommittees>
        <item>
          <name>Financial Services Committee</name>
          <type>Standing</type>
          <chamber>House</chamber>
          <subcommittees />
          <activities>
            <item>
              <name>Referred to</name>
              <date>2017-09-28T13:01:40Z</date>
            </item>
          </activities>
          <systemCode>hsba00</systemCode>
        </item>
      </billCommittees>
    </committees>
    <cosponsors>
      <item>
        <party>D</party>
        <sponsorshipDate>2017-09-28</sponsorshipDate>
        <middleName />
        <identifiers>
          <lisID>1811</lisID>
          <gpoId>8217</gpoId>
          <bioguideId>M001160</bioguideId>
        </identifiers>
        <lastName>Moore</lastName>
        <fullName>Rep. Moore, Gwen [D-WI-4]</fullName>
        <bioguideId>M001160</bioguideId>
        <district>4</district>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <state>WI</state>
        <sponsorshipWithdrawnDate />
        <firstName>Gwen</firstName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipDate>2017-09-28</sponsorshipDate>
        <middleName>E.</middleName>
        <identifiers>
          <lisID>1256</lisID>
          <bioguideId>Y000033</bioguideId>
          <gpoId>7785</gpoId>
        </identifiers>
        <lastName>YOUNG</lastName>
        <fullName>Rep. Young, Don [R-AK-At Large]</fullName>
        <bioguideId>Y000033</bioguideId>
        <district>0</district>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <state>AK</state>
        <sponsorshipWithdrawnDate />
        <firstName>DON</firstName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipDate>2017-09-28</sponsorshipDate>
        <middleName />
        <identifiers>
          <lisID>867</lisID>
          <bioguideId>N000127</bioguideId>
          <gpoId />
        </identifiers>
        <lastName>NOLAN</lastName>
        <fullName>Rep. Nolan, Richard M. [D-MN-8]</fullName>
        <bioguideId>N000127</bioguideId>
        <district>8</district>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <state>MN</state>
        <sponsorshipWithdrawnDate />
        <firstName>RICHARD</firstName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipDate>2017-09-28</sponsorshipDate>
        <middleName />
        <identifiers>
          <lisID>2122</lisID>
          <gpoId />
          <bioguideId>G000571</bioguideId>
        </identifiers>
        <lastName>Gabbard</lastName>
        <fullName>Rep. Gabbard, Tulsi [D-HI-2]</fullName>
        <bioguideId>G000571</bioguideId>
        <district>2</district>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <state>HI</state>
        <sponsorshipWithdrawnDate />
        <firstName>Tulsi</firstName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipDate>2017-09-28</sponsorshipDate>
        <middleName />
        <identifiers>
          <lisID>2010</lisID>
          <bioguideId>H001050</bioguideId>
          <gpoId>7912</gpoId>
        </identifiers>
        <lastName>Hanabusa</lastName>
        <fullName>Rep. Hanabusa, Colleen [D-HI-1]</fullName>
        <bioguideId>H001050</bioguideId>
        <district>1</district>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <state>HI</state>
        <sponsorshipWithdrawnDate />
        <firstName>Colleen</firstName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipDate>2017-09-28</sponsorshipDate>
        <middleName />
        <identifiers>
          <bioguideId>H001064</bioguideId>
          <lisID>2170</lisID>
          <gpoId />
        </identifiers>
        <lastName>Heck</lastName>
        <fullName>Rep. Heck, Denny [D-WA-10]</fullName>
        <bioguideId>H001064</bioguideId>
        <district>10</district>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <state>WA</state>
        <sponsorshipWithdrawnDate />
        <firstName>Denny</firstName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipDate>2017-09-28</sponsorshipDate>
        <middleName />
        <identifiers>
          <lisID>1742</lisID>
          <bioguideId>C001053</bioguideId>
          <gpoId>8112</gpoId>
        </identifiers>
        <lastName>Cole</lastName>
        <fullName>Rep. Cole, Tom [R-OK-4]</fullName>
        <bioguideId>C001053</bioguideId>
        <district>4</district>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <state>OK</state>
        <sponsorshipWithdrawnDate />
        <firstName>Tom</firstName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipDate>2017-09-28</sponsorshipDate>
        <middleName />
        <identifiers>
          <lisID>1653</lisID>
          <gpoId>8004</gpoId>
          <bioguideId>M001143</bioguideId>
        </identifiers>
        <lastName>MCCOLLUM</lastName>
        <fullName>Rep. McCollum, Betty [D-MN-4]</fullName>
        <bioguideId>M001143</bioguideId>
        <district>4</district>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <state>MN</state>
        <sponsorshipWithdrawnDate />
        <firstName>BETTY</firstName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipDate>2017-10-12</sponsorshipDate>
        <middleName />
        <identifiers>
          <lisID>2099</lisID>
          <gpoId />
          <bioguideId>S001191</bioguideId>
        </identifiers>
        <lastName>Sinema</lastName>
        <fullName>Rep. Sinema, Kyrsten [D-AZ-9]</fullName>
        <bioguideId>S001191</bioguideId>
        <district>9</district>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <state>AZ</state>
        <sponsorshipWithdrawnDate />
        <firstName>Kyrsten</firstName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipDate>2017-10-12</sponsorshipDate>
        <middleName>Coleman</middleName>
        <identifiers>
          <lisID>2222</lisID>
          <bioguideId>R000600</bioguideId>
          <gpoId />
        </identifiers>
        <lastName>Radewagen</lastName>
        <fullName>Rep. Radewagen, Aumua Amata Coleman [R-AS-At Large]</fullName>
        <bioguideId>R000600</bioguideId>
        <district>0</district>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <state>AS</state>
        <sponsorshipWithdrawnDate />
        <firstName>Aumua Amata</firstName>
      </item>
    </cosponsors>
    <introducedDate>2017-09-28</introducedDate>
    <subjects>
      <billSubjects>
        <legislativeSubjects>
          <item>
            <name>Advisory bodies</name>
          </item>
          <item>
            <name>Alaska Natives and Hawaiians</name>
          </item>
          <item>
            <name>Congressional oversight</name>
          </item>
          <item>
            <name>Department of Housing and Urban Development</name>
          </item>
          <item>
            <name>Environmental assessment, monitoring, research</name>
          </item>
          <item>
            <name>Executive agency funding and structure</name>
          </item>
          <item>
            <name>Government lending and loan guarantees</name>
          </item>
          <item>
            <name>Homelessness and emergency shelter</name>
          </item>
          <item>
            <name>Housing and community development funding</name>
          </item>
          <item>
            <name>Housing finance and home ownership</name>
          </item>
          <item>
            <name>Housing supply and affordability</name>
          </item>
          <item>
            <name>Indian lands and resources rights</name>
          </item>
          <item>
            <name>Indian social and development programs</name>
          </item>
          <item>
            <name>Low- and moderate-income housing</name>
          </item>
          <item>
            <name>Public housing</name>
          </item>
          <item>
            <name>Residential rehabilitation and home repair</name>
          </item>
          <item>
            <name>Veterans' loans, housing, homeless programs</name>
          </item>
        </legislativeSubjects>
        <policyArea>
          <name>Native Americans</name>
        </policyArea>
      </billSubjects>
    </subjects>
    <notes />
    <billType>HR</billType>
    <policyArea>
      <name>Native Americans</name>
    </policyArea>
    <laws />
    <billNumber>3864</billNumber>
    <actions>
      <item>
        <type>IntroReferral</type>
        <actionDate>2017-09-28</actionDate>
        <links />
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <text>Referred to the House Committee on Financial Services.</text>
        <actionCode>H11100</actionCode>
        <committee>
          <name>Financial Services Committee</name>
          <systemCode>hsba00</systemCode>
        </committee>
      </item>
      <item>
        <type>IntroReferral</type>
        <actionDate>2017-09-28</actionDate>
        <links />
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <text>Introduced in House</text>
        <actionCode>Intro-H</actionCode>
        <committee />
      </item>
      <item>
        <type>IntroReferral</type>
        <actionDate>2017-09-28</actionDate>
        <links />
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <text>Introduced in House</text>
        <actionCode>1000</actionCode>
        <committee />
      </item>
      <actionTypeCounts>
        <billReferrals>1</billReferrals>
        <introducedInHouse>1</introducedInHouse>
        <introducedInTheHouse>1</introducedInTheHouse>
      </actionTypeCounts>
      <actionByCounts>
        <houseOfRepresentatives>3</houseOfRepresentatives>
      </actionByCounts>
    </actions>
    <committeeReports />
    <title>Native American Housing Assistance and Self-Determination Reauthorization Act of 2017</title>
    <createDate>2017-09-29T03:11:25Z</createDate>
    <version>1.0.0</version>
    <recordedVotes />
    <originChamber>House</originChamber>
    <calendarNumbers />
    <titles>
      <item>
        <titleType>Short Titles as Introduced</titleType>
        <chamberName />
        <parentTitleType />
        <chamberCode />
        <title>Native American Housing Assistance and Self-Determination Reauthorization Act of 2017</title>
      </item>
      <item>
        <titleType>Official Title as Introduced</titleType>
        <chamberName />
        <parentTitleType />
        <chamberCode />
        <title>To reauthorize the Native American Housing Assistance and Self-Determination Act of 1996, and for other purposes.</title>
      </item>
      <item>
        <titleType>Display Title</titleType>
        <chamberName />
        <parentTitleType />
        <chamberCode />
        <title>Native American Housing Assistance and Self-Determination Reauthorization Act of 2017</title>
      </item>
      <item>
        <titleType>(Extracted from GPO) Short Titles as Introduced</titleType>
        <chamberName />
        <parentTitleType />
        <chamberCode />
        <title>Native American Housing Assistance and Self-Determination Reauthorization Act of 2017</title>
      </item>
    </titles>
    <relatedBills>
      <item>
        <type>S</type>
        <latestTitle>Native American Housing Assistance and Self-Determination Reauthorization Act of 2017</latestTitle>
        <congress>115</congress>
        <latestAction>
          <actionDate>2017-09-28</actionDate>
          <text>Read twice and referred to the Committee on Indian Affairs.</text>
        </latestAction>
        <relationshipDetails>
          <item>
            <type>Related bill</type>
            <identifiedBy>CRS</identifiedBy>
          </item>
        </relationshipDetails>
        <number>1895</number>
      </item>
    </relatedBills>
    <sponsors>
      <item>
        <party>R</party>
        <state>NM</state>
        <byRequestType />
        <bioguideId>P000588</bioguideId>
        <firstName>Stevan</firstName>
        <identifiers>
          <lisID>1738</lisID>
          <bioguideId>P000588</bioguideId>
          <gpoId>8057</gpoId>
        </identifiers>
        <middleName />
        <district>2</district>
        <lastName>Pearce</lastName>
        <fullName>Rep. Pearce, Stevan [R-NM-2]</fullName>
      </item>
    </sponsors>
    <amendments />
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="cn.jamesli.example.trivialtest" >

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <!-- READ_EXTERNAL_STORAGE is default after this permission -->

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ui>
    <!-- CREATED WITH AAMO EDITOR -->
    <uiid>1</uiid>
    <title/>
    <version>0.3</version>
    <onLoadScript>lua::aamo.openDatabase("contatos")</onLoadScript>
    <onEndScript>lua::aamo.log("END SCRIPT TELA 1")</onEndScript>

    <element>
        <id>1</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript/>
        <percentHeight>5.0</percentHeight>
        <percentLeft>1.0</percentLeft>
        <percentTop>10.0</percentTop>
        <percentWidth>18.0</percentWidth>
        <text>Nome:</text>
        <type>2</type>
    </element>

    <element>
        <id>2</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript/>
        <percentHeight>10.0</percentHeight>
        <percentLeft>25.0</percentLeft>
        <percentTop>31.0</percentTop>
        <percentWidth>64.0</percentWidth>
        <text/>
        <type>1</type>
    </element>

    <element>
        <id>3</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript/>
        <percentHeight>5.0</percentHeight>
        <percentLeft>3.0</percentLeft>
        <percentTop>33.0</percentTop>
        <percentWidth>15.0</percentWidth>
        <text>Email:</text>
        <type>2</type>
    </element>

    <element>
        <id>4</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript/>
        <percentHeight>10.0</percentHeight>
        <percentLeft>25.0</percentLeft>
        <percentTop>8.0</percentTop>
        <percentWidth>64.0</percentWidth>
        <text/>
        <type>1</type>
    </element>

    <element>
        <id>5</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript/>
        <percentHeight>5.0</percentHeight>
        <percentLeft>1.0</percentLeft>
        <percentTop>20.0</percentTop>
        <percentWidth>24.0</percentWidth>
        <text>Endereço:</text>
        <type>2</type>
    </element>

    <element>
        <id>6</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript/>
        <percentHeight>10.0</percentHeight>
        <percentLeft>25.0</percentLeft>
        <percentTop>20.0</percentTop>
        <percentWidth>64.0</percentWidth>
        <text/>
        <type>1</type>
    </element>

    <element>
        <id>7</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript>lua::aamo.showMessage(aamo.execSQL("update contato set nome=?, endereco=?, email=? where id=?", aamo.getTextField(4),aamo.getTextField(6),aamo.getTextField(2),3))</onClickScript>
        <percentHeight>10.0</percentHeight>
        <percentLeft>63.0</percentLeft>
        <percentTop>57.0</percentTop>
        <percentWidth>22.0</percentWidth>
        <text>Alterar</text>
        <type>3</type>
    </element>

    <element>
        <id>8</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript>lua::aamo.execSQL("insert into contato (id , nome, endereco, email) values (?,?,?,?)", NULL,aamo.getTextField(4),aamo.getTextField(6),aamo.getTextField(2))</onClickScript>
        <percentHeight>10.0</percentHeight>
        <percentLeft>5.0</percentLeft>
        <percentTop>57.0</percentTop>
        <percentWidth>22.0</percentWidth>
        <text>Incluir</text>
        <type>3</type>
    </element>

    <element>
        <id>9</id>
        <checked>0</checked>
        <onChangeScript/>
        <onClickScript>lua::aamo.showMessage(aamo.execSQL("delete FROM contato where id=?", 3))</onClickScript>
        <percentHeight>10.0</percentHeight>
        <percentLeft>33.0</percentLeft>
        <percentTop>57.0</percentTop>
        <percentWidth>22.0</percentWidth>
        <text>Excluir</text>
        <type>3</type>
    </element>

    <element>
        <id>10</id>
        <type>3</type>
        <percentTop>70</percentTop>
        <percentLeft>30</percentLeft>
        <percentWidth>30</percentWidth>
        <percentHeight>15</percentHeight>
        <text>Buscar Contato</text>
        <onClickScript>acessodb</onClickScript>
    </element>
</ui>


text:
package com.orientechnologies.orient.core.db;

import static org.assertj.core.api.Assertions.assertThat;

import com.orientechnologies.orient.core.db.document.ODatabaseDocument;
import com.orientechnologies.orient.core.record.OVertex;
import com.orientechnologies.orient.server.AbstractRemoteTest;
import org.junit.Test;

/** Created by Enrico Risa on 19/05/2017. */
public class OSequenceRemoteTest extends AbstractRemoteTest {

  ODatabaseDocument db;

  @Override
  public void setup() throws Exception {
    super.setup();
    OrientDB factory =
        new OrientDB("remote:localhost", "root", "root", OrientDBConfig.defaultConfig());
    db = factory.open(name.getMethodName(), "admin", "admin");
  }

  @Override
  public void teardown() {
    db.close();
    super.teardown();
  }

  @Test
  public void shouldSequenceWithDefaultValueNoTx() {

    db.command("CREATE CLASS Person EXTENDS V");
    db.command("CREATE SEQUENCE personIdSequence TYPE ORDERED;");
    db.command(
        "CREATE PROPERTY Person.id LONG (MANDATORY TRUE, default \"sequence('personIdSequence').next()\");");
    db.command("CREATE INDEX Person.id ON Person (id) UNIQUE");

    db.getMetadata().reload();

    for (int i = 0; i < 10; i++) {
      OVertex person = db.newVertex("Person");
      person.setProperty("name", "Foo" + i);
      person.save();
    }

    assertThat(db.countClass("Person")).isEqualTo(10);
  }

  @Test
  public void shouldSequenceWithDefaultValueTx() {

    db.command("CREATE CLASS Person EXTENDS V");
    db.command("CREATE SEQUENCE personIdSequence TYPE ORDERED;");
    db.command(
        "CREATE PROPERTY Person.id LONG (MANDATORY TRUE, default \"sequence('personIdSequence').next()\");");
    db.command("CREATE INDEX Person.id ON Person (id) UNIQUE");
    db.getMetadata().reload();

    db.begin();

    for (int i = 0; i < 10; i++) {
      OVertex person = db.newVertex("Person");
      person.setProperty("name", "Foo" + i);
      person.save();
    }

    db.commit();

    assertThat(db.countClass("Person")).isEqualTo(10);
  }

  @Test
  public void testCreateCachedSequenceInTx() {
    db.begin();
    db.command("CREATE SEQUENCE CircuitSequence TYPE CACHED START 1 INCREMENT 1 CACHE 10;");
    db.commit();

    db.command("select sequence('CircuitSequence').next() as seq");
  }

  @Test
  public void testCreateOrderedSequenceInTx() {
    db.begin();
    db.command("CREATE SEQUENCE CircuitSequence TYPE ORDERED;");
    db.commit();

    db.command("select sequence('CircuitSequence').next() as seq");
  }
}


text:
Host resolver

View pending lookups

Default address family:

        (IPv6 disabled)
        <input type=button value="Enable IPv6" id=dns-view-enable-ipv6 class="hide-when-not-capturing" />

Async DNS Configuration

Internal DNS client enabled:

          (No valid configuration found)

    Host resolver cache
    <input type=button value="Clear host cache" id=dns-view-clear-cache class="hide-when-not-capturing" />

Capacity:

Current State

Active entries:

Expired entries:

        Hostname
        Family
        Addresses
        Expires


text:
'use strict';

// 3rd-party modules

var test = require('tape');

// our modules

var Policy = require('../src/policy');
var Statement = require('../src/statement');

var defaultPolicy = require('./policy-default');
// var defaultPolicyJson = JSON.stringify(defaultPolicy);

// this module

test('Policy(): "auth:ReadToken" both denied and allowed', function (t) {
  var policy = new Policy();
  policy.push(new Statement({
    effect: 'allow',
    actions: ['auth:CreateToken', 'auth:ReadToken'],
    resources: ['brn:auth:token::*']
  }));
  policy.push(new Statement({
    effect: 'deny',
    actions: ['auth:CreateToken'],
    resources: ['brn:auth:token::*']
  }));

  policy.push(new Statement({
    effect: 'allow',
    actions: ['auth:CreateUser'],
    resources: ['brn:auth:user::*']
  }));

  t.notOk(policy.authorises('auth:CreateToken', 'brn:auth:token::123'), 'denied action fails');
  t.ok(policy.authorises('auth:ReadToken', 'brn:auth:token::123'), 'allowed action passes');
  t.notOk(policy.authorises('auth:DeleteToken', 'brn:auth:user::123'), 'unlisted action fails');
  t.end();
  t.ok(policy.authorises('auth:CreateUser', 'brn:auth:user::123'), 'allowed action passes');
});

test('policy.push({ /* ... */ }): properly instantiates Statements', function (t) {
  var policy = new Policy();
  policy.push.apply(policy, defaultPolicy.statements);
  policy.statements.forEach(function (stmt, index) {
    t.ok(stmt instanceof Statement, '[' + index + '] is a Statement');
  });
  t.end();
});

test('policy.push({ /* ... */ }): "deny" persists regardless of order', function (t) {
  var policy = new Policy();
  policy.push.apply(policy, defaultPolicy.statements);
  t.notOk(policy.authorises('policy:LinkUser', 'brn:policy:users::*'));
  // add an "allow" that matches a previous "deny"
  policy.push({
    'effect': 'allow',
    'actions': [
      'policy:LinkUser'
    ],
    'resources': [
      'brn:policy:users::*'
    ]
  });
  t.notOk(policy.authorises('policy:LinkUser', 'brn:policy:users::*'));
  t.end();
});

test('policy-default.json: permissions are as expected', function (t) {
  var policy = new Policy();
  policy.push.apply(policy, defaultPolicy.statements);

  ['*', '123'].forEach(function (id) {
    var brn;

    brn = 'brn:policy:policies::' + id;
    t.notOk(policy.authorises('policy:CreatePolicy', brn), brn);
    t.notOk(policy.authorises('policy:ReadPolicy', brn), brn);
    t.notOk(policy.authorises('policy:UpdatePolicy', brn), brn);
    t.notOk(policy.authorises('policy:DeletePolicy', brn), brn);
    t.notOk(policy.authorises('policy:LinkPolicy', brn), brn);

    brn = 'brn:policy:tokens::' + id;
    t.ok(policy.authorises('policy:CreateToken', brn), brn);
    t.notOk(policy.authorises('policy:LinkToken', brn), brn);

    brn = 'brn:policy:users::' + id;
    t.ok(policy.authorises('policy:CreateUser', brn), brn);
    t.notOk(policy.authorises('policy:LinkUser', brn), brn);
  });

  t.end();
});


text:
package org.apache.reef.runtime.azbatch.evaluator;

import org.apache.reef.annotations.audience.EvaluatorSide;
import org.apache.reef.annotations.audience.Private;
import org.apache.reef.runtime.azbatch.parameters.EvaluatorShimConfigFilePath;
import org.apache.reef.tang.Configuration;
import org.apache.reef.tang.Injector;
import org.apache.reef.tang.JavaConfigurationBuilder;
import org.apache.reef.tang.Tang;
import org.apache.reef.tang.annotations.Parameter;
import org.apache.reef.tang.formats.ConfigurationSerializer;

import javax.inject.Inject;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * The main entry point into the {@link EvaluatorShim}.
 */
@Private
@EvaluatorSide
public final class EvaluatorShimLauncher {

  private static final Logger LOG = Logger.getLogger(EvaluatorShimLauncher.class.getName());

  private final String configurationFilePath;
  private final ConfigurationSerializer configurationSerializer;

  @Inject
  EvaluatorShimLauncher(
      @Parameter(EvaluatorShimConfigFilePath.class) final String configurationFilePath,
      final ConfigurationSerializer configurationSerializer) {
    this.configurationFilePath = configurationFilePath;
    this.configurationSerializer = configurationSerializer;
  }

  /**
   * Launch the {@link EvaluatorShim}.
   * @throws Exception
   */
  public void launch() throws Exception {
    final Injector injector = Tang.Factory.getTang().newInjector(readConfigurationFromDisk(this.configurationFilePath));
    final EvaluatorShim evaluatorShim = injector.getInstance(EvaluatorShim.class);
    evaluatorShim.run();
  }

  private Configuration readConfigurationFromDisk(final String configPath) {

    LOG.log(Level.FINER, "Loading configuration file: {0}", configPath);

    final File shimConfigurationFile = new File(configPath);

    if (!shimConfigurationFile.exists() || !shimConfigurationFile.canRead()) {
      throw new RuntimeException(
          "Configuration file " + configPath + " doesn't exist or is not readable.",
          new IOException(configPath));
    }

    try {
      final Configuration config = this.configurationSerializer.fromFile(shimConfigurationFile);
      LOG.log(Level.FINEST, "Configuration file loaded: {0}", configPath);
      return config;
    } catch (final IOException e) {
      throw new RuntimeException("Unable to parse the configuration file: " + configPath, e);
    }
  }

  private static Configuration parseCommandLine(final String[] args) {
    if (args.length != 1) {
      throw new RuntimeException("Expected configuration file name as an argument.");
    }

    final JavaConfigurationBuilder confBuilder = Tang.Factory.getTang().newConfigurationBuilder();
    confBuilder.bindNamedParameter(EvaluatorShimConfigFilePath.class, args[0]);

    return confBuilder.build();
  }

  /**
   * The starting point of the evaluator shim launcher.
   */
  public static void main(final String[] args) throws Exception {
    LOG.log(Level.INFO, "Entering EvaluatorShimLauncher.main().");

    final Injector injector = Tang.Factory.getTang().newInjector(parseCommandLine(args));
    final EvaluatorShimLauncher launcher = injector.getInstance(EvaluatorShimLauncher.class);
    launcher.launch();
  }
}


text:
import * as assert from 'assert';
import {describe, it} from 'mocha';

import {
	createNumberFormatter,
	parseNumber,
} from '../../../common/converter/number';
import {ValueMap} from '../../../common/model/value-map';
import {createValue} from '../../../common/model/values';
import {ViewProps} from '../../../common/model/view-props';
import {createTestWindow} from '../../../misc/dom-test-util';
import {TestUtil} from '../../../misc/test-util';
import {Point2d, Point2dAssembly} from '../../point-2d/model/point-2d';
import {PointNdTextController} from './point-nd-text';

describe(PointNdTextController.name, () => {
	it('should update value with user operation', () => {
		const win = createTestWindow();
		const doc = win.document;
		const c = new PointNdTextController(doc, {
			assembly: Point2dAssembly,
			axes: [
				{
					baseStep: 1,
					constraint: undefined,
					textProps: ValueMap.fromObject({
						formatter: createNumberFormatter(0),
						draggingScale: 1,
					}),
				},
				{
					baseStep: 1,
					constraint: undefined,
					textProps: ValueMap.fromObject({
						formatter: createNumberFormatter(0),
						draggingScale: 1,
					}),
				},
			],
			parser: parseNumber,
			value: createValue(new Point2d(12, 34)),
			viewProps: ViewProps.create(),
		});

		c.view.textViews[0].inputElement.value = '3.14';
		c.view.textViews[0].inputElement.dispatchEvent(
			TestUtil.createEvent(win, 'change'),
		);
		assert.strictEqual(c.value.rawValue.x, 3.14);

		c.view.textViews[1].inputElement.dispatchEvent(
			TestUtil.createKeyboardEvent(win, 'keydown', {
				key: 'ArrowUp',
				shiftKey: true,
			}),
		);
		assert.strictEqual(c.value.rawValue.y, 34 + 10);
	});
});


text:
/* Includes ------------------------------------------------------------------*/
#include "main.h"

/** @addtogroup STM32F4xx_HAL_Examples
  * @{
  */

/** @defgroup HAL_TimeBase_RTC_Alarm  HAL TimeBase RTC Alarm
  * @{
  */

/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
uint32_t uwIncrementState = 0;

/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
static void SystemClock_Config(void);
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
int main(void)
{
  /* STM32F4xx HAL library initialization:
       - Configure the Flash prefetch, instruction and Data caches
       - Configure the RTC Alarm to generate an interrupt each 1 msec
       - Set NVIC Group Priority to 4
       - Global MSP (MCU Support Package) initialization
     */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();

  /* Configure LED3, LED4, LED5 and LED6 */
  BSP_LED_Init(LED3);
  BSP_LED_Init(LED4);
  BSP_LED_Init(LED5);
  BSP_LED_Init(LED6);

  /* Configure BUTTON_KEY */
  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);
  /* -3- Toggle LED3, LED4, LED5 and LED6 in an Infinite loop */
  while(1)
  {
    /* Insert delay 500 ms */
    HAL_Delay(500);
    /* Toggle LED3 */
    BSP_LED_Toggle(LED3);
    /* Toggle LED4 */
    BSP_LED_Toggle(LED4);
    /* Toggle LED5 */
    BSP_LED_Toggle(LED5);
    /* Toggle LED6 */
    BSP_LED_Toggle(LED6);
  }
}

/**
  * @brief EXTI line detection callback.
  * @param GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  if(GPIO_Pin == KEY_BUTTON_PIN)
  {
    if (uwIncrementState == 0)
    {
      /* Suspend tick increment */
      HAL_SuspendTick();

      /* Change the Push button state */
      uwIncrementState = 1;
    }
    else
    {
      /* Resume tick increment */
      HAL_ResumeTick();

      /* Change the Push button state */
      uwIncrementState = 0;
    }
  }
}

/**
  * @brief  System Clock Configuration
  *         The system Clock is configured as follow :
  *            System Clock source            = PLL (HSE)
  *            SYSCLK(Hz)                     = 168000000
  *            HCLK(Hz)                       = 168000000
  *            AHB Prescaler                  = 1
  *            APB1 Prescaler                 = 4
  *            APB2 Prescaler                 = 2
  *            HSE Frequency(Hz)              = 8000000
  *            PLL_M                          = 8
  *            PLL_N                          = 336
  *            PLL_P                          = 2
  *            PLL_Q                          = 7
  *            VDD(V)                         = 3.3
  *            Main regulator output voltage  = Scale1 mode
  *            Flash Latency(WS)              = 5
  * @param  None
  * @retval None
  */
static void SystemClock_Config(void)
{
  RCC_ClkInitTypeDef RCC_ClkInitStruct;
  RCC_OscInitTypeDef RCC_OscInitStruct;

  /* Enable Power Control clock */
  __HAL_RCC_PWR_CLK_ENABLE();

  /* The voltage scaling allows optimizing the power consumption when the device is
     clocked below the maximum system frequency, to update the voltage scaling value
     regarding system frequency refer to product datasheet.  */
  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);

  /* Enable HSE Oscillator and activate PLL with HSE as source */
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  RCC_OscInitStruct.PLL.PLLM = 8;
  RCC_OscInitStruct.PLL.PLLN = 336;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = 7;
  HAL_RCC_OscConfig(&RCC_OscInitStruct);

  /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2
     clocks dividers */
  RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);
  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
  HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5);

  /* STM32F405x/407x/415x/417x Revision Z devices: prefetch is supported  */
  if (HAL_GetREVID() == 0x1001)
  {
    /* Enable the Flash prefetch */
    __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
  }
}

#ifdef USE_FULL_ASSERT
/**
  * @brief  Reports the name of the source file and the source line number
  *         where the assert_param error has occurred.
  * @param  file: pointer to the source file name
  * @param  line: assert_param error line source number
  * @retval None
  */
void assert_failed(uint8_t* file, uint32_t line)
{
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while (1)
  {
  }
}
#endif

/**
  * @}
  */

/**
  * @}
  */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/


text:
[ # NOTE: these are copied to AR-JDBC's suite with proper (JVM) TZ adjustment
    :test_preserving_time_objects_with_utc_time_conversion_to_default_timezone_local,
    :test_preserving_time_objects_with_time_with_zone_conversion_to_default_timezone_local
].each do |name|
  exclude name, 'assuming ENV[TZ] change reflects system (JVM) TimeZone default change'
end


text:
package com.farmerbb.secondscreen.activity;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.farmerbb.secondscreen.R;
import com.farmerbb.secondscreen.util.U;

import java.io.IOException;

// This activity is responsible for invoking the TurnOffService via either the notification
// action button, or when a display is disconnected.  (When a profile is turned off via
// ProfileViewFragment, this activity is not invoked and TurnOffService is run directly.)
//
// The activity invokes the TurnOffService immediately if run via the notification action button;
// it will show a confirmation dialog first if run when a display is disconnected.
public final class TurnOffActivity extends Activity {

    public final class FinishReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(Context context, Intent intent) {
            finish();
        }
    }

    boolean dialog = false;
    IntentFilter filter = new IntentFilter(U.SCREEN_CONNECT);
    FinishReceiver receiver = new FinishReceiver();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Load preferences
        SharedPreferences prefCurrent = U.getPrefCurrent(this);
        String filename = prefCurrent.getString("filename", "0");

        // Close notification drawer
        Intent closeDrawer = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
        sendBroadcast(closeDrawer);

        // Handle intents
        Intent quickLaunchIntent = getIntent();
        if(quickLaunchIntent.getBooleanExtra("notification", false)) {
            U.turnOffProfile(this);
            finish();
        } else {
            dialog = true;
            String name;
            setTitle(getResources().getString(R.string.display_disconnected));
            setContentView(R.layout.activity_turn_off);

            if("quick_actions".equals(prefCurrent.getString("filename", "0"))) {
                SharedPreferences prefSaved = U.getPrefQuickActions(this);
                filename = prefSaved.getString("original_filename", "0");

                if("0".equals(filename))
                    name = getResources().getStringArray(R.array.pref_notification_action_list)[1];
                else {
                    try {
                        name = U.getProfileTitle(this, filename);
                    } catch (IOException e) {
                        name = getResources().getString(R.string.this_profile);
                    }
                }
            } else {
                try {
                    name = U.getProfileTitle(this, filename);
                } catch (IOException e) {
                    name = getResources().getString(R.string.this_profile);
                }
            }

            // Set TextView contents
            TextView textView = (TextView) findViewById(R.id.turnOffTextView);
            textView.setText(name + " " + getResources().getString(R.string.dialog_turn_off_message));

            // Set OnClickListeners for the buttons
            Button buttonSecondary = (Button) findViewById(R.id.turnOffButtonSecondary);
            buttonSecondary.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    finish();
                }
            });

            Button buttonPrimary = (Button) findViewById(R.id.turnOffButtonPrimary);
            buttonPrimary.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    try {
                        SharedPreferences prefCurrent = U.getPrefCurrent(TurnOffActivity.this);
                        if(!prefCurrent.getBoolean("not_active", true))
                            U.turnOffProfile(TurnOffActivity.this);
                    } catch (NullPointerException e) {}

                    finish();
                }
            });
        }
    }

    @Override
    protected void onStart() {
        super.onStart();

        if(dialog)
            registerReceiver(receiver, filter);
    }

    @Override
    protected void onStop() {
        super.onStop();

        if(dialog)
            unregisterReceiver(receiver);
    }
}


text:
/*
 * 音乐控制
 *
 */
function AudioPlayer(player) {
    this.isPlay = false;
    this.source = document.querySelector('.audio-source');
    this.player = player;
}
AudioPlayer.prototype = {
    constructor: AudioPlayer,
    play: function() {
        if (!this.isPlay) {
            this.source.play();
            this.isPlay = true;
        }
    },
    pause: function() {
      if (this.isPlay) {
          this.source.pause();
          this.isPlay = false;
      }
    }
};


text:
[![Gem Version](https://badge.fury.io/rb/frachtraum.svg)](http://badge.fury.io/rb/frachtraum)

Oh this is really great. If I only took the time to tell you about it...


text:
  #define PROTOBUF_USE_EXCEPTIONS 1
#elif defined(__EXCEPTIONS)
  #define PROTOBUF_USE_EXCEPTIONS 1
#else
  #define PROTOBUF_USE_EXCEPTIONS 0
#endif
#endif

#if PROTOBUF_USE_EXCEPTIONS
#include <exception>
#endif
#if defined(__APPLE__)
#include <TargetConditionals.h>  // for TARGET_OS_IPHONE
#endif

#if defined(__ANDROID__) || defined(GOOGLE_PROTOBUF_OS_ANDROID) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || defined(GOOGLE_PROTOBUF_OS_IPHONE)
#include <pthread.h>
#endif

#if defined(_WIN32) && defined(GetMessage)
// Allow GetMessage to be used as a valid method name in protobuf classes.
// windows.h defines GetMessage() as a macro.  Let's re-define it as an inline
// function.  The inline function should be equivalent for C++ users.
inline BOOL GetMessage_Win32(
    LPMSG lpMsg, HWND hWnd,
    UINT wMsgFilterMin, UINT wMsgFilterMax) {
  return GetMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
}
#undef GetMessage
inline BOOL GetMessage(
    LPMSG lpMsg, HWND hWnd,
    UINT wMsgFilterMin, UINT wMsgFilterMax) {
  return GetMessage_Win32(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
}
#endif

namespace std {}

namespace google {
namespace protobuf {
namespace internal {

// Some of these constants are macros rather than const ints so that they can
// be used in #if directives.

// The current version, represented as a single integer to make comparison
// easier:  major * 10^6 + minor * 10^3 + micro
#define GOOGLE_PROTOBUF_VERSION 3000000

// The minimum library version which works with the current version of the
// headers.
#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3000000

// The minimum header version which works with the current version of
// the library.  This constant should only be used by protoc's C++ code
// generator.
static const int kMinHeaderVersionForLibrary = 3000000;

// The minimum protoc version which works with the current version of the
// headers.
#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3000000

// The minimum header version which works with the current version of
// protoc.  This constant should only be used in VerifyVersion().
static const int kMinHeaderVersionForProtoc = 3000000;

// Verifies that the headers and libraries are compatible.  Use the macro
// below to call this.
void LIBPROTOBUF_EXPORT VerifyVersion(int headerVersion, int minLibraryVersion,
                                      const char* filename);

// Converts a numeric version number to a string.
std::string LIBPROTOBUF_EXPORT VersionString(int version);

}  // namespace internal

// Place this macro in your main() function (or somewhere before you attempt
// to use the protobuf library) to verify that the version you link against
// matches the headers you compiled against.  If a version mismatch is
// detected, the process will abort.
#define GOOGLE_PROTOBUF_VERIFY_VERSION                                    \
  ::google::protobuf::internal::VerifyVersion(                            \
    GOOGLE_PROTOBUF_VERSION, GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION,         \
    __FILE__)

// ===================================================================
// from google3/util/utf8/public/unilib.h

namespace internal {

// Checks if the buffer contains structurally-valid UTF-8.  Implemented in
// structurally_valid.cc.
LIBPROTOBUF_EXPORT bool IsStructurallyValidUTF8(const char* buf, int len);

}  // namespace internal

// ===================================================================
// Shutdown support.

// Shut down the entire protocol buffers library, deleting all static-duration
// objects allocated by the library or by generated .pb.cc files.
//
// There are two reasons you might want to call this:
// * You use a draconian definition of "memory leak" in which you expect
//   every single malloc() to have a corresponding free(), even for objects
//   which live until program exit.
// * You are writing a dynamically-loaded library which needs to clean up
//   after itself when the library is unloaded.
//
// It is safe to call this multiple times.  However, it is not safe to use
// any other part of the protocol buffers library after
// ShutdownProtobufLibrary() has been called.
LIBPROTOBUF_EXPORT void ShutdownProtobufLibrary();

namespace internal {

// Register a function to be called when ShutdownProtocolBuffers() is called.
LIBPROTOBUF_EXPORT void OnShutdown(void (*func)());

}  // namespace internal

#if PROTOBUF_USE_EXCEPTIONS
class FatalException : public std::exception {
 public:
  FatalException(const char* filename, int line, const std::string& message)
      : filename_(filename), line_(line), message_(message) {}
  virtual ~FatalException() throw();

  virtual const char* what() const throw();

  const char* filename() const { return filename_; }
  int line() const { return line_; }
  const std::string& message() const { return message_; }

 private:
  const char* filename_;
  const int line_;
  const std::string message_;
};
#endif

// This is at the end of the file instead of the beginning to work around a bug
// in some versions of MSVC.
using namespace std;  // Don't do this at home, kids.

}  // namespace protobuf
}  // namespace google

#endif  // GOOGLE_PROTOBUF_COMMON_H__


text:
"""Provides agency object."""

from __future__ import absolute_import
from .. import t1types
from ..entity import Entity

class Organization(Entity):
    """Organization entity."""
    collection = 'organizations'
    resource = 'organization'
    _relations = {
        'currency',
        'seats',
        'contracts',
    }
    _dmp_settings = t1types.enum({'disabled', 'enabled'}, 'disabled')
    _org_types = t1types.enum({'buyer', 'partner'}, 'buyer')
    _pull = {
        'address_1': None,
        'address_2': None,
        'adx_seat_account_id': int,
        'allow_byo_price': t1types.int_to_bool,
        'allow_x_agency_pixels': t1types.int_to_bool,
        'billing_country_code': None,
        'city': None,
        'contact_name': None,
        'country': None,
        'created_on': t1types.strpt,
        'currency_code': None,
        'dmp_enabled': None,
        'id': int,
        'mm_contact_name': None,
        'name': None,
        'org_type': None,
        'override_suspicious_traffic_filter': t1types.int_to_bool,
        'accountable_and_addressable': t1types.int_to_bool,
        'phone': None,
        'state': None,
        'status': t1types.int_to_bool,
        'suspicious_traffic_filter_level': int,
        'tag_ruleset': None,
        'updated_on': t1types.strpt,
        'use_evidon_optout': t1types.int_to_bool,
        'version': int,
        'zip': None,
    }
    _push = _pull.copy()
    _push.update({
        'allow_byo_price': int,
        'allow_x_agency_pixels': int,
        'dmp_enabled': _dmp_settings,
        'org_type': _org_types,
        'override_suspicious_traffic_filter': int,
        'accountable_and_addressable': int,
        'status': int,
        'use_evidon_optout': int,
    })

    def __init__(self, session, properties=None, **kwargs):
        super(Organization, self).__init__(session, properties, **kwargs)


text:
using chrome::OmahaQueryParams;
using content::BrowserThread;

namespace component_updater {

namespace {

// Name of the Pnacl component specified in the manifest.
const char kPnaclManifestName[] = "PNaCl Translator";

// Sanitize characters from Pnacl Arch value so that they can be used
// in path names.  This should only be characters in the set: [a-z0-9_].
// Keep in sync with chrome/browser/nacl_host/nacl_file_host.
std::string SanitizeForPath(const std::string& input) {
  std::string result;
  base::ReplaceChars(input, "-", "_", &result);
  return result;
}

// Set the component's hash to the multi-CRX PNaCl package.
void SetPnaclHash(CrxComponent* component) {
 static const uint8 sha256_hash[32] =
     { // This corresponds to AppID: hnimpnehoodheedghdeeijklkeaacbdc
       0x7d, 0x8c, 0xfd, 0x47, 0xee, 0x37, 0x44, 0x36, 0x73, 0x44,
       0x89, 0xab, 0xa4, 0x00, 0x21, 0x32, 0x4a, 0x06, 0x06, 0xf1, 0x51,
       0x3c, 0x51, 0xba, 0x31, 0x2f, 0xbc, 0xb3, 0x99, 0x07, 0xdc, 0x9c};

  component->pk_hash.assign(sha256_hash,
                            &sha256_hash[arraysize(sha256_hash)]);
}

// If we don't have Pnacl installed, this is the version we claim.
const char kNullVersion[] = "0.0.0.0";
const char kMinPnaclVersion[] = "0.1.0.12773";

// Initially say that we do not need OnDemand updates. This should be
// updated by CheckVersionCompatiblity(), before doing any URLRequests
// that depend on PNaCl.
volatile base::subtle::Atomic32 needs_on_demand_update = 0;

void CheckVersionCompatiblity(const base::Version& current_version) {
  // Using NoBarrier, since needs_on_demand_update is standalone and does
  // not have other associated data.
  base::subtle::NoBarrier_Store(&needs_on_demand_update,
                                current_version.IsOlderThan(kMinPnaclVersion));
}

// PNaCl is packaged as a multi-CRX.  This returns the platform-specific
// subdirectory that is part of that multi-CRX.
base::FilePath GetPlatformDir(const base::FilePath& base_path) {
  std::string arch = SanitizeForPath(OmahaQueryParams::GetNaclArch());
  return base_path.AppendASCII("_platform_specific").AppendASCII(arch);
}

// Tell the rest of the world where to find the platform-specific PNaCl files.
void OverrideDirPnaclComponent(const base::FilePath& base_path) {
  PathService::Override(chrome::DIR_PNACL_COMPONENT,
                        GetPlatformDir(base_path));
}

bool GetLatestPnaclDirectory(PnaclComponentInstaller* pci,
                             base::FilePath* latest_dir,
                             Version* latest_version,
                             std::vector<base::FilePath>* older_dirs) {
  // Enumerate all versions starting from the base directory.
  base::FilePath base_dir = pci->GetPnaclBaseDirectory();
  bool found = false;
  base::FileEnumerator
      file_enumerator(base_dir, false, base::FileEnumerator::DIRECTORIES);
  for (base::FilePath path = file_enumerator.Next(); !path.value().empty();
       path = file_enumerator.Next()) {
    Version version(path.BaseName().MaybeAsASCII());
    if (!version.IsValid())
      continue;
    if (found) {
      if (version.CompareTo(*latest_version) > 0) {
        older_dirs->push_back(*latest_dir);
        *latest_dir = path;
        *latest_version = version;
      } else {
        older_dirs->push_back(path);
      }
    } else {
      *latest_version = version;
      *latest_dir = path;
      found = true;
    }
  }
  return found;
}

// Read a manifest file in.
base::DictionaryValue* ReadJSONManifest(
    const base::FilePath& manifest_path) {
  JSONFileValueSerializer serializer(manifest_path);
  std::string error;
  scoped_ptr<base::Value> root(serializer.Deserialize(NULL, &error));
  if (!root.get())
    return NULL;
  if (!root->IsType(base::Value::TYPE_DICTIONARY))
    return NULL;
  return static_cast<base::DictionaryValue*>(root.release());
}

// Read the PNaCl specific manifest.
base::DictionaryValue* ReadPnaclManifest(const base::FilePath& unpack_path) {
  base::FilePath manifest_path = GetPlatformDir(unpack_path).AppendASCII(
      "pnacl_public_pnacl_json");
  if (!base::PathExists(manifest_path))
    return NULL;
  return ReadJSONManifest(manifest_path);
}

// Read the component's manifest.json.
base::DictionaryValue* ReadComponentManifest(
    const base::FilePath& unpack_path) {
  base::FilePath manifest_path = unpack_path.Append(
      FILE_PATH_LITERAL("manifest.json"));
  if (!base::PathExists(manifest_path))
    return NULL;
  return ReadJSONManifest(manifest_path);
}

// Check that the component's manifest is for PNaCl, and check the
// PNaCl manifest indicates this is the correct arch-specific package.
bool CheckPnaclComponentManifest(const base::DictionaryValue& manifest,
                                 const base::DictionaryValue& pnacl_manifest,
                                 Version* version_out) {
  // Make sure we have the right |manifest| file.
  std::string name;
  if (!manifest.GetStringASCII("name", &name)) {
    LOG(WARNING) << "'name' field is missing from manifest!";
    return false;
  }
  // For the webstore, we've given different names to each of the
  // architecture specific packages (and test/QA vs not test/QA)
  // so only part of it is the same.
  if (name.find(kPnaclManifestName) == std::string::npos) {
    LOG(WARNING) << "'name' field in manifest is invalid ("
                 << name << ") -- missing ("
                 << kPnaclManifestName << ")";
    return false;
  }

  std::string proposed_version;
  if (!manifest.GetStringASCII("version", &proposed_version)) {
    LOG(WARNING) << "'version' field is missing from manifest!";
    return false;
  }
  Version version(proposed_version.c_str());
  if (!version.IsValid()) {
    LOG(WARNING) << "'version' field in manifest is invalid "
                 << version.GetString();
    return false;
  }

  // Now check the |pnacl_manifest|.
  std::string arch;
  if (!pnacl_manifest.GetStringASCII("pnacl-arch", &arch)) {
    LOG(WARNING) << "'pnacl-arch' field is missing from pnacl-manifest!";
    return false;
  }
  if (arch.compare(OmahaQueryParams::GetNaclArch()) != 0) {
    LOG(WARNING) << "'pnacl-arch' field in manifest is invalid (" << arch
                 << " vs " << OmahaQueryParams::GetNaclArch() << ")";
    return false;
  }

  *version_out = version;
  return true;
}

}  // namespace

PnaclComponentInstaller::PnaclComponentInstaller()
    : per_user_(false),
      updates_disabled_(false),
      cus_(NULL) {
#if defined(OS_CHROMEOS)
  per_user_ = true;
#endif
}

PnaclComponentInstaller::~PnaclComponentInstaller() {
}

void PnaclComponentInstaller::OnUpdateError(int error) {
  NOTREACHED() << "Pnacl update error: " << error;
}

// Pnacl components have the version encoded in the path itself:
// <profile>\AppData\Local\Google\Chrome\User Data\pnacl\0.1.2.3\.
// and the base directory will be:
// <profile>\AppData\Local\Google\Chrome\User Data\pnacl\.
base::FilePath PnaclComponentInstaller::GetPnaclBaseDirectory() {
  // For ChromeOS, temporarily make this user-dependent (for integrity) until
  // we find a better solution.
  // This is not ideal because of the following:
  //   (a) We end up with per-user copies instead of a single copy
  //   (b) The profile can change as users log in to different accounts
  //   so we need to watch for user-login-events (see pnacl_profile_observer.h).
  if (per_user_) {
    DCHECK(!current_profile_path_.empty());
    base::FilePath path = current_profile_path_.Append(
        FILE_PATH_LITERAL("pnacl"));
    return path;
  } else {
    base::FilePath result;
    CHECK(PathService::Get(chrome::DIR_PNACL_BASE, &result));
    return result;
  }
}

void PnaclComponentInstaller::OnProfileChange() {
  // On chromeos, we want to find the --login-profile=<foo> dir.
  // Even though the path does vary between users, the content
  // changes when logging out and logging in.
  ProfileManager* pm = g_browser_process->profile_manager();
  current_profile_path_ = pm->user_data_dir().Append(
      pm->GetInitialProfileDir());
}

bool PnaclComponentInstaller::Install(const base::DictionaryValue& manifest,
                                      const base::FilePath& unpack_path) {
  scoped_ptr<base::DictionaryValue> pnacl_manifest(
      ReadPnaclManifest(unpack_path));
  if (pnacl_manifest == NULL) {
    LOG(WARNING) << "Failed to read pnacl manifest.";
    return false;
  }

  Version version;
  if (!CheckPnaclComponentManifest(manifest, *pnacl_manifest, &version)) {
    LOG(WARNING) << "CheckPnaclComponentManifest failed, not installing.";
    return false;
  }

  // Don't install if the current version is actually newer.
  if (current_version().CompareTo(version) > 0) {
    return false;
  }

  // Passed the basic tests. Time to install it.
  base::FilePath path = GetPnaclBaseDirectory().AppendASCII(
      version.GetString());
  if (base::PathExists(path)) {
    if (!base::DeleteFile(path, true))
      return false;
  }
  if (!base::Move(unpack_path, path)) {
    LOG(WARNING) << "Move failed, not installing.";
    return false;
  }

  // Installation is done. Now tell the rest of chrome.
  // - The path service.
  // - Callbacks that requested an update.
  set_current_version(version);
  CheckVersionCompatiblity(version);
  OverrideDirPnaclComponent(path);
  return true;
}

// Given |file|, which can be a path like "_platform_specific/arm/pnacl_foo",
// returns the assumed install path. The path separator in |file| is '/'
// for all platforms. Caller is responsible for checking that the
// |installed_file| actually exists.
bool PnaclComponentInstaller::GetInstalledFile(
    const std::string& file, base::FilePath* installed_file) {
  if (current_version().Equals(Version(kNullVersion)))
    return false;

  *installed_file = GetPnaclBaseDirectory().AppendASCII(
      current_version().GetString()).AppendASCII(file);
  return true;
}

CrxComponent PnaclComponentInstaller::GetCrxComponent() {
  CrxComponent pnacl_component;
  pnacl_component.version = current_version();
  pnacl_component.name = "pnacl";
  pnacl_component.installer = this;
  pnacl_component.fingerprint = current_fingerprint();
  SetPnaclHash(&pnacl_component);

  return pnacl_component;
}

namespace {

void FinishPnaclUpdateRegistration(const Version& current_version,
                                   const std::string& current_fingerprint,
                                   PnaclComponentInstaller* pci) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  pci->set_current_version(current_version);
  CheckVersionCompatiblity(current_version);
  pci->set_current_fingerprint(current_fingerprint);
  CrxComponent pnacl_component = pci->GetCrxComponent();

  ComponentUpdateService::Status status =
      pci->cus()->RegisterComponent(pnacl_component);
  if (status != ComponentUpdateService::kOk
      && status != ComponentUpdateService::kReplaced) {
    NOTREACHED() << "Pnacl component registration failed.";
  }
}

// Check if there is an existing version on disk first to know when
// a hosted version is actually newer.
void StartPnaclUpdateRegistration(PnaclComponentInstaller* pci) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
  base::FilePath path = pci->GetPnaclBaseDirectory();
  if (!base::PathExists(path)) {
    if (!base::CreateDirectory(path)) {
      NOTREACHED() << "Could not create base Pnacl directory.";
      return;
    }
  }

  Version current_version(kNullVersion);
  std::string current_fingerprint;
  std::vector<base::FilePath> older_dirs;
  if (GetLatestPnaclDirectory(pci, &path, &current_version, &older_dirs)) {
    scoped_ptr<base::DictionaryValue> manifest(
        ReadComponentManifest(path));
    scoped_ptr<base::DictionaryValue> pnacl_manifest(
        ReadPnaclManifest(path));
    Version manifest_version;
    // Check that the component manifest and PNaCl manifest files
    // are legit, and that the indicated version matches the one
    // encoded within the path name.
    if (manifest == NULL || pnacl_manifest == NULL
        || !CheckPnaclComponentManifest(*manifest,
                                        *pnacl_manifest,
                                        &manifest_version)
        || !current_version.Equals(manifest_version)) {
      current_version = Version(kNullVersion);
    } else {
      OverrideDirPnaclComponent(path);
      base::ReadFileToString(path.AppendASCII("manifest.fingerprint"),
                             &current_fingerprint);
    }
  }

  // If updates are disabled, only discover the current version
  // and OverrideDirPnaclComponent. That way, developers can use
  // a pinned version. Do not actually finish registration with
  // the component update service.
  if (pci->updates_disabled())
    return;

  BrowserThread::PostTask(
      BrowserThread::UI, FROM_HERE,
      base::Bind(&FinishPnaclUpdateRegistration,
                 current_version,
                 current_fingerprint,
                 pci));

  // Remove older versions of PNaCl.
  for (std::vector<base::FilePath>::iterator iter = older_dirs.begin();
       iter != older_dirs.end(); ++iter) {
    base::DeleteFile(*iter, true);
  }
}

// Remove old per-profile copies of PNaCl (was for ChromeOS).
// TODO(jvoung): Delete this code once most ChromeOS users have reaped
// their old per-profile copies of PNaCl.
void ReapOldChromeOSPnaclFiles(PnaclComponentInstaller* pci) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
  base::FilePath path = pci->GetPnaclBaseDirectory();
  if (!base::PathExists(path))
    return;

  // Do a basic sanity check first.
  if (pci->per_user()
      && path.BaseName().value().compare(FILE_PATH_LITERAL("pnacl")) == 0)
    base::DeleteFile(path, true);
}

void GetProfileInformation(PnaclComponentInstaller* pci) {
  // Bail if not logged in yet.
  if (!g_browser_process->profile_manager()->IsLoggedIn()) {
    return;
  }

  pci->OnProfileChange();

  // Do not actually register PNaCl for component updates, for CHROMEOS.
  // Just get the profile information and delete the per-profile files
  // if they exist.
 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
                         base::Bind(&ReapOldChromeOSPnaclFiles, pci));
}

}  // namespace

void PnaclComponentInstaller::RegisterPnaclComponent(
                            ComponentUpdateService* cus,
                            const CommandLine& command_line) {
  // Register PNaCl by default (can be disabled).
  updates_disabled_ = command_line.HasSwitch(switches::kDisablePnaclInstall);
  cus_ = cus;
  // If per_user, create a profile observer to watch for logins.
  // Only do so after cus_ is set to something non-null.
  if (per_user_ && !profile_observer_) {
    profile_observer_.reset(new PnaclProfileObserver(this));
  }
  if (per_user_) {
    // Figure out profile information, before proceeding to look for files.
    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
                            base::Bind(&GetProfileInformation, this));
  } else {
    BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
                            base::Bind(&StartPnaclUpdateRegistration, this));
  }
}

void PnaclComponentInstaller::ReRegisterPnacl() {
  DCHECK(per_user_);
  // Figure out profile information, before proceeding to look for files.
  BrowserThread::PostTask(
      BrowserThread::UI, FROM_HERE,
      base::Bind(&GetProfileInformation, this));
}

}  // namespace component_updater

namespace pnacl {

bool NeedsOnDemandUpdate() {
  return base::subtle::NoBarrier_Load(
      &component_updater::needs_on_demand_update) != 0;
}

}  // namespace pnacl


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.securityinsights.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner;

/** An instance of this class provides access to all the operations defined in DomainWhoisClient. */
public interface DomainWhoisClient {
    /**
     * Get whois information for a single domain name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param domain Domain name to be enriched.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return whois information for a single domain name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    EnrichmentDomainWhoisInner get(String resourceGroupName, String domain);

    /**
     * Get whois information for a single domain name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param domain Domain name to be enriched.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return whois information for a single domain name along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<EnrichmentDomainWhoisInner> getWithResponse(String resourceGroupName, String domain, Context context);
}


text:
<?php

	class Extension_TextBoxField extends Extension {
	/*-------------------------------------------------------------------------
		Definition:
	-------------------------------------------------------------------------*/

		protected static $fields = array();

		public function about() {
			return array(
				'name'			=> 'Field: Text Box',
				'version'		=> '2.0.6',
				'release-date'	=> '2009-07-24',
				'author'		=> array(
					'name'			=> 'Rowan Lewis',
					'website'		=> 'http://rowanlewis.com/',
					'email'			=> 'me@rowanlewis.com'
				),
				'description' => '
					An enhanced text input field.
				'
			);
		}

		public function uninstall() {
			$this->_Parent->Database->query("DROP TABLE `tbl_fields_textbox`");
		}

		public function install() {
			$this->_Parent->Database->query("
				CREATE TABLE IF NOT EXISTS `tbl_fields_textbox` (
					`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
					`field_id` INT(11) UNSIGNED NOT NULL,
					`formatter` VARCHAR(255) DEFAULT NULL,
					`size` ENUM('single', 'small', 'medium', 'large', 'huge') DEFAULT 'medium',
					`validator` VARCHAR(255) DEFAULT NULL,
					PRIMARY KEY (`id`),
					KEY `field_id` (`field_id`)
				)
			");

			return true;
		}

	/*-------------------------------------------------------------------------
		Utilites:
	-------------------------------------------------------------------------*/

		protected $addedHeaders = false;

		public function addHeaders($page) {
			if (!$this->addedHeaders) {
				$page->addStylesheetToHead(URL . '/extensions/textboxfield/assets/publish.css', 'screen', 10251840);

				$this->addedHeaders = true;
			}
		}
	}

?>


text:
Template.clipboard.rendered = function(){

    new Clipboard('.btn');

};


text:
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;

public class CheckDuck {
    private WebDriver driver;
    private WebDriverWait wait;
    @Before
    public void start(){
          driver = new ChromeDriver();
//        driver = new InternetExplorerDriver();
//        driver = new FirefoxDriver();
        wait = new WebDriverWait(driver, 10);
    }
    @Test
    public void test() {
//открываем магазин:
    driver.get("http://localhost/litecard/");
    wait.until(titleIs("Online Store | My Store"));
//Ищем первую уточку в разделе Campaigns:
    WebElement duck = driver.findElement(By.cssSelector("div#box-campaigns a.link"));
//Считываем название и цены:
    String name1 = duck.findElement(By.cssSelector("div.name")).getAttribute("innerText");
    String regularPrice1 = duck.findElement(By.cssSelector(".regular-price")).getAttribute("innerText");
    String campaignPrice1 = duck.findElement(By.cssSelector(".campaign-price")).getAttribute("innerText");

//Проверяем, что у регулярной цены размер меньше, чем скидочной:
    if(!( Integer.parseInt(duck.findElement(By.cssSelector(".campaign-price"))
                .getAttribute("offsetHeight"))>
     Integer.parseInt(duck.findElement(By.cssSelector(".regular-price"))
             .getAttribute("offsetHeight"))) ) {
        System.out.println("Размеры неправильные!");
        System.exit(-1);
    }
//Проверяем, что у регулярной цены серый цвет:
        String color1 = duck.findElement(By.cssSelector(".regular-price")).getCssValue("color");
        System.out.println(color1);
    //Разбираем полученнуюстроку на цвета RGB и сравниваем их:
        String[] colors1 =  color1.substring(5,color1.length()- 1 ).split(", ");
        String R1 = colors1[0]; String G1 = colors1[1]; String B1 = colors1[2];
        if(!(R1.equals(G1)&&R1.equals(B1))){
            System.out.println("Цвет не серый");
            System.exit(-1); }
//Проверяем, что у регулярной цены зачеркнутый шрифт:
        if(!(duck.findElement(By.cssSelector(".regular-price")).getCssValue("text-decoration")
                .contains("line-through"))) {
            System.err.println("Шрифт не зачеркнутый");
            System.exit(-1);}
//Проверяем, что у скидочной цены красный цвет:
        String color2 = duck.findElement(By.cssSelector(".campaign-price")).getCssValue("color");
        String[] colors2 =  color2.substring(5,color2.length()- 1 ).split(", ");
        String G2 = colors2[1]; String B2 = colors2[2];
        if(!(G2.equals("0")&&B2.equals("0"))) {
            System.err.println("Цвет не красный");
            System.exit(-1); }
//Проверяем, что у скидочной цены жирный шрифт:
        if(!(duck.findElement(By.cssSelector(".campaign-price"))
                .getCssValue("font-weight").equals("bold"))) {
            System.err.println("Шрифт не жирный!");
            System.exit(-1); }
//Переходим на страницу товара:
        duck.click();
        String regularPrice2 = driver.findElement(By.cssSelector(".regular-price"))
                .getAttribute("innerText");
        String campaignPrice2 = driver.findElement(By.cssSelector(".campaign-price"))
                .getAttribute("innerText");
        //Сравниваем имена:
        String name2 = driver.findElement(By.cssSelector("h1.title")).getAttribute("innerText");
        if(!(name2.equals(name1))){
            System.err.println("Имена различаются!");
            System.exit(-1);}
//Проверяем цены попарно:
        if(!(regularPrice2.equals(regularPrice1))&&(campaignPrice2.equals(campaignPrice1))){
            System.err.println("Цены различаются!");
            System.exit(-1);}
//Проверяем, что у регулярной цены размер меньше, чем скидочной:
        if(!( Integer.parseInt(driver.findElement(By.cssSelector(".campaign-price"))
                .getAttribute("offsetHeight"))>
                Integer.parseInt(driver.findElement(By.cssSelector(".regular-price"))
                        .getAttribute("offsetHeight"))) ) {
            System.out.println("Размеры неправильные!");
            System.exit(-1);}
//Проверяем, что у регулярной цены серый цвет:
        String color3 = driver.findElement(By.cssSelector(".regular-price")).getCssValue("color");
//Разбираем полученнуюстроку на цвета RGB и сравниваем их:
        String[] colors3 =  color3.substring(5,color1.length()- 1 ).split(", ");
        String R3 = colors3[0]; String G3 = colors3[1]; String B3 = colors3[2];
        if(!(R3.equals(G3)&&R3.equals(B3))){
            System.out.println("Цвет не серый");
            System.exit(-1); }
//Проверяем, что у регулярной цены зачеркнутый шрифт:
        if(!(driver.findElement(By.cssSelector(".regular-price")).getCssValue("text-decoration").contains("line-through"))) {
            System.err.println("Шрифт не зачеркнутый");
            System.exit(-1);}
//Проверяем, что у скидочной цены красный цвет:
        String color4 = driver.findElement(By.cssSelector(".campaign-price")).getCssValue("color");
        String[] colors4 =  color4.substring(5,color2.length()- 1 ).split(", ");
        String G4 = colors4[1]; String B4 = colors4[2];
        if(!(G4.equals("0")&&B4.equals("0"))) {
            System.err.println("Цвет не красный");
            System.exit(-1); }
//Проверяем, что у скидочной цены жирный шрифт:
        if(!(driver.findElement(By.cssSelector(".campaign-price"))
                .getCssValue("font-weight").equals("bold"))) {
            System.err.println("Шрифт не жирный!");
            System.exit(-1); }

        }
    @After
    public void stop(){
        driver.quit();
        driver = null;
    }
}


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

using Xunit;

namespace Platibus.UnitTests.SQLite
{
    [CollectionDefinition(Name)]
    public class SQLiteCollection : ICollectionFixture<SQLiteFixture>
    {
        public const string Name = "UnitTests.SQLite";
    }
}


text:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	package="no.nordicsemi.android.dfu">
	<uses-permission android:name="android.permission.BLUETOOTH"/>
	<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
</manifest>


text:
require 'rspec/core'
require 'rantly/property'

class RSpec::Core::ExampleGroup
  def property_of(&block)
    Rantly::Property.new(block)
  end
end


text:
package it.rainbowbreeze.libs.logic;

import android.text.TextUtils;

import java.util.HashMap;

import it.rainbowbreeze.libs.common.IRainbowLogFacility;

/**
 * Created by alfredomorresi on 16/05/15.
 */
public class RainbowStatusChangeNotifier {
    private static final String LOG_TAG = RainbowStatusChangeNotifier.class.getSimpleName();

    private final IRainbowLogFacility mLogFacility;
    private final HashMap<String, StatusChangerListener> mListeners;

    public static interface StatusChangerListener {
        void OnStatusChanges(String statusKey);
    }

    public RainbowStatusChangeNotifier(IRainbowLogFacility logFacility) {
        mLogFacility = logFacility;
        mListeners = new HashMap<>();
    }

    public void registerListener(String newListenerId, StatusChangerListener listener) {
        if (TextUtils.isEmpty(newListenerId)) return;
        if (null == listener) return;

        mListeners.put(newListenerId, listener);
    }

    public void unregisterListener(String listenerId) {
        if (TextUtils.isEmpty(listenerId)) return;
        if (mListeners.containsKey(listenerId)) {
            mListeners.remove(listenerId);
        }
    }

    protected void notifyStatusChanged(String statusKey) {
        mLogFacility.v(LOG_TAG, "Sending status change for id " + statusKey);
        for (StatusChangerListener listener : mListeners.values()) {
            listener.OnStatusChanges(statusKey);
        }
    }
}


text:
import {IssuesCreateResponseMilestone} from "@octokit/rest"

export interface IMilestone extends IssuesCreateResponseMilestone {
  repository_url:string
}

export const MilestoneIndexes = {
	v1: "&id,repository_url,url,title"
}


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

    <parent>
        <groupId>org.treewalk.devops</groupId>
        <artifactId>org-treewalk-devops-parent-pom</artifactId>
        <version>0.1-SNAPSHOT</version>
        <relativePath>../org-treewalk-devops-parent/pom.xml</relativePath>
    </parent>

    <artifactId>org-treewalk-devops-packaging</artifactId>
    <packaging>pom</packaging>
    <name>Treewalk DevOps Platform: Packaging</name>

    <description>Deployment packaging for the Treewalk DevOps project</description>

    <modules>
        <module>org-treewalk-devops-packaging-nexus3</module>
    </modules>

</project>


text:
package com.example.android.assistantplayback.data;

import android.app.SearchManager;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
import android.provider.BaseColumns;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;

import com.example.android.assistantplayback.model.Movie;

import java.util.List;

/**
 * Provides global search on the app's movie catalog. The assistant will query this provider for
 * results.

 * Note: If you provide WatchAction feeds to Google, then you do not need this class. You should
 * still handle the playback intent and media controls in your fragment. This class enables on-device search..
 */
public class VideoContentProvider extends ContentProvider {

    private static final String TAG = "VideoContentProvider";

    private static final String AUTHORITY = "com.example.android.assistantplayback";

    private MockDatabase mDatabase;

    // UriMatcher constant for search suggestions
    private static final int SEARCH_SUGGEST = 1;

    private UriMatcher mUriMatcher;

    private final String[] queryProjection =
            new String[] {
                BaseColumns._ID,
                MockDatabase.KEY_NAME,
                MockDatabase.KEY_DESCRIPTION,
                MockDatabase.KEY_ICON,
                MockDatabase.KEY_DATA_TYPE,
                MockDatabase.KEY_IS_LIVE,
                MockDatabase.KEY_VIDEO_WIDTH,
                MockDatabase.KEY_VIDEO_HEIGHT,
                MockDatabase.KEY_AUDIO_CHANNEL_CONFIG,
                MockDatabase.KEY_PURCHASE_PRICE,
                MockDatabase.KEY_RENTAL_PRICE,
                MockDatabase.KEY_RATING_STYLE,
                MockDatabase.KEY_RATING_SCORE,
                MockDatabase.KEY_PRODUCTION_YEAR,
                MockDatabase.KEY_COLUMN_DURATION,
                MockDatabase.KEY_ACTION,
                SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID
            };

    @Override
    public boolean onCreate() {
        mDatabase = new MockDatabase();
        mUriMatcher = buildUriMatcher();
        return true;
    }

    private UriMatcher buildUriMatcher() {
        UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
        uriMatcher.addURI(
                AUTHORITY, "/search/" + SearchManager.SUGGEST_URI_PATH_QUERY, SEARCH_SUGGEST);
        uriMatcher.addURI(
                AUTHORITY,
                "/search/" + SearchManager.SUGGEST_URI_PATH_QUERY + "/*",
                SEARCH_SUGGEST);
        return uriMatcher;
    }

    @Nullable
    @Override
    public Cursor query(
            @NonNull Uri uri,
            @Nullable String[] projection,
            @Nullable String selection,
            @Nullable String[] selectionArgs,
            @Nullable String sortOrder) {

        Log.d(TAG, uri.toString());

        if (mUriMatcher.match(uri) == SEARCH_SUGGEST) {
            Log.d(TAG, "Search suggestions requested.");

            return search(uri.getLastPathSegment());

        } else {
            Log.d(TAG, "Unknown uri to query: " + uri);
            throw new IllegalArgumentException("Unknown Uri: " + uri);
        }
    }

    private Cursor search(String query) {
        List<Movie> results = mDatabase.search(query);

        MatrixCursor matrixCursor = new MatrixCursor(queryProjection);
        if (!results.isEmpty()) {
            for (Movie movie : results) {
                matrixCursor.addRow(convertMovieIntoRow(movie));
            }
        }

        return matrixCursor;
    }

    private Object[] convertMovieIntoRow(Movie movie) {
        return new Object[] {
            movie.getId(),
            movie.getTitle(),
            movie.getDescription(),
            movie.getCardImage(),
            movie.getContentType(),
            movie.isLive(),
            movie.getWidth(),
            movie.getHeight(),
            movie.getAudioChannelConfig(),
            movie.getPurchasePrice(),
            movie.getRentalPrice(),
            movie.getRatingStyle(),
            movie.getRatingScore(),
            movie.getProductionYear(),
            movie.getDuration(),
            "GLOBALSEARCH",
            movie.getId()
        };
    }

    @Nullable
    @Override
    public String getType(@NonNull Uri uri) {
        return null;
    }

    @Nullable
    @Override
    public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) {
        throw new UnsupportedOperationException("Insert is not implemented.");
    }

    @Override
    public int delete(@NonNull Uri uri, @Nullable String s, @Nullable String[] strings) {
        throw new UnsupportedOperationException("Delete is not implemented.");
    }

    @Override
    public int update(
            @NonNull Uri uri,
            @Nullable ContentValues contentValues,
            @Nullable String s,
            @Nullable String[] strings) {
        throw new UnsupportedOperationException("Update is not implemented.");
    }
}


text:
@interface Utils : NSObject

void showAlert (NSString* sMessage);

@end


text:
import { Meteor } from 'meteor/meteor';

import { hasPermission } from '../../../authorization';
import { Notifications } from '../../../notifications';
import { RocketChatFile } from '../../../file';
import { RocketChatFileCustomSoundsInstance } from '../startup/custom-sounds';

Meteor.methods({
	uploadCustomSound(binaryContent, contentType, soundData) {
		if (!hasPermission(this.userId, 'manage-sounds')) {
			throw new Meteor.Error('not_authorized');
		}

		const file = new Buffer(binaryContent, 'binary');

		const rs = RocketChatFile.bufferToStream(file);
		RocketChatFileCustomSoundsInstance.deleteFile(`${ soundData._id }.${ soundData.extension }`);
		const ws = RocketChatFileCustomSoundsInstance.createWriteStream(`${ soundData._id }.${ soundData.extension }`, contentType);
		ws.on('end', Meteor.bindEnvironment(() =>
			Meteor.setTimeout(() => Notifications.notifyAll('updateCustomSound', { soundData }), 500),
		));

		rs.pipe(ws);
	},
});