region //////////////////////////////////////////////// Main Public Methods
482361
public function compile( $content )
  {
    if ( !empty( $content ) )
    {
      // Create the ProcessBuilder
      $Sass = new Sass();

      // Import Paths
      foreach ( $this->importPaths as $importPath )
      {
        $Sass->setIncludePath( $importPath );
      }

      // Line Numbers
      if ( $this->lineNumbers )
      {
        $Sass->setComments( true );
      }

      // Output Style
      if ( $this->style != self::DEFAULT_STYLE )
      {
        switch ( $this->style )
        {
          case self::STYLE_NESTED:
            $Sass->setStyle( Sass::STYLE_NESTED );
            break;
          case self::STYLE_EXPANDED:
            $Sass->setStyle( Sass::STYLE_EXPANDED );
            break;
          case self::STYLE_COMPACT:
            $Sass->setStyle( Sass::STYLE_COMPACT );
            break;
          case self::STYLE_COMPRESSED:
            $Sass->setStyle( Sass::STYLE_COMPRESSED );
            break;
          default:
            $Sass->setStyle( Sass::STYLE_NESTED );
        }
      }

      try
      {
        $output = $Sass->compile( $content );
      }
      catch ( \SassException $e )
      {
        throw new \Exception( $e->getMessage() );
      }

      if ( !$this->sourceMap && is_array( $output ) )
      {
        $output = $output[0];
      }
    }

    return (isset($output)) ? $output : null;
  }
140832
public void setContent(Region content) {
        if (content != null) {
            this.content = content;
            this.content.setPickOnBounds(false);
            contentHolder.getChildren().setAll(content);
        }
    }
400084
public static void buildRegions(Context ctx, CompactHeightfield chf, int borderSize, int minRegionArea,
            int mergeRegionArea) {
        ctx.startTimer("BUILD_REGIONS");

        int w = chf.width;
        int h = chf.height;

        ctx.startTimer("REGIONS_WATERSHED");

        int LOG_NB_STACKS = 3;
        int NB_STACKS = 1 << LOG_NB_STACKS;
        List<List<Integer>> lvlStacks = new ArrayList<>();
        for (int i = 0; i < NB_STACKS; ++i) {
            lvlStacks.add(new ArrayList<>(1024));
        }

        List<Integer> stack = new ArrayList<>(1024);

        int[] srcReg = new int[chf.spanCount];
        int[] srcDist = new int[chf.spanCount];

        int regionId = 1;
        int level = (chf.maxDistance + 1) & ~1;

        // TODO: Figure better formula, expandIters defines how much the
        // watershed "overflows" and simplifies the regions. Tying it to
        // agent radius was usually good indication how greedy it could be.
        // const int expandIters = 4 + walkableRadius * 2;
        int expandIters = 8;

        if (borderSize > 0) {
            // Make sure border will not overflow.
            int bw = Math.min(w, borderSize);
            int bh = Math.min(h, borderSize);
            // Paint regions
            paintRectRegion(0, bw, 0, h, regionId | RC_BORDER_REG, chf, srcReg);
            regionId++;
            paintRectRegion(w - bw, w, 0, h, regionId | RC_BORDER_REG, chf, srcReg);
            regionId++;
            paintRectRegion(0, w, 0, bh, regionId | RC_BORDER_REG, chf, srcReg);
            regionId++;
            paintRectRegion(0, w, h - bh, h, regionId | RC_BORDER_REG, chf, srcReg);
            regionId++;

        }

        chf.borderSize = borderSize;

        int sId = -1;
        while (level > 0) {
            level = level >= 2 ? level - 2 : 0;
            sId = (sId + 1) & (NB_STACKS - 1);

            // ctx->startTimer(RC_TIMER_DIVIDE_TO_LEVELS);

            if (sId == 0) {
                sortCellsByLevel(level, chf, srcReg, NB_STACKS, lvlStacks, 1);
            } else {
                appendStacks(lvlStacks.get(sId - 1), lvlStacks.get(sId), srcReg); // copy left overs from last level
            }

            // ctx->stopTimer(RC_TIMER_DIVIDE_TO_LEVELS);

            ctx.startTimer("BUILD_REGIONS_EXPAND");

            // Expand current regions until no empty connected cells found.
            expandRegions(expandIters, level, chf, srcReg, srcDist, lvlStacks.get(sId), false);

            ctx.stopTimer("BUILD_REGIONS_EXPAND");

            ctx.startTimer("BUILD_REGIONS_FLOOD");

            // Mark new regions with IDs.
            for (int j = 0; j < lvlStacks.get(sId).size(); j += 3) {
                int x = lvlStacks.get(sId).get(j);
                int y = lvlStacks.get(sId).get(j + 1);
                int i = lvlStacks.get(sId).get(j + 2);
                if (i >= 0 && srcReg[i] == 0) {
                    if (floodRegion(x, y, i, level, regionId, chf, srcReg, srcDist, stack)) {
                        regionId++;
                    }
                }
            }

            ctx.stopTimer("BUILD_REGIONS_FLOOD");
        }

        // Expand current regions until no empty connected cells found.
        expandRegions(expandIters * 8, 0, chf, srcReg, srcDist, stack, true);

        ctx.stopTimer("BUILD_REGIONS_WATERSHED");

        ctx.startTimer("BUILD_REGIONS_FILTER");

        // Merge regions and filter out smalle regions.
        List<Integer> overlaps = new ArrayList<>();
        chf.maxRegions = mergeAndFilterRegions(ctx, minRegionArea, mergeRegionArea, regionId, chf, srcReg, overlaps);

        // If overlapping regions were found during merging, split those regions.
        if (overlaps.size() > 0) {
            throw new RuntimeException("rcBuildRegions: " + overlaps.size() + " overlapping regions.");
        }

        ctx.stopTimer("BUILD_REGIONS_FILTER");

        // Write the result out.
        for (int i = 0; i < chf.spanCount; ++i) {
            chf.spans[i].reg = srcReg[i];
        }

        ctx.stopTimer("BUILD_REGIONS");

    }
