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

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

      // Line Numbers
      if ( $this->lineNumbers )
      {
        $sc->setLineNumberStyle( Compiler::LINE_COMMENTS );
      }

      // Precision
      if ( $this->precision != self::DEFAULT_PRECISION )
      {
        $sc->setNumberPrecision( $this->precision );
      }

      // Output Style
      if ( $this->style != self::DEFAULT_STYLE )
      {
        switch ( $this->style )
        {
          case self::STYLE_NESTED:
            $sc->setFormatter(Nested::class);
            break;
          case self::STYLE_EXPANDED:
            $sc->setFormatter(Expanded::class);
            break;
          case self::STYLE_COMPACT:
            $sc->setFormatter(Compact::class);
            break;
          case self::STYLE_COMPRESSED:
            $sc->setFormatter(Compressed::class);
            break;
          default:
            $sc->setFormatter(Nested::class);
            break;
        }
      }

      $output = $sc->compile($content);
    }

    return (isset($output)) ? $output : null;
  }
41350
@Provides
  @Singleton
  @Named("geo")
  Map<String, Collection<String>> provideCountriesByRegion() {
    Map<String, Collection<String>>
        countriesByRegion =
        new LinkedHashMap<String, Collection<String>>();
    countriesByRegion.put("11",
                          Arrays.asList("AG", "AI", "AN", "AW", "BB", "BL", "BM", "BS", "BZ", "CA",
                                        "CR", "CU", "DM",
                                        "DO", "GD", "GL", "GP", "GT", "HN", "HT", "JM", "KN", "KY",
                                        "LC", "MF", "MQ", "MS",
                                        "MX", "NI", "PA", "PM", "PR", "SV", "TC", "TT", "US", "VC",
                                        "VG", "VI"));
    countriesByRegion.put("United States",
                          Arrays.asList("al", "ak", "as", "az", "ar", "aa", "ae", "ap", "ca", "co",
                                        "ct", "de", "dc",
                                        "fm", "fl", "ga", "gu", "hi", "id", "il", "in", "ia", "ks",
                                        "ky", "la", "me", "mh",
                                        "md", "ma", "mi", "mn", "ms", "mo", "mt", "ne", "nv", "nh",
                                        "nj", "nm", "ny", "nc",
                                        "nd", "mp", "oh", "ok", "or", "pw", "pa", "pr", "ri", "sc",
                                        "sd", "tn", "tx", "ut",
                                        "vt", "vi", "va", "wa", "wv", "wi", "wy"));
    countriesByRegion.put("Canada",
                          Arrays.asList("ab", "bc", "mb", "nb", "nl", "nt", "ns", "nu", "on", "pe",
                                        "qc", "sk", "yt"));
    // Continental South America
    countriesByRegion.put("12",
                          Arrays.asList("AR", "BO", "BR", "CL", "CO", "EC", "FK", "GF", "GY", "PE",
                                        "PY", "SR", "UY",
                                        "VE"));
    // Continental Europe
    countriesByRegion.put("13",
                          Arrays.asList("AD", "AL", "AT", "AX", "BA", "BE", "BG", "BY", "CH", "CZ",
                                        "DE", "DK", "EE",
                                        "ES", "EU", "FI", "FO", "FR", "FX", "GB", "GG", "GI", "GR",
                                        "HR", "HU", "IE", "IM",
                                        "IS", "IT", "JE", "LI", "LT", "LU", "LV", "MC", "MD", "ME",
                                        "MK", "MT", "NL", "NO",
                                        "PL", "PT", "RO", "RS", "RU", "SE", "SI", "SJ", "SK", "SM",
                                        "TR", "UA", "VA"));
    // Continental Africa
    countriesByRegion.put("14",
                          Arrays.asList("AO", "BF", "BI", "BJ", "BW", "CD", "CF", "CG", "CI", "CM",
                                        "CV", "DJ", "DZ",
                                        "EG", "EH", "ER", "ET", "GA", "GH", "GM", "GN", "GQ", "GW",
                                        "KE", "KM", "LR", "LS",
                                        "LY", "MA", "MG", "ML", "MR", "MU", "MW", "MZ", "NA", "NE",
                                        "NG", "RE", "RW", "SC",
                                        "SD", "SH", "SL", "SN", "SO", "ST", "SZ", "TD", "TG", "TN",
                                        "TZ", "UG", "YT", "ZA",
                                        "ZM", "ZW"));
    // Continental Asia
    countriesByRegion.put("15",
                          Arrays.asList("AE", "AF", "AM", "AP", "AZ", "BD", "BH", "BN", "BT", "CC",
                                        "CN", "CX", "CY",
                                        "GE", "HK", "ID", "IL", "IN", "IO", "IQ", "IR", "JO", "JP",
                                        "KG", "KH", "KP", "KR",
                                        "KW", "KZ", "LA", "LB", "LK", "MM", "MN", "MO", "MV", "MY",
                                        "NP", "OM", "PH", "PK",
                                        "PS", "QA", "SA", "SG", "SY", "TH", "TJ", "TL", "TM", "TW",
                                        "UZ", "VN", "YE"));
    // Continental Australia
    countriesByRegion.put("16",
                          Arrays.asList("AS", "AU", "CK", "FJ", "FM", "GU", "KI", "MH", "MP", "NC",
                                        "NF", "NR", "NU",
                                        "NZ", "PF", "PG", "PN", "PW", "SB", "TK", "TO", "TV", "UM",
                                        "VU", "WF", "WS"));
    // Continental Antarctica
    countriesByRegion.put("17", Arrays.asList("AQ", "BV", "GS", "HM", "TF"));
    countriesByRegion.put("Fallback", Arrays.asList("@@"));
    countriesByRegion.put("Unknown IP", Arrays.asList("@!"));
    countriesByRegion.put("Anonymous Proxy", Arrays.asList("A1"));
    countriesByRegion.put("Other Country", Arrays.asList("O1"));
    countriesByRegion.put("Satellite Provider", Arrays.asList("A2"));
    return countriesByRegion;
  }
