text:
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import bwapi.Pair;
import bwapi.Position;
import bwapi.Race;
import bwapi.TechType;
import bwapi.TilePosition;
import bwapi.Unit;
import bwapi.UnitCommand;
import bwapi.UnitCommandType;
import bwapi.UnitType;
import bwapi.UpgradeType;
import bwta.BWTA;
import bwta.BaseLocation;
import bwta.Chokepoint;
import bwta.Region;

/// 빌드(건물 건설 / 유닛 훈련 / 테크 리서치 / 업그레이드) 명령을 순차적으로 실행하기 위해 빌드 큐를 관리하고, 빌드 큐에 있는 명령을 하나씩 실행하는 class

/// 빌드 명령 중 건물 건설 명령은 ConstructionManager로 전달합니다
/// @see ConstructionManager
public class BuildManager {

	/// BuildOrderItem 들의 목록을 저장하는 buildQueue
	public BuildOrderQueue buildQueue = new BuildOrderQueue();

	private static BuildManager instance = new BuildManager();

	/// static singleton 객체를 리턴합니다
	public static BuildManager Instance() {
		return instance;
	}

	/// buildQueue 에 대해 Dead lock 이 있으면 제거하고, 가장 우선순위가 높은 BuildOrderItem 를 실행되도록 시도합니다
	public void update() {
		// 1초(24프레임)에 4번 정도만 실행해도 충분하다
		if (MyBotModule.Broodwar.getFrameCount() % 6 != 0)
			return;

		if (buildQueue.isEmpty()) {
			return;
		}

		// Dead Lock 을 체크해서 제거한다
		checkBuildOrderQueueDeadlockAndAndFixIt();
		// Dead Lock 제거후 Empty 될 수 있다
		if (buildQueue.isEmpty()) {
			return;
		}

		// the current item to be used
		BuildOrderItem currentItem = buildQueue.getHighestPriorityItem();

		//System.out.println("current HighestPriorityItem is " + currentItem.metaType.getName());

		// while there is still something left in the buildQueue
		while (!buildQueue.isEmpty()) {
			boolean isOkToRemoveQueue = true;

			// BasicBot 1.1 Patch Start ////////////////////////////////////////////////
			// 빌드 실행 유닛 (일꾼/건물) 결정 로직이 seedLocation 이나 seedLocationStrategy 를 잘 반영하도록 수정

			// seedPosition 을 도출한다
			Position seedPosition = null;
			if (currentItem.seedLocation != TilePosition.None && currentItem.seedLocation != TilePosition.Invalid
					&& currentItem.seedLocation != TilePosition.Unknown && currentItem.seedLocation.isValid()) {
				seedPosition = currentItem.seedLocation.toPosition();
			}
			else {
				seedPosition = getSeedPositionFromSeedLocationStrategy(currentItem.seedLocationStrategy);
			}

			// this is the unit which can produce the currentItem
			Unit producer = getProducer(currentItem.metaType, seedPosition, currentItem.producerID);

			// BasicBot 1.1 Patch End //////////////////////////////////////////////////

			/*
			 * if (currentItem.metaType.isUnit() &&
			 * currentItem.metaType.getUnitType().isBuilding()) { if (producer
			 * != null) { System.out.println("Build " +
			 * currentItem.metaType.getName() + " producer : " +
			 * producer.getType() + " ID : " + producer.getID()); } else {
			 * System.out.println("Build " + currentItem.metaType.getName() +
			 * " producer null"); } }
			 */

			Unit secondProducer = null;
			boolean canMake = false;

			// 건물을 만들수 있는 유닛(일꾼)이나, 유닛을 만들수 있는 유닛(건물 or 유닛)이 있으면
			if (producer != null) {

				// check to see if we can make it right now
				// 지금 해당 유닛을 건설/생산 할 수 있는지에 대해 자원, 서플라이, 테크 트리, producer 만을 갖고
				// 판단한다
				canMake = canMakeNow(producer, currentItem.metaType);

				/*
				 * if (currentItem.metaType.isUnit() &&
				 * currentItem.metaType.getUnitType().isBuilding() ) { std::cout
				 * + "Build " + currentItem.metaType.getName() +
				 * " canMakeNow : " + canMake + std::endl; }
				 */

				// 프로토스 종족 유닛 중 Protoss_Archon / Protoss_Dark_Archon 은 기존
				// Protoss_High_Templar / Protoss_Dark_Templar 두 유닛을 합체시키는 기술을
				// 써서 만들기 때문에
				// secondProducer 을 추가로 찾아 확인한다
				if (canMake) {
					if (currentItem.metaType.isUnit()) {
						if (currentItem.metaType.getUnitType() == UnitType.Protoss_Archon
								|| currentItem.metaType.getUnitType() == UnitType.Protoss_Dark_Archon) {
							secondProducer = getAnotherProducer(producer, producer.getPosition());
							if (secondProducer == null) {
								canMake = false;
							}
						}
					}
				}
			}

			// if we can make the current item, create it
			if (producer != null && canMake == true) {
				MetaType t = currentItem.metaType;

				if (t.isUnit()) {
					if (t.getUnitType().isBuilding()) {

						// 저그 종족 건물 중 Zerg_Lair, Zerg_Hive, Zerg_Greater_Spire,
						// Zerg_Sunken_Colony, Zerg_Spore_Colony 는 기존 건물을 Morph
						// 시켜 만든다
						// Morph를 시작하면 isMorphing = true, isBeingConstructed =
						// true, isConstructing = true 가 되고
						// 완성되면 isMorphing = false, isBeingConstructed = false,
						// isConstructing = false, isCompleted = true 가 된다
						if (t.getUnitType().getRace() == Race.Zerg && t.getUnitType().whatBuilds().first.isBuilding()) {
							producer.morph(t.getUnitType());
						}
						// 테란 Addon 건물의 경우 (Addon 건물을 지을수 있는지는 getProducer 함수에서
						// 이미 체크완료)
						// 모건물이 Addon 건물 짓기 전에는 canBuildAddon = true,
						// isConstructing = false, canCommand = true 이다가
						// Addon 건물을 짓기 시작하면 canBuildAddon = false,
						// isConstructing = true, canCommand = true 가 되고 (Addon
						// 건물 건설 취소는 가능하나 Train 등 커맨드는 불가능)
						// 완성되면 canBuildAddon = false, isConstructing = false 가
						// 된다
						else if (t.getUnitType().isAddon()) {

							// std::cout + "addon build start " + std::endl;

							producer.buildAddon(t.getUnitType());
							// 테란 Addon 건물의 경우 정상적으로 buildAddon 명령을 내려도 SCV가 모건물
							// 근처에 있을 때 한동안 buildAddon 명령이 취소되는 경우가 있어서
							// 모건물이 isConstructing = true 상태로 바뀐 것을 확인한 후
							// buildQueue 에서 제거해야한다
							if (producer.isConstructing() == false) {
								isOkToRemoveQueue = false;
							}
							// std::cout + "8";
						}
						// 그외 대부분 건물의 경우
						else {
							// ConstructionPlaceFinder 를 통해 건설 가능 위치
							// desiredPosition 를 알아내서
							// ConstructionManager 의 ConstructionTask Queue에 추가를
							// 해서 desiredPosition 에 건설을 하게 한다.
							// ConstructionManager 가 건설 도중에 해당 위치에 건설이 어려워지면 다시
							// ConstructionPlaceFinder 를 통해 건설 가능 위치를
							// desiredPosition 주위에서 찾을 것이다
							TilePosition desiredPosition = getDesiredPosition(t.getUnitType(), currentItem.seedLocation,
									currentItem.seedLocationStrategy);

							//System.out.println("BuildManager " + currentItem.metaType.getUnitType().toString()
							//		+ " desiredPosition " + desiredPosition.getX() + "," + desiredPosition.getY());

							if (desiredPosition != TilePosition.None) {
								// Send the construction task to the
								// construction manager
								ConstructionManager.Instance().addConstructionTask(t.getUnitType(), desiredPosition);
							} else {
								// 건물 가능 위치가 없는 경우는, Protoss_Pylon 가 없거나, Creep
								// 이 없거나, Refinery 가 이미 다 지어져있거나, 정말 지을 공간이 주위에
								// 없는 경우인데,
								// 대부분의 경우 Pylon 이나 Hatchery가 지어지고 있는 중이므로, 다음
								// frame 에 건물 지을 공간을 다시 탐색하도록 한다.
								System.out.print(
										"There is no place to construct " + currentItem.metaType.getUnitType()
												+ " strategy " + currentItem.seedLocationStrategy);
								if (currentItem.seedLocation != null)
									System.out.print(" seedPosition " + currentItem.seedLocation.getX() + ","
											+ currentItem.seedLocation.getY());
								if (desiredPosition != null)
									System.out.print(" desiredPosition " + desiredPosition.getX() + ","
											+ desiredPosition.getY());
								isOkToRemoveQueue = false;
							}
						}
					}
					// 지상유닛 / 공중유닛의 경우
					else {
						// 저그 지상유닛 / 공중유닛
						if (t.getUnitType().getRace() == Race.Zerg) {
							// 저그 종족 유닛의 거의 대부분은 Morph 시켜 만든다
							if (t.getUnitType() != UnitType.Zerg_Infested_Terran) {
								producer.morph(t.getUnitType());
							}
							// 저그 종족 유닛 중 Zerg_Infested_Terran 은 Train 시켜 만든다
							else {
								producer.train(t.getUnitType());
							}
						}
						// 프로토스 지상유닛 / 공중유닛
						else if (t.getUnitType().getRace() == Race.Protoss) {
							// 프로토스 종족 유닛 중 Protoss_Archon 은 기존
							// Protoss_High_Templar 두 유닛을 합체시키는 기술을 써서 만든다
							if (t.getUnitType() == UnitType.Protoss_Archon) {
								producer.useTech(TechType.Archon_Warp, secondProducer);
							}
							// 프로토스 종족 유닛 중 Protoss_Dark_Archon 은 기존
							// Protoss_Dark_Templar 두 유닛을 합체시키는 기술을 써서 만든다
							else if (t.getUnitType() == UnitType.Protoss_Dark_Archon) {
								producer.useTech(TechType.Dark_Archon_Meld, secondProducer);
							} else {
								producer.train(t.getUnitType());
							}
						}
						// 테란 지상유닛 / 공중유닛
						else {
							producer.train(t.getUnitType());
						}
					}
				}
				// if we're dealing with a tech research
				else if (t.isTech()) {
					producer.research(t.getTechType());
				} else if (t.isUpgrade()) {
					producer.upgrade(t.getUpgradeType());
				}

				//System.out.println(" build " + t.getName() + " started ");

				// remove it from the buildQueue
				if (isOkToRemoveQueue) {
					buildQueue.removeCurrentItem();
				}

				// don't actually loop around in here
				break;
			}
			// otherwise, if we can skip the current item
			else if (buildQueue.canSkipCurrentItem()) {
				// skip it and get the next one
				buildQueue.skipCurrentItem();
				currentItem = buildQueue.getNextItem();
			} else {
				// so break out
				break;
			}
		}
	}