479296
private void doUpdateRegional() throws PageException {
	Boolean useTimeServer = getBool("usetimeserver", null);

	try {
	    admin.updateLocale(getString("admin", action, "locale"));
	    admin.updateTimeZone(getString("admin", action, "timezone"));
	    admin.updateTimeServer(getString("admin", action, "timeserver"), useTimeServer);
	}
	finally {
	    store();
	}
	adminSync.broadcast(attributes, config);
    }
1011193
public void initialize( T image , int x0 , int y0 , int regionWidth , int regionHeight ) {

		this.imageWidth = image.width;
		this.imageHeight = image.height;

		setTrackLocation(x0,y0,regionWidth,regionHeight);

		initialLearning(image);
	}
241230
function askRegion() {
    if (this.abort) return null;
    const done = this.async();
    const prompts = [
        {
            type: 'list',
            name: 'region',
            message: 'Which region?',
            choices: regionList,
            default: this.aws.region ? _.indexOf(regionList, this.aws.region) : this.awsFacts.defaultRegion
        }
    ];

    return this.prompt(prompts).then(props => {
        const region = props.region;
        if (region) {
            this.aws.region = region;
            done();
        } else {
            this.abort = true;
            done();
        }
    });
}
863212
function (options) {
    var regions;
    this._initRegionManager();

    if (_.isFunction(this.regions)) {
      regions = this.regions(options);
    } else {
      regions = this.regions || {};
    }

    this.addRegions(regions);
  }
677574
public void addRegion(InfinispanBaseRegion region) {
		allRegions.put(ByteString.fromString(region.getCache().getName()), region);
	}
