text:
package ch.idsia.agents.controllers.kbarrett.first;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

import ch.idsia.agents.controllers.kbarrett.Encoding;

/**
 * This class is responsible for seeing what is in the vicinity of Mario.
 * @author Kim Barrett
 */
public class LevelSceneInvestigator
{
	//Data
		/**
		 * Stores Mario's location in the levelScene.
		 * Used for translating between {@link #map} co-ordinates & levelScene co-ordinates.
		 */
		private int[] marioLoc;
		/**
		 * Stores the float position of Mario on the screen during the initial frame.
		 */
		private float[] marioInitialScreenPos;
		/**
		 * Stores the float position of Mario on the screen during the last frame.
		 */
		private float[] marioLastScreenPos;
		/**
		 * Stores whether Mario has moved to a different position within the map (i.e. whether marioMapLoc has changed) on this iteration.
		 */
		private boolean justMoved = false;
		/**
		 * Stores Mario's knowledge about the environment.
		 */
		private ArrayList<ArrayList<MapSquare>> map;
		/**
		 * Stores Mario's current position within the {@link #map}.
		 */
		private int[] marioMapLoc = {0,0};
		/**
		 * Stores the physical size of a square in levelScene and map.
		 * @see ch.idsia.agents.controllers.kbarrett.LevelSceneInvestigator.levelScene
		 */
		private static final float SQUARESIZE = 16f;
		/**
		 * Stores whether there is an enemy within {@link #enemybound} of Mario.
		 */
		private boolean enemyFound = false;
		/**
		 * The maximum distance an enemy can be away for Mario to attempt to deal with it.
		 */
		private int enemybound = 2;
		/**
		 * Stores the current plan Mario is executing and is also responsible for making new plans.
		 */
		private PlanStorer planStorer;
		/**
		 * Mario's current mode.
		 * 2 = fire mode; 1 = large mode; 0 = small mode.
		 */
		private int marioMode;
		/**
		 * Direction Mario is currently moving in, where -1 is left, 0 is not moving & 1 is right.
		 */
		private byte directionOfMovement = 0;

		public LevelSceneInvestigator()
		{
			planStorer = new PlanStorer();
		}

		/**
		 * @return true if Mario isn't currently moving in the x direction and false if he is.
		 */
		private boolean isStationary()
		{
			return directionOfMovement == 0;
		}

	//Methods for updating the data
		/**
		 * Create a new (empty) map
		 */
		public void createEmptyMap()
		{
			map = new ArrayList<ArrayList<MapSquare>>();
			map.add(new ArrayList<MapSquare>());
		}
		/**
		 * Used for updating the {@link #map} from a newly acquired levelScene.
		 * @param levelScene a 2D array representing the current environment of Mario encoded as integers.
		 */
		public void updateMapFromLevelScene(byte[][] levelScene)
		{
			//Updates map using this levelScene
			MapUpdater.updateMap(map, levelScene, marioMapLoc);
			//Checks whether any step of the plan has become an Environment piece by this update.
			planStorer.checkPlan();
		}
		/**
		 * Used for updating Mario's screen position.
		 * Note: will only update the stored position if it has varied by more than {@link #SQUARESIZE}.
		 * This method also updates {@link #marioMapLoc}, if Mario has moved into the space represented by a different position in map.
		 * @param marioScreenPos a float array of size 2 containing Mario's actual position on the screen. Note: this is as an (x,y) coordinate.
		 */
		public void setMarioScreenPos(float[] marioScreenPos)
		{
			/*Swap the terms in marioScreenPos, so they match the y-x orientation of the map.*/
			float temp = marioScreenPos[0];
			marioScreenPos[0] = marioScreenPos[1];
			marioScreenPos[1] = temp;

			//On the first run through, store the top-left (physical) location of the square we're in as our current position
			if(this.marioInitialScreenPos == null || this.marioLastScreenPos == null)
			{
				this.marioInitialScreenPos = new float[2];
				this.marioInitialScreenPos[0] = marioScreenPos[0] - SQUARESIZE/2;
				this.marioInitialScreenPos[1] = marioScreenPos[1] - SQUARESIZE/2;

				this.marioLastScreenPos = new float[2];
				this.marioLastScreenPos[0] = marioScreenPos[0];
				this.marioLastScreenPos[1] = marioScreenPos[1];
			}
			//On all subsequent runs, use the initial position to calculate our current position in the map
			else
			{
				//Store the previous location in the map
				int[] prevMapLoc = new int[] {marioMapLoc[0], marioMapLoc[1]};

				//Calculate new positions
				marioMapLoc[0] = (int)((marioScreenPos[0] - this.marioInitialScreenPos[0]) / SQUARESIZE) + marioLoc[0];
				marioMapLoc[1] = (int)((marioScreenPos[1] - this.marioInitialScreenPos[1]) / SQUARESIZE) + marioLoc[1];

				//If previous and new differ, then we have moved
				if(prevMapLoc[0] != marioMapLoc[0] || prevMapLoc[1] != prevMapLoc[1])
				{
					justMoved = true;
				}
				else
				{
					justMoved = false;
				}

				//If old & new screen positions are equals then we are stationary
				float diff = marioScreenPos[0] - this.marioLastScreenPos[0];
				if(diff < 0)
				{
					directionOfMovement = -1;
				}
				else if (diff == 0)
				{
					directionOfMovement = 0;
				}
				else
				{
					directionOfMovement = 1;
				}
				//set previous position to be the current position
				marioLastScreenPos[0] = marioScreenPos[0];
				marioLastScreenPos[1] = marioScreenPos[1];
			}
		}
		/**
		 * Used for updating {@link #marioLoc}.
		 * @param marioLoc int array of size 2 representing the position of Mario in levelScene.
		 */
		public void setMarioLoc(int[] marioLoc)
		{
			this.marioLoc = marioLoc;
		}
		/**
		 * @return the indices of Mario's current location within {@link #map}.
		 */
		public int[] getMarioMapLoc()
		{
			return marioMapLoc;
		}
		/**
		 * @param marioMode = 0, 1 or 2 representing small, large, fire (respectively).
		 */
		public void setMarioMode(int marioMode)
		{
			this.marioMode = marioMode;
		}
		/**
		 * @return 0 if Mario is small, 1 if Mario is large or 2 if Mario is fire.
		 */
		public int getMarioMode()
		{
			return marioMode;
		}
		/**
		 * @return boolean representing whether there's an enemy within {@link #enemybound} of Mario.
		 */
		public boolean isEnemy()
		{
			return enemyFound;
		}
		/**
		 * @param y - y index in map
		 * @param x - x index in map
		 * @return location in {@link #map} corresponding to [y,x]
		 */
		public MapSquare getMapSquare(int y, int x)
		{
			return map.get(y).get(x);
		}

	//Methods for analysing the environment

		/**
		 * Used to make a decision based on the environment about which location Mario needs to move to.
		 * @param isFacingRight indicating whether Mario is facing right or not.
		 * @return byte array of size 2 denoting the location that has been decided to move towards.
		 * Returns null if no location has been chosen.
		 */
		public MapSquare getNextLocation(boolean isJumping)
		{
			//Check if we have achieved the goal of our last plan step & remove it from the plan
			boolean lastStepAchieved = planStorer.isPlanStepAchieved(getMarioMapSquare());

			//If we don't already have a plan or we have an unimportant plan (i.e. one that just moves us across the board)
			if(!planStorer.havePlan() || !planStorer.isImportant())
			{
				makeNewPlan();
			}

			//If we have just made a move
			if(justMoved)
			{
				//If we are not where we expected to be
				if(!lastStepAchieved)
				{
					planStorer.replan(getMarioMapSquare(), getMarioMode());
				}
			}

			return getLocationToMoveTo(isJumping);
		}
		/**
		 * Used to get the location Mario wants to move towards.
		 * Generally corresponds to the next stage in the plan, though sometimes different if
		 * there are enemies to deal with or Mario needs to be stationary for the next move.
		 * @param isJumping - whether Mario is currently jumping
		 * @return a MapSquare that Mario should move towards
		 */
		private MapSquare getLocationToMoveTo(boolean isJumping)
		{
			//Find nearby enemies
			List<MapSquare> enemy = checkForEnemies(enemybound, enemybound);
			if(enemy.size() > 0)
			{
				//Adapt plan to avoid them
				planStorer.avoid(enemy, map, marioMode, 6);
			}

			//Get next stage in the plan
			MapSquare s =  planStorer.getLocationToMoveTo(getMarioMapSquare(), this);
			//If our next step is to jump upwards we need to be stationary (relative to the x axis) first.
			if(!isStationary() && !isJumping && getMarioMapSquare().getSquareAbove().equals(s))
			{
				return getMarioMapSquare();
			}
			//Otherwise return the next stage in the plan
			return s;
		}
		/**
		 * @return MapSquare that Mario is currently occupying
		 */
		private MapSquare getMarioMapSquare()
		{
			return map.get(marioMapLoc[0]).get(marioMapLoc[1]);
		}

		/**
		 * Finds a location that would be good for Mario to move towards and makes a plan to get there.
		 * @return true if we succeeded in making a plan
		 */
		private boolean makeNewPlan()
		{
			ArrayList<MapSquare> allRewards = getAllRewards();
			for(MapSquare square : allRewards)
			{
				//Find a good location to move towards
				planStorer.makePlan(square, getMarioMapSquare(), getMarioMode());
				//If this succeeded, then use this plan
				if(planStorer.havePlan())
				{
					return true;
				}
			}
			if(!planStorer.havePlan())
			{
				//if we still don't have a plan, plan to move to the RHS of the screen
				planStorer.makePlan(getBestRightHandSide(), getMarioMapSquare(), false, getMarioMode());
			}
			return planStorer.havePlan();
		}

		/**
		 * @return list of all MapSquares (within jumping reach of Mario in the x-direction) containing "reward" types (i.e. {@link Encoding#COIN} or {@link Encoding#FIRE_FLOWER}.)
		 */
		private ArrayList<MapSquare> getAllRewards()
		{
			ArrayList<MapSquare> rewardsFound = new ArrayList<MapSquare>(2 * Movement.MAX_JUMP_WIDTH);
			for(
					int i = Math.max(0, marioMapLoc[1] - Movement.MAX_JUMP_WIDTH);
					    i < Math.min(map.get(0).size(), marioMapLoc[1] + Movement.MAX_JUMP_WIDTH);
					++i
				)
			{
				innerloop : for(int j =  0; j <	map.size(); ++j)
				{
					if(map.get(j).get(i) == null)
					{
						//It doesn't have an encoding, so can't contain a reward type.
						continue innerloop;
					}
					if(map.get(j).get(i).getEncoding() == Encoding.COIN || map.get(j).get(i).getEncoding() == Encoding.FIRE_FLOWER)
					{
						rewardsFound.add(map.get(j).get(i));
					}
				}
			}
			return rewardsFound;
		}
		/**
		 * Gets an empty square close to the RHS of the screen
		 * @return MapSquare corresponding to this empty square
		 */
		public MapSquare getBestRightHandSide()
		{
			//whether we have found an environment piece in this column or not
			boolean found = false;

			//Iterate from the bottom right of the map, up each column towards Mario
			//Note: we have to be above the ground for Mario to be able to move towards it, so we look for the first non-Environment piece above an Environment piece.
			for(int x = map.get(0).size() - 1; x >= marioMapLoc[1]; --x)
			{
				innerloop : for(int y = map.size() - 1; y >= 0 ; --y)
				{
					MapSquare rightHandSquare = map.get(y).get(x);

					if(rightHandSquare == null)
					{
						continue innerloop;
					}
					//if it's an Environment piece, then we have found an Environment piece in this column
					else if(Encoding.isEnvironment(rightHandSquare))
					{
						found = true;
					}
					//if we have previously found an Environment piece (& this piece is not Environment)
					else if (found)
					{
						//then this is the square we want to move towards
						//debugPrint("Found a RHS square to move towards " + map.get(y).get(x));
						return map.get(y).get(x);
					}
				}
				/*
				 * If we haven't found a non-Environment square in this column (above an Environment piece)
				 * then move to next column & look again
				 */
				found = false;
			}
			return null;
		}
		/**
		 * Searches the immediate vicinity of Mario for enemies.
		 * @param xBound - how far in each direction along the x-axis we want to look
		 * @param yBound - how far in each direction along the y-axis we want to look
		 * @return list of MapSquares that contains enemies.
		 */
		public LinkedList<MapSquare> checkForEnemies(int xBound, int yBound)
		{
			enemyFound = false;
			LinkedList<MapSquare> enemies = new LinkedList<MapSquare>();
			for(int j = marioMapLoc[0] + yBound; j >= marioMapLoc[0] - yBound; --j)
			{
				for(int k = marioMapLoc[1] + xBound; k >= marioMapLoc[1] - xBound ; --k)
				{
					if(Encoding.isEnemySprite(map.get(j).get(k)))
					{
						enemyFound = true;
						enemies.add(map.get(j).get(k));
					}
				}
			}
			return enemies;
		}