	/// 해당 MetaType 을 build 할 수 있는 producer 를 찾아 반환합니다
	/// @param t 빌드하려는 대상의 타입
	/// @param closestTo 파라메타 입력 시 producer 후보들 중 해당 position 에서 가장 가까운 producer 를 리턴합니다
	/// @param producerID 파라메타 입력 시 해당 ID의 unit 만 producer 후보가 될 수 있습니다
	public Unit getProducer(MetaType t, Position closestTo, int producerID) {
		// get the type of unit that builds this
		UnitType producerType = t.whatBuilds();

		// make a set of all candidate producers
		List<Unit> candidateProducers = new ArrayList<Unit>();
		for (Unit unit : MyBotModule.Broodwar.self().getUnits()) {
			if (unit == null)
				continue;

			// reasons a unit can not train the desired type
			if (unit.getType() != producerType) {
				continue;
			}
			if (!unit.exists()) {
				continue;
			}
			if (!unit.isCompleted()) {
				continue;
			}
			if (unit.isTraining()) {
				continue;
			}
			if (!unit.isPowered()) {
				continue;
			}
			// if unit is lifted, unit should land first
			if (unit.isLifted()) {
				continue;
			}

			if (producerID != -1 && unit.getID() != producerID)	{
				continue;
			}

			if (t.isUnit()) {
				// if the type requires an addon and the producer doesn't have
				// one
				// C++ : typedef std::pair<BWAPI::UnitType, int> ReqPair;
				Pair<UnitType, Integer> ReqPair = null;

				Map<UnitType, Integer> requiredUnitsMap = t.getUnitType().requiredUnits();
				if (requiredUnitsMap != null) {
					Iterator<UnitType> it = requiredUnitsMap.keySet().iterator();

					// for (final Pair<UnitType, Integer> pair :
					// t.getUnitType().requiredUnits())
					while (it.hasNext()) {
						UnitType requiredType = it.next();
						if (requiredType.isAddon()) {
							if (unit.getAddon() == null || (unit.getAddon().getType() != requiredType)) {
								continue;
							}
						}
					}
				}

				// if the type is an addon
				if (t.getUnitType().isAddon()) {
					// if the unit already has an addon, it can't make one
					if (unit.getAddon() != null) {
						continue;
					}

					// 모건물은 건설되고 있는 중에는 isCompleted = false, isConstructing =
					// true, canBuildAddon = false 이다가
					// 건설이 완성된 후 몇 프레임동안은 isCompleted = true 이지만, canBuildAddon
					// = false 인 경우가 있다
					if (!unit.canBuildAddon()) {
						continue;
					}

					// if we just told this unit to build an addon, then it will
					// not be building another one
					// this deals with the frame-delay of telling a unit to
					// build an addon and it actually starting to build
					if (unit.getLastCommand().getUnitCommandType() == UnitCommandType.Build_Addon // C++
																									// :
																									// unit.getLastCommand().getType()
							&& (MyBotModule.Broodwar.getFrameCount() - unit.getLastCommandFrame() < 10)) {
						continue;
					}

					boolean isBlocked = false;

					// if the unit doesn't have space to build an addon, it
					// can't make one
					TilePosition addonPosition = new TilePosition(
							unit.getTilePosition().getX() + unit.getType().tileWidth(),
							unit.getTilePosition().getY() + unit.getType().tileHeight() - t.getUnitType().tileHeight());

					for (int i = 0; i < t.getUnitType().tileWidth(); ++i) {
						for (int j = 0; j < t.getUnitType().tileHeight(); ++j) {
							TilePosition tilePos = new TilePosition(addonPosition.getX() + i, addonPosition.getY() + j);

							// if the map won't let you build here, we can't
							// build it.
							// 맵 타일 자체가 건설 불가능한 타일인 경우 + 기존 건물이 해당 타일에 이미 있는경우
							if (!MyBotModule.Broodwar.isBuildable(tilePos, true)) {
								isBlocked = true;
							}

							// if there are any units on the addon tile, we
							// can't build it
							// 아군 유닛은 Addon 지을 위치에 있어도 괜찮음. (적군 유닛은 Addon 지을 위치에
							// 있으면 건설 안되는지는 아직 불확실함)
							for (Unit u : MyBotModule.Broodwar.getUnitsOnTile(tilePos.getX(), tilePos.getY())) {
								//System.out.println("Construct " + t.getName() + " beside " + unit.getType() + "("
								//		+ unit.getID() + ")" + ", units on Addon Tile " + tilePos.getX() + ","
								//		+ tilePos.getY() + " is " + u.getType() + "(ID : " + u.getID() + " Player : "
								//		+ u.getPlayer().getName() + ")");
								if (u.getPlayer() != InformationManager.Instance().selfPlayer) {
									isBlocked = false;
								}
							}
						}
					}

					if (isBlocked) {
						continue;
					}
				}
			}

			// if we haven't cut it, add it to the set of candidates
			candidateProducers.add(unit); // C++ :
											// candidateProducers.insert(unit);

		}

		return getClosestUnitToPosition(candidateProducers, closestTo);
	}

	/// 해당 MetaType 을 build 할 수 있는 producer 를 찾아 반환합니다
	public Unit getProducer(MetaType t, Position closestTo) {
		return getProducer(t, closestTo, -1);
	}

	/// 해당 MetaType 을 build 할 수 있는 producer 를 찾아 반환합니다
	public Unit getProducer(MetaType t) {
		return getProducer(t, Position.None, -1);
	}

	/// 해당 MetaType 을 build 할 수 있는, getProducer 리턴값과 다른 producer 를 찾아 반환합니다

	/// 프로토스 종족 유닛 중 Protoss_Archon / Protoss_Dark_Archon 을 빌드할 때 사용합니다
	public Unit getAnotherProducer(Unit producer, Position closestTo) {
		if (producer == null)
			return null;

		Unit closestUnit = null;

		List<Unit> candidateProducers = new ArrayList<Unit>();
		for (Unit unit : MyBotModule.Broodwar.self().getUnits()) {
			if (unit == null) {
				continue;
			}
			if (unit.getType() != producer.getType()) {
				continue;
			}
			if (unit.getID() == producer.getID()) {
				continue;
			}
			if (!unit.isCompleted()) {
				continue;
			}
			if (unit.isTraining()) {
				continue;
			}
			if (!unit.exists()) {
				continue;
			}
			if (unit.getHitPoints() + unit.getEnergy() <= 0) {
				continue;
			}

			candidateProducers.add(unit); // C++ :
											// candidateProducers.insert(unit);
		}

		return getClosestUnitToPosition(candidateProducers, closestTo);
	}

	public Unit getClosestUnitToPosition(final List<Unit> units, Position closestTo) {
		if (units.size() == 0) {
			return null;
		}

		// BasicBot 1.1 Patch Start ////////////////////////////////////////////////
		// 빌드 실행 유닛 (일꾼/건물) 결정 로직이 seedLocation 이나 seedLocationStrategy 를 잘 반영하도록 수정

		// if we don't care where the unit is return the first one we have
		if (closestTo == Position.None || closestTo == Position.Invalid || closestTo == Position.Unknown || closestTo.isValid() == false) {
			return units.get(0); // C++ : return units.begin();
		}

		// BasicBot 1.1 Patch End //////////////////////////////////////////////////

		Unit closestUnit = null;
		double minDist = 1000000000;

		for (Unit unit : units) {
			if (unit == null)
				continue;

			double distance = unit.getDistance(closestTo);
			if (closestUnit == null || distance < minDist) {
				closestUnit = unit;
				minDist = distance;
			}
		}

		return closestUnit;
	}

	// 지금 해당 유닛을 건설/생산 할 수 있는지에 대해 자원, 서플라이, 테크 트리, producer 만을 갖고 판단한다

	// 해당 유닛이 건물일 경우 건물 지을 위치의 적절 여부 (탐색했었던 타일인지, 건설 가능한 타일인지, 주위에 Pylon이 있는지,

	// Creep이 있는 곳인지 등) 는 판단하지 않는다
	public boolean canMakeNow(Unit producer, MetaType t) {
		if (producer == null) {
			return false;
		}

		boolean canMake = hasEnoughResources(t);

		if (canMake) {
			if (t.isUnit()) {
				// MyBotModule.Broodwar.canMake : Checks all the requirements
				// include resources, supply, technology tree, availability, and
				// required units
				canMake = MyBotModule.Broodwar.canMake(t.getUnitType(), producer);
			} else if (t.isTech()) {
				canMake = MyBotModule.Broodwar.canResearch(t.getTechType(), producer);
			} else if (t.isUpgrade()) {
				canMake = MyBotModule.Broodwar.canUpgrade(t.getUpgradeType(), producer);
			}
		}

		return canMake;
	}

	// 건설 가능 위치를 찾는다

	// seedLocationStrategy 가 SeedPositionSpecified 인 경우에는 그 근처만 찾아보고,

	// SeedPositionSpecified 이 아닌 경우에는 seedLocationStrategy 를 조금씩 바꿔가며 계속 찾아본다.

	// (MainBase . MainBase 주위 . MainBase 길목 . MainBase 가까운 앞마당 . MainBase 가까운 앞마당의 길목 . 탐색 종료)
	public TilePosition getDesiredPosition(UnitType unitType, TilePosition seedPosition,
			BuildOrderItem.SeedPositionStrategy seedPositionStrategy) {
		TilePosition desiredPosition = ConstructionPlaceFinder.Instance()
				.getBuildLocationWithSeedPositionAndStrategy(unitType, seedPosition, seedPositionStrategy);

		/*
		 * std::cout +
		 * "ConstructionPlaceFinder getBuildLocationWithSeedPositionAndStrategy "
		 * + unitType.getName().c_str() + " strategy " + seedPositionStrategy +
		 * " seedPosition " + seedPosition.x + "," + seedPosition.y +
		 * " desiredPosition " + desiredPosition.x + "," + desiredPosition.y +
		 * std::endl;
		 */

		// desiredPosition 을 찾을 수 없는 경우
		boolean findAnotherPlace = true;
		while (desiredPosition == TilePosition.None) {

			switch (seedPositionStrategy) {
			case MainBaseLocation:
				seedPositionStrategy = BuildOrderItem.SeedPositionStrategy.MainBaseBackYard;
				break;
			case MainBaseBackYard:
				seedPositionStrategy = BuildOrderItem.SeedPositionStrategy.FirstChokePoint;
				break;
			case FirstChokePoint:
				seedPositionStrategy = BuildOrderItem.SeedPositionStrategy.FirstExpansionLocation;
				break;
			case FirstExpansionLocation:
				seedPositionStrategy = BuildOrderItem.SeedPositionStrategy.SecondChokePoint;
				break;
			case SecondChokePoint:
			case SeedPositionSpecified:
			default:
				findAnotherPlace = false;
				break;
			}

			// 다른 곳을 더 찾아본다
			if (findAnotherPlace) {
				desiredPosition = ConstructionPlaceFinder.Instance()
						.getBuildLocationWithSeedPositionAndStrategy(unitType, seedPosition, seedPositionStrategy);
				/*
				 * std::cout +
				 * "ConstructionPlaceFinder getBuildLocationWithSeedPositionAndStrategy "
				 * + unitType.getName().c_str() + " strategy " +
				 * seedPositionStrategy + " seedPosition " + seedPosition.x +
				 * "," + seedPosition.y + " desiredPosition " +
				 * desiredPosition.x + "," + desiredPosition.y + std::endl;
				 */
			}
			// 다른 곳을 더 찾아보지 않고, 끝낸다
			else {
				break;
			}
		}

		return desiredPosition;
	}

	// 사용가능 미네랄 = 현재 보유 미네랄 - 사용하기로 예약되어있는 미네랄
	public int getAvailableMinerals() {
		return MyBotModule.Broodwar.self().minerals() - ConstructionManager.Instance().getReservedMinerals();
	}

	// 사용가능 가스 = 현재 보유 가스 - 사용하기로 예약되어있는 가스
	public int getAvailableGas() {
		return MyBotModule.Broodwar.self().gas() - ConstructionManager.Instance().getReservedGas();
	}

	// return whether or not we meet resources, including building reserves
	public boolean hasEnoughResources(MetaType type) {
		// return whether or not we meet the resources
		return (type.mineralPrice() <= getAvailableMinerals()) && (type.gasPrice() <= getAvailableGas());
	}

	// selects a unit of a given type
	public Unit selectUnitOfType(UnitType type, Position closestTo) {
		// if we have none of the unit type, return null right away
		if (MyBotModule.Broodwar.self().completedUnitCount(type) == 0) {
			return null;
		}

		Unit unit = null;

		// if we are concerned about the position of the unit, that takes
		// priority
		if (closestTo != Position.None) {
			double minDist = 1000000000;

			for (Unit u : MyBotModule.Broodwar.self().getUnits()) {
				if (u.getType() == type) {
					double distance = u.getDistance(closestTo);
					if (unit == null || distance < minDist) {
						unit = u;
						minDist = distance;
					}
				}
			}

			// if it is a building and we are worried about selecting the unit
			// with the least
			// amount of training time remaining
		} else if (type.isBuilding()) {
			for (Unit u : MyBotModule.Broodwar.self().getUnits()) {
				if (u.getType() == type && u.isCompleted() && !u.isTraining() && !u.isLifted() && u.isPowered()) {

					return u;
				}
			}
			// otherwise just return the first unit we come across
		} else {
			for (Unit u : MyBotModule.Broodwar.self().getUnits()) {
				if (u.getType() == type && u.isCompleted() && u.getHitPoints() > 0 && !u.isLifted() && u.isPowered()) {
					return u;
				}
			}
		}

		// return what we've found so far
		return null;
	}