659657
public static void main(final String[] pArgs) throws IOException {
        int subsampleFactor = 1;
        Rectangle sourceRegion = null;
        boolean readLayers = false;
        boolean readThumbnails = false;

        int idx = 0;
        while (pArgs[idx].charAt(0) == '-') {
            if (pArgs[idx].equals("-s") || pArgs[idx].equals("--subsampling")) {
                subsampleFactor = Integer.parseInt(pArgs[++idx]);
            }
            else if (pArgs[idx].equals("-r") || pArgs[idx].equals("--sourceregion")) {
                int xw = Integer.parseInt(pArgs[++idx]);
                int yh = Integer.parseInt(pArgs[++idx]);

                try {
                    int w = Integer.parseInt(pArgs[idx + 1]);
                    int h = Integer.parseInt(pArgs[idx + 2]);

                    idx += 2;

                    // x y w h
                    sourceRegion = new Rectangle(xw, yh, w, h);
                }
                catch (NumberFormatException e) {
                    // w h
                    sourceRegion = new Rectangle(xw, yh);
                }

                System.out.println("sourceRegion: " + sourceRegion);
            }
            else if (pArgs[idx].equals("-l") || pArgs[idx].equals("--layers")) {
                readLayers = true;
            }
            else if (pArgs[idx].equals("-t") || pArgs[idx].equals("--thumbnails")) {
                readThumbnails = true;
            }
            else {
                System.err.println("Usage: java PSDImageReader [-s <subsample factor>] [-r [<x y>] <w h>] <image file>");
                System.exit(1);
            }

            idx++;
        }

        PSDImageReader imageReader = new PSDImageReader(null);

        for (; idx < pArgs.length; idx++) {
            File file = new File(pArgs[idx]);
            System.out.println();
            System.out.println("file: " + file.getAbsolutePath());

            ImageInputStream stream = ImageIO.createImageInputStream(file);
            imageReader.setInput(stream);
            imageReader.readHeader();
            System.out.println("imageReader.header: " + imageReader.header);

            imageReader.readImageResources(true);
            System.out.println("imageReader.imageResources: " + imageReader.metadata.imageResources);
            System.out.println();

            imageReader.readLayerAndMaskInfo(true);
            System.out.println("imageReader.layerInfo: " + imageReader.metadata.layerInfo);
/*
    //        System.out.println("imageReader.globalLayerMask: " + imageReader.globalLayerMask);
            System.out.println();

            IIOMetadata metadata = imageReader.getImageMetadata(0);
            Node node;
            XMLSerializer serializer;

            node = metadata.getAsTree(IIOMetadataFormatImpl.standardMetadataFormatName);
            serializer = new XMLSerializer(System.out, System.getProperty("file.encoding"));
            serializer.serialize(node, true);
            System.out.println();

            node = metadata.getAsTree(PSDMetadata.NATIVE_METADATA_FORMAT_NAME);
    //        serializer = new XMLSerializer(System.out, System.getProperty("file.encoding"));
            serializer.serialize(node, true);
*/
            if (readThumbnails && imageReader.hasThumbnails(0)) {
                int thumbnails = imageReader.getNumThumbnails(0);
                for (int i = 0; i < thumbnails; i++) {
                    showIt(imageReader.readThumbnail(0, i), String.format("Thumbnail %d", i));
                }
            }

            long start = System.currentTimeMillis();

            ImageReadParam param = imageReader.getDefaultReadParam();

            if (sourceRegion != null) {
                param.setSourceRegion(sourceRegion);
            }

            if (subsampleFactor > 1) {
                param.setSourceSubsampling(subsampleFactor, subsampleFactor, 0, 0);
            }

            //        param.setDestinationType(imageReader.getRawImageType(0));

            BufferedImage image = imageReader.read(0, param);
            System.out.println("read time: " + (System.currentTimeMillis() - start));
            System.out.println("image: " + image);

            if (image.getType() == BufferedImage.TYPE_CUSTOM) {
                try {
                    ColorConvertOp op = new ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_sRGB), null);
                    GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
                    image = op.filter(image, gc.createCompatibleImage(image.getWidth(), image.getHeight(), image.getTransparency()));
                }
                catch (Exception e) {
                    e.printStackTrace();
                    image = ImageUtil.accelerate(image);
                }
                System.out.println("conversion time: " + (System.currentTimeMillis() - start));
                System.out.println("image: " + image);
            }

            showIt(image, file.getName());

            if (readLayers) {
                int images = imageReader.getNumImages(true);
                for (int i = 1; i < images; i++) {
                    start = System.currentTimeMillis();
                    BufferedImage layer = imageReader.read(i);

                    System.out.println("layer read time: " + (System.currentTimeMillis() - start));
                    System.err.println("layer: " + layer);

                    if (layer != null && layer.getType() == BufferedImage.TYPE_CUSTOM) {
                        try {
                            ColorConvertOp op = new ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_sRGB), null);
                            GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
                            layer = op.filter(layer, gc.createCompatibleImage(layer.getWidth(), layer.getHeight(), layer.getTransparency()));
                        }
                        catch (Exception e) {
                            e.printStackTrace();
                            layer = ImageUtil.accelerate(layer);
                        }
                        System.out.println("layer conversion time: " + (System.currentTimeMillis() - start));
                        System.out.println("layer: " + layer);
                    }

                    showIt(layer, "layer " + i);
                }
            }
        }
    }