		//The following are methods that can be used while debugging
		/**
		 * Makes sure all encodings in the levelScene have been encountered before.
		 */
		private void checkLevelScene(byte[][] levelScene)
		{
			for(int i = 0; i< levelScene.length; i++)
			{
				middleloop: for(int j = 0; j < levelScene[i].length; ++j)
				{
					for(int thing : Encoding.knownThings)
					{
						if(levelScene[i][j] == thing)
						{
							continue middleloop;
						}
					}
					System.err.println("ARRRRRRGGGGHHHHHH: " + levelScene[i][j]);
				}
			}
		}
		/**
		 * Prints out the current map in the agent's memory
		 */
		private void printMap()
		{
			for(int i = 0; i<map.size(); ++i)
			{
				for(int j = 0; j<map.get(i).size(); ++j)
				{
					String s = "";
					if(i == marioMapLoc[0] && j == marioMapLoc[1]) {s += "*";}
					if(map.get(i).get(j) == null) {s += ""+map.get(i).get(j);}
					else {s += ""+map.get(i).get(j).getEncoding();}
					if(i == marioMapLoc[0] && j == marioMapLoc[1]) {s += "*";}
					while(s.length()<4)
					{
						s+=" ";
					}
					System.out.print(s);
				}
				System.out.println();
			}
		}

}


text:
/*global CSSMatrix*/
/*global WebKitCSSMatrix*/
/*global MSCSSMatrix*/

/**
 * Changes the css transition configuration on target element.
 *
 * @param {jQuery} $target    The element to edited
 * @param {string} transition The css transition configuration of target
 */
export function changeTransition($target, transition) {
    $target.css('-webkit-transition', transition);
    $target.css('transition', transition);
}

/**
 * Changes the css transform configuration on target element.
 *
 * @param {jQuery} $target   The element to edited
 * @param {string} transform The css transform configuration of target
 */
export function changeTransform($target, transform) {
    $target.css('-webkit-transform', transform);
    $target.css('transform', transform);
}

/**
 * Translate the jquery element with Translate 3D CSS.
 *
 * @param {jQuery } $target The jquery element
 * @param {Number}  delta   The delta of translate
 */
export function changeTranslate($target, delta) {
    let trans = delta + 'px, 0px, 0px';

    changeTransform($target, 'translate3d(' + trans + ')');
}

/**
 * Get the horizontal position of target element.
 *
 * @param {jQuery} $target The jquery target
 *
 * @return {number}
 */
export function getTargetPosition($target) {
    let transformCss = $target.css('transform'),
        transform = {e: 0, f: 0},
        reMatrix,
        match;

    if (transformCss) {
        if ('function' === typeof CSSMatrix) {
            transform = new CSSMatrix(transformCss);

        } else if ('function' === typeof WebKitCSSMatrix) {
            transform = new WebKitCSSMatrix(transformCss);

        } else if ('function' === typeof MSCSSMatrix) {
            transform = new MSCSSMatrix(transformCss);

        } else {
            reMatrix = /matrix\(\s*-?\d+(?:\.\d+)?\s*,\s*-?\d+(?:\.\d+)?\s*,\s*-?\d+(?:\.\d+)?\s*,\s*-?\d+(?:\.\d+)?\s*,\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*\)/;
            match = transformCss.match(reMatrix);

            if (match) {
                transform.e = parseInt(match[1], 10);
                transform.f = parseInt(match[2], 10);
            }
        }
    }

    return transform.e;
}

/**
 * Checks if the window width is wider than the minimum width defined in
 * options.
 *
 * @param {Sidebar} self The sidebar instance
 *
 * @returns {boolean}
 */
export function isOverMinWidth(self) {
    let $window = $(window),
        windowWidth = $window.innerWidth();

    if (self.$body.height() > $window.innerHeight()) {
        windowWidth += self.nativeScrollWidth;
    }

    return windowWidth >= self.options.minLockWidth;
}

redpajama_set_name: RedPajamaGithub


text:
package org.bouncycastle.asn1.ua;

import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1OctetString;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.DEROctetString;
import org.bouncycastle.math.ec.ECPoint;

public class DSTU4145PublicKey
    extends ASN1Object
{

    private ASN1OctetString pubKey;

    public DSTU4145PublicKey(ECPoint pubKey)
    {
        // We always use big-endian in parameter encoding
        this.pubKey = new DEROctetString(DSTU4145PointEncoder.encodePoint(pubKey));
    }

    private DSTU4145PublicKey(ASN1OctetString ocStr)
    {
        pubKey = ocStr;
    }

    public static DSTU4145PublicKey getInstance(Object obj)
    {
        if (obj instanceof DSTU4145PublicKey)
        {
            return (DSTU4145PublicKey)obj;
        }

        if (obj != null)
        {
            return new DSTU4145PublicKey(ASN1OctetString.getInstance(obj));
        }

        return null;
    }

    public ASN1Primitive toASN1Primitive()
    {
        return pubKey;
    }

}


text:
<!DOCTYPE html>

		<meta charset="utf-8" />

		<link href="asset/css/bootstrap.css" rel="stylesheet" />
		<link rel="stylesheet" href="asset/css/dexter.min.css" />
		<link rel="stylesheet" href="asset/css/font-awesome.min.css" />

		<link rel="stylesheet" href="asset/css/prettify.css" />

 Checker Code

					HE_EQUALS_USE_HASHCODE

 Description

					Class defines equals() and uses Object.hashCode()

 Severity

					Critical

 Detector / Bug Pattern

					FindHEmismatch / HE

 More Information

 This class overrides equals(Object), but does not
  override hashCode(), and inherits the implementation of
  hashCode() from java.lang.Object (which returns
  the identity hash code, an arbitrary value assigned to the object
  by the VM).  Therefore, the class is very likely to violate the
  invariant that equal objects must have equal hashcodes.

If you don't think instances of this class will ever be inserted into a HashMap/HashTable,
the recommended hashCode implementation to use is:

public int hashCode() {
  assert false : "hashCode not designed";
  return 42; // any arbitrary constant will do
  }

 Bad Code

public class MyClass {

    private final String importantField;
    private final String anotherField;

    public MyClass(final String equalField, final String anotherField) {
        this.importantField = equalField;
        this.anotherField = anotherField;
    }

    @Override
    public boolean equals(final Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final MyClass other = (MyClass) obj;
        if (importantField == null) {
            if (other.importantField != null)
                return false;
        } else if (!importantField.equals(other.importantField))
            return false;
        return true;
    }

	 // Incorrect : But this class is very likely to violate the invariant that equal objects must have equal hashcodes.
}

 Good Code

public class MyClass {
    // other code including equals() method
    ...
    @Override
    public int hashCode() {
      assert false : "hashCode not designed";
      return 42; // any arbitrary constant will do
    }
}

 CWE ID

				CWE-586

 Code Review Asset

				N/A

 URLs

					OTHER SITE  :

					http://www.javaranch.com/journal/2002/10/equalhash.html

					http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html

					STACKOVERFLOW SITE  :

					http://stackoverflow.com/questions/2265503/why-do-i-need-to-override-the-equals-and-hashcode-methods-in-java


text:
package com.miguelgaeta.easyprefs.typetoken;

import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.List;

import lombok.NonNull;
import lombok.ToString;

/**
 * Created by Miguel Gaeta on 6/1/15.
 */
@ToString
abstract class TypeToken {

    protected @NonNull List<TypeToken> nestedTypeTokens = new ArrayList<>();

    @NonNull
    protected String objectClassName;

    /**
     * Set stores the class name of the underlying object
     * which can be used for deserialization and then
     * builds the rest of the type token.
     */
    void set(Object object) {

        this.objectClassName = object.getClass().getName();

        build(object);
    }

    /**
     * Build up the type token object from
     * some complex object.  Generally will involve
     * adding additional nested type tokens.
     */
    protected abstract void build(Object object);

    /**
     * Given an arbitrary object does it match
     * this type token.
     */
    protected abstract boolean isMatchingType(Object object);

    /**
     * Given a string attempt to de-serialize it
     * into the associated object for this
     * type token.
     */
    abstract Object deserialize(Gson gson, String json);
}