233138
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $areas_flydown = $this->getCompositeWidget('areas_flydown');
        $regions_flydown = $this->getCompositeWidget('regions_flydown');

        $div_tag = new SwatHtmlTag('div');
        $div_tag->id = $this->id;
        $div_tag->class = $this->getCSSClassString();
        $div_tag->open();

        $areas_flydown->value = $this->getArea($this->value);
        $areas_flydown->display();

        $regions_flydown->options = $this->regions;
        $regions_flydown->value = $this->getRegion($this->value);
        $regions_flydown->display();

        $div_tag->close();
    }
582294
@Override
    public void run() {
        long bidId = m_bidId++;
        long advertiserId = Math.abs(m_rand.nextLong()) % NUM_ADVERTISERS;
        GeographyValue bidRegion = Regions.pickRandomRegion();
        TimestampType bidStartTime = new TimestampType();
        TimestampType bidEndTime = new TimestampType(
                bidStartTime.getTime() + AdBrokerBenchmark.BID_DURATION_SECONDS * 1000000);

        // Amount of bid: a hundredth of a penny up to around a tenth of a penny.
        double amount = 0.00001 + 0.01 * m_rand.nextDouble();
        DecimalFormat df = new DecimalFormat("#.####");
        amount = Double.valueOf(df.format(amount));

        try {
            m_client.callProcedure(new NullCallback(), "bids.Insert",
                    bidId,
                    advertiserId,
                    bidRegion,
                    bidStartTime,
                    bidEndTime,
                    amount);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
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();
        }
    });
}
1150371
public static void main(String[] args) throws Exception {
        
    	getparseArticle();
    	geoparseUppercaseArticle();
        resolveStanfordEntities();
    	
        // And we're done...
        System.out.println("\n\"That's all folks!\"");
    }
1123166
function (originRegionArr, mapName, nameMap) {
        // Not use the original
        var regionsArr = (originRegionArr || []).slice();

        var dataNameMap = zrUtil.createHashMap();
        for (var i = 0; i < regionsArr.length; i++) {
            dataNameMap.set(regionsArr[i].name, regionsArr[i]);
        }

        var source = geoSourceManager.load(mapName, nameMap);
        zrUtil.each(source.regions, function (region) {
            var name = region.name;
            !dataNameMap.get(name) && regionsArr.push({name: name});
        });

        return regionsArr;
    }