	/// BuildOrderItem 들의 목록을 저장하는 buildQueue 를 리턴합니다
	public BuildOrderQueue getBuildQueue() {
		return buildQueue;
	}

	/// seedPositionStrategy 을 현재 게임상황에 맞게 seedPosition 으로 바꾸어 리턴합니다
	private Position getSeedPositionFromSeedLocationStrategy(BuildOrderItem.SeedPositionStrategy seedLocationStrategy) {

		// BasicBot 1.1 Patch Start ////////////////////////////////////////////////
		// 빌드 실행 유닛 (일꾼/건물) 결정 로직이 seedLocation 이나 seedLocationStrategy 를 잘 반영하도록 수정

		Position seedPosition = null;
		Chokepoint tempChokePoint;
		BaseLocation tempBaseLocation;
		TilePosition tempTilePosition = null;
		Region tempBaseRegion;
		int vx, vy;
		double d, theta;
		int bx, by;

		switch (seedLocationStrategy) {
		case MainBaseLocation:
			tempBaseLocation = InformationManager.Instance().getMainBaseLocation(MyBotModule.Broodwar.self());
			if (tempBaseLocation != null) {
				seedPosition = tempBaseLocation.getPosition();
			}
			break;
		case MainBaseBackYard:
			tempBaseLocation = InformationManager.Instance().getMainBaseLocation(MyBotModule.Broodwar.self());
			tempChokePoint = InformationManager.Instance().getFirstChokePoint(MyBotModule.Broodwar.self());
			tempBaseRegion = BWTA.getRegion(tempBaseLocation.getPosition());

			//std::cout << "y";

			// (vx, vy) = BaseLocation 와 ChokePoint 간 차이 벡터 = 거리 d 와 각도 t 벡터. 단위는 position
			// 스타크래프트 좌표계 : 오른쪽으로 갈수록 x 가 증가 (데카르트 좌표계와 동일). 아래로 갈수록 y가 증가 (y축만 데카르트 좌표계와 반대)
			// 삼각함수 값은 데카르트 좌표계에서 계산하므로, vy를 부호 반대로 해서 각도 t 값을 구함

			// MainBaseLocation 이 null 이거나, ChokePoint 가 null 이면, MainBaseLocation 주위에서 가능한 곳을 리턴한다
			if (tempBaseLocation != null && tempChokePoint != null) {

				// BaseLocation 에서 ChokePoint 로의 벡터를 구한다
				vx = tempChokePoint.getCenter().getX() - tempBaseLocation.getPosition().getX();
				//std::cout << "vx : " << vx ;
				vy = (tempChokePoint.getCenter().getY() - tempBaseLocation.getPosition().getY()) * (-1);
				//std::cout << "vy : " << vy;
				d = Math.sqrt(vx * vx + vy * vy) * 0.5; // BaseLocation 와 ChokePoint 간 거리보다 조금 짧은 거리로 조정. BaseLocation가 있는 Region은 대부분 직사각형 형태이기 때문
				//std::cout << "d : " << d;
				theta = Math.atan2(vy, vx + 0.0001); // 라디안 단위
				//std::cout << "t : " << t;

				// cos(t+90), sin(t+180) 등 삼각함수 Trigonometric functions of allied angles 을 이용. y축에 대해서는 반대부호로 적용

				// BaseLocation 에서 ChokePoint 반대쪽 방향의 Back Yard : 데카르트 좌표계에서 (cos(t+180) = -cos(t), sin(t+180) = -sin(t))
				bx = tempBaseLocation.getTilePosition().getX() - (int)(d * Math.cos(theta) / Config.TILE_SIZE);
				by = tempBaseLocation.getTilePosition().getY() + (int)(d * Math.sin(theta) / Config.TILE_SIZE);
				//std::cout << "i";
				tempTilePosition = new TilePosition(bx, by);
				// std::cout << "ConstructionPlaceFinder MainBaseBackYard tempTilePosition " << tempTilePosition.x << "," << tempTilePosition.y << std::endl;

				//std::cout << "k";
				// 해당 지점이 같은 Region 에 속하고 Buildable 한 타일인지 확인
				if (!tempTilePosition.isValid() || !MyBotModule.Broodwar.isBuildable(tempTilePosition.getX(), tempTilePosition.getY(), false) || tempBaseRegion != BWTA.getRegion(new Position(bx*Config.TILE_SIZE, by*Config.TILE_SIZE))) {
					//std::cout << "l";

					// BaseLocation 에서 ChokePoint 방향에 대해 오른쪽으로 90도 꺾은 방향의 Back Yard : 데카르트 좌표계에서 (cos(t-90) = sin(t),   sin(t-90) = - cos(t))
					bx = tempBaseLocation.getTilePosition().getX() + (int)(d * Math.sin(theta) / Config.TILE_SIZE);
					by = tempBaseLocation.getTilePosition().getY() + (int)(d * Math.cos(theta) / Config.TILE_SIZE);
					tempTilePosition = new TilePosition(bx, by);
					// std::cout << "ConstructionPlaceFinder MainBaseBackYard tempTilePosition " << tempTilePosition.x << "," << tempTilePosition.y << std::endl;
					//std::cout << "m";

					if (!tempTilePosition.isValid() || !MyBotModule.Broodwar.isBuildable(tempTilePosition.getX(), tempTilePosition.getY(), false)) {
						// BaseLocation 에서 ChokePoint 방향에 대해 왼쪽으로 90도 꺾은 방향의 Back Yard : 데카르트 좌표계에서 (cos(t+90) = -sin(t),   sin(t+90) = cos(t))
						bx = tempBaseLocation.getTilePosition().getX() - (int)(d * Math.sin(theta) / Config.TILE_SIZE);
						by = tempBaseLocation.getTilePosition().getY() - (int)(d * Math.cos(theta) / Config.TILE_SIZE);
						tempTilePosition = new TilePosition(bx, by);
						// std::cout << "ConstructionPlaceFinder MainBaseBackYard tempTilePosition " << tempTilePosition.x << "," << tempTilePosition.y << std::endl;

						if (!tempTilePosition.isValid() || !MyBotModule.Broodwar.isBuildable(tempTilePosition.getX(), tempTilePosition.getY(), false) || tempBaseRegion != BWTA.getRegion(new Position(bx*Config.TILE_SIZE, by*Config.TILE_SIZE))) {

							// BaseLocation 에서 ChokePoint 방향 절반 지점의 Back Yard : 데카르트 좌표계에서 (cos(t),   sin(t))
							bx = tempBaseLocation.getTilePosition().getX() + (int)(d * Math.cos(theta) / Config.TILE_SIZE);
							by = tempBaseLocation.getTilePosition().getY() - (int)(d * Math.sin(theta) / Config.TILE_SIZE);
							tempTilePosition = new TilePosition(bx, by);
							// std::cout << "ConstructionPlaceFinder MainBaseBackYard tempTilePosition " << tempTilePosition.x << "," << tempTilePosition.y << std::endl;
							//std::cout << "m";
						}

					}
				}
				//std::cout << "z";
				if (tempTilePosition.isValid() == false
					|| MyBotModule.Broodwar.isBuildable(tempTilePosition.getX(), tempTilePosition.getY(), false) == false) {
					seedPosition = tempTilePosition.toPosition();
				}
				else {
					seedPosition = tempBaseLocation.getPosition();
				}
			}
			//std::cout << "w";
			// std::cout << "ConstructionPlaceFinder MainBaseBackYard desiredPosition " << desiredPosition.x << "," << desiredPosition.y << std::endl;
			break;

		case FirstExpansionLocation:
			tempBaseLocation = InformationManager.Instance().getFirstExpansionLocation(MyBotModule.Broodwar.self());
			if (tempBaseLocation != null) {
				seedPosition = tempBaseLocation.getPosition();
			}
			break;

		case FirstChokePoint:
			tempChokePoint = InformationManager.Instance().getFirstChokePoint(MyBotModule.Broodwar.self());
			if (tempChokePoint != null) {
				seedPosition = tempChokePoint.getCenter();
			}
			break;

		case SecondChokePoint:
			tempChokePoint = InformationManager.Instance().getSecondChokePoint(MyBotModule.Broodwar.self());
			if (tempChokePoint != null) {
				seedPosition = tempChokePoint.getCenter();
			}
			break;
		}

		return seedPosition;

		// BasicBot 1.1 Patch End //////////////////////////////////////////////////
	}

	/// buildQueue 의 Dead lock 여부를 판단하기 위해, 가장 우선순위가 높은 BuildOrderItem 의 producer 가 존재하게될 것인지 여부를 리턴합니다
	public boolean isProducerWillExist(UnitType producerType) {
		boolean isProducerWillExist = true;

		if (MyBotModule.Broodwar.self().completedUnitCount(producerType) == 0
				&& MyBotModule.Broodwar.self().incompleteUnitCount(producerType) == 0) {
			// producer 가 건물 인 경우 : 건물이 건설 중인지 추가 파악
			// 만들려는 unitType = Addon 건물. Lair. Hive. Greater Spire. Sunken
			// Colony. Spore Colony. 프로토스 및 테란의 지상유닛 / 공중유닛.
			if (producerType.isBuilding()) {
				if (ConstructionManager.Instance().getConstructionQueueItemCount(producerType, null) == 0) {
					isProducerWillExist = false;
				}
			}
			// producer 가 건물이 아닌 경우 : producer 가 생성될 예정인지 추가 파악
			// producerType : 일꾼. Larva. Hydralisk, Mutalisk
			else {
				// Larva 는 시간이 지나면 Hatchery, Lair, Hive 로부터 생성되기 때문에 해당 건물이 있는지
				// 추가 파악
				if (producerType == UnitType.Zerg_Larva) {
					if (MyBotModule.Broodwar.self().completedUnitCount(UnitType.Zerg_Hatchery) == 0
							&& MyBotModule.Broodwar.self().incompleteUnitCount(UnitType.Zerg_Hatchery) == 0
							&& MyBotModule.Broodwar.self().completedUnitCount(UnitType.Zerg_Lair) == 0
							&& MyBotModule.Broodwar.self().incompleteUnitCount(UnitType.Zerg_Lair) == 0
							&& MyBotModule.Broodwar.self().completedUnitCount(UnitType.Zerg_Hive) == 0
							&& MyBotModule.Broodwar.self().incompleteUnitCount(UnitType.Zerg_Hive) == 0) {
						if (ConstructionManager.Instance().getConstructionQueueItemCount(UnitType.Zerg_Hatchery,
								null) == 0
								&& ConstructionManager.Instance().getConstructionQueueItemCount(UnitType.Zerg_Lair,
										null) == 0
								&& ConstructionManager.Instance().getConstructionQueueItemCount(UnitType.Zerg_Hive,
										null) == 0) {
							isProducerWillExist = false;
						}
					}
				}
				// Hydralisk, Mutalisk 는 Egg 로부터 생성되기 때문에 추가 파악
				else if (producerType.getRace() == Race.Zerg) {
					boolean isInEgg = false;
					for (Unit unit : MyBotModule.Broodwar.self().getUnits()) {
						if (unit.getType() == UnitType.Zerg_Egg && unit.getBuildType() == producerType) {
							isInEgg = true;
						}
						// 갓태어난 유닛은 아직 반영안되어있을 수 있어서, 추가 카운트를 해줘야함
						if (unit.getType() == producerType && unit.isConstructing()) {
							isInEgg = true;
						}
					}
					if (isInEgg == false) {
						isProducerWillExist = false;
					}
				} else {
					isProducerWillExist = false;
				}
			}
		}

		return isProducerWillExist;
	}

