Creates a live region with a particular type.
330492
function(type) {
      var element = MathJax.HTML.Element(
          'div', {className: 'MJX_LiveRegion'});
      element.setAttribute('aria-live', type);
      return element;
    }
525628
function createPrototype (type, options) {
    return new DuckType({
      name: options && options.name || null,
      test: function test (object) {
        return (object instanceof type);
      }
    });
  }
849387
public static com.liferay.commerce.model.CommerceRegion createCommerceRegion(
		long commerceRegionId) {
		return getService().createCommerceRegion(commerceRegionId);
	}
1016972
function createIeEvent(type, options) {
  options = clean(type, options);
  var e = document.createEventObject();
  e.altKey = options.alt;
  e.bubbles = options.bubbles;
  e.button = options.button;
  e.cancelable = options.cancelable;
  e.clientX = options.clientX;
  e.clientY = options.clientY;
  e.ctrlKey = options.ctrl;
  e.detail = options.detail;
  e.metaKey = options.meta;
  e.screenX = options.screenX;
  e.screenY = options.screenY;
  e.shiftKey = options.shift;
  e.keyCode = options.key;
  e.charCode = options.key;
  e.view = options.view;
  return e;
}
291310
public JSType createOptionalNullableType(JSType type) {
    return createUnionType(type, getNativeType(JSTypeNative.VOID_TYPE),
        getNativeType(JSTypeNative.NULL_TYPE));
  }
425718
public static synchronized MediaType create(String type, String... fileExtensisons) {
		return create(type, NO_ATTR, fileExtensisons);
	}
84997
def from_region(region, mesh_in, save_edges=False, save_faces=False,
                    localize=False, is_surface=False):
        
        mesh = Mesh( mesh_in.name + "_reg" )
        mesh.coors = mesh_in.coors.copy()
        mesh.ngroups = mesh_in.ngroups.copy()

        mesh.conns = []
        mesh.descs = []
        mesh.mat_ids = []

        if not is_surface:
            if region.has_cells():
                for ig in region.igs:
                    mesh.descs.append( mesh_in.descs[ig] )
                    els = region.get_cells( ig )
                    mesh.mat_ids.append( mesh_in.mat_ids[ig][els,:].copy() )
                    mesh.conns.append( mesh_in.conns[ig][els,:].copy() )

            if save_edges:
                ed = region.domain.ed
                for ig in region.igs:
                    edges = region.get_edges( ig )
                    mesh.descs.append( '1_2' )
                    mesh.mat_ids.append( ed.data[edges,0] + 1 )
                    mesh.conns.append( ed.data[edges,-2:].copy() )

            if save_faces:
                mesh._append_region_faces(region)

            if save_edges or save_faces:
                mesh.descs.append( {2 : '2_3', 3 : '3_4'}[mesh_in.dim] )
                mesh.mat_ids.append( -nm.ones_like( region.all_vertices ) )
                mesh.conns.append(make_point_cells(region.all_vertices,
                                                   mesh_in.dim))

        else:
            mesh._append_region_faces(region, force_faces=True)

        mesh._set_shape_info()

        if localize:
            mesh.localize( region.all_vertices )

        return mesh
6925
def format(self, **kwargs):
        """"""
        attrs = self._attrs.copy()
        attrs.update(kwargs)
        return Region(self._geojson, **attrs)
340463
def save_region(region, filename):
    
    region.save(filename)
    logging.info("Wrote {0}".format(filename))
    return
348927
function createSeed(type){

  var steps = [], current = 0, callback = _.noop;
  var key;

  var out = {
    type: type,
    start: function(cb){
      key = _.uid();
      if(typeof cb === "function") callback = cb;
      if(current> 0 ){
        current = 0 ;
      }else{
        out.step();
      }
      return out.compelete;
    },
    compelete: function(){
      key = null;
      callback && callback();
      callback = _.noop;
      current = 0;
    },
    step: function(){
      if(steps[current]) steps[current ]( out.done.bind(out, key) );
    },
    done: function(pkey){
      if(pkey !== key) return; // means the loop is down
      if( current < steps.length - 1 ) {
        current++;
        out.step();
      }else{
        out.compelete();
      }
    },
    push: function(step){
      steps.push(step)
    }
  }

  return out;
}
1301854
def do_region(self, x, y, w, h):
        """"""
        if (x is not None):
            raise IIIFError(code=501, parameter="region",
                            text="Null manipulator supports only region=/full/.")
375005
function createReader(rtype, wtype) {
  return rtype.equals(wtype) ? rtype : rtype.createResolver(wtype);
}
1046403
@Override
    public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
        for (Class<?> t = type.getRawType(); (t != Object.class) && (t.getSuperclass() != null); t = t.getSuperclass()) {
            for (Method m : t.getDeclaredMethods()) {
                if (m.isAnnotationPresent(PostConstruct.class)) {
                    m.setAccessible(true);
                    TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
                    return new PostConstructAdapter<T>(delegate, m);
                }
            }
        }
        return null;
    }