1368589
public static void main(final String[] args) throws Exception {
		// Set the logger to use the text area logger
		System.setProperty("org.apache.commons.logging.Log",
				"com.github.bordertech.wcomponents.lde.StandaloneLauncher$TextAreaLogger");

		// Set the port number to a random port
		Configuration internalWComponentConfig = Config.getInstance();
		CompositeConfiguration config = new CompositeConfiguration(new MapConfiguration(
				new HashMap<String, Object>()));
		config.addConfiguration(internalWComponentConfig); // Internal WComponent config next
		config.setProperty(ConfigurationProperties.LDE_SERVER_PORT, 0);
		Config.setConfiguration(config);

		getInstance().launcher.run();
		getInstance().log("LDE now running on " + getInstance().launcher.getUrl() + '\n');
	}
962390
@Override
  public void start(CoprocessorEnvironment e) throws IOException {
    if (e instanceof RegionCoprocessorEnvironment) {
      RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment) e;
      Supplier<TransactionStateCache> cacheSupplier = getTransactionStateCacheSupplier(env);
      this.cache = cacheSupplier.get();

      HTableDescriptor tableDesc = env.getRegion().getTableDesc();
      for (HColumnDescriptor columnDesc : tableDesc.getFamilies()) {
        String columnTTL = columnDesc.getValue(TxConstants.PROPERTY_TTL);
        long ttl = 0;
        if (columnTTL != null) {
          try {
            ttl = Long.parseLong(columnTTL);
            LOG.info("Family " + columnDesc.getNameAsString() + " has TTL of " + columnTTL);
          } catch (NumberFormatException nfe) {
            LOG.warn("Invalid TTL value configured for column family " + columnDesc.getNameAsString() +
                       ", value = " + columnTTL);
          }
        }
        ttlByFamily.put(columnDesc.getName(), ttl);
      }

      this.allowEmptyValues = env.getConfiguration().getBoolean(TxConstants.ALLOW_EMPTY_VALUES_KEY,
                                                                TxConstants.ALLOW_EMPTY_VALUES_DEFAULT);
      this.readNonTxnData = Boolean.valueOf(tableDesc.getValue(TxConstants.READ_NON_TX_DATA));
      if (readNonTxnData) {
        LOG.info("Reading pre-existing data enabled for table " + tableDesc.getNameAsString());
      }
    }
  }
200802
public void setRegions(java.util.Collection<String> regions) {
        if (regions == null) {
            this.regions = null;
            return;
        }

        this.regions = new java.util.ArrayList<String>(regions);
    }
385487
public java.util.List<Region> getRegions() {
        if (regions == null) {
            regions = new com.amazonaws.internal.SdkInternalList<Region>();
        }
        return regions;
    }