	public void checkBuildOrderQueueDeadlockAndAndFixIt() {
		// 빌드오더를 수정할 수 있는 프레임인지 먼저 판단한다
		// this will be true if any unit is on the first frame if it's training
		// time remaining
		// this can cause issues for the build order search system so don't plan
		// a search on these frames
		boolean canPlanBuildOrderNow = true;
		for (final Unit unit : MyBotModule.Broodwar.self().getUnits()) {
			if (unit.getRemainingTrainTime() == 0) {
				continue;
			}

			UnitCommand unitCommand = unit.getLastCommand();
			if (unitCommand != null) {

				UnitCommandType unitCommandType = unitCommand.getUnitCommandType();
				if (unitCommandType != UnitCommandType.None) {
					if (unitCommand.getUnit() != null) {
						UnitType trainType = unitCommand.getUnit().getType();
						if (unit.getRemainingTrainTime() == trainType.buildTime()) {
							canPlanBuildOrderNow = false;
							break;
						}
					}
				}
			}

		}
		if (!canPlanBuildOrderNow) {
			return;
		}

		// BuildQueue 의 HighestPriority 에 있는 BuildQueueItem 이 skip 불가능한 것인데,
		// 선행조건이 충족될 수 없거나, 실행이 앞으로도 계속 불가능한 경우, dead lock 이 발생한다
		// 선행 건물을 BuildQueue에 추가해넣을지, 해당 BuildQueueItem 을 삭제할지 전략적으로 판단해야 한다
		BuildOrderQueue buildQueue = BuildManager.Instance().getBuildQueue();
		if (!buildQueue.isEmpty()) {
			BuildOrderItem currentItem = buildQueue.getHighestPriorityItem();

			// if (buildQueue.canSkipCurrentItem() == false)
			if (currentItem.blocking == true) {
				boolean isDeadlockCase = false;

				// producerType을 먼저 알아낸다
				UnitType producerType = currentItem.metaType.whatBuilds();

				// 건물이나 유닛의 경우
				if (currentItem.metaType.isUnit()) {
					UnitType unitType = currentItem.metaType.getUnitType();
					TechType requiredTechType = unitType.requiredTech();
					final Map<UnitType, Integer> requiredUnits = unitType.requiredUnits();
					int requiredSupply = unitType.supplyRequired();

					/*
					 * std::cout + "To make " + unitType.getName() +
					 * ", producerType " + producerType.getName() +
					 * " completedUnitCount " +
					 * MyBotModule.Broodwar.self().completedUnitCount(
					 * producerType) + " incompleteUnitCount " +
					 * MyBotModule.Broodwar.self().incompleteUnitCount(
					 * producerType) + std::endl;
					 */

					// 건물을 생산하는 유닛이나, 유닛을 생산하는 건물이 존재하지 않고, 건설 예정이지도 않으면 dead
					// lock
					if (isProducerWillExist(producerType) == false) {
						isDeadlockCase = true;
					}

					// Refinery 건물의 경우, Refinery 가 건설되지 않은 Geyser가 있는 경우에만 가능
					if (!isDeadlockCase && unitType == InformationManager.Instance().getRefineryBuildingType()) {
						boolean hasAvailableGeyser = true;

						// Refinery가 지어질 수 있는 장소를 찾아본다
						TilePosition testLocation = getDesiredPosition(unitType, currentItem.seedLocation,
								currentItem.seedLocationStrategy);

						// Refinery 를 지으려는 장소를 찾을 수 없으면 dead lock
						if (testLocation == TilePosition.None || testLocation == TilePosition.Invalid
								|| testLocation.isValid() == false) {
							System.out
									.println("Build Order Dead lock case . Cann't find place to construct " + unitType); // C++
																															// :
																															// unitType.getName()
							hasAvailableGeyser = false;
						} else {
							// Refinery 를 지으려는 장소에 Refinery 가 이미 건설되어 있다면 dead
							// lock
							for (Unit u : MyBotModule.Broodwar.getUnitsOnTile(testLocation)) {
								if (u.getType().isRefinery() && u.exists()) {
									hasAvailableGeyser = false;

									// BasicBot 1.1 Patch Start ////////////////////////////////////////////////
									// 콘솔 출력 추가. 하지 않아도 됨

									System.out.println("Build Order Dead lock case -> Refinery Building was built already at "
											+ testLocation.getX() + ", " + testLocation.getY() );

									// BasicBot 1.1 Patch End ////////////////////////////////////////////////

									break;
								}
							}
						}

						if (hasAvailableGeyser == false) {
							isDeadlockCase = true;
						}
					}

					// 선행 기술 리서치가 되어있지 않고, 리서치 중이지도 않으면 dead lock
					if (!isDeadlockCase && requiredTechType != TechType.None) {
						if (MyBotModule.Broodwar.self().hasResearched(requiredTechType) == false) {
							if (MyBotModule.Broodwar.self().isResearching(requiredTechType) == false) {
								isDeadlockCase = true;
							}
						}
					}

					Iterator<UnitType> it = requiredUnits.keySet().iterator();
					// 선행 건물/유닛이 있는데
					if (!isDeadlockCase && requiredUnits.size() > 0) {
						// for (Unit u : it)
						while (it.hasNext()) {
							UnitType requiredUnitType = it.next(); // C++ :
																	// u.first;

							if (requiredUnitType != UnitType.None) {

								/*
								 * std::cout + "pre requiredUnitType " +
								 * requiredUnitType.getName() +
								 * " completedUnitCount " +
								 * MyBotModule.Broodwar.self().
								 * completedUnitCount(requiredUnitType) +
								 * " incompleteUnitCount " +
								 * MyBotModule.Broodwar.self().
								 * incompleteUnitCount(requiredUnitType) +
								 * std::endl;
								 */

								// BasicBot 1.1 Patch Start ////////////////////////////////////////////////
								// Zerg_Mutalisk 나 Zerg_Scourge 를 만들려고하는데 Zerg_Greater_Spire 만 있는 경우 deadlock 으로 판정하는 버그 수정

								// 만들려는 유닛이 Zerg_Mutalisk 이거나 Zerg_Scourge 이고, 선행 유닛이 Zerg_Spire 인 경우, Zerg_Greater_Spire 가 있으면 dead lock 이 아니다
								if ((unitType == UnitType.Zerg_Mutalisk || unitType == UnitType.Zerg_Scourge)
									&& requiredUnitType == UnitType.Zerg_Spire
									&& MyBotModule.Broodwar.self().allUnitCount(UnitType.Zerg_Greater_Spire) > 0)
								{
									isDeadlockCase = false;
								}
								else

								// BasicBot 1.1 Patch End //////////////////////////////////////////////////

								// 선행 건물 / 유닛이 존재하지 않고, 생산 중이지도 않고
								if (MyBotModule.Broodwar.self().completedUnitCount(requiredUnitType) == 0
										&& MyBotModule.Broodwar.self().incompleteUnitCount(requiredUnitType) == 0) {
									// 선행 건물이 건설 예정이지도 않으면 dead lock
									if (requiredUnitType.isBuilding()) {
										if (ConstructionManager.Instance()
												.getConstructionQueueItemCount(requiredUnitType, null) == 0) {
											isDeadlockCase = true;
										}
									}
									// 선행 유닛이 Larva 인 Zerg 유닛의 경우, Larva,
									// Hatchery, Lair, Hive 가 하나도 존재하지 않고, 건설
									// 예정이지 않은 경우에 dead lock
									else if (requiredUnitType == UnitType.Zerg_Larva) {
										if (MyBotModule.Broodwar.self().completedUnitCount(UnitType.Zerg_Hatchery) == 0
												&& MyBotModule.Broodwar.self()
														.incompleteUnitCount(UnitType.Zerg_Hatchery) == 0
												&& MyBotModule.Broodwar.self()
														.completedUnitCount(UnitType.Zerg_Lair) == 0
												&& MyBotModule.Broodwar.self()
														.incompleteUnitCount(UnitType.Zerg_Lair) == 0
												&& MyBotModule.Broodwar.self()
														.completedUnitCount(UnitType.Zerg_Hive) == 0
												&& MyBotModule.Broodwar.self()
														.incompleteUnitCount(UnitType.Zerg_Hive) == 0) {
											if (ConstructionManager.Instance()
													.getConstructionQueueItemCount(UnitType.Zerg_Hatchery, null) == 0
													&& ConstructionManager.Instance().getConstructionQueueItemCount(
															UnitType.Zerg_Lair, null) == 0
													&& ConstructionManager.Instance().getConstructionQueueItemCount(
															UnitType.Zerg_Hive, null) == 0) {
												isDeadlockCase = true;
											}
										}
									}
								}
							}
						}
					}

					// 건물이 아닌 지상/공중 유닛인 경우, 서플라이가 400 꽉 찼으면 dead lock
					if (!isDeadlockCase && !unitType.isBuilding() && MyBotModule.Broodwar.self().supplyTotal() == 400
							&& MyBotModule.Broodwar.self().supplyUsed() + unitType.supplyRequired() > 400) {
						isDeadlockCase = true;
					}

					// 건물이 아닌 지상/공중 유닛인데, 서플라이가 부족하면 dead lock 상황이 되긴 하지만,
					// 이 경우는 빌드를 취소하기보다는, StrategyManager 등에서 서플라이 빌드를 추가함으로써 풀도록 한다
					if (!isDeadlockCase && !unitType.isBuilding()
							&& MyBotModule.Broodwar.self().supplyUsed() + unitType.supplyRequired() > MyBotModule.Broodwar.self().supplyTotal())
					{
						//isDeadlockCase = true;
					}

					// Pylon 이 해당 지역 주위에 먼저 지어져야 하는데, Pylon 이 해당 지역 주위에 없고, 예정되어있지도 않으면 dead lock
					if (!isDeadlockCase && unitType.isBuilding() && unitType.requiresPsi()
							&& currentItem.seedLocationStrategy == BuildOrderItem.SeedPositionStrategy.SeedPositionSpecified) {

						boolean hasFoundPylon = false;
						List<Unit> ourUnits = MyBotModule.Broodwar
								.getUnitsInRadius(currentItem.seedLocation.toPosition(), 4 * Config.TILE_SIZE);

						for (Unit u : ourUnits) {
							if (u.getPlayer() == MyBotModule.Broodwar.self() && u.getType() == UnitType.Protoss_Pylon) {
								hasFoundPylon = true;
							}
						}

						if (hasFoundPylon == false) {
							isDeadlockCase = true;
						}
					}

					// Creep 이 해당 지역 주위에 Hatchery나 Creep Colony 등을 통해 먼저 지어져야 하는데, 해당 지역 주위에 지어지지 않고 있으면 dead lock
					if (!isDeadlockCase && unitType.isBuilding() && unitType.requiresCreep()
							&& currentItem.seedLocationStrategy == BuildOrderItem.SeedPositionStrategy.SeedPositionSpecified) {
						boolean hasFoundCreepGenerator = false;
						List<Unit> ourUnits = MyBotModule.Broodwar
								.getUnitsInRadius(currentItem.seedLocation.toPosition(), 4 * Config.TILE_SIZE);

						for (Unit u : ourUnits) {
							if (u.getPlayer() == MyBotModule.Broodwar.self() && (u.getType() == UnitType.Zerg_Hatchery
									|| u.getType() == UnitType.Zerg_Lair || u.getType() == UnitType.Zerg_Hive
									|| u.getType() == UnitType.Zerg_Creep_Colony
									|| u.getType() == UnitType.Zerg_Sunken_Colony
									|| u.getType() == UnitType.Zerg_Spore_Colony)) {
								hasFoundCreepGenerator = true;
							}
						}

						if (hasFoundCreepGenerator == false) {
							isDeadlockCase = true;
						}
					}

				}
				// 테크의 경우, 해당 리서치를 이미 했거나, 이미 하고있거나, 리서치를 하는 건물 및 선행건물이 존재하지않고
				// 건설예정이지도 않으면 dead lock
				else if (currentItem.metaType.isTech()) {
					TechType techType = currentItem.metaType.getTechType();
					UnitType requiredUnitType = techType.requiredUnit();

					/*
					 * System.out.println("To research " + techType.toString() +
					 * ", hasResearched " +
					 * MyBotModule.Broodwar.self().hasResearched(techType) +
					 * ", isResearching " +
					 * MyBotModule.Broodwar.self().isResearching(techType) +
					 * ", producerType " + producerType.toString() +
					 * " completedUnitCount " +
					 * MyBotModule.Broodwar.self().completedUnitCount(
					 * producerType) + " incompleteUnitCount " +
					 * MyBotModule.Broodwar.self().incompleteUnitCount(
					 * producerType));
					 */

					if (MyBotModule.Broodwar.self().hasResearched(techType)
							|| MyBotModule.Broodwar.self().isResearching(techType)) {
						isDeadlockCase = true;
					}
					else if (MyBotModule.Broodwar.self().completedUnitCount(producerType) == 0
							&& MyBotModule.Broodwar.self().incompleteUnitCount(producerType) == 0)
					{
						if (ConstructionManager.Instance().getConstructionQueueItemCount(producerType, null) == 0)
						{

							// 테크 리서치의 producerType이 Addon 건물인 경우, Addon 건물 건설이
							// 명령 내려졌지만 시작되기 직전에는 getUnits, completedUnitCount,
							// incompleteUnitCount 에서 확인할 수 없다
							// producerType의 producerType 건물에 의해 Addon 건물 건설의
							// 명령이 들어갔는지까지 확인해야 한다
							if (producerType.isAddon()) {

								boolean isAddonConstructing = false;

								UnitType producerTypeOfProducerType = producerType.whatBuilds().first;

								if (producerTypeOfProducerType != UnitType.None) {

									for (Unit unit : MyBotModule.Broodwar.self().getUnits()) {
										if (unit == null)
											continue;
										if (unit.getType() != producerTypeOfProducerType) {
											continue;
										}

										// 모건물이 완성되어있고, 모건물이 해당 Addon 건물을 건설중인지
										// 확인한다
										if (unit.isCompleted() && unit.isConstructing()
												&& unit.getBuildType() == producerType) {
											isAddonConstructing = true;
											break;
										}
									}
								}

								if (isAddonConstructing == false) {
									isDeadlockCase = true;
								}
							} else {
								isDeadlockCase = true;
							}
						}
					}
					else if (requiredUnitType != UnitType.None) {
						/*
						 * std::cout + "To research " + techType.getName() +
						 * ", requiredUnitType " + requiredUnitType.getName() +
						 * " completedUnitCount " +
						 * MyBotModule.Broodwar.self().completedUnitCount(
						 * requiredUnitType) + " incompleteUnitCount " +
						 * MyBotModule.Broodwar.self().incompleteUnitCount(
						 * requiredUnitType) + std::endl;
						 */

						if (MyBotModule.Broodwar.self().completedUnitCount(requiredUnitType) == 0
								&& MyBotModule.Broodwar.self().incompleteUnitCount(requiredUnitType) == 0) {
							if (ConstructionManager.Instance().getConstructionQueueItemCount(requiredUnitType,
									null) == 0) {
								isDeadlockCase = true;
							}
						}
					}
				}
				// 업그레이드의 경우, 해당 업그레이드를 이미 했거나, 이미 하고있거나, 업그레이드를 하는 건물 및 선행건물이
				// 존재하지도 않고 건설예정이지도 않으면 dead lock
				else if (currentItem.metaType.isUpgrade()) {
					UpgradeType upgradeType = currentItem.metaType.getUpgradeType();
					int maxLevel = MyBotModule.Broodwar.self().getMaxUpgradeLevel(upgradeType);
					int currentLevel = MyBotModule.Broodwar.self().getUpgradeLevel(upgradeType);
					UnitType requiredUnitType = upgradeType.whatsRequired();

					/*
					 * std::cout + "To upgrade " + upgradeType.getName() +
					 * ", maxLevel " + maxLevel + ", currentLevel " +
					 * currentLevel + ", isUpgrading " +
					 * MyBotModule.Broodwar.self().isUpgrading(upgradeType) +
					 * ", producerType " + producerType.getName() +
					 * " completedUnitCount " +
					 * MyBotModule.Broodwar.self().completedUnitCount(
					 * producerType) + " incompleteUnitCount " +
					 * MyBotModule.Broodwar.self().incompleteUnitCount(
					 * producerType) + ", requiredUnitType " +
					 * requiredUnitType.getName() + std::endl;
					 */

					if (currentLevel >= maxLevel || MyBotModule.Broodwar.self().isUpgrading(upgradeType)) {
						isDeadlockCase = true;
					} else if (MyBotModule.Broodwar.self().completedUnitCount(producerType) == 0
							&& MyBotModule.Broodwar.self().incompleteUnitCount(producerType) == 0) {
						if (ConstructionManager.Instance().getConstructionQueueItemCount(producerType, null) == 0) {

							// 업그레이드의 producerType이 Addon 건물인 경우, Addon 건물 건설이
							// 시작되기 직전에는 getUnits, completedUnitCount,
							// incompleteUnitCount 에서 확인할 수 없다
							// producerType의 producerType 건물에 의해 Addon 건물 건설이
							// 시작되었는지까지 확인해야 한다
							if (producerType.isAddon()) {

								boolean isAddonConstructing = false;

								UnitType producerTypeOfProducerType = producerType.whatBuilds().first;

								if (producerTypeOfProducerType != UnitType.None) {

									for (Unit unit : MyBotModule.Broodwar.self().getUnits()) {
										if (unit == null)
											continue;
										if (unit.getType() != producerTypeOfProducerType) {
											continue;
										}
										// 모건물이 완성되어있고, 모건물이 해당 Addon 건물을 건설중인지
										// 확인한다
										if (unit.isCompleted() && unit.isConstructing()
												&& unit.getBuildType() == producerType) {
											isAddonConstructing = true;
											break;
										}
									}
								}

								if (isAddonConstructing == false) {
									isDeadlockCase = true;
								}
							} else {
								isDeadlockCase = true;
							}
						}
					} else if (requiredUnitType != UnitType.None) {
						if (MyBotModule.Broodwar.self().completedUnitCount(requiredUnitType) == 0
								&& MyBotModule.Broodwar.self().incompleteUnitCount(requiredUnitType) == 0) {
							if (ConstructionManager.Instance().getConstructionQueueItemCount(requiredUnitType,
									null) == 0) {
								isDeadlockCase = true;
							}
						}
					}
				}

				if (!isDeadlockCase) {
					// producerID 를 지정했는데, 해당 ID 를 가진 유닛이 존재하지 않으면 dead lock
					if (currentItem.producerID != -1 ) {
						boolean isProducerAlive = false;
						for (Unit unit : MyBotModule.Broodwar.self().getUnits()) {
							if (unit != null && unit.getID() == currentItem.producerID && unit.exists() && unit.getHitPoints() > 0) {
								isProducerAlive = true;
								break;
							}
						}
						if (isProducerAlive == false) {
							isDeadlockCase = true;
						}
					}
				}

				if (isDeadlockCase) {
					System.out.println(
							"Build Order Dead lock case . remove BuildOrderItem " + currentItem.metaType.getName());

					buildQueue.removeCurrentItem();
				}

			}
		}
	}

};

