@param {string} kind

@returns {Field}
351158
function createField(kind) {
  if (!fields.has(kind)) {
    let type;
    switch (kind) {
      case DynamicFieldKind.STRING_VAL.toString():
        type = StringType.create();
        break;

      case DynamicFieldKind.TEXT_VAL.toString():
        type = TextType.create();
        break;

      case DynamicFieldKind.INT_VAL.toString():
        type = IntType.create();
        break;

      case DynamicFieldKind.BOOL_VAL.toString():
        type = BooleanType.create();
        break;

      case DynamicFieldKind.FLOAT_VAL.toString():
        type = FloatType.create();
        break;

      case DynamicFieldKind.DATE_VAL.toString():
        type = DateType.create();
        break;

      default:
        throw new AssertionFailed(`DynamicField "${kind}" is not a valid type.`);
    }

    fields.set(
      kind, new Field({ name: kind, type, rule: FieldRule.A_SINGLE_VALUE, required: true }),
    );
  }

  return fields.get(kind);
}
739028
@SuppressWarnings("checkstyle:equalsavoidnull")
    private static int kindFromString(String kindStr) {

        if (kindStr.equalsIgnoreCase("prj")) { //$NON-NLS-1$
            return IClasspathEntry.CPE_PROJECT;
        }
        if (kindStr.equalsIgnoreCase("var")) { //$NON-NLS-1$
            return IClasspathEntry.CPE_VARIABLE;
        }
        if (kindStr.equalsIgnoreCase("con")) { //$NON-NLS-1$
            return IClasspathEntry.CPE_CONTAINER;
        }
        if (kindStr.equalsIgnoreCase("src")) { //$NON-NLS-1$
            return IClasspathEntry.CPE_SOURCE;
        }
        if (kindStr.equalsIgnoreCase("lib")) { //$NON-NLS-1$
            return IClasspathEntry.CPE_LIBRARY;
        }
        if (kindStr.equalsIgnoreCase("output")) { //$NON-NLS-1$
            return ClasspathEntry.K_OUTPUT;
        }
        return -1;
    }
1198243
function getType(instance) {
    return instance.static.type === consts_1.DEFAULT_TYPE
        ? getProp(instance, instance.static.typeAttribute)
        : instance.static.type;
}
1094453
function genTypePartial(gen, field, fieldIndex, ref) {
  return field.resolvedType.group ?
    gen('types[%i].encode(%s,w.uint32(%i)).uint32(%i)', fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) :
    gen('types[%i].encode(%s,w.uint32(%i).fork()).ldelim()', fieldIndex, ref, (field.id << 3 | 2) >>> 0);
}
795861
def get_image_by_kind(self, kind):
        
        for ss in self.images:
            if ss.kind == kind:
                return ss
        return None
931266
def _make_kind_id(self, name_or_id):
        """"""
        if not name_or_id:
            return None
        if name_or_id.isdigit():
            return name_or_id
        return self.kind_name_to_id(name_or_id)
617213
function (source) {
  var ast = parser.parseEval(source)
  var array = ast.children.find((child) => child.kind === 'array')
  return parseValue(array)
}
1010143
def checktype(self, val, kind, **kargs):
        """"""
        if not isinstance(val, kind):
            raise TypeError('Expected {}; got {}'.format(
                            self.str_kind(kind), self.str_valtype(val)))
1345984
function kindOf(val) {
        if (val === null) {
            return 'Null';
        } else if (val === UNDEF) {
            return 'Undefined';
        } else {
            return _rKind.exec( _toString.call(val) )[1];
        }
    }
1088029
private Token match(Token.Kind kind) {
		checkNotEof();
		Token token = tokens.get(index++);
		if (token.kind != kind) {
			syntaxError("expecting \"" + kind + "\" here", token);
		}
		return token;
	}
897312
def make_kind_check(python_types, numpy_kind):
    
    def check(value):
        if hasattr(value, 'dtype'):
            return value.dtype.kind == numpy_kind
        return isinstance(value, python_types)
    return check
987155
def kind(units):
    
    for k, v in dicts.items():
        if units in v.keys():
            return k
307609
function kindToResource(kind, humanize) {
    if (!kind) {
      return "";
    }
    var resource = kind;
    if (humanize) {
      var humanizeKind = $filter("humanizeKind");
      resource = humanizeKind(resource);
    }
    resource = String(resource).toLowerCase();
    if (resource === 'endpoints' || resource === 'securitycontextconstraints') {
      // no-op, plural is the singular
    }
    else if (resource[resource.length-1] === 's') {
      resource = resource + 'es';
    }
    else if (resource[resource.length-1] === 'y') {
      resource = resource.substring(0, resource.length-1) + 'ies';
    }
    else {
      resource = resource + 's';
    }

    return resource;
  }
794544
private ParseTree parseObjectPattern(PatternKind kind) {
    SourcePosition start = getTreeStartLocation();
    ImmutableList.Builder<ParseTree> fields = ImmutableList.builder();
    eat(TokenType.OPEN_CURLY);
    while (peekObjectPatternField()) {
      fields.add(parseObjectPatternField(kind));

      if (peek(TokenType.COMMA)) {
        // Consume the comma separator
        eat(TokenType.COMMA);
      } else {
        // Otherwise we must be done
        break;
      }
    }
    if (peek(TokenType.SPREAD)) {
      recordFeatureUsed(Feature.OBJECT_PATTERN_REST);
      fields.add(parsePatternRest(kind));
    }
    eat(TokenType.CLOSE_CURLY);
    return new ObjectPatternTree(getTreeLocation(start), fields.build());
  }
866079
def get_all(kind='2'):
        '''
        
        '''
        return TabPost.select().where(
            (TabPost.kind == kind) &
            (TabPost.valid == 1)
        ).order_by(
            TabPost.time_update.desc()
        )
1006657
public java.lang.String getKind() {
    java.lang.Object ref = kind_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      kind_ = s;
      return s;
    }
  }
709690
public static Expression constantSanitizedContentKindAsContentKind(
      @Nullable SanitizedContentKind kind) {
    return (kind == null)
        ? BytecodeUtils.constantNull(CONTENT_KIND_TYPE)
        : FieldRef.enumReference(ContentKind.valueOf(kind.name())).accessor();
  }