text:
namespace network::cors {

namespace {

// Timeout values below are at the discretion of the user agent.

// Default cache expiry time for an entry that does not have
// Access-Control-Max-Age header in its CORS-preflight response.
constexpr base::TimeDelta kDefaultTimeout = base::Seconds(5);

// Maximum cache expiry time. Even if a CORS-preflight response contains
// Access-Control-Max-Age header that specifies a longer expiry time, this
// maximum time is applied.
constexpr base::TimeDelta kMaxTimeout = base::Hours(2);

// Holds TickClock instance to overwrite TimeTicks::Now() for testing.
const base::TickClock* tick_clock_for_testing = nullptr;

// We define the value here because we want a lower-cased header name.
constexpr char kAuthorization[] = "authorization";

base::TimeTicks Now() {
  if (tick_clock_for_testing)
    return tick_clock_for_testing->NowTicks();
  return base::TimeTicks::Now();
}

base::TimeDelta ParseAccessControlMaxAge(
    const absl::optional<std::string>& max_age) {
  if (!max_age) {
    return kDefaultTimeout;
  }

  int64_t seconds;
  if (!base::StringToInt64(*max_age, &seconds)) {
    return kDefaultTimeout;
  }

  // Negative value doesn't make sense - use 0 instead, to represent that the
  // entry cannot be cached.
  if (seconds < 0) {
    return base::TimeDelta();
  }
  // To avoid integer overflow, we compare seconds instead of comparing
  // TimeDeltas.
  static_assert(kMaxTimeout == base::Seconds(kMaxTimeout.InSeconds()),
                "`kMaxTimeout` must be a multiple of one second.");
  if (seconds >= kMaxTimeout.InSeconds()) {
    return kMaxTimeout;
  }

  return base::Seconds(seconds);
}

// Parses `string` as a Access-Control-Allow-* header value, storing the result
// in `set`. This function returns false when `string` does not satisfy the
// syntax here: https://fetch.spec.whatwg.org/#http-new-header-syntax.
bool ParseAccessControlAllowList(const absl::optional<std::string>& string,
                                 base::flat_set<std::string>* set,
                                 bool insert_in_lower_case) {
  DCHECK(set);

  if (!string)
    return true;

  net::HttpUtil::ValuesIterator it(string->begin(), string->end(), ',', true);
  while (it.GetNext()) {
    base::StringPiece value = it.value_piece();
    if (!net::HttpUtil::IsToken(value)) {
      set->clear();
      return false;
    }
    set->insert(insert_in_lower_case ? base::ToLowerASCII(value)
                                     : std::string(value));
  }
  return true;
}

// Joins the strings in the given `set ` with commas.
std::string JoinSet(const base::flat_set<std::string>& set) {
  std::vector<base::StringPiece> values(set.begin(), set.end());
  return base::JoinString(values, ",");
}

}  // namespace

// static
void PreflightResult::SetTickClockForTesting(
    const base::TickClock* tick_clock) {
  tick_clock_for_testing = tick_clock;
}

// static
std::unique_ptr<PreflightResult> PreflightResult::Create(
    const mojom::CredentialsMode credentials_mode,
    const absl::optional<std::string>& allow_methods_header,
    const absl::optional<std::string>& allow_headers_header,
    const absl::optional<std::string>& max_age_header,
    absl::optional<mojom::CorsError>* detected_error) {
  std::unique_ptr<PreflightResult> result =
      base::WrapUnique(new PreflightResult(credentials_mode));
  absl::optional<mojom::CorsError> error =
      result->Parse(allow_methods_header, allow_headers_header, max_age_header);
  if (error) {
    if (detected_error)
      *detected_error = error;
    return nullptr;
  }
  return result;
}

PreflightResult::PreflightResult(const mojom::CredentialsMode credentials_mode)
    : credentials_(credentials_mode == mojom::CredentialsMode::kInclude) {}

PreflightResult::~PreflightResult() = default;

absl::optional<CorsErrorStatus> PreflightResult::EnsureAllowedCrossOriginMethod(
    const std::string& method,
    bool acam_preflight_spec_conformant) const {
  // `normalized_method_allowed`: Request method is normalized to upper case,
  // and comparison is performed in case-sensitive way, that means access
  // control header should provide an upper case method list. This behavior is
  // to be deprecated (https://crbug.com/1228178).
  const std::string normalized_method = base::ToUpperASCII(method);
  const bool normalized_method_allowed =
      methods_.find(normalized_method) != methods_.end() ||
      IsCorsSafelistedMethod(normalized_method);

  // `method_allowed`: Request method should be already normalized (in Blink, in
  // https://xhr.spec.whatwg.org/#dom-xmlhttprequest-open or
  // https://fetch.spec.whatwg.org/#dom-request) so we don't normalize the
  // method again here.
  const bool method_allowed =
      methods_.find(method) != methods_.end() || IsCorsSafelistedMethod(method);

  // This should be consistent with `NetworkServiceCorsPreflightMethodAllowed`
  // in `tools/metrics/histograms/enums.xml`.
  enum CorsPreflightMethodAllowed : uint8_t {
    kBothDisallowed = 0,
    kNormalizedMethodAllowed = 1,
    kMethodAllowed = 2,
    kBothAllowed = 3,
    kMaxValue = kBothAllowed
  };

  UMA_HISTOGRAM_ENUMERATION(
      "NetworkService.CorsPreflightMethodAllowed",
      normalized_method_allowed
          ? (method_allowed ? kBothAllowed : kNormalizedMethodAllowed)
          : (method_allowed ? kMethodAllowed : kBothDisallowed));

  const bool allowed = acam_preflight_spec_conformant
                           ? method_allowed
                           : normalized_method_allowed;

  if (allowed) {
    return absl::nullopt;
  }

  if (!credentials_ && methods_.find("*") != methods_.end())
    return absl::nullopt;

  return CorsErrorStatus(mojom::CorsError::kMethodDisallowedByPreflightResponse,
                         method);
}

absl::optional<CorsErrorStatus>
PreflightResult::EnsureAllowedCrossOriginHeaders(
    const net::HttpRequestHeaders& headers,
    bool is_revalidating,
    NonWildcardRequestHeadersSupport non_wildcard_request_headers_support)
    const {
  const bool has_wildcard = !credentials_ && headers_.contains("*");
  if (has_wildcard) {
    if (non_wildcard_request_headers_support) {
      // "authorization" is the only member of
      // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name.
      if (headers.HasHeader(kAuthorization) &&
          !headers_.contains(kAuthorization)) {
        CorsErrorStatus error_status(
            mojom::CorsError::kHeaderDisallowedByPreflightResponse,
            kAuthorization);
        error_status.has_authorization_covered_by_wildcard_on_preflight = true;
        return error_status;
      }
    }
    return absl::nullopt;
  }

  // Forbidden headers are forbidden to be used by JavaScript, and checked
  // beforehand. But user-agents may add these headers internally, and it's
  // fine.
  for (const auto& name : CorsUnsafeNotForbiddenRequestHeaderNames(
           headers.GetHeaderVector(), is_revalidating)) {
    // Header list check is performed in case-insensitive way. Here, we have a
    // parsed header list set in lower case, and search each header in lower
    // case.
    if (!headers_.contains(name)) {
      return CorsErrorStatus(
          mojom::CorsError::kHeaderDisallowedByPreflightResponse, name);
    }
  }
  return absl::nullopt;
}

bool PreflightResult::IsExpired() const {
  return absolute_expiry_time_ <= Now();
}

bool PreflightResult::EnsureAllowedRequest(
    mojom::CredentialsMode credentials_mode,
    const std::string& method,
    const net::HttpRequestHeaders& headers,
    bool is_revalidating,
    NonWildcardRequestHeadersSupport non_wildcard_request_headers_support,
    bool acam_preflight_spec_conformant) const {
  if (!credentials_ && credentials_mode == mojom::CredentialsMode::kInclude) {
    return false;
  }

  if (EnsureAllowedCrossOriginMethod(method, acam_preflight_spec_conformant)) {
    return false;
  }

  if (EnsureAllowedCrossOriginHeaders(headers, is_revalidating,
                                      non_wildcard_request_headers_support)) {
    return false;
  }

  return true;
}

absl::optional<mojom::CorsError> PreflightResult::Parse(
    const absl::optional<std::string>& allow_methods_header,
    const absl::optional<std::string>& allow_headers_header,
    const absl::optional<std::string>& max_age_header) {
  DCHECK(methods_.empty());
  DCHECK(headers_.empty());

  // Keeps parsed method case for case-sensitive search.
  if (!ParseAccessControlAllowList(allow_methods_header, &methods_, false))
    return mojom::CorsError::kInvalidAllowMethodsPreflightResponse;

  // Holds parsed headers in lower case for case-insensitive search.
  if (!ParseAccessControlAllowList(allow_headers_header, &headers_, true))
    return mojom::CorsError::kInvalidAllowHeadersPreflightResponse;

  const base::TimeDelta expiry_delta = ParseAccessControlMaxAge(max_age_header);
  absolute_expiry_time_ = Now() + expiry_delta;

  return absl::nullopt;
}

bool PreflightResult::HasAuthorizationCoveredByWildcard(
    const net::HttpRequestHeaders& headers) const {
  // "*" acts as a wildcard symbol only when `credentials_` is false.
  const bool has_wildcard =
      !credentials_ && headers_.find("*") != headers_.end();

  return has_wildcard && headers.HasHeader(kAuthorization) &&
         !headers_.contains(kAuthorization);
}

base::Value PreflightResult::NetLogParams() const {
  base::Value dict(base::Value::Type::DICTIONARY);
  dict.SetStringKey("access-control-allow-methods", JoinSet(methods_));
  dict.SetStringKey("access-control-allow-headers", JoinSet(headers_));
  return dict;
}

}  // namespace network::cors


text:
using System;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace WebCanvasCore
{
    internal class WebSocketMessageCenter
    {
        public event Action WebSocketOpen;

        public event Action WebSocketNoLongerOpen;

        public event Action<string> MessageReceived;

        private WebSocket Socket { get; set; }

        public async void SendMessage(string message)
        {
            if (Socket == null || Socket.State != WebSocketState.Open) return;

            byte[] data = Encoding.UTF8.GetBytes(message);
            await Socket.SendAsync(
                new ArraySegment<Byte>(data),
                WebSocketMessageType.Text,
                true,
                CancellationToken.None);
        }

        public async Task HandleWebSocketRequest(HttpContext http, Func<Task> next)
        {
            if (http.WebSockets.IsWebSocketRequest)
            {
                if (Socket == null)
                {
                    Socket = await http.WebSockets.AcceptWebSocketAsync();

                    var socketOpenHandler = WebSocketOpen;
                    if (socketOpenHandler != null)
                    {
                        Task.Run(socketOpenHandler);
                    }
                }

                while (Socket.State == WebSocketState.Open)
                {
                    var buffer = new ArraySegment<Byte>(new Byte[4096]);
                    var received = await Socket.ReceiveAsync(buffer, CancellationToken.None);

                    if (received.MessageType == WebSocketMessageType.Text)
                    {
                        string message = Encoding.UTF8.GetString(buffer.Array, buffer.Offset, buffer.Count);

                        MessageReceived?.Invoke(message);
                    }
                }

                Socket = null;

                var handler = WebSocketNoLongerOpen;
                if (handler != null)
                {
                    Task.Run(handler);
                }
            }
            else
            {
                await next();
            }
        }

        public void Close()
        {
            Socket?.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
        }

    }
}


text:
package io.openwire.codec.v3;

import io.openwire.codec.OpenWireInteropTests;

public class OpenWireV3Test extends OpenWireInteropTests {

    /**
     * @param tightEncodingEnabled
     */
    public OpenWireV3Test(boolean tightEncodingEnabled) {
        super(tightEncodingEnabled);
    }

    @Override
    protected int getOpenWireVersion() {
        return 3;
    }
}


text:
<?php

namespace Bobo\Taxonomies\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Taxable
 * @package Bobo\Taxonomies\Models
 */
class Taxable extends Model
{
    /**
     * @todo make this editable via config file
     * @inheritdoc
     */
    protected $table = 'taxables';

    /**
     * @inheritdoc
     */
    protected $fillable = [
        'taxonomy_id',
        'taxable_id',
        'taxable_type'
    ];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\MorphTo
     */
    public function taxable()
    {
        return $this->morphTo();
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function taxonomy()
    {
        return $this->belongsTo(Taxonomy::class, 'taxonomy_id', 'id');
    }

}


text:
package ru.stqa.pft.mantis.model;

/**
 * Created by Admin on 26.07.2017.
 */
public class MailMessage {

  public String to; //К кому пришло письмо
  public String text; //Текст письма