redpajama_set_name: RedPajamaGithub


text:
I Can't Keep Quiet
We can't keep quiet! We absolutely love this song and how it's captured the imagination of so many around the world. The lyrics are perfect and ring true for a whole new generation of women activists. It's about time we had a new anthem to sing. And sing it we are going to! Loud! We're going to take it to Flash mobs, Rallys and Protests bringing a positive vibe, a joy from the gloom, a chance for voices to be heard, a heartfelt throng. It's going to make us feel really goooooood.
But first we need a good strong contingent of voices who know the song well. The vocal backbone as it were.
What a day! Denise had been asked by the organisers of the Women's March on London to lead the singing in Trafalgar Square during the rally and following the speeches. It was a big deal and such a honour for Holler4 to be asked. Everything Denise had done with Songworks and Holler4 had led to this one amazing day. My role was to keep the Holler4 social media up to speed and let Denise keep her mind on what she does best. I mean did you see her! In front of all those crowds. Directing them, conducting the choir, motivating everyone and speaking and singing at the top of her voice. How else would 100,000 people hear and know what to do! All around the Square was rammed packed and try as I did, I couldn't get to a good spot in front of the stage. And then I heard Sandi Toksvig announce that the rally was going to end early because the Police were concerned about clearing London. Apparently 'it was at a standstill'! Oh no! Holler4 won't get to do their thing, I felt a bit gutted knowing the energy and enthusiasm that had gone into even just the THINKING about let alone the actual doing of this performance! And just then as the Rally was wrapping Sandi called Denise to the stage to lead the crowd in the final song. I pushed forward, now with some fervour, to make sure I could capture at least something on video. So glad I did. Here's the fruits of my labours. The tail end of the song and all the cheering and celebrations that ensued. It was so exhilarating to be amongst the crowd. It felt that through the singing, it gave everyone present a chance to get their voice heard and with the strength in numbers felt like our voices could actually change the world.

redpajama_set_name: RedPajamaCommonCrawl