413615
@Override
	protected void selectRectangle(Bbox selectedArea) {
		// we can clear here !
		if (!shiftOrCtrl) {
			MapModel mapModel = mapWidget.getMapModel();
			mapModel.clearSelectedFeatures();
		}
		GwtCommand commandRequest = new GwtCommand(SearchByLocationRequest.COMMAND);
		SearchByLocationRequest request = new SearchByLocationRequest();
		request.setLayerIds(getSelectionLayerIds());
		for (Layer<?> layer : mapWidget.getMapModel().getLayers()) {
			if (layer.isShowing() && layer instanceof VectorLayer) {
				request.setFilter(layer.getServerLayerId(), ((VectorLayer) layer).getFilter());
			}
		}

		Polygon polygon = mapWidget.getMapModel().getGeometryFactory().createPolygon(selectedArea);
		request.setLocation(GeometryConverter.toDto(polygon));
		request.setCrs(mapWidget.getMapModel().getCrs());
		request.setQueryType(SearchByLocationRequest.QUERY_INTERSECTS);
		request.setRatio(coverageRatio);
		request.setSearchType(SearchByLocationRequest.SEARCH_ALL_LAYERS);
		request.setFeatureIncludes(GwtCommandDispatcher.getInstance().getLazyFeatureIncludesSelect());
		commandRequest.setCommandRequest(request);
		GwtCommandDispatcher.getInstance().execute(commandRequest,
				new AbstractCommandCallback<SearchByLocationResponse>() {

			public void execute(SearchByLocationResponse response) {
				Map<String, List<org.geomajas.layer.feature.Feature>> featureMap = response.getFeatureMap();
				for (String layerId : featureMap.keySet()) {
					selectFeatures(layerId, featureMap.get(layerId));
				}
			}
		});
	}
304156
function loadRegions(regions) {
    regions.forEach(function(region) {
        region.color = randomColor(0.1);
        wavesurfer.addRegion(region);
    });
}
262816
function () {
		this.regional = []; // Available regional settings, indexed by language code
		this.regional[''] = { // Default regional settings
			currentText: 'Now',
			closeText: 'Done',
			amNames: ['AM', 'A'],
			pmNames: ['PM', 'P'],
			timeFormat: 'HH:mm',
			timeSuffix: '',
			timeOnlyTitle: 'Choose Time',
			timeText: 'Time',
			hourText: 'Hour',
			minuteText: 'Minute',
			secondText: 'Second',
			millisecText: 'Millisecond',
			microsecText: 'Microsecond',
			timezoneText: 'Time Zone',
			isRTL: false
		};
		this._defaults = { // Global defaults for all the datetime picker instances
			showButtonPanel: true,
			timeOnly: false,
			timeOnlyShowDate: false,
			showHour: null,
			showMinute: null,
			showSecond: null,
			showMillisec: null,
			showMicrosec: null,
			showTimezone: null,
			showTime: true,
			stepHour: 1,
			stepMinute: 1,
			stepSecond: 1,
			stepMillisec: 1,
			stepMicrosec: 1,
			hour: 0,
			minute: 0,
			second: 0,
			millisec: 0,
			microsec: 0,
			timezone: null,
			hourMin: 0,
			minuteMin: 0,
			secondMin: 0,
			millisecMin: 0,
			microsecMin: 0,
			hourMax: 23,
			minuteMax: 59,
			secondMax: 59,
			millisecMax: 999,
			microsecMax: 999,
			minDateTime: null,
			maxDateTime: null,
			maxTime: null,
			minTime: null,
			onSelect: null,
			hourGrid: 0,
			minuteGrid: 0,
			secondGrid: 0,
			millisecGrid: 0,
			microsecGrid: 0,
			alwaysSetTime: true,
			separator: ' ',
			altFieldTimeOnly: true,
			altTimeFormat: null,
			altSeparator: null,
			altTimeSuffix: null,
			altRedirectFocus: true,
			pickerTimeFormat: null,
			pickerTimeSuffix: null,
			showTimepicker: true,
			timezoneList: null,
			addSliderAccess: false,
			sliderAccessArgs: null,
			controlType: 'slider',
			oneLine: false,
			defaultValue: null,
			parse: 'strict',
			afterInject: null
		};
		$.extend(this._defaults, this.regional['']);
	}
533687
public static boolean isValidRegion(String region) {
		try {
			Regions.fromName(region.toLowerCase());
		} catch (IllegalArgumentException e) {
			return false;
		}
		return true;
	}