  public MailMessage(String to, String text) {
    this.to = to;
    this.text = text;
  }
}


text:
<?php

namespace Eva\Authentication\Form;

use Eva\Form\Form;
use Eva\Form\Input;

class Login extends Form
{
    public function init()
    {
        $element = new Input();
        $element->setAttributes(array(
            'name' => 'identifier',
            'type' => 'text',
            'placeholder' => 'Электронная почта или телефон',
            'required' => 'required',
        ));
        $element->getLabel()->setText('Электронная почта или телефон');
        $this->set('identifier', $element);

        $element = new Input();
        $element->setAttributes(array(
            'name' => 'password',
            'type' => 'password',
            'placeholder' => 'Пароль',
            'required' => 'required',
        ));
        $element->getLabel()->setText('Пароль');
        $this->append($element);

        $element = new Input();
        $element->setAttributes(array(
            'name' => 'remember',
            'type' => 'checkbox',
        ));
        $element->getLabel()->setText('Запомнить меня');
        $this->append($element);

        $element = new Input();
        $element->setAttributes(array(
            'type' => 'submit',
            'value' => 'Войти',
        ));
        $this->append($element);
    }

}


text:
start: 2020-09-24 18:00
edition: 81
isWebinar: true
participate: "https://www.meetup.com/Chennai-Geek-Night/events/273289220/"
talk: "https://docs.google.com/forms/d/1llJxKCuEnPXOPHnXUQHnc8Unlt_Y4kPvWJqndjl_6Gg/viewform"
agenda:
-
  time: "6:00"
  title: "Deploying application securely using Hashicorp Vault"
  subtitle: "Secret Management becomes tedious while dealing with a lot of users / applications. Let's try to deploy a sample application using Jenkins CI/CD to Kubernetes cluster with Hashicorp vault and understand how vault is able to solve it seamlessly."
  speakers:
  -
    name: "Dinesh Balasubramanian"
    profile: "https://stackoverflow.com/users/5305962/dinesh-balasubramanian?tab=profile"
    description: "Dinesh has explored many technologies like devops tools (docker, kubernetes, terraform, service mesh etc), mobile (both iOS and Android), micro services architecture. He is an avid open-source contributor and is a strong believer of giving back to the community. He is also a programming language enthusiast and has worked on GoLang, Elixir, Java, Swift, Kotlin, Javascript, Typescript."
    image: "dinesh_balasubramanian.jpeg"

-
  time: "7:00"
  title: "Benefits of edge computing in healthcare"
  subtitle: "The widespread adoption of healthcare IoT devices and edge computing will make citizens more aware of their health status. It will also make advanced healthcare resources available in remote areas via telemedicine. The ability for caregivers to regularly keep tabs on their patients will reduce the hospitalization rate significantly. As collaborative edge computing and machine learning are able to preprocess data and generate meaningful analytics in real time, caregivers will spend less time collecting and analysing data and more time caring for their patients."
  speakers:
    -
      name: "Ravishankar Sundaram"
      profile: "https://www.linkedin.com/in/ravishankar-sundaram-a6105739"
      description: "Ravishankar is a Fullstack developer and worked on enterprise applications with microservice architecture and react based web applications."
      image: "Ravishankar.jpg"
---


text:
copyright:
  years: 2014, 2016
lastupdated: "2016-12-06"

---
{:new_window: target="_blank"}
{:shortdesc: .shortdesc}
{:codeblock: .codeblock}
{:screen: .screen}
{:pre: .pre}

# Concessione dell'accesso in lettura

Un utente {{site.data.keyword.objectstorageshort}} con un [ruolo da amministratore](/docs/services/ObjectStorage/os_access_types.html) può concedere l'accesso in lettura a un contenitore a un altro utente e modificare le combinazioni ACL di lettura.
{: shortdesc}

     Autorizzazione
     Opzioni Read ACL

     Legge tutti i riferimenti indipendentemente dall'affiliazione dell'account
      .r,*

     Legge e elenca tutti i riferimenti e li elenca
      .r:*,.rlistings

     Legge e elenca un utente specifico in un progetto specifico
      project_id:user_id

     Legge e elenca un utente specifico in qualsiasi progetto
      *:user_id

     Legge e elenca ogni utente in un progetto specifico
      project_id:*

     Legge e elenca ogni utente in ogni progetto
      *:*

Tabella 1: Autorizzazioni dell'accesso in lettura per opzione

1. Autenticazione delle tue credenziali. Puoi utilizzare le credenziali trovate nella scheda delle credenziali del servizio della IU o puoi generare nuove credenziali. Per ulteriori informazioni sulla generazione di nuove credenziali, consulta [Generazione delle credenziali del servizio](/docs/services/ObjectStorage/os_credentials.html). Riceverai il tuo URL e token di autenticazione {{site.data.keyword.objectstorageshort}} come output.

    Comando Swift:

    ```
    export OS_USER_ID=<user_id>
  export OS_PASSWORD=<password>
  export OS_TENANT_ID=<project_id>
  export OS_AUTH_URL=https://identity.open.softlayer.com/v3
  export OS_REGION_NAME=<region>
  export OS_IDENTITY_API_VERSION=3
  export OS_AUTH_VERSION=3

    swift auth
    ```
    {: codeblock}

    Comando cURL:

    ```
    curl -i -H "X-Auth-User: <user_id>" -H "X-Auth-Key: <password>" <auth_url>
    ```
    {: pre}

2. Concedi l'accesso in lettura immettendo il seguente comando:
    Comando Swift:

    ```
    swift post <container_name> --read-acl "<user_id>:<project_id>"
    ```
    {: pre}

    Comando cURL:

    ```
    curl -i <OS_STORAGE_URL> -X POST -H "Content-Length: 0" -H "X-Container-Read: <tenant_id>:<project_id>" -H "X-Auth-Token: <OS_AUTH_TOKEN>"
    ```
    {: pre}
    **Nota**: utilizza una virgola (,) per separare gli elenchi del controllo dell'accesso.

3. Verifica il valore Read ACL.

    Comando Swift:

    ```
    swift stat <container_name>
    ```
    {: pre}

    Comando cURL:

    ```
    curl -i <OS_STORAGE_URL> -I -H "X-Auth-Token:<OS_AUTH_TOKEN>"
    ```
    {: pre}

    Puoi controllare nel seguente esempio se è stato concesso l'accesso in lettura:

    ```
    HTTP/1.1 204 No Content
  Content-Length: 0
  X-Container-Object-Count: 1
  Accept-Ranges: bytes
  X-Storage-Policy: standard
  X-Container-Read: c727d7e248b448f6b268f31a1bd8691e:3c5b516655e4479881d3d216895faedb
  X-Container-Bytes-Used: 31512
  X-Timestamp: 1462818314.11220
  Content-Type: text/plain; charset=utf-8
  X-Trans-Id: txad7fe001da274b9ba39a6-005772e4d6
  Date: Tue, 28 Jun 2016 20:57:58 GMT
    ```
    {: screen}


text:
package android.accounts;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import com.android.internal.R;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * @hide
 */
public class ChooseAccountTypeActivity extends Activity {
    private static final String TAG = "AccountChooser";

    private HashMap<String, AuthInfo> mTypeToAuthenticatorInfo = new HashMap<String, AuthInfo>();
    private ArrayList<AuthInfo> mAuthenticatorInfosToDisplay;

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

        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "ChooseAccountTypeActivity.onCreate(savedInstanceState="
                    + savedInstanceState + ")");
        }

        // Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
        Set<String> setOfAllowableAccountTypes = null;
        String[] validAccountTypes = getIntent().getStringArrayExtra(
                ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
        if (validAccountTypes != null) {
            setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.length);
            for (String type : validAccountTypes) {
                setOfAllowableAccountTypes.add(type);
            }
        }

        // create a map of account authenticators
        buildTypeToAuthDescriptionMap();

        // Create a list of authenticators that are allowable. Filter out those that
        // don't match the allowable account types, if provided.
        mAuthenticatorInfosToDisplay = new ArrayList<AuthInfo>(mTypeToAuthenticatorInfo.size());
        for (Map.Entry<String, AuthInfo> entry: mTypeToAuthenticatorInfo.entrySet()) {
            final String type = entry.getKey();
            final AuthInfo info = entry.getValue();
            if (setOfAllowableAccountTypes != null
                    && !setOfAllowableAccountTypes.contains(type)) {
                continue;
            }
            mAuthenticatorInfosToDisplay.add(info);
        }

        if (mAuthenticatorInfosToDisplay.isEmpty()) {
            Bundle bundle = new Bundle();
            bundle.putString(AccountManager.KEY_ERROR_MESSAGE, "no allowable account types");
            setResult(Activity.RESULT_OK, new Intent().putExtras(bundle));
            finish();
            return;
        }

        if (mAuthenticatorInfosToDisplay.size() == 1) {
            setResultAndFinish(mAuthenticatorInfosToDisplay.get(0).desc.type);
            return;
        }

        setContentView(R.layout.choose_account_type);
        // Setup the list
        ListView list = (ListView) findViewById(android.R.id.list);
        // Use an existing ListAdapter that will map an array of strings to TextViews
        list.setAdapter(new AccountArrayAdapter(this,
                android.R.layout.simple_list_item_1, mAuthenticatorInfosToDisplay));
        list.setChoiceMode(ListView.CHOICE_MODE_NONE);
        list.setTextFilterEnabled(false);
        list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
                setResultAndFinish(mAuthenticatorInfosToDisplay.get(position).desc.type);
            }
        });
    }

    private void setResultAndFinish(final String type) {
        Bundle bundle = new Bundle();
        bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, type);
        setResult(Activity.RESULT_OK, new Intent().putExtras(bundle));
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "ChooseAccountTypeActivity.setResultAndFinish: "
                    + "selected account type " + type);
        }
        finish();
    }

    private void buildTypeToAuthDescriptionMap() {
        for(AuthenticatorDescription desc : AccountManager.get(this).getAuthenticatorTypes()) {
            String name = null;
            Drawable icon = null;
            try {
                Context authContext = createPackageContext(desc.packageName, 0);
                icon = authContext.getDrawable(desc.iconId);
                final CharSequence sequence = authContext.getResources().getText(desc.labelId);
                if (sequence != null) {
                    name = sequence.toString();
                }
                name = sequence.toString();
            } catch (PackageManager.NameNotFoundException e) {
                // Nothing we can do much here, just log
                if (Log.isLoggable(TAG, Log.WARN)) {
                    Log.w(TAG, "No icon name for account type " + desc.type);
                }
            } catch (Resources.NotFoundException e) {
                // Nothing we can do much here, just log
                if (Log.isLoggable(TAG, Log.WARN)) {
                    Log.w(TAG, "No icon resource for account type " + desc.type);
                }
            }
            AuthInfo authInfo = new AuthInfo(desc, name, icon);
            mTypeToAuthenticatorInfo.put(desc.type, authInfo);
        }
    }

    private static class AuthInfo {
        final AuthenticatorDescription desc;
        final String name;
        final Drawable drawable;

        AuthInfo(AuthenticatorDescription desc, String name, Drawable drawable) {
            this.desc = desc;
            this.name = name;
            this.drawable = drawable;
        }
    }

    private static class ViewHolder {
        ImageView icon;
        TextView text;
    }

    private static class AccountArrayAdapter extends ArrayAdapter<AuthInfo> {
        private LayoutInflater mLayoutInflater;
        private ArrayList<AuthInfo> mInfos;

        public AccountArrayAdapter(Context context, int textViewResourceId,
                ArrayList<AuthInfo> infos) {
            super(context, textViewResourceId, infos);
            mInfos = infos;
            mLayoutInflater = (LayoutInflater) context.getSystemService(
                    Context.LAYOUT_INFLATER_SERVICE);
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            ViewHolder holder;

            if (convertView == null) {
                convertView = mLayoutInflater.inflate(R.layout.choose_account_row, null);
                holder = new ViewHolder();
                holder.text = (TextView) convertView.findViewById(R.id.account_row_text);
                holder.icon = (ImageView) convertView.findViewById(R.id.account_row_icon);
                convertView.setTag(holder);
            } else {
                holder = (ViewHolder) convertView.getTag();
            }

            holder.text.setText(mInfos.get(position).name);
            holder.icon.setImageDrawable(mInfos.get(position).drawable);

            return convertView;
        }
    }
}