Do you know the most commonly used terms and terminology in the photo industry?
We asked the experts from Kodak to share some of these descriptions.
A lock on the Advanced Photo System film cassette that allows unexposed or partially exposed film to be advanced only when the cassette is properly loaded into any of the system's equipment, including cameras and photofinishing devices.
A new standard in consumer photography developed by Kodak and four other System Developing Companies – Canon, Fuji, Minolta and Nikon – based on a new film format and innovative film, camera and photofinishing technologies.
The new Kodak brand that identifies the company's Advanced Photo System offerings.
The ratio of width to height in photographic prints – 2:3 in 35 mm pictures to produce photographs most commonly measuring 3.5 x 5 inches or4 x 6 inches; Advanced Photo System cameras deliver three aspect ratios as selected by the user.
The part of the scene the appears behind the principal subject of the picture.
The folding (accordion) portion in some cameras that connects the lens to the camera body. Also a camera accessory that, when inserted between lens and camera body, extends the lens-to-film distance for close focusing.
A shutter whose blades operate between two elements of the lens.
Flash or tungsten light bounced off a reflector (such as the ceiling or walls) to give the effect of natural or available light.
Taking additional pictures of the subject through a range of exposures-both lighter and darker-when unsure of the correct exposure.
Giving additional exposure to part of the image projected on an enlarger easel to make that area of the print darker. This is accomplished after the basic exposure by extending the exposure time to allow additional image-forming light to strike the areas in the print you want to darken while holding back the image-forming light from the rest of the image. Sometimes called printing-in.
"Classic" format – one of the three selectable Advanced Photo System print formats; identical to the 2:3 aspect ratio used in 35 mm photography and suitable for most general-purpose shots.
A lighttight, factory-loaded film container that can be placed in and removed from the camera in daylight.
Elliptically shaped film cassette designed especially for the Advanced Photo System that serves as the sealed, leaderless container for all System film whether unexposed, exposed or processed.
A chemical that neutralizes hypo in film or paper, reducing wash time and helping to provide a more stable image.
Kodak's patented flip-up flash mechanism that creates distance between the flash and the lens to reduce red-eye; flash is located on the end of hinged lever that covers the lens when closed, and flips up to switch on the camera and deploy the flash. Also called Flip-up Flash.
The playback output level of the color (chrominance) signal after it is separated from the luminence signal. As with RF output, a low performing tape can lose color resolution due to increased percentage of noise.
An enlarger with a sharp, undiffused light that produces high contrast and high definition in a print. Scratches and blemishes in the negative are emphasized.
A print made by exposing photographic paper while it is held tightly against the negative. Images in the print will be the same size as those in the negative.
A device used for contact-printing that consists of a lighttight box with an internal light source and a printing frame to position the negative against the photographic paper in front of the light.
Numbers (usually 1-5) and names (soft, medium, hard, extra-hard, and ultrahard) of the contrast grades of photographic papers, to enable you to get good prints from negatives of different contrasts. Use a low-numbered or soft contrast paper with a high contrast negative to get a print that most closely resembles the original scene. Use a high-numbered or an extra-hard paper with a low-contrast negative to get a normal contrast paper.
A lighttight area used for processing films and for printing and processing papers; also for loading and unloading film holders and some cameras.
A circular, rotating disk at the end of Advanced Photo System film cassettes that functions as a circular bar code, communicating the film speed, type and exposure length through a sequence of reflective bars to an optical sensor in the camera.
A fully automatic flash that works only with specific cameras. Dedicated flash units automatically set the proper flash sync speed and lens aperture, and electronic sensors within the camera automatically control exposure by regulating the amount of light from the flash.
The clarity of detail in a photograph.
The blackness of an area in a negative or print that determines the amount of light that will pass through it or reflect from it. Sometimes referred to as contrast.
The distance range over which the film could be shifted at the film plane inside the camera and still have the subject appear in sharp focus; often misused to mean depth of field.
A solution used to turn the latent image into a visible image on exposed films or photographic papers.
A lighttight container used for processing film.
Lens opening. A perforated plate or adjustable opening mounted behind or between the elements of a lens used to control the amount of light that reaches the film. Openings are usually calibrated in f-numbers.
An enlarger that combines diffuse light with a condenser system, producing more contrast and sharper detail than a diffusion enlarger but less contrast and blemish emphasis than a condenser enlarger.
An enlarger that scatters light before it strikes the negative, distributing light evenly on the negative. Detail is not as sharp as with a condenser enlarger; negative blemishes are minimized.
A camera that encodes an image in a digital file, rather than on film.
Holding back the image-forming light from a part of the image projected on an enlarger easel during part of the basic exposure time to make that area of the print lighter.
Two pictures taken on one frame of film, or two images printed on one piece of photographic paper.
Film cassette loading feature in all Advanced Photo System cameras that virtually eliminates film-loading problems by automatically accepting the leaderless cassette and thrusting the film forward to the first unexposed frame without any user intervention.
Electrical coding system employed in 35 mm format film that communicates film speed, type and exposure length to the camera.
A technology that provides amplified sharpness in Kodak Advantix 100-speed film.
The electrical performance of the tape samples is measured and compared to the VHS-standard reference tape (the JVC VRT-2). The published numbers represent how much better (+) or worse (-) then the industry standard tape each tape sample performed (the JVC VRT-2 scores 0.0 for every parameter).
Micro-thin layers of gelatin on film in which light-sensitive ingredients are suspended; triggered by light to create a chemical reaction resulting in a photographic image.
A print that is larger than the negative or slide; blowup.
A truly high grade tape will demonstrate its differences mostly in the quality of the image recorded. Extra high grade tape coatings are generally superior in noise immunity and lower in dropouts. This means that you get a better recording, and you'll get a better second and third generation copy. Several manufacturers have indicated on their packaging that they have done things to also provide greater longevity, but this is a claim that would be difficult to prove or disprove. For especially valuable recordings, use a high grade tape; but remember that there is no standardization and no requirements that prevent anyone from naming a product "extra high grade." Buy a tape with a brand you trust.
Describes the fact that Advanced Photo System film is sealed in the cassette; avoids the danger of exposure to light before shooting and mishandling of negatives after shooting.
The four icons on Advanced Photo System film cassettes that show the film status – unexposed, partially exposed, fully exposed or processed.
A viewing device on a camera to show the subject area that will be recorded on the film. Also known as viewfinder and projected frame.
A lens that has been focused in a fixed position by the manufacturer. The user does not have to adjust the focus of this lens.
A solution that removes any light-sensitive silver-halide crystals not acted upon by light or developer, leaving a black-and-white negative or print unalterable by further action of light. Also referred to as hypo.
A brief, intense burst of light from a flashbulb or an electronic flash unit, usually used where the lighting on the scene is inadequate for picture-taking.
Too low in contrast. The range in density in a negative or print is too short.
The distance between the film and the optical center of the lens when the lens is focused on infinity. The focal length of the lens on most adjustable cameras is marked in millimetres on the lens mount.
The range within which a camera is able to focus on the selected picture subject – 4 feet to infinity – for example.
storage of film or paper in a hot, humid place.
One individual picture on a roll of film. Also, tree branch, arch, etc., that frames a subject.
The sand-like or granular appearance of a negative, print, or slide. Graininess becomes more pronounced with faster film and the degree of enlargement.
One of the three selectable Advanced Photo System print formats; identical to the 9:16 aspect ratio used in high-definition television (HDTV); suitable for wider shots than usual, such as groups; produces prints of 3.5 x 6 inches or 4 x 7 inches.
A wide range of density in a print or negative.
The brightest areas of a subject and the corresponding areas in a negative, a print, or a slide.
The fitting on a camera that holds a small portable flash. It has an electrical contact that aligns with the contact on the flash unit's "foot" and fires the flash when you press the shutter release. This direct flash-to-camera contact eliminates the need for a PC cord.
Distance of the nearest object in a scene that is acceptably sharp when the lens is focused on infinity.
The name for a fixing bath made from sodium thiosulfate, other chemicals, and water; often used as a synonym for fixing bath.
High dynamic range (HDR) images contain a great deal more lighting information than regular images, such as ones found in books or the internet. These images are generally created by shooting the same photographic subject at a series of exposure settings, then by using computer software, combine the total range of light into one image. HDR has many benefits within compositing and lighting, allowing a much fuller representation of intensity range found in the natural world. Often real life environments are captured as HDR images and put to use in 3D production with image based lighting techniques.
A basic requirement of certified photofinishers and certified photofinishing equipment; specifies the three system print formats – C, H and P – that users select during picture-taking must be available at photofinishing.
The invisible image left by the action of light on photographic film or paper. The light changes the photosensitive salts to varying degrees depending on the amount of light striking them. When processed, this latent image will become a visible image either in reversed tones (as in a negative) or in positive tones (as in a color slide).
Liquid Crystal Display on cameras that shows such information as remaining exposures, flash status and aspect ratio selected.
A camera with the shutter built into the lens; the viewfinder and picture-taking lens are separate.
A lighttight metal container (cartridge) that holds 135 film (cylindrical magazine).
The ability to record detailed information about picture-taking conditions, such as lighting and subject distance, via the magnetic layer on Advantix film.
Compact Kodak Advantix storage case that secures up to 12 film cassettes and accompanying photo file index prints.
Feature available on the Kodak Advantix 5800 MRX-Zoom camera that enables users to remove a partially exposed film cassette, insert it again later, and start shooting exactly where they left off.
Photofinishing operation that operates on a retail level, serving consumers directly and processing film on-site.
A mechanism for advancing the film to the next frame and recocking the shutter, activated by an electric motor usually powered by batteries. Popular for action-sequence photography and for recording images by remote control.
A device designed to hold the negative in proper position in an enlarger.
A lens that makes the image in a photograph appear in perspective similar to that of the original scene. A normal lens has a shorter focal length and a wider field of view than a telephoto lens, and a longer focal length and narrower field of view than a wide-angle lens.
Negative Returned In Cassette – required Advanced Photo System feature that returns processed film in its original, closed cassette; liberates consumers from the hassle of storing and handling film negatives.
A meter which determines exposure by reading light reflected from the film during picture-taking.
"Pan" format – one of the three selectable Advanced Photo System print formats; a 1:3 aspect ratio that produces prints of 3.5 x 10.5 inches or up to4.5 x 11.5 inches; suitable for panoramic shots and tall or wide subjects.
Moving the camera so that the image of a moving object remains in the same relative position in the viewfinder as you take a picture.
Regularly and accurately spaced holes punched throughout the length of 35 mm film for still cameras.
A basic system feature that makes ordering reprints and enlargements easy; the small print shows a positive, "thumbnail"-sized version of every picture on an Advanced Photo System film roll; accompanies all prints and negatives returned in the sealed film cassette by the photofinisher; each thumbnail picture is numbered on the index print to match negative frames inside the cassette.
A device included on many cameras as an aid in focusing.
Any device used to reflect light onto a subject.
Most films are designed to be exposed within a certain range of exposure times-usually between 1/15 second to 1/1000 second. When exposure times fall outside of this range-becoming either significantly longer or shorter-a film's characteristics may change. Loss of effective film speed, contrast changes, and (with color films) color shifts are the three common results. These changes are called reciprocity effect.
Cracking or distorting of the emulsion during processing, usually caused by wide temperature or chemical-activity differences between the solutions.
Altering a print or negative after development by use of dyes or pencils to alter tones of highlights, shadows, and other details, or to remove blemishes.
The playback output level of the recorded FM signal. Lower RF output levels can result in increased noise levels in the playback signal.
A feature on all Kodak Advantix cameras that prevents the film door from opening mid-roll and exposing film to light.
Kodak and four other photo industry leaders who jointly developed the Advanced Photo System standards.
Trademark for patented Kodak flash technology, employed in Kodak Advantix cameras, that automatically determines when flash is needed.
Light striking the subject from the side relative to the position of the camera; produces shadows and highlights to create modeling on the subject.
A camera that has few or no adjustments to be made by the picture-taker. Usually, simple cameras have only one size of lens opening and one or two shutter speeds and do not require focusing by the picture-taker.
A camera in which you view the scene through the same lens that takes the picture.
Produced by use of a special lens that creates soft outlines.
Retouching a processed print with a pencil or brush (with watercolors or dyes) to eliminate spots left by dust or scratches on the negative.
Discolored areas on film or paper, usually caused by contaminated developing solutions or by insufficient fixing, washing, or agitation.
An acid rinse, usually a weak solution of acetic acid, used as a second step when developing black-and-white film or paper. It stops development and makes the hypo (fixing bath) last longer.
A lens that makes a subject appear larger on film than does a normal lens at the same camera-to-subject distance. A telephoto lens has a longer focal length and narrower field of view than a normal lens.
Trademark for patented Kodak film emulsion technology used in all Kodak Advanced Photo System films; uniquely shaped grains that align better than conventional silver crystals, absorbing and transmitting light more effectively to produce sharper images. Kodak Advantix 400 film is the company's first 400-speed film using all T-grain emulsions.
Meter built into the camera determines exposure for the scene by reading light that passes through the lens during picture-taking.
A positive photographic image on film, viewed or projected by transmitted light (light shining through film).
A three-legged supporting stand used to hold the camera steady. Especially useful when using slow shutter speeds and/or telephoto lenses.
Light from regular room lamps and ceiling fixtures, not fluorescent.
A condition in which too little light reaches the film, producing a thin negative, a dark slide, or a muddy-looking print.
More commonly called "luminence signal-to-noise ratio." This is a measure of how pure the video signal is (the monochrome or black-and-white portion of the picture). Tape with good luminence signal-to-noise ratios has a sharper, clearer image. This property has even greater importance on multiple generation copies.


text:
Nintendo's Next Switch Game Trial Has Been Announced For Online Subscribers
12 January 2023 by admin
Subscribe to Nintendo Life on YouTube
Nintendo has announced that UNO is set to be the next free game trial for Nintendo Switch Online subscribers in Europe. The freebie is available to download from the Switch eShop right now, but it won't be playable until the trial begins on 19th January.
The chances are you will have come across UNO before and you don't need us to tell you how the game works (yep, we have also been a part of those long family game nights that get a little too competitive). In one of the few differences between the Switch version and the OG card game, the power of online play lets you play solo against others from around the world — perfect for working on your skills before the next family event.
Race against friends and family to empty your hand in the UNO Game Trial, exclusive to #NintendoSwitchOnline members!
Download now so you're ready to play from 19/01: pic.twitter.com/LvmZTKqrTR
— Nintendo of Europe (@NintendoEurope) January 12, 2023
This is, as we have come to expect, a trial by name and a trial by nature and subscribers will once again have only one week to play the game for free before the virtual cards are snatched from our virtual hands. Any saved data will be carried over to the full game if you do decide to purchase though, so there's always that!
Will you be picking up or skipping on this one? Play your cards in the comments below!


For each visitor to our Website, our server automatically recognises information regarding the customer's domain name (or that of the visitor's access provider) but not the e-mail address.
b. Information you give us.
We collect aggregate information regarding customer access or visit of the Website and information volunteered by customers such as when you register and communicate with us electronically.
3. Use and Disclosure of Customer Information?
Information about our customers is an important part of our business. We share customer information only on a limited basis and with our parent company and affiliates. We share it on a limited basis with agents that we use from time to time to send postal mail and e-mail, remove repetitive information from customer lists, analyse data, provide marketing assistance, and provide customer service.
In case BEI or substantially all of its assets are acquired by one or more third parties as a result of a merger, sale, consolidation or liquidation, customer information may be one of the transferred assets.
Certain activities through the Website, such as special promotions may be linked to those from other unrelated third party companies that offer you the option to share your personal information with the third party. We will not share your personal information with those third party companies; only you can if you make that choice.
We are committed to offering our customers a safe and secure environment. Our servers utilise SSL (Secure Sockets Layer) encryption technology to help protect your personal information. By using an SSL-compatible browser such as Microsoft Internet Explorer, Mozilla Firefox and Safari, you can help ensure that your personal identifiable information is unavailable to unauthorised users and processed confidentially.