784743
public float[] query(Region region) throws IOException {
        BigWigIterator bigWigIterator = iterator(region);
        float[] values = new float[region.getEnd() - region.getStart() + 1];
        while (bigWigIterator.hasNext()) {
            WigItem wigItem = bigWigIterator.next();
            for (int i = wigItem.getStartBase(), j = wigItem.getStartBase() - region.getStart(); i <= wigItem.getEndBase(); i++, j++) {
                values[j] = wigItem.getWigValue();
            }
        }
        return values;
    }
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");

    }
775173
function(region) {
    if (this._isShown) {
      throw new Error('This component is already shown in a region.');
    }

    if (!region) {
      throw new Error('Please supply a region to show inside.');
    }

    this.region = region;

    this.triggerMethod('before:show');

    this._showView();
    this._isShown = true;

    this.triggerMethod('show');
  }
469674
private void setRegionOrEndPoint() {
        String regionName = getParamString("ddb_region");
        if (regionName != null) {
            Regions regionEnum = Regions.fromName(regionName);
            Utils.require(regionEnum != null, "Unknown 'ddb_region': " + regionName);
            m_logger.info("Using region: {}", regionName);
            m_ddbClient.setRegion(Region.getRegion(regionEnum));
        } else {
            String ddbEndpoint = getParamString("ddb_endpoint");
            Utils.require(ddbEndpoint != null,
                          "Either 'ddb_region' or 'ddb_endpoint' must be defined for tenant: " + m_tenant.getName());
            m_logger.info("Using endpoint: {}", ddbEndpoint);
            m_ddbClient.setEndpoint(ddbEndpoint);
        }
    }
189302
public static RegionMetadata getRegionMetadata() {
        RegionMetadata rval = regionMetadata;
        if (rval != null) {
            return rval;
        }

        synchronized (RegionUtils.class) {
            if (regionMetadata == null) {
                initialize();
            }
        }

        return regionMetadata;
    }
105588
public static void main(final String[] args) {
        LookAndFeelManager.get().init();

        final Injector injector = Guice.createInjector(new DCModuleImpl());

        // run a small job
        final AnalysisJobBuilder ajb = injector.getInstance(AnalysisJobBuilder.class);
        final Datastore ds = injector.getInstance(DatastoreCatalog.class).getDatastore("orderdb");
        final DatastoreConnection con = ds.openConnection();
        final Table table = con.getSchemaNavigator().convertToTable("PUBLIC.CUSTOMERS");
        ajb.setDatastore(ds);
        ajb.addSourceColumns(table.getLiteralColumns());
        ajb.addAnalyzer(PatternFinderAnalyzer.class).addInputColumns(ajb.getSourceColumns())
                .setName("Ungrouped pattern finders");

        final AnalyzerComponentBuilder<PatternFinderAnalyzer> groupedPatternFinder =
                ajb.addAnalyzer(PatternFinderAnalyzer.class);
        ajb.addSourceColumns("PUBLIC.OFFICES.CITY", "PUBLIC.OFFICES.TERRITORY");
        groupedPatternFinder.setName("Grouped PF");
        groupedPatternFinder.addInputColumn(ajb.getSourceColumnByName("PUBLIC.OFFICES.CITY"));
        groupedPatternFinder.addInputColumn(ajb.getSourceColumnByName("PUBLIC.OFFICES.TERRITORY"),
                groupedPatternFinder.getDescriptor().getConfiguredProperty("Group column"));

        final ResultWindow resultWindow = injector.getInstance(ResultWindow.class);
        resultWindow.setVisible(true);
        resultWindow.startAnalysis();
    }
519009
function(){
    this.regionManager = new Marionette.RegionManager();

    this.listenTo(this.regionManager, "region:add", function(name, region){
      this[name] = region;
      this.trigger("region:add", name, region);
    });

    this.listenTo(this.regionManager, "region:remove", function(name, region){
      delete this[name];
      this.trigger("region:remove", name, region);
    });
  }
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));
				}
			}
		});
	}
1047918
public void setRegions(java.util.Collection<Region> regions) {
        if (regions == null) {
            this.regions = null;
            return;
        }

        this.regions = new com.amazonaws.internal.SdkInternalList<Region>(regions);
    }
477018
function initAwsStuff(region = DEFAULT_REGION) {
    ec2 = new AWS.EC2({ region });
    // ecr = new AWS.ECR({ region });
    s3 = new AWS.S3();
    sts = new AWS.STS();

    SSM = new AwsSSM(region);
    ECR = new AwsECR(region);
    CF = new AwsCF(region);
}