text:
package mods.mud.gui;

import java.util.List;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;

import org.lwjgl.opengl.GL11;

public class GuiModUpdateButton extends GuiButton{

    RenderItem renderItem = new RenderItem();
    ItemStack icon = new ItemStack(Blocks.farmland);
    List<String> text = null;
    private GuiScreen parent;
    public GuiModUpdateButton(int id, int x, int y, GuiScreen parent) {
        super(id, x, y, 100, 20, "");
        this.parent = parent;
    }

    @Override
    public void drawButton(Minecraft par1Minecraft, int par2, int par3) {
        super.drawButton(par1Minecraft, par2, par3);

        if(text == null){
            text = par1Minecraft.fontRenderer.listFormattedStringToWidth(StatCollector.translateToLocal("mud.name"), 80);
        }

        renderItem.renderItemIntoGUI(par1Minecraft.fontRenderer, par1Minecraft.getTextureManager(), icon, xPosition+2, yPosition+2);

        int l = 14737632;

        if (!this.enabled)
            l = -6250336;
        else if (this.field_146123_n)
            l = 16777120;

        float scale = 1.25F;
        GL11.glScalef(1F/scale, 1F/scale, 1F/scale);

        for(int i = 0; i < text.size() && i < 2; i++){
            drawCenteredString(par1Minecraft.fontRenderer, text.get(i), (int)(scale*(xPosition+20+40)), (int)(scale*((yPosition+3)+par1Minecraft.fontRenderer.FONT_HEIGHT*i)), l);
        }
        GL11.glScalef(scale, scale, scale);
    }

    @Override
    public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3) {
        boolean press = super.mousePressed(par1Minecraft, par2, par3);
        if(press){
            Minecraft.getMinecraft().displayGuiScreen(new GuiChangelogDownload(parent));
        }
        return press;
    }
}


text:
namespace NLog.Internal
{
    /// <summary>
    /// Supports rendering as string value with limited or no allocations (preferred)
    /// </summary>
    interface IStringValueRenderer
    {
        /// <summary>
        /// Renders the value of layout renderer in the context of the specified log event
        /// </summary>
        /// <param name="logEvent"></param>
        /// <returns>null if not possible or unknown</returns>
        string GetFormattedString(LogEventInfo logEvent);
    }
}


text:
import React from 'react';
import ReactDOM from 'react-dom';
import App from './Main';
import Router from 'react-router'
import routes from '../config/routes';

// Render the main component into the dom
Router.run(routes, function(Handler){
  ReactDOM.render(<Handler /> , document.getElementById('app'));
});


text:
<?php

namespace Google\AdsApi\AdManager\v202202;

/**
 * This file was generated from WSDL. DO NOT EDIT.
 */
class AssetCreativeTemplateVariableMimeType
{
    const JPG = 'JPG';
    const PNG = 'PNG';
    const GIF = 'GIF';
    const SWF = 'SWF';

}


text:
target_process_id: 7096
title: Benthyca arian wrth ddigwyl
advice_anchor_id: benthyca-arian-wrth-ddigwyl
slug: benthyca-arian-wrth-ddigwyl-un
tasks:
  now:
    task01: Ceisiwch ddod o hyd i ffyrdd rhad o fenthyca arian
---
Os gwelwch nad ydych yn rheoli'ch arian yn dda, gallech ystyried benthyca arian er mwyn i chi ymdopi hyd nes i chi gael trefn ar bethau.

Ceisiwch gadw'n glir o fenthyca sy'n costio'n ddrud fel:
* benthycwyr stepen drws
* benthyciadau diwrnod cyflog
* benthyciadau llyfr cofrestru

Cyn edrych ar ffyrdd eraill o fenthyca, sicrhewch eich bod yn deall:
* faint yn union fydd yn ei gostio i chi
* a allwch chi fforddio'r ad-daliadau

#### Benthyca gan deulu a ffrindiau
Gall benthyca arian argyfwng gan aelod o'ch teulu neu ffrind eich helpu i osgoi'r risgiau sydd ynghlwm â benthyca drud, fel benthyciadau diwrnod cyflog neu lyfr cofrestru.

Gwnewch yn siŵr eich bod chi a'r unigolyn rydych yn benthyca ganddo'n cymryd yr amser i:
* drefnu cynllun ad-dalu
* trafod beth fydd yn digwydd os ydych yn hwyr yn talu'r arian yn ôl neu os nad ydych yn ei ad-dalu o gwbl
* cofnodi'ch cytundeb yn ysgrifenedig os bydd angen