Comprising: a necklace suspending a fancy shaped aquamarine surmounted by brilliant-cut diamonds and dark mother of pearl, to a similarly set collar, length approximately 465mm; a pair of earrings; and a ring, size N; each signed Fred Paris, French assay and maker's marks. Approximately 100 carats of aquamarine and 60 carats of G-H colour diamonds. Circa 1980.


text:
Culture & Religion — November 16, 2015
How Social Media Helps Us in Emergencies
In times of emergency, many of us reach for our phones. They are vital to the safety and security of our families, friends, and colleagues.
Copy a link to the article entitled http://How%20Social%20Media%20Helps%20Us%20in%20Emergencies
Share How Social Media Helps Us in Emergencies on Facebook
Share How Social Media Helps Us in Emergencies on Twitter
Share How Social Media Helps Us in Emergencies on LinkedIn
Soon after the devastating terror attacks in Paris on Friday that left at least 129 people killed and countless others wounded, Facebook launched a "Safety Check" tool that allowed users located in Paris to identify themselves as "safe." Their Facebook friends then received notifications that they were unharmed.
Facebook created this service after the Nepal earthquake earlier this year. "This morning we activated Safety Check for people affected by the earthquake in Nepal. It's a simple way to let family and friends know you're okay," Mark Zuckerberg wrote on his Facebook page after the Nepal disaster. "If you're in one of the areas affected by the earthquake, you'll get a notification asking if you're safe, and whether you want to check on any of your friends." The service can be linked to geo-location of the user and an additional feature allows individuals to "mark safe" others as safe too.
In times of emergency, many of us reach for our phones. I remember the day of the 9/11 attacks where many in the U.S. could not place a call as the circuits were overloaded with individuals trying to reach their loved ones. Then in 2011, a magnitude 5.9 earthquake hit Virginia, and social media demonstrated its true power. Seconds after the first tremors were felt, Virginians took to Twitter to express their reactions. Almost immediately those tweets were read by others in the New York area who then felt the quake 30 seconds later.
The US Geological Survey (USGS) has begun to use Twitter data to predict earthquakes. The USGS National Earthquake Information Center processes information in real time from about 2,000 earthquake sensors, most of them in the United States.
"Weirdest moment: Seeing the people I'm following in DC tweet "earthquake" seconds before I felt it here in NYC," wrote one Twitter user. "Haha! I was able to read about the earthquake on Twitter right before I felt it! I love living in the future," said another.
In fact, the US Geological Survey (USGS) has begun to use Twitter data to predict earthquakes. The USGS National Earthquake Information Center processes information in real time from about 2,000 earthquake sensors, most of them in the United States. That leaves most of the world without USGS earthquake sensors. But, there are lots of folks who use Twitter. So, the USGS decided to determine if Twitter could be used to detect earthquakes. They found that it was surprisingly effective. In fact, as reported by Twitter they detected the 2014 earthquake in Napa less than 30 seconds after it began:
"The 2014 earthquake in Napa was detected by USGS in 29 seconds using Twitter data, likely due to the tech-savvy population that dominates the area. (Origin time was 2014-08-24 10:20:44 UTC and Twitter data detection time was 2014/08/24 10:21:13.)"
And using social media to inform the public of disasters is equally important. According to The Pew Research Center, a quarter of Americans used a social networking site to obtain information related to the Boston Marathon bombing attacks. Researchers from a National Science Foundation-funded program called Project HEROIC studies how Twitter is used during disasters. Their focus is to help inform policy around best practices in using social media during these events. In the week following the Boston attacks, for example, Project HEROIC found that the number of followers on Boston Police Department's Twitter account increased by 500 percent, while the city's public information officer saw a 2,000 percent increase in followers as people sought out information. Principal investigator for the program, Carter Butts, says that this new form of communication is "really an important emerging communication channel for rapid notification and dissemination of information."
Like the Twitter user above mentioned, I love living in the future. We are lucky to have tools and technologies that keep us informed about the world around us, while also letting us notify others of our own health and safety.
After Hurricane Sandy hit, PSE&G, the largest utility company in New Jersey, staffed up their social media teams to notify customers of the locations of tents and generators. "At one point during the storm, we sent so many tweets to alert customers, we exceeded the [number] of tweets allowed per day," said PSE&G'S Jorge Cardenas, vice president of asset management and centralized services.
Whether it's using social media to let others know that you're safe or using it to predict earthquakes, the tools and technologies we have available to us through our phones provide a new, important way in which to increase the safety and security of those around us. After the Paris attacks, many of us took to social media to determine the status of our friends and family, ensuring that our loved ones were safe. At the same time, social media provided an outlet for the anger, dismay, sadness, and loss many of us experienced.
Like the Twitter user above mentioned, I love living in the future. We are lucky to have tools and technologies that keep us informed about the world around us, while also letting us notify others of our own health and safety. Our mobile phones offer more than just Candy Crush and Clash of Kings. They are vital to the safety and security of our families, friends, and colleagues and I'm happy we have them.
Jason is Chief, Innovation for Thomson Reuters Special Services where he facilitates, oversees, and executes long-term solutions to emerging technology challenges. He works closely with governments, the private-sector, and non-governmental organizations to identify opportunities that will shape the future. The views expressed are his alone and do not necessarily represent the views of Thomson Reuters or Thomson Reuters Special Services.
This Telescope Could See Back to the Beginning of Time by 2022
Who knows what we'll see. We may be able to witness the beginning of everything.


A custom building from ClearSpan ensures that even the most specific building requirements and accessories can be accommodated. Whether it's a special building color, custom doors, flame-retardant fabric, strategically placed fans and lighting, custom conveyor systems or anything else, no detail is too small for ClearSpan.
To begin, please fill out the form below or contact ClearSpan by phone at 1.866.643.1010.


Charlotte completed her PhD at the Institute of Psychiatry, King's College London, exploring the mental health of women in the UK Armed Forces. Her research and interests since then have focused on local health inequalities; for example, in sexual minority mental health; in the physical health of patients with serious mental illnesses; and, in the residential mobility of individuals with common mental disorders. Charlotte is currently a Research Associate working as an 'embedded researcher' within Haringey Council, as part of a research initiative organised by the NIHR CLAHRC North Thames to develop an evaluation framework for the provision of welfare advice hubs in primary care.


Published 04/22/2019 10:42:48 am at 04/22/2019 10:42:48 am in Lg French Door Refrigerator Black.
lg french door refrigerator black 4 door french door smart refrigerator with instaview door lg lsfxcd inch counter depth french door refrigerator with lg studio lsfxcd counter depth french door refrigerator with instaview window and doorin.
lpxsd lg diamond cuft door french door refrigerator lpxsd , lg lfxd door french door refrigerator lg usa , lg lsfxcd inch counter depth french door refrigerator with lg studio lsfxcd counter depth french door refrigerator with instaview window and doorin , amazoncom lg lfxss french door refrigerator with cu ft lg lfxss french door refrigerator with cu ft capacity in stainless steel, amazoncom lg lfxsm cu ft matte black stainless french lg lfxsm cu ft matte black stainless french door refrigerator, lg french door refrigerators smart instaview doors lg usa french door counterdepth refrigerator, lg lfcd door french door counterdepth refrigerator lg usa lg refrigerators lfcd , lg lfcsb french door refrigerator cu ft refrigerator lg lfcsb french door refrigerator cu ft refrigerator cu ft freezer multiair flow , lg gfvbsl doorindoor french door fridge black ssteel jb hifi lg gfvbsl doorindoor french door fridge black s, lg french door refrigerator inch white rc willey furniture store , .


text:
Main PIR Press News The Security Index Occasional Paper Series Came Out With The New Report "Russia's Nonproliferation Policy And Global Strategic Stability" By Sergey Ryabkov
The Security Index Occasional Paper Series Came Out With The New Report "Russia's Nonproliferation Policy And Global Strategic Stability" By Sergey Ryabkov
MOSCOW, DECEMBER 16, 2021. PIR PRESS. The Security Index Occasional Paper Series came out with the new report "Russia's nonproliferation policy and global strategic stability" by the Deputy Minister of Foreign Affairs of the Russian Federation Sergey Ryabkov.
In his paper provided exclusively for PIR Center, Russian Deputy Foreign Minister Sergey Ryabkov expresses Russia's position on topical issues of global security and notes the most important obstacles to disarmament and nonproliferation. The author touches upon Russia-U.S. relations in the strategic stability domain and highlights the most pressing challenges to the nuclear nonproliferation regime. Despite enormous difficulties and challenges in this field, H.E. Ryabkov expresses cautious optimism about the future, hoping for pragmatism and willingness to seek balanced and mutually acceptable solutions to the problems of nuclear nonproliferation and global security to prevail at the NPT Review Conference and during the Russia-U.S. strategic stability dialogue.
Although Russian-U.S. relations are overshadowed by the disintegration of the arms control architecture, mostly due to the destructive course of the previous U.S. Administration, the understanding reached by Presidents Biden and Putin at the Geneva summit opened a window of opportunity for constructive interaction of two major stewards of nuclear arsenals.
The long-awaited steps agreed upon by the U.S. and Russian leaders are the following: New START extension, Joint Statement that nuclear war cannot be won and should never be fought, and launch of Strategic Stability Dialogue, which is to serve as insurance of predictability, prevent arms race, build up arms control, and reduce risks of armed conflicts.
The underlying idea of the Strategic Stability Dialogue is to jointly develop a "new strategic equation" between the U.S. and Russia, which would embrace the entire spectrum of arms possessed by the states, including offensive weapons and defensive systems.
Among major challenges to the nonproliferation regime, Russia highlights the creation of weapons of mass destruction free zone in the Middle East, the Comprehensive Nuclear-Test-Ban Treaty not entering into force, a possible arms race in outer space, Iranian and North Korean crises, and the risk of politicization of IAEA safeguards system.


