Creates a new condition create struct from the provided values.
543201
public function newConditionCreateStruct(string $type): ConditionCreateStruct
    {
        $struct = new ConditionCreateStruct();
        $struct->type = $type;

        return $struct;
    }
974484
def add_condition(self, condition: z3.BoolRef) -> None:
        
        variables = set(_get_expr_variables(condition))
        relevant_buckets = set()
        for variable in variables:
            try:
                bucket = self.variable_map[str(variable)]
                relevant_buckets.add(bucket)
            except KeyError:
                continue

        new_bucket = DependenceBucket(variables, [condition])
        self.buckets.append(new_bucket)

        if relevant_buckets:
            # Merge buckets, and rewrite variable map accordingly
            relevant_buckets.add(new_bucket)
            new_bucket = self._merge_buckets(relevant_buckets)

        for variable in new_bucket.variables:
            self.variable_map[str(variable)] = new_bucket
396866
def from_list(cls, values):
        """"""
        self = cls()
        for value in values:
            self.add(value)
        return self
411
def _createunbound(kls, **info):
    """"""
    
    if issubclass(kls, Bitfield):
        nodetype = UnboundBitfieldNode
    elif hasattr(kls, '_fields_'):
        nodetype = UnboundStructureNode
    elif issubclass(kls, ctypes.Array):
        nodetype = UnboundArrayNode
    else:
        nodetype = UnboundSimpleNode        
    return nodetype(type=kls, **info)
837315
function createCondition(name, value) {
    // FIXME name?
    value = value.replace(r, function (w) {
        w = w.replace('{{', '').replace('}}', '');
        return 'item["' + w + '"]';
    });
    //console.log('createCondition', name, value);
    return function (item) {
        return eval(value);
    };
}
1093480
def _cstor_args_from_fields(self, fields, is_struct=False):
        """"""
        if is_struct:
            args = [(fmt_var(f.name),
                fmt_type(f.data_type, tag=True, has_default=f.has_default)) for f in fields]
        else:
            args = [(fmt_var(f.name), fmt_type(f.data_type, tag=True)) for f in fields]

        return fmt_func_args_declaration(args)
927585
def fromvalue(self, value, size=None, fmt='Q'):
        '''
        
        '''
        if size and value.bit_length() > size:
            raise TypeError('Value is too big for given size')
        self.frombytes(struct.pack(fmt, value))
        if size:
            if not isinstance(size, integer_types) or not size > 0:
                raise TypeError('Size must be greater than zero')
            if size > self.length():
                bitarray.extend(self, (size - self.length()) * [0])
            else:
                bitarray.__delitem__(self, slice(size, self.length()))
1129424
def to_struct(self, value):
        """"""
        if self.str_format:
            return value.strftime(self.str_format)
        return value.strftime(self.default_format)
544184
def pack(self):
        ''''''
        for i in range(len(self.values)):
            if math.isnan(self.values[i]):
                self.values[i] = 0
        return struct.pack(self.pack_string, *self.values)
676548
def create_new(cls, oldvalue, *args):
    ""
    if oldvalue is not None:
        raise AlreadyExistsException('%r already exists' % (oldvalue,))
    return cls.create_instance(*args)
839393
private ConvertibleValues<Object> newConvertibleValues(Map<CharSequence, Object> values) {
        if (CollectionUtils.isEmpty(values)) {
            return ConvertibleValues.EMPTY;
        } else {
            return ConvertibleValues.of(values);
        }
    }
810268
def infer_struct(value: Mapping[str, GenericAny]) -> Struct:
    """"""
    if not value:
        raise TypeError('Empty struct type not supported')
    return Struct(list(value.keys()), list(map(infer, value.values())))
1208358
def build_condition(filter_map, using=CONDITIONS):
    
    if not filter_map:
        return

    filters = {}
    dynamizer = Dynamizer()

    for field_and_op, value in filter_map.items():
        field_bits = field_and_op.split('__')
        fieldname = '__'.join(field_bits[:-1])

        try:
            op = using[field_bits[-1]]
        except KeyError:
            raise ConditionNotRecognizedException(
                "Operator '%s' from '%s' is not recognized." % (
                    field_bits[-1],
                    field_and_op
                )
            )

        lookup = {
            'AttributeValueList': [],
            'ComparisonOperator': op,
        }

        # Special-case the ``NULL/NOT_NULL`` case.
        if field_bits[-1] == 'null':
            del lookup['AttributeValueList']

            if value is False:
                lookup['ComparisonOperator'] = 'NOT_NULL'
            else:
                lookup['ComparisonOperator'] = 'NULL'
        # Special-case the ``BETWEEN`` case.
        elif field_bits[-1] == 'between':
            if len(value) == 2 and isinstance(value, (list, tuple)):
                lookup['AttributeValueList'].append(
                    dynamizer.encode(value[0])
                )
                lookup['AttributeValueList'].append(
                    dynamizer.encode(value[1])
                )
        # Special-case the ``IN`` case
        elif field_bits[-1] == 'in':
            for val in value:
                lookup['AttributeValueList'].append(dynamizer.encode(val))
        else:
            # Fix up the value for encoding, because it was built to only work
            # with ``set``s.
            if isinstance(value, (list, tuple)):
                value = set(value)
            lookup['AttributeValueList'].append(
                dynamizer.encode(value)
            )

        # Finally, insert it into the filters.
        filters[fieldname] = lookup
    return filters
638096
public static<R> Result<R> create(R value, int status, String details, String ... vars) {
    	return new Result<R>(value,status,details,vars);
    }
1235538
def _set_condition(self, condition):
        """"""
        assert isinstance(condition, CodeExpression.TYPES)
        self.condition = condition
1106458
public OqlBuilder<T> newFrom(final String from) {
    if (null == from) {
      this.from = null;
    } else {
      if (Strings.contains(from.toLowerCase(), "from")) {
        this.from = from;
      } else {
        this.from = "from " + from;
      }
    }
    return this;
  }
1354109
private void newValueOnTOS() {
        IsNullValueFrame frame = getFrame();
        if (frame.getStackDepth() < 1) {
            return;
        }
        int tosSlot = frame.getNumSlots() - 1;
        IsNullValue tos = frame.getValue(tosSlot);
        if (tos.isDefinitelyNull()) {
            slotContainingNewNullValue = tosSlot;
        }
        if (trackValueNumbers) {
            try {
                ValueNumberFrame vnaFrameAfter = vnaDataflow.getFactAfterLocation(getLocation());
                if (vnaFrameAfter.isValid()) {
                    ValueNumber tosVN = vnaFrameAfter.getTopValue();
                    getFrame().setKnownValue(tosVN, tos);
                }
            } catch (DataflowAnalysisException e) {
                AnalysisContext.logError("error", e);
            }
        }
    }