Darllenwch ein canllaw [A ddylech chi fenthyca arian gan eich teulu a'ch ffrindiau?](/cy/articles/a-ddylech-gael-benthyg-arian-gan-eich-teulu-neuch-ffrindiau)

#### Gorddrafftiau
Gall eich cyfrif cyfredol gynnig gorddrafft di-log hyd at derfyn penodol.

Bydd rhai cyfrifon cyfredol yn cynnig terfyn cytunedig awtomatig ond efallai y bydd yn rhaid i chi dalu ffioedd a chostau.

Os byddwch yn mynd i orddrafft gwnewch yn siŵr eich bod yn gwybod beth yw eich terfyn cytunedig.

Os ewch dros y terfyn hwn, gallech wynebu ffioedd ychwanegol yn ogystal â chostau llog.

Gall y ffioedd hyn fod yn ddrud iawn.

Siaradwch â'ch banc ynglŷn â pha bryd y disgwyliwch gael eich taliad Credyd Cynhwysol cyntaf er mwyn iddynt ddeall y rheswm dros fynd i orddrafft.

[Darganfyddwch ragor am ffyrdd eraill o fenthyca.](/cy/articles/penderfynu-ar-y-math-gorau-o-gredyd-i-chi)

#### Benthyca o undeb credyd

Mae benthyciadau o undebau credyd yn llawer rhatach na benthyca drud o ffynonellau eraill.

Mae cap ar faint o log allant ei godi. Mae llawer yn codi llai na hyn.

Nid oes unrhyw gostau neu gosbau cudd os ad-dalwch y benthyciad yn gynnar.

Holwch a oes yna undeb credyd yn eich ardal chi.

[Benthyca o undeb credyd.](/cy/articles/benthyca-gan-undeb-credyd)

#### Credyd cartref a benthyciadau stepen drws

O'i gymharu â mathau eraill o fenthyca, gall credyd cartref neu fenthyca stepen drws fod yn ddrud iawn.

Cyn i chi benderfynu cymryd un o'r benthyciadau hyn, cymharwch y gost â mathau eraill o fenthyca.

Gallech ad-dalu llawer iawn mwy o'i gymharu â mathau eraill o fenthyca, fel benthyciad o undeb credyd.

Chwiliwch am y fargen orau a chymharwch y gost gyda darparwyr eraill cyn llofnodi cytundeb.

Gallwch gymharu cost defnyddio credyd cartref ar [wefan Lenders Compared](http://www.lenderscompared.org.uk/)

#### Os ydych chi'n cael trafferth gyda dyledion neu filiau bob dydd
Mae benthyca arian i dalu dyledion neu ôl-ddyledion yn arwydd eich bod yn llithro i mewn i ddyled broblemus.

[Mynnwch gyngor am ddim ar ddyledion nawr](/cy/tools/canfyddwr-cyngor-ar-ddyledion)


text:
/**********
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)

This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
more details.

You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
**********/
// "liveMedia"
// Copyright (c) 1996-2015 Live Networks, Inc.  All rights reserved.
// Transcoder for ADUized MP3 frames
// C++ header

#ifndef _MP3_ADU_TRANSCODER_HH
#define _MP3_ADU_TRANSCODER_HH

#ifndef _FRAMED_FILTER_HH
#include "FramedFilter.hh"
#endif

class MP3ADUTranscoder: public FramedFilter {
public:
  static MP3ADUTranscoder* createNew(UsageEnvironment& env,
				  unsigned outBitrate /* in kbps */,
				  FramedSource* inputSource);

  unsigned outBitrate() const { return fOutBitrate; }
protected:
  MP3ADUTranscoder(UsageEnvironment& env,
		unsigned outBitrate /* in kbps */,
		FramedSource* inputSource);
      // called only by createNew()
  virtual ~MP3ADUTranscoder();

private:
  // redefined virtual functions:
  virtual void doGetNextFrame();
  virtual void getAttributes() const;

private:
  static void afterGettingFrame(void* clientData,
				unsigned numBytesRead, unsigned numTruncatedBytes,
				struct timeval presentationTime,
				unsigned durationInMicroseconds);
  void afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes,
			  struct timeval presentationTime,
			  unsigned durationInMicroseconds);

private:
  unsigned fOutBitrate; // in kbps
  unsigned fAvailableBytesForBackpointer;

  unsigned char* fOrigADU;
      // used to store incoming ADU prior to transcoding
};

#endif


text:
A quick and simple platform for recording research events.

[![Build Status](https://img.shields.io/scrutinizer/build/g/mysociety/logbook.svg)](https://scrutinizer-ci.com/g/mysociety/logbook/)
[![Code Quality](https://img.shields.io/scrutinizer/g/mysociety/logbook.svg)](https://scrutinizer-ci.com/g/mysociety/logbook/)

## How does it work?

Check the [API documentation](http://docs.logbook.apiary.io/).

## Developing

### Requirements

* PHP 5.4.
* A PostgreSQL database.

### Configuration

Copy the `conf/conf.env-example` file to `conf/conf.env` and adjust parameters accordingly.

### Libraries

Libraries are handled using [Composer](https://getcomposer.org/). Do a `php composer.phar install`.

### Migrations

Migrations are handled using [Phinx](https://phinx.org/). To run them, `vendor/bin/phinx migrate -c conf/phinx.php` (after you've installed the Composer requirements).


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

<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
  <string name="explore_io_msgcards_ask_opt_in"
          description="This message is displayed on the Explore I/O screen to ask users whether
            they would like to opt in to receive messages regarding the conference."><![CDATA[
        Сообщения Kонференции

        Хотите , чтобы отказаться в получать сообщения от организаторов конференции Google I / O ? Сообщения могут быть основаны на текущий момент времени и могут включать в себя объявления наших партнерами .]]></string>

  <string name="welcome_conduct_title">Код поведения конференции
    Google I/O</string>
  <string description="Label of filter option that allow to display all elements" name="all">все
  </string>

  <string name="add_to_schedule_desc">Добавить событие к вашему расписанию</string>

  <string name="browse_events">Просмотреть Мероприятия</string>

  <string name="cancel">Отменить</string>

  <string name="description_i_o_extended">Расширенный Google I/O</string>

  <string name="google_account_required_message">Чтобы пользоваться приложением, вы должны иметь хотя бы одну учетную запись Google на вашем устройстве.</string>

  <string name="plus_one_description_standard">Нажмите, чтобы добавить в Ваши круги.</string>

  <string name="pref_analytics_enabled_title">Отправить анонимную статистику использования</string>

  <string name="pref_local_times_title">Показать местное время</string>

  <string name="pref_notify_starred_sessions_title">Уведомить о моих событий</string>

  <string name="session_feedback_relevance">Насколько эта сессия былa актуально для Вашей работы?</string>

  <string name="session_links">Ссылки на сессию</string>

  <string name="session_livestream_block">Прямой Эфир</string>

  <string name="session_livestream_title">GOOGLE I/O в прямом эфире</string>

  <string name="session_speakers">Выступающие</string>

  <string name="time_hint_about_to_start_shortly">Сессия начинается (осталось меньше минуты).</string>

  <string name="session_watch_live">Смотреть трансляцию в прямом эфире</string>

  <string name="my_schedule_rate_this_session">Оценить эту сессию</string>

  <string name="navdrawer_item_io_live">В прямом эфире</string>

  <string name="add_account">Добавить учётную запись</string>

    <string description="Accessibility description for a control that allows the user to close the current screen          and go back to the previous one." name="close_and_go_back">Закрыть и вернуться</string>

    <string description="Accessibility for the links to the G+ or Twitter pages for speakers. For example: Go to the Twitter page for Sally Sample." name="speaker_social_page">Перейти на страницу %1$s с %2$s</string>

    <string description="Accessibility description for the GPlus icon in the '#io15' box." name="social_io15_gplus_content_description">Перейти к Google Plus с хэштегом \"io15\"</string>

    <string description="Accessibility description for the Twitter icon in the '#io15' box." name="social_io15_twitter_content_description">Перейти к Twitter с хэштегом \"io15\"</string>

    <string description="Accessibility description for link to the 'Google Developers' GPlus page." name="social_gplus_devs_content_description">Перейти к Google Developers на Google Plus</string>

    <string description="Accessibility description for link to the 'Google Developers' Twitter page." name="social_twitter_devs_content_description">Перейти к Google Developers на Twitter</string>

    <string description="Accessibility description for the GPlus icon in the '#io15 extended' box." name="social_extended_gplus_content_description">Перейти к Google Plus с хэштегом \"extended\"</string>

    <string description="Accessibility description for the Twitter icon in the '#io15 extended' box." name="social_extended_twitter_content_description">Перейти к Twitter с хэштегом \"extended\"</string>

    <string descripton="Accessibility description for the GPlus icon in the '#io15 request' box." name="social_request_gplus_content_description">Перейти к Google Plus с хэштегом \"request\"</string>

    <string description="Accessibility description for the Twitter icon in the '#io15 extended' box." name="social_request_twitter_content_description">Перейти к Twitter с хэштегом \"request\"</string>

    <string description="Accessibility description for the IO15 logo that is not a link." name="io15_logo_not_clickable">Логотип IO15 некликабелен</string>

    <string description="Accessibility description for the IO15 extended logo that is not a link." name="io15_extended_logo_not_clickable">Логотип IO15 extended некликабелен</string>

    <string description="Accessibility description for the IO15 request logo that is not a link." name="io15_request_logo_not_clickable">Логотип IO15 request некликабелен</string>

    <string description="Accessibility description for the I/O logo that is not a link." name="io_logo_not_clickable">Логотип IO некликабелен</string>

    <string description="Accessibility description for viewing more sessions/videos." name="more_items_button_desc_a11y">Нажмите, чтобы увидеть больше материалов.</string>

  <string name="explore_io_msgcards_conf_creds_card"><b>Личные данные участника</b><br> Каждый участник конференции получит в этом году ндивидуальный NFC-браслет. Ваш бейдж I/O конференции и браслет NFC обеспечат вам доступ к Keynote, сессиям, Sandbox, и на вечеринки. Всегда носите их оба с собой.</string>

  <string description="A message card displayed in the Explore I/O page that asks users to opt into a                          feature." name="explore_io_msgcards_after_hours_card"><b>After Hours</b><br></br> Эту вечеринку вы не захотите пропустить! Приглашаем вас насладиться едой, напитками, музыкой, играми и многим другим, вечером, 28 мая. Для входа необходимы бейдж I/O конференции и браслет NFC.</string>

    <string descripton="Text of a card shown in the Explore I/O screen that asks the user if they want to configure          the conference WiFi. 'Not now' and 'Yes, please' are options show on the card" name="question_setup_wifi_card_text"><b>Wi-Fi конференции</b><br/> Вы хотели бы настроить это устройство для доступа к Wi-Fi конференции?</string>

    <string description="A session feedback section label asking the user to rate the session overall" name="session_rating_label_text">Оценка сессии:</string>

    <string descripton="Session feedback section title" name="session_feedback_content_label_text">На основании описания/моих ожиданий, содержание было:</string>

    <string description="A negative relevance session feedback option" name="session_feedback_not_at_all_relevant">Абсолютно нет</string>

    <string description="A negative relevance session feedback option" name="session_feedback_extremely_relevant">Полностью</string>

    <string description="Text for a button which allows the user to enable the feature" name="welcome_enable">Включить</string>

    <string description="Text for a button which allows the user to reject the feature" name="welcome_no_thanks">Нет, спасибо</string>

    <string description="Medium-length welcome text indicating the subsequent text is important legal information " name="welcome_text">Прежде чем начать, ознакомьтесь с важной юридической информацией, касающейся использования данного приложения. Это займет всего одну минуту!</string>

    <string description="Short text asking if they're interested in what's around them" name="welcome_around">Рядом с Вами</string>

    <string description="Short text asking them to select an account" name="welcome_select_account">Выберите аккаунт</string>

    <string description="Medium text asking to choose an account from a list" name="welcome_select_accoun_text">Выберите используемый аккаунт:</string>

    <string name="explore_sessions_show_day_hour_and_room"
            description="Sub-title for a session in ExploreSessionsActivity that shows the day, time and room name for a given session. Example: Day 1 / 9:00AM - 11:00AM / Room 1" ><xliff:g example="Day 1" id="day">%1$s</xliff:g> / <xliff:g example="2:00PM" id="start_time">%2$s</xliff:g> - <xliff:g example="3:00PM" id="end_time">%3$s</xliff:g> / <xliff:g id="room">%4$s</xliff:g></string>

    <string
            description="Show the Day 1 or Day 2 as part of either the ExploreSessionsActivity title or in the session details." name="explore_sessions_show_day_n">День %d</string>

    <string
            description="Show Day and start time of a session as the title when viewing browsing sessions (ExploreSessionActivity) from MySchedule." name="explore_sessions_time_slot_title">
    <xliff:g example="Day 1" id="day">%1$s</xliff:g>, <xliff:g example="2:30PM" id="start_time">%2$s</xliff:g>
  </string>

    <string
            description="This string is presented to users when they attempt to click something that indicates they can watch a video but it turns out we can't show the video." name="explore_io_video_id_not_valid">Извините. Судя по всему, есть проблема с URL-адресом видео.</string>

    <string
            description="Generic error message used for errors that should never happen. This explains to the user that we can't execute the request when they click a button or touch a part of the screen that should normally be touchable." name="unknown_error">Упс, мы не cмогли обработать этот запрос.</string>

    <string description="Indicates the item is actionable and the user can tap on it" name="talkback_button">Кнопка %1$S</string>

    <string description="Indicates the item does nothing when tapped" name="talkback_not_clickable">%1$S некликабельна</string>

    <string description="Indicates the item is an image" name="talkback_image">%1$S изображение</string>

    <string description="Indicates the item is a link (and actionable)" name="talkback_link">%1$S ссылка</string>

    <string descripton="Indicates the item is currently selected" name="talkback_selected">%1$S выбран</string>

    <string description="Indicates the item is currently not selected" name="talkback_not_selected">%1$S не выбран</string>

    <string description="Indicates what happens when the user taps on an item" name="talkback_tapfor">нажмите, чтобы %1$S</string>

    <string
            descripton="This string is the title of a notification shown to the user when Google Play services can't connect." name="app_data_notification_resolution_title">Приложению I/O необходимо разрешение</string>

    <string
            description="This string is the message of the notification shown to the user when Google Play services can't connect from a background sync." name="app_data_notification_resolution_content">Требуется вмешательство пользователя, чтобы I/O смог завершить фоновую синхронизацию.</string>

    <string description="Shown as the titles of the tabs for the user's schedule" name="day_n">ДЕНЬ %d</string>

    <string description="Session feedback section title" name="session_feedback_content">Содержание было:</string>

    <string description="A positive overall session feedback option" name="session_feedback_great">Отличным</string>

    <string description="A negative overall session feedback option" name="session_feedback_notgreat">Не очень впечатляющим</string>

    <string description="A negative relevance session feedback option" name="session_feedback_notrel">Неактуальным</string>

    <string description="A session feedback section label asking for any other feedback. It indicates the user should not add personal information" name="session_feedback_other">Что-нибудь еще, что нам не помешало бы знать?\n(Пожалуйста, не добавляйте личную информацию к вашим комментариям.)</string>

    <string description="A positive speaker quality session feedback option" name="session_feedback_outstanding">Выдающимся</string>

    <string description="A negative speaker quality session feedback option" name="session_feedback_poor">Слабым</string>

    <string description="A positive relevance session feedback option" name="session_feedback_rel">Актуальным</string>

    <string description="Hint for adding other session feedback" name="session_feedback_tell_us">Расскажите нам!</string>

    <string name="add_to_schedule">Добавить к расписанию</string>

    <string name="all_sessions">Все события</string>

    <string name="all_themes">Все категории</string>

    <string name="all_topics">Все темы</string>

    <string name="all_types">Все форматы</string>

    <string name="all_years">Все года</string>

    <string name="app_name">Google I/O 2015</string>

    <string name="attending_in_person">Лично</string>

    <string name="attending_remotely">Дистанционно</string>

    <string name="browse_sessions">Просмотреть события...</string>

    <string name="calltoaction_wifi_configure"><br><br>Чтобы продолжить, нажмите \"Добавить сеть Wi-Fi\".</string>

    <string name="calltoaction_wifi_settings"><br><br>Чтобы включить Wi-Fi, нажмите \"Открыть настройки Wi-Fi\".</string>

    <string name="close_detail_pane">Закрыть панель деталей</string>

    <string name="data_stale_warning">Эта информация может быть устаревшей.</string>

    <string name="day_title_today">Сегодня</string>

    <string name="day_title_tomorrow">Завтра</string>

    <string name="day_title_yesterday">Вчера</string>

    <string name="decline">Не согласен</string>

    <string name="description_about">О приложении</string>

    <string name="description_add_schedule">Добавить к расписанию</string>

    <string name="description_app_feedback">Отзыв о приложении</string>

    <string name="description_app_feedback_old">Отправить отзыв</string>

    <string name="description_captions">Субтитры</string>

    <string name="description_configure_wifi">Настройки Wi-Fi</string>

    <string name="description_map">Карта</string>

    <string name="description_presentation">Вывод на экран</string>

    <string name="description_refresh">Обновить</string>

    <string name="description_remove_schedule">Удалить из расписания</string>

    <string name="description_search">Поиск</string>

    <string name="description_settings">Настройки</string>

    <string name="description_setup_wifi_body">Поскольку вы посещаете конференцию лично, мы можем настроить доступ этого устройства к сети Wi-Fi конференции сейчас (5Ghz). Настроив ваш Wi-Fi сейчас, вы поможете предотвратить перегрузку сети.</string>

    <string name="description_share">Поделиться</string>

    <string name="description_social_stream">Показать поток Google+</string>

    <string name="drawer_close">Панель навигации закрыта</string>

    <string name="drawer_open">Панель навигации открыта</string>

    <string name="empty_captions">Нет субтитров для этого события.</string>

    <string name="empty_session_detail">Нет деталей о событии.</string>

    <string name="empty_sessions">Нет событий.</string>

    <string name="empty_waiting_for_sync">Синхронизация...</string>

    <string name="empty_widget_text">Больше нет предстоящих событий.\nУвидимся в следующем году!</string>

    <string name="empty_widget_text_signed_out">Чтобы зарегистрироваться и начать пользоваться приложением, нажмите на логотип Google I/O 2015 вверху.</string>

    <string name="ended_sessions">Прошедшие события</string>

    <string name="give_feedback">Да</string>

    <string name="google_account_required_title">Необходима учетная запись AKKOUNT Google</string>

    <string name="google_i_o_year">Конференция I/O <xliff:g id="year">%1$d</xliff:g>
  </string>

    <string name="got_it">Понятно</string>

    <string name="live_available">LIVE</string>

    <string name="live_now">LIVE NOW</string>

    <string name="loading">Загрузка...</string>

    <string name="login_failed_text">Не удалось синхронизировать события из-за ошибки.</string>

    <string name="login_failed_text_retry">Попробовать снова</string>

    <string name="mandatory_update_error">Ваше приложение устарело. Чтобы продолжить использовать приложение, вам необходимо его обновить.</string>

    <string name="update_available">Более новая версия данного приложения доступна в магазине Google Play.</string>

    <string name="map_at">В %1$s:<br><b>%2$s</b></string>

    <string name="map_now_playing">Воспроизводится сейчас:<br><b>%1$s</b></string>

    <string name="map_touch_to_see_session">Нажмите, чтобы просмотреть события</string>

    <string name="more_sessions">Ещё события BOLSHE SOBUTIY</string>

    <string name="my_schedule_tab_desc_a11y">Нажмите, чтобы увидеть своё расписание на <xliff:g id="day">%1$s</xliff:g>.</string>

    <string name="my_schedule_page_desc_a11y">Ваше расписание на <xliff:g id="day">%1$s</xliff:g>.</string>

    <string name="navdrawer_item_explore">Ознакомиться</string>

    <string name="navdrawer_item_explore_a11y">Ознакомиться с Google I/O</string>

    <string name="navdrawer_item_map">Карта</string>

    <string name="navdrawer_item_my_schedule">Моё расписание</string>

    <string name="navdrawer_item_settings">Настройки</string>

    <string name="navdrawer_item_sign_in">Войти</string>

    <string name="navdrawer_item_social">Обсуждения</string>

    <string name="navdrawer_status_attending_in_person">Посещает Google I/O лично</string>

    <string name="navdrawer_status_attending_remotely">Посещает I/O дистанционно</string>

    <string name="no_connection_cant_login">Не удалось войти. Проверьте интернет-соединение.</string>

    <string name="no_matching_sessions">Нет подходящих событий.</string>

    <string name="no_matching_sessions_in_interval">В выбранный вами период подходящих событий нет.</string>

    <string name="no_matching_videos">Нет подходящих видео.</string>

    <string name="no_thanks">Нет, спасибо</string>

    <string name="not_now">Не сейчас</string>

    <string name="number_1">1</string>

    <string name="number_2">2</string>

    <string name="number_3">3</string>

    <string name="number_4">4</string>

    <string name="number_5">5</string>

    <string name="ok">OkOK</string>

    <string name="others">Другое</string>

    <string name="permission_write">Изменить данные расписания Google I/O</string>

    <string name="pref_analytics_enabled_description">Если флажок FLAG установлен, анонимная статистика использования будет отправляться OTPRAVLENA  в Google.</string>

    <string name="pref_attendee_at_venue_description">Если флажок FLAG установлен, будут показаны все события и локальные мероприятия. В противном случае, будут отображаться только транслируемые в прямом эфире события.</string>

    <string name="pref_attendee_at_venue_title">Я еду на Google I/O!</string>

    <string name="pref_local_times_description">Если флажок FLAG установлен, время событий будет соответствовать установленному на вашем устройстве местному времени. Если не установлен, будет отображаться местное время конференции (дневное тихоокеанское время ).</string>

    <string name="pref_notify_feedback_description">Если флажок установлен, приложение будет показывать уведомления с запросом отправить отзыв о выбранных вами событиях.</string>

    <string name="pref_notify_feedback_title">Напоминать, чтобы я отправлял отзывы</string>

    <string name="pref_notify_starred_sessions_description">Если флажок установлен, приложение будет показывать уведомления о скором начале ваших событий.</string>

    <string name="pref_sync_with_calendar_description">Если флажок установлен, выбранные вами события будут автоматически синхронизироваться с вашим календарём Google.</string>

    <string name="pref_sync_with_calendar_title">Синхронизировать с календарем Google</string>

    <string name="question_i_o_extended">Вы хотите узнать больше о событиях I/O Extended, которые будут проходить недалеко от вас?</string>

    <string name="question_local_or_remote">Вы посещаете конференцию Google I/O дистанционно или лично в Сан-Франциско?</string>

    <string name="related_videos">Похожие видео</string>

    <string name="remove_from_schedule">В расписании</string>

    <string name="remove_from_schedule_desc">Удаление события из вашего расписания.</string>

    <string name="retry">Попробовать снова</string>

    <string name="schedule_conflict_with_previous">(конфликт)</string>

    <string name="schedule_end_time">до <xliff:g id="endTime">%1$s</xliff:g>
  </string>

    <string name="search_hint">Поиск событий</string>

    <string name="search_label">События Google I/O</string>

    <string name="session_calendar_suffix">- добавлено приложением Google I/O для Android</string>

    <string name="session_details_a11y_session_added">Событие добавлено в ваше расписание</string>

    <string name="session_details_a11y_session_removed">Событие удалено из вашего расписания</string>

    <string name="session_feedback_advanced">Слишком высокий уровень</string>

    <string name="session_feedback_basic">Слишком простой уровень</string>

    <string name="session_feedback_notification_text">Оставить отзыв о %1$s</string>

    <string name="session_feedback_notification_ticker">Оставить отзыв о событии</string>

    <string name="session_feedback_speaker_quality">Речь выступающего:</string>

    <string name="session_feedback_submitlink">Отправить отзыв</string>

    <string name="session_finished">Завершено</string>

    <string name="session_give_feedback_message">Вам понравилось это событие? Вы хотите отправить отзыв?</string>

    <string name="session_link_livestream">Смотреть трансляцию</string>

    <string name="session_link_moderator">Модератор</string>

    <string name="session_link_notes">Официальная информация</string>

    <string name="session_link_pdf">Слайды</string>

    <string name="session_link_youtube">Видео на Youtube</string>

    <string name="session_live_now_message">Это событие прямо сейчас транслируется в прямом эфире! Хотите начать просмотр трансляции?</string>

    <string name="session_livestream_captions">Субтитры</string>

    <string name="session_livestream_error_init">К сожалению, произошла ошибка при инициализации плеера YouTube (%1$s).</string>

    <string name="session_livestream_error_playback">К сожалению, при загрузке потока произошла ошибка. Попробуйте снова позже.</string>

    <string name="session_livestream_info">Информация</string>

    <string name="session_livestream_play_pause">Старт / пауза</string>

    <string name="session_notification_text_1">начнётся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</string>

    <string name="session_now">Сейчас</string>

    <string name="session_requirements">Требования</string>

    <string name="session_subtitle">
    <xliff:g id="time">%1$s</xliff:g> в <xliff:g id="room">%2$s</xliff:g>
  </string>

    <string name="session_subtitle_short">
    <xliff:g id="time">%1$s</xliff:g>
  </string>

    <string name="setup_wifi_yes">Да!</string>

    <string name="share_livestream_template">Просмотр GOOGLE I/O Live: \"<xliff:g id="title">%1$s</xliff:g>\" на <xliff:g id="hashtags">%2$s</xliff:g> <xliff:g id="url">%3$s</xliff:g>
  </string>

    <string name="share_template">Смотрю \"<xliff:g id="title">%1$s</xliff:g>\" на <xliff:g id="hashtags">%2$s</xliff:g> <xliff:g id="url">%3$s</xliff:g>
  </string>

    <string name="snooze_x_min">Не показывать <xliff:g id="remaining_time">%1$d</xliff:g> мин.</string>

    <string name="social_intro">Нажмите на символ решётки, если вы хотите присоединиться к беседе на Google+</string>

    <string name="speaker_googleplus_profile">Профиль Google+: <xliff:g id="speakername">%1$s</xliff:g>
  </string>

    <string name="themes">Категории</string>

    <string name="time_hint_about_to_start_min">Событие начнётся через <xliff:g id="minutes">%1$d</xliff:g> мин.</string>

    <string name="time_hint_session_ended">Событие завершено.</string>

    <string name="time_hint_started_just">Это событие уже началось! (совсем недавно)</string>

    <string name="time_hint_started_min">Это событие уже началось! (<xliff:g id="minutes">%1$d</xliff:g> мин. назад)</string>

    <string name="times_shown_in_tz">Время показано в <xliff:g id="timezone">%1$s</xliff:g>
  </string>

    <string name="title_about">О приложении</string>

    <string name="title_explore">Ознакомиться</string>

    <string name="title_map">Карта</string>

    <string name="title_my_schedule">Моё расписание</string>

    <string name="title_office_hours">Часы работы</string>

    <string name="title_sandbox_detail">Информация о компании</string>

    <string name="title_search">Поиск</string>

    <string name="title_session_detail">Информация о событии</string>

    <string name="title_session_feedback">Отзыв о событии</string>

    <string name="title_settings">Настройки</string>

    <string name="title_share">Поделиться через</string>

    <string name="topics">Темы</string>

    <string name="types">Форматы</string>

    <string name="unknown_room">(Помещение не указано)</string>

    <string name="update_app">Обновить приложение</string>

    <string name="watch_now">Смотреть сейчас!</string>

    <string name="welcome_to_google_i_o_app">Добро пожаловать в приложение Google I/O!</string>

    <string name="wifi_dialog_button_configure">Добавить сеть Wi-Fi</string>

    <string name="wifi_dialog_button_settings">Открыть настройки Wi-Fi</string>

    <string name="wifi_install_error_message">К сожалению, не удаётся обновить настройки Wi-Fi</string>

    <string name="explore_attending_in_person_toast">Посещает I/O лично (вы можете изменить это в настройках)</string>
    <string name="explore_attending_remotely_toast">Посещает I/O удаленно (вы можете изменить это в настройках)</string>
    <string name="go_to_settings">Назад в настройки</string>
    <string name="more_information">Дополнительные сведения</string>

    <string name="session_live_streamed">Прямая трансляция</string>

    <string name="session_watch">Смотреть</string>

    <string name="session_replay">ПовторIT</string>

    <string name="keynote_group_title">Ключевые слова</string>

    <string name="more_items_button">Еще</string>

    <string name="my_schedule_watch_live_now">ПРЯМОЙ ЭФИР</string>

    <string name="navdrawer_description_a11y">Панель навигации используется для переключения между основными разделами приложения</string>

    <string name="navdrawer_item_video_library">Видеотека</string>

    <string name="navdrawer_item_debug">Отладка</string>

     <string name="new_videos_title">Новое в <xliff:g id="year">%1$d</xliff:g>
    </string>

    <string name="pref_conf_message_cards_enabled_title">Показывать cообщения конференции</string>

    <string name="schedule_session_subtitle">
    <xliff:g id="speakers">%1$s</xliff:g>\n<xliff:g id="room KOMNATA">%2$s</xliff:g>
    </string>
    <string name="title_video_library">Видео</string>

    <string name="welcome_attending">Присутствуете лично?</string>

    <string name="welcome_attending_text">Вы присутствуете на I/O дистанционно или лично в Сан-Франциско?</string>

     <string name="title_topic_filtered_video_library">Видео о <xliff:g id="topic TEMA">%1$s</xliff:g>
    </string>

     <string name="title_year_filtered_video_library">
    <xliff:g id="year GOD">%1$d</xliff:g> видео</string>

     <string name="title_year_and_topic_filtered_video_library">
    <xliff:g id="year GOD">%1$d</xliff:g> видео о <xliff:g id="topic">%2$s</xliff:g>
    </string>

    <string name="description_filter">Фильтр</string>

    <string name="title_video_library_filter">Фильтр</string>

    <string name="year_filter_section_label">Год</string>

    <string name="topic_filter_section_label">Тема</string>

    <string name="title_activity_new_social">Соц сети</string>

    <string name="title_explore_sessions_filter">Фильтр</string>

    <string name="explore_io_msgcards_answer_yes">Конечно, давайте!</string>

    <string name="explore_io_msgcards_answer_no">Нет, спасибо.</string>

    <plurals name="schedule_block_subtitle">
    <item quantity="one">
      <xliff:g id="number_of_sessions">%1$d</xliff:g> событие доступно</item>
    <item quantity="few">
      <xliff:g id="number_of_sessions">%1$d</xliff:g> события доступно</item>
    <item quantity="many">
      <xliff:g id="number_of_sessions">%1$d</xliff:g> событий доступно</item>
    <item quantity="other">
      <xliff:g id="number_of_sessions">%1$d</xliff:g> события доступны</item>
    </plurals>

    <plurals name="session_notification_text">
        <item quantity="one">и ещё 1 начнётся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</item>
        <item quantity="few">и ещё <xliff:g id="num_sessions">%2$d</xliff:g> начнутся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</item>
        <item quantity="many">и ещё <xliff:g id="num_sessions">%2$d</xliff:g> начнутся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</item>
        <item quantity="other">и ещё <xliff:g id="num_sessions">%2$d</xliff:g> начнутся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</item>
    </plurals>

    <plurals name="session_notification_ticker">
        <item quantity="one">%d событие скоро начнётся.</item>
        <item quantity="few">%d событияII скоро начнутся.</item>
        <item quantity="many">%d событий скоро начнутся.</item>
        <item quantity="other">%d события скоро начнутся.</item>
    </plurals>

    <plurals name="session_notification_title">
        <item quantity="one">1 событие начнётся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</item>
    <item quantity="few">
      <xliff:g id="num_sessions">%2$d</xliff:g> события начнутся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</item>
    <item quantity="many">
      <xliff:g id="num_sessions">%2$d</xliff:g> событий начнутся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</item>
    <item quantity="other">
      <xliff:g id="num_sessions">%2$d</xliff:g> события начнутся через <xliff:g id="remaining_time">%1$d</xliff:g> мин.</item>
    </plurals>

    <string name="about_body"><b>Конференция Google I/O 2015</b><br> Версия %s<br><br> <a href=http://m.google.com/utos>Условия обслуживания</a><br><br> <a href=http://www.google.com/policies/privacy/>Политика конфиденциальности</a></string>

    <string name="about_eula">Лицензионное соглашение конечного пользователя</string>

    <string name="about_licenses">Лицензии с открытым исходным кодом</string>

    <string name="accept">Согласен</string>
</resources>


text:
package dev.amp.validator.utils;

import dev.amp.validator.Context;
import dev.amp.validator.ParsedHtmlTag;
import dev.amp.validator.ValidatorProtos;

import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;

import static dev.amp.validator.utils.ExtensionsUtils.ScriptReleaseVersion.LTS;
import static dev.amp.validator.utils.ExtensionsUtils.ScriptReleaseVersion.UNKNOWN;

/**
 * Utils to handle extension validation
 *
 * @author nhant01
 * @author GeorgeLuo
 */

public class ExtensionsUtils {
  /**
   * Private constructor.
   */
  private ExtensionsUtils() {
  }

  // If any script in the page uses LTS, all scripts must use LTS. This is used to
  // record when a script is seen and validate following script tags.
  public enum ScriptReleaseVersion {
    /**
     * UNKNOWN
     */
    UNKNOWN,
    /**
     * STANDARD
     */
    STANDARD,
    /**
     * LTS
     */
    LTS,
  }

  /**
   * Tests if a tag is an extension script tag.
   *
   * @param tag to test
   * @return true iff a tag is an extension script tag
   */
  public static boolean isExtensionScript(final ParsedHtmlTag tag) {
    // checks for a falsy value of ExtensionScriptNameAttribute,
    // falsy means null or empty string
    return !extensionScriptNameAttribute(tag).equals("");
  }

  /**
   * Tests if a tag is the AMP runtime script tag.
   *
   * @param tag to test
   * @return true iff a tag is the AMP runtime script tag.
   */
  public static boolean isAmpRuntimeScript(final ParsedHtmlTag tag) {
    final String src = (tag.attrsByKey().get("src") != null) ? tag.attrsByKey().get("src") : "";
    return isAsyncScriptTag(tag) && !isExtensionScript(tag)
      && src.startsWith("https://cdn.ampproject.org/") && src.endsWith("/v0.js");
  }

  /**
   * Tests if a tag is an async script tag.
   *
   * @param tag to test
   * @return true iff a tag is an async script tag.
   */
  public static boolean isAsyncScriptTag(final ParsedHtmlTag tag) {
    return tag.upperName().equals("SCRIPT") && tag.attrsByKey().
      containsKey("async") && tag.attrsByKey().containsKey("src");
  }

  /**
   * Tests if a URL is for the LTS version of a script.
   *
   * @param url to test
   * @return true iff a URL is for the LTS version of a script.
   */
  public static boolean isLtsScriptUrl(@Nonnull final String url) {
    return url.startsWith("https://cdn.ampproject.org/lts/");
  }

  /**
   * Gets the name attribute for an extension script tag.
   *
   * @param tag to extract name attribute from
   * @return name attribute for an extension script tag
   */
  public static String extensionScriptNameAttribute(@Nonnull final ParsedHtmlTag tag) {
    if (tag.upperName().equals("SCRIPT")) {
      final String[] myStringArray = new String[]{"custom-element", "custom-template", "host-service"};
      for (final String attribute : myStringArray) {
        if (tag.attrsByKey().containsKey(attribute)) {
          return attribute;
        }
      }
    }
    return "";
  }

  /**
   * Gets the extension name for an extension script tag.
   *
   * @param tag to get extension name from
   * @return extension name for an extension script tag
   */
  public static String extensionScriptName(final ParsedHtmlTag tag) {
    final String nameAttr = extensionScriptNameAttribute(tag);
    if (nameAttr != null) {
      // Extension script names are required to be in lowercase by the validator,
      // so we don't need to lowercase them here.
      return (tag.attrsByKey().get(nameAttr) != null) ? tag.attrsByKey().get(nameAttr) : "";
    }
    return "";
  }

  /**
   * Validates that LTS is used for either all script sources or none.
   *
   * @param srcAttr the attr to check
   * @param tagSpec the spec to check against
   * @param context global context
   * @param result  record to update
   */
  public static void validateScriptSrcAttr(@Nonnull final String srcAttr, @Nonnull final ValidatorProtos.TagSpec tagSpec,
                                           @Nonnull final Context context, @Nonnull final ValidatorProtos.ValidationResult.Builder result) {
    if (context.getScriptReleaseVersion() == UNKNOWN) {
      return;
    }
    final ExtensionsUtils.ScriptReleaseVersion scriptReleaseVersion = isLtsScriptUrl(srcAttr) ? LTS
      : ExtensionsUtils.ScriptReleaseVersion.STANDARD;
    if (context.getScriptReleaseVersion() != scriptReleaseVersion) {
      List<String> params = new ArrayList<>();
      final String specName = (tagSpec.hasExtensionSpec())
        ? tagSpec.getExtensionSpec().getName() : tagSpec.getSpecName();
      params.add(specName);
      context.addError(
        scriptReleaseVersion == LTS
          ? ValidatorProtos.ValidationError.Code.LTS_SCRIPT_AFTER_NON_LTS
          : ValidatorProtos.ValidationError.Code.NON_LTS_SCRIPT_AFTER_LTS,
        context.getLineCol(), params,
        "https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml#required-markup",
        result);
    }
  }
}


text:
package com.fasterxml.jackson.databind.jsonFormatVisitors;

import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable;
import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWithSerializerProvider;

public interface JsonMapFormatVisitor extends JsonFormatVisitorWithSerializerProvider
{
    void keyFormat(JsonFormatVisitable p0, JavaType p1);
    void valueFormat(JsonFormatVisitable p0, JavaType p1);
}


text:
//
//  JyMyNavigationController.m
//  LuckyLottery
//
//  Created by MS on 16/9/24.
//  Copyright © 2016年 JY. All rights reserved.
//

#import "JyMyNavigationController.h"

@interface JyMyNavigationController ()

@end

@implementation JyMyNavigationController
//这个方法是这个类第一次用的时候调用 只会调用一次
+ (void)initialize{
    //设置导航栏的样式

    UINavigationBar *navBar = [UINavigationBar appearance];

    NSString *image = nil;
    if (IOS7) {
        image = @"NavBar64";
    }else{
        image = @"NavBar";
    }
    [navBar setBackgroundImage:[UIImage imageNamed:image] forBarMetrics:UIBarMetricsDefault];

    NSMutableDictionary *attribute = [NSMutableDictionary dictionary];
    attribute[UITextAttributeTextColor] = [UIColor whiteColor];
    attribute[UITextAttributeFont] = [UIFont systemFontOfSize:19];
    [navBar setTitleTextAttributes:attribute];
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{

    viewController.hidesBottomBarWhenPushed = YES;
    [super pushViewController:viewController animated:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
package ru.ematveev;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Class convert List Users to Map.
 * @author Matveev Evgeny.
 */
public class UserConvert {
    /**
     * Method convert List Users to Map with key = id users.
     * @param list List users.
     * @return HashMap.
     */
    public Map<Integer, User> process(List<User> list) {
        Map<Integer, User> map = new HashMap<>();
        for (User ls : list) {
            map.put(ls.getId(), ls);
        }
        System.out.println(map.toString());
        return map;
    }
}


text:
<a href="<?php echo get_url('albums/images'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/images.png'; ?>" align="middle" alt="Images" />Images

<a href="<?php echo get_url('albums/add'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/add.png'; ?>" align="middle" alt="Add a new image" />Add an Image

<a href="<?php echo get_url('albums/albums'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/albums.png'; ?>" align="middle" alt="Albums" />Albums

<a href="<?php echo get_url('albums/addAlbum'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/add.png'; ?>" align="middle" alt="Create a new Album" />Create a new Album

<a href="<?php echo get_url('albums/categories'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/categories.png'; ?>" align="middle" alt="Categories" />Categories

<a href="<?php echo get_url('albums/addCategory'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/add.png'; ?>" align="middle" alt="Create a new Category" />Create a new Category

<?php
	if($settings['logging'] == 'on') {
?>

<a href="<?php echo get_url('albums/logs'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/logs.png'; ?>" align="middle" alt="Logs" />Logs

<?php
	}
?>

<a href="<?php echo get_url('albums/settings'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/settings.png'; ?>" align="middle" alt="Settings" />Settings

<a href="<?php echo get_url('albums/documentation'); ?>"><img src="<?php echo URL_PUBLIC . CORE_FOLDER . '/plugins/albums/images/documentation.png'; ?>" align="middle" alt="Documentation" />Documentation