DEANNE BUTTERWORTH AND MATTHEW DAY'S DANCEHOUSE DOUBLE BILL IS AN APT PAIRING, EACH PERFORMER EXUDING A PALPABLE SENSE OF COMPULSIVE PURPOSE WITH INTENSIVELY FOCUSED BODY-WORK IN SPACES TIGHTLY FRAMED BY LIGHT, SHADOW AND ENVELOPING SOUND. THERE IS NOTHING LITERAL TO HANG ON TO HERE—ONCE AGAIN IN DANCE MASSIVE WE ARE ALL VERY MUCH IN THE MOMENT.
Butterworth's Dual Repérage in Threes works the length of the venue's upstairs Studio. To our far right, the choreographer-dancer appears abruptly, in a flurry of extensions, silhouetted in front of a human scale rectangle of bright, softly coloured light. Butterworth's relationship to this light source is pivotal: she constantly moves away from it to the centre of her stage, sometimes further, only to return to it, sometimes moving backwards into its acute frame. The dancer is not miming push and pull, but the magnetism is evident—sometimes in a mere walk, sometimes as if she's danced by an unseen force. As if to amplify the work's anxious, moth-to-a-flame vibrancy, a hand-held torch lightly tracks Butterworth, casting a flickering shadow on the long wall as she moves into the dark.
Michael Munson's score resonates with the dance; initially short, deep chords and high piano twangs suggest the solidity of acoustic sources, providing a palpable physical sonic pattern against which the dancer's restive body moves regardless.
As Dual Repérage in Threes evolves, Butterworth's choreography takes shape, cumulatively building on a calculatedly limited set of movements with occasional, strikingly different images (sculpted posturing, balletic tip-toeing, feet 'stuttering,' rapid pelvic thrusts) breaking the routine. The dancing's not minimalist as in, say, some Molissa Fenley works, but the recurrence and recombination of motifs can be hypnotic or, at times, hard to hold together. Arms lead the body in wide turns, swing over shoulders singly and then together, back and forth at speed; hands spin rapidly over each other; and, in a dominant image, the dancer's upper body is constantly pulled down towards the floor, centrestage, hands reaching, half-cupped as if something sighted is beyond grasp—the strange potency of this gesture is heightened by the addition of a percussive element to the sound score.
The work is played out in two sections—there is a 'private' third that only Butterworth experiences or we can imagine, as she suggests in her opaque program notes. As the first 'act' progresses, the pull of the light is amplified when it turns slowly, softly orange, Butterworth travelling elegantly sideways, then walking serenely towards it. On arrival, she oscillates between bursts of energy and calm, drifts back to the centre, again as if seeing…what? Sweet organ-like tones fill the space. Black-out. Butterworth stands over a flickering fluorescent light as she commences her second 'act,' in which the rectangle of light is a vivid orange, and the images into which she recurrently locks are more intense, more urgent while others—like squared-off poses, moments of rare stability—are added. A thin line of lilac light illuminates the space where wall and floor meet, drawing a crawling Butterworth away from her principal light source, perhaps into some kind of release. In a moment that seems to break even further from the work's patterning, Butterworth is no longer compelled to bend low; instead she clenches a fist and reaches out directly to us. It's a powerful almost implicating moment, if again an abstract one.
In the work's climactic moments, Butterworth returns to the light, a deep musical pulse underlining a frightening escalation of the work's key motifs—arms and hands spinning, body pulled down and forward over and over. I'm not sure precisely what I witnessed in Dual Repérage in Threes, but Deanne Butterworth's adroit coding of her choreography (inflected with years of dance know—how, superb balance and rapid gear-shifting) and the work's near obsessive—compulsive realisation made for a compelling experience.
A second viewing of Thousands confirmed for me the work's peculiar, tension-driven power. Day maintains his performance constantly on the pivot of transition, always moving in minimal increments, such that the tension required not to topple or speed up creates a bodily vibration that is at times exhausting to watch but which provides the work with its pulse. This time I was hyper-alert to the meticulous shifts in movement: an arm leads out left, the direction Day is facing, but the palm of the hand faces us while the rest of the body slowly but with determination turns to the right.
As part of Dance Massive, Thousands was performed at one end of the Dancehouse Studio against a white wall and on a polished timber floor. In terms of space and focus this created a very different ambience from the Sydney performance at PACT. There, Day's black outfit was in sync with dark floor and walls. Here, the sheen of surfaces and the scatter of shadows reduced a little the work's sense of sheer singularity. (In the second part of his trilogy, Cannibal, Day, in white clothes and hair, works a large white space in which shadows play an essential role: see RealTime 102, April-May.) Nonetheless, lighting designer Travis Hodgson (who also lit Cannibal), using strong down-lighting, manages to fix our attention while floorlights create shadows to amplify momentary, chance associations with, among others, sporting heroism, Soviet Realism, Rodin and Buddha.
James Brown's monumental score also generates associations. Its enormous pulsing rumble feels like we're sitting atop a giant machine, then stuck in a tunnel facing an oncoming train, then the target of hovering helicopters. But Brown's composition is never literal, its long throbbing, humming lines magnifing the sense of body tension, although not in calculated sync with Day's staccato internal beat, until the disco passage where music and body become one, Brown making even more of the flying bass lines than usual in that idiom. Of course, Day never deviates from his own pulse, making for some of the most restrained club dancing of all time.
Rosalind Crisp's No one will tell us…, Luke George's NOW NOW NOW and Deanne Butterworth's Dual Repérage in Threes, in their very different ways deliriously engage with the notion of the moment. So does Matthew Day's Thousands, not with improvisation or an open structure as its foundation, but with the 'high-wire' on-the-floor skill of maintaining balance and precision at the slowest of motion in the strangest of dances.


For over 30 years Stellar Yacht Charters has provided luxury rental yachts in Fort Lauderdale, Miami, Martha's Vineyard, Nantucket, Newport, New York and Boston, MA. All of the yachts that we charter are maintained with the highest standards and are very well appointed.
We have a varied selection of leisurely sailing yachts and motor yachts that are perfect for events and celebrations, big or small. Planning on a small, intimate birthday celebration with close friends and family? Need to host a corporate event with a large number of guests? We have 50' rental yachts that are perfect for groups of up to 12 and yachts up to 150' in length that can accommodate over 100 guests.
Complete listing of Motor Yachts & Sailing Yachts.


Carbonated Soft Drinks in the Netherlands industry profile provides top-line qualitative and quantitative summary information including: market share, market size (value and volume 2013-17, and forecast to 2022). The profile also contains descriptions of the leading players including key financial metrics and analysis of competitive pressures within the market.
- The Dutch carbonated soft drinks market had total revenues of $1,918.2m in 2017, representing a compound annual growth rate (CAGR) of 1.0% between 2013 and 2017.
- Market consumption volume declined with a CARC of -2.1% between 2013 and 2017, to reach a total of 997.8 million liters in 2017.
- Consumer's perception towards carbonated soft drinks has been changing in the Netherlands.
- What was the size of the Netherlands carbonated soft drinks market by value in 2017?
- What will be the size of the Netherlands carbonated soft drinks market in 2022?
- What factors are affecting the strength of competition in the Netherlands carbonated soft drinks market?
- Who are the top competitiors in the Netherlands's carbonated soft drinks market?


Organic semiconductors have received a great deal of attention in recent years due to their optoelectronical properties and their potential applications in industry. In this thesis, resonance Raman calculations of a family of organic semiconductor dyes: pery-lene tetracarboxylic diimides (PTCD) derivatives, are presented. Also the UV/vis, infrared and normal Raman spectra, structures and molecular orbitals, excitation ener- gies, dipole moments, (hyper) polarizabilities and charge population analyses of these molecules are calculated. The calculations in this thesis are performed using a Time- Dependent Density Functional Theory (TDDFT) method, and for that, the Amsterdam Density Functional program package (ADF2009) is used. The molecular properties cal-culated for the molecules in this thesis are then compared with experimental data and the main spectroscopic characteristics are found to be, for the most part, due to the perylene plane and therefore, the same for all of its derivatives.
Torabi, MohammadAmin, "Resonance Raman Spectral Calculations of Organic Semiconductor Molecules" (2011). Electronic Theses and Dissertations. 377.


The time has come! We are very proud to announce our next expansion, EverQuest II: Chains of Eternity!
The team is hard at work developing our ninth – yes, our ninth – expansion and implementing the finer details, several of which I will go into here. When the expansion launches, Norrathians will pass into Ethernere, the realm of the afterlife, where all spirits pass after death on their way to their final resting place.
Recently, something has gone horribly wrong in Ethernere and it is bleeding through in the mortal plane. Over the summer months, evidence of ripples between the realms was in evidence as items with ethereal energy appeared upon the dead. As the tears between the realms widen, it will be up to the heroes of Norrath to save the immortal and mortal realms from collapse!
The adventures in this expansion will be great ones! The team is spending a lot of time ensuring that you experience the story, rather than merely read it, so I won't give it all away in this letter. As for features and details, we've got a lot to crow about. We hope players enjoy it as much as we've enjoyed weaving it together.
In two re-imagined Ethernere overlands inspired by Feerrott and Loping Plains, players will find a region in chaos. The natural ebb and flow of spirits passing through the Ethernere to each spirit's final resting place is corrupted and on the edge of destruction, threatening every mortal's life and afterlife. Through the trials of nine new instanced dungeons, players will attempt to mend the end of all things. Prelude content and dungeons give insights into the threat from the other side while telling all new stories – including advancing the story behind the Ages End Prophecy. Players meet new creatures from the beyond and face a whole host of new challenges.
In this expansion, the signature, or main, storyline quest will be available to everyone no matter how they play the game. Every player tough enough to access the expansion content will have the opportunity to see how the story ends, and raiding guilds will have opportunities to take part in special events that support the story. Even when the main quest line completes, players gain access to benefits as a result of their heroic acts and get rewards for replaying content.
Each subclass will get access to new Prestige Abilities. Our engineering and design teams are hard at work creating new abilities that will set a new bar for players and for creating events. The new abilities give players more tools to tinker with in combat, and designers too.
We have started implementing Tradeskill Prestige abilities too. These allow our tradeskill classes the ability to become specialists in their chosen craft in a variety of ways. We're still creating these and excited about the opportunities that will open up for our tradeskillers!
To provide new benefits, we wanted to increase our Guild Levels . We will speak more to that when we are further along with the implementation.
We have a new adornment type in development! These Organic Adornments, as the name suggests, will gain experience with the player and grow more powerful as a result. There will be many to choose from so players can focus on how they want to increase the power of their characters.
Of course, there are going to be plenty of items in the expansion for players to discover. This is a very strong content expansion with lots to do and find. We heard our players ask for fewer features and more content that builds on the core game so we're doing just that.
At the same time as we're focusing on the expansion, we are still offering live content prior to the expansion. We are releasing the first areas of Sleeper's Tomb in mid-September which we refer to as the "Prelude." This advances the world story as players find entry into the tomb.
We have another event that we're keeping under wraps that releases closer to the expansion and then, of course, there's "Chains of Eternity" itself releasing in November. We're even releasing additional free content at the same time that the expansion launches. Players will discover that avatars are once again making an appearance in Norrath. These avatars are different from those who appeared in the past.
There's more to come in the details, of course, but we have been bursting at the seams to tell you what we can…and now we have.
We invite you to come on this crazy ride with us. We really think you'll love it!
P.S. We will be adding window recipes for tradeskillers with the expansion, as well as others…thought I'd mention it given the recent marketplace release.
So I guess the industry-changing announcement is for Friday. RE this one and the expansion, sure, sounds good, I need more stuff to do.
Anyone know if the veteran bonuses are fixed at attaining level 90, or if they are shifting up since we're creeping to 95 now?
I am mostly worried about this very aggresive timeline. All I can think of is tons of broken content. And so much for PoW being top tier.
All they needed was Fens of Nathsar and it would have been my top 3 hated zones.
@camelotcrusade – Brasse has announced on Twitter that this is NOT the industry-rocking announcement for *today*. Something else should come out today as well.
From the EQ2 site: "EverQuest™ II players are some of the most dedicated, emotionally invested players in any virtual world. For the first time, EverQuest II players have the opportunity to create parts of our world by designing new in-game items.
Player Studio™ is a new program that invites (initially US-based) players to download sample geometry, learn how virtual items are constructed, and try designing items. You can try your hand at writing a creative name, item description, and rationale for how it fits into the ongoing storyline.
Selected items will be offered for sale in the SOE Marketplace alongside items created by staff artists, priced in SOE's Station Cash virtual currency. Revenue from the sale of these items will be shared back with the creative player.
i never thought sales would be shared back. that is crazy.
Dexella posted on the forums stating that it is indeed "real money" not SC you are paid with.
I hope they iron out 90-92 adventuring to make way for this, because I completely gave up months ago. I'm just not as dedicated as I used to be with this game. The content they keep adding just seem like more of the same. New area, bad stuff happening, go kill 5 gnolls.


Rent your villa in Istria now.
The best olive oil, the tastiest fish and the finest wines.
The peninsula of Istria is the most popular travel destination in the country due to its advantageous location to Central Europe. The region has just about everything you could possibly want from a holiday region: Mediterranean climate, impressive coastal and land sections, valuable natural and cultural treasures, and a huge selection of leisure activities - in short: Istria invites you to the experience! The manageable size gives you the opportunity to get to know pretty much every feature of the region.
Over 450 km of beautiful coastline awaits you, ready to be explored: whether a lonely bay, fine stretch of beach or a dive to one of the many shipwrecks off the coast. Water lovers will get their money's worth here: snorkelling, surfing, diving or maybe just a day trip to Venice? You will find it fulfilling and exciting!
Inland you will find striking hills and rich forest areas, which are ideal for hiking or exploring by bike. Here you will come across valuable natural treasures: various wine-growing areas, olive trees and also the gold of the earth, the truffle, which is among connoisseurs, and claimed to be the best in the world! Also known around the world are Croatia's breath-taking natural and national parks, of which you will find several in Istria! Especially worth visiting is the natural park Cape Kamenjak on the southern tip of Istria with several beautiful bays and paradisiacal beaches to the west and east side. If you like it a bit more majestic, make a detour to the Brijuni Islands, a nature reserve consisting of 14 islands small and large, which have always been used as a governmental residence.
The landmark is undoubtedly the amphitheatre in the port city of Pula, which not only resembles the Coliseum in Rome, but also provides deep insights into the history of Istria and is definitely worth a visit! The most important cities of the region are next to Pula, the governmental centre Pazin, the picturesque Poreč and the romantic Rovinj.