732459
private static void createLocales(TypeSpec.Builder type, List<LocaleID> defaultContent, Set<LocaleID> available) {
    TypeSpec.Builder localeInterface = TypeSpec.interfaceBuilder("Locale")
        .addModifiers(PUBLIC, STATIC)
        .addMethod(MethodSpec.methodBuilder("language")
            .addModifiers(PUBLIC, ABSTRACT)
            .returns(String.class).build())
        .addMethod(MethodSpec.methodBuilder("script")
            .addModifiers(PUBLIC, ABSTRACT)
            .returns(String.class).build())
        .addMethod(MethodSpec.methodBuilder("territory")
            .addModifiers(PUBLIC, ABSTRACT)
            .returns(String.class).build())
        .addMethod(MethodSpec.methodBuilder("variant")
            .addModifiers(PUBLIC, ABSTRACT)
            .returns(String.class).build())
        .addMethod(MethodSpec.methodBuilder("compact")
            .addModifiers(PUBLIC, ABSTRACT)
            .returns(String.class).build())
        .addMethod(MethodSpec.methodBuilder("expanded")
            .addModifiers(PUBLIC, ABSTRACT)
            .returns(String.class).build());
    
    List<LocaleID> localeFields = new ArrayList<>();
    List<String> allLocales = new ArrayList<>();
    List<String> bundles = new ArrayList<>();
    
    for (LocaleID locale : available) {
      localeFields.add(locale);
      allLocales.add(locale.safe);
      bundles.add(locale.safe);
    }
    
    MethodSpec.Builder method = MethodSpec.methodBuilder("registerDefaultContent")
        .addModifiers(PRIVATE, STATIC);
    
    for (LocaleID locale : defaultContent) {
      LocaleID dest = new LocaleID(locale.language, "", "", "");
      if (available.contains(dest)) {
        localeFields.add(locale);
        allLocales.add(locale.safe);
        method.addStatement("DEFAULT_CONTENT.put(Locale.$L, Locale.$L)",
            locale.safe,
            dest.safe);
      }
    }
    type.addMethod(method.build());

    Collections.sort(localeFields);
    for (LocaleID locale : localeFields) {
      addLocaleField(localeInterface, locale.safe, locale);
    }

    StringBuilder buf = new StringBuilder("$T.unmodifiableList($T.asList(\n");
    for (int i = 0; i < allLocales.size(); i++) {
      if (i > 0) {
        buf.append(",\n");
      }
      buf.append("  Locale.$L");
    }
    buf.append("))");

    Collections.sort(allLocales);
    
    List<Object> arguments = new ArrayList<>();
    arguments.add(Collections.class);
    arguments.add(Arrays.class);
    arguments.addAll(allLocales);
    
    FieldSpec.Builder field = FieldSpec.builder(LIST_CLDR_LOCALE_IF, "AVAILABLE_LOCALES", PRIVATE, STATIC, FINAL);
    field.initializer(buf.toString(), arguments.toArray());
    type.addField(field.build());
    
    buf = new StringBuilder("$T.unmodifiableList($T.asList(\n");
    for (int i = 0; i < bundles.size(); i++) {
      if (i > 0) {
        buf.append(",\n");
      }
      buf.append("  Locale.$L");
    }
    buf.append("))");
    
    Collections.sort(bundles);
    arguments = new ArrayList<>();
    arguments.add(Collections.class);
    arguments.add(Arrays.class);
    arguments.addAll(bundles);
    
    field = FieldSpec.builder(LIST_CLDR_LOCALE_IF, "AVAILABLE_BUNDLES", PRIVATE, STATIC, FINAL);
    field.initializer(buf.toString(), arguments.toArray());
    type.addField(field.build());
    
    method = MethodSpec.methodBuilder("availableLocales")
        .addModifiers(PUBLIC, FINAL)
        .returns(LIST_CLDR_LOCALE_IF)
        .addStatement("return AVAILABLE_LOCALES");
    
    type.addMethod(method.build());
    
    method = MethodSpec.methodBuilder("availableBundles")
        .addModifiers(PUBLIC, FINAL)
        .returns(LIST_CLDR_LOCALE_IF)
        .addStatement("return AVAILABLE_BUNDLES");
    
    type.addMethod(method.build());

    type.addType(localeInterface.build());
  }
1207850
static JSType createType(boolean shouldCreate, JSTypeRegistry registry, JSTypeNative typeName) {
    if (!shouldCreate) {
      return null;
    }
    return registry.getNativeType(typeName);
  }
540435
def do_region(self, x, y, w, h):
        """"""
        if (x is None):
            self.logger.debug("region: full (nop)")
        else:
            self.logger.debug("region: (%d,%d,%d,%d)" % (x, y, w, h))
            self.image = self.image.crop((x, y, x + w, y + h))
            self.width = w
            self.height = h
863212
function (options) {
    var regions;
    this._initRegionManager();

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

    this.addRegions(regions);
  }