GetRecordFromCode Method.
975401
public static Record getRecordFromCode(BaseField field, String strDesc, String strFieldName)
    {
        Record recSecond = ((ReferenceField)field).getReferenceRecord();
        return BaseFixData.getRecordFromCode(field, strDesc, strFieldName, recSecond);
    }
586670
public int handleGetRawRecordData(Rec record)
    {
        int iErrorCode = Constant.NORMAL_RETURN;
            
        iErrorCode = super.handleGetRawRecordData(record);
        
        if (iErrorCode == Constant.NORMAL_RETURN)
        {
            if (m_messageDataDescChildren != null)
            {
                for (String strKey : m_messageDataDescChildren.keySet())
                {
                    iErrorCode = m_messageDataDescChildren.get(strKey).handleGetRawRecordData(record);
                    if (iErrorCode != Constant.NORMAL_RETURN)
                        break;
                }
            }
        }

        return iErrorCode;
    }
1149363
public void fieldsToData(Rec record) throws DBException
    {
        BaseBuffer buffer = this.getNewDataBuffer();
        this.doSetHandle(buffer, DBConstants.DATA_SOURCE_HANDLE); // This way you can retrieve the current buffer.
        super.fieldsToData(record);
        buffer.finishBuffer();
    }
379098
public int putRawRecordData(Rec record)
    {
        if (this.getNodeType() == BaseMessageRecordDesc.NON_UNIQUE_NODE)
            this.getMessage().createNewNode(this.getFullKey(null));
        return super.putRawRecordData(record);
    }
1267168
public int getRecordCount(Rec record)
    {
        int iRecordCount = 1;
        if ((this.getNodeType() == MessageRecordDesc.NON_UNIQUE_NODE)
            && (!this.isSingleDetail(record)))
                iRecordCount = Integer.MAX_VALUE;   // Until EOF
        return iRecordCount;
    }
419304
public Record getRecord(String strFileName)
    {
        if (m_vRecordList == null)
            return null;
        Record record = m_vRecordList.getRecord(strFileName);
        if (record != null)
            return record;
        return super.getRecord(strFileName);    // Look thru the parent window now
    }
833704
def __record(self, oid=None):
        """"""
        f = self.__getFileObj(self.dbf)
        recordContents = self.__recStruct.unpack(f.read(self.__recStruct.size))
        if recordContents[0] != b' ':
            # deleted record
            return None
        record = []
        for (name, typ, size, deci), value in zip(self.fields, recordContents):
            if name == 'DeletionFlag':
                continue
            elif typ in ("N","F"):
                # numeric or float: number stored as a string, right justified, and padded with blanks to the width of the field. 
                value = value.split(b'\0')[0]
                value = value.replace(b'*', b'')  # QGIS NULL is all '*' chars
                if value == b'':
                    value = None
                elif deci:
                    try:
                        value = float(value)
                    except ValueError:
                        #not parseable as float, set to None
                        value = None
                else:
                    # force to int
                    try:
                        # first try to force directly to int.
                        # forcing a large int to float and back to int
                        # will lose information and result in wrong nr.
                        value = int(value) 
                    except ValueError:
                        # forcing directly to int failed, so was probably a float.
                        try:
                            value = int(float(value))
                        except ValueError:
                            #not parseable as int, set to None
                            value = None
            elif typ == 'D':
                # date: 8 bytes - date stored as a string in the format YYYYMMDD.
                if value.count(b'0') == len(value):  # QGIS NULL is all '0' chars
                    value = None
                else:
                    try:
                        y, m, d = int(value[:4]), int(value[4:6]), int(value[6:8])
                        value = date(y, m, d)
                    except:
                        value = value.strip()
            elif typ == 'L':
                # logical: 1 byte - initialized to 0x20 (space) otherwise T or F.
                if value == b" ":
                    value = None # space means missing or not yet set
                else:
                    if value in b'YyTt1':
                        value = True
                    elif value in b'NnFf0':
                        value = False
                    else:
                        value = None # unknown value is set to missing
            else:
                # anything else is forced to string/unicode
                value = u(value, self.encoding, self.encodingErrors)
                value = value.strip()
            record.append(value)

        return _Record(self.__fieldposition_lookup, record, oid)
13487
def to_string(self, other):
        """"""
        arg = "%s/%s,%s" % (
                self.ttl, self.get_remaining_ttl(current_time_millis()), other)
        return DNSEntry.to_string(self, "record", arg)
875117
def _get_record_fields(d):
    
    if isinstance(d, dict):
        if "fields" in d:
            return d["fields"]
        else:
            for v in d.values():
                fields = _get_record_fields(v)
                if fields:
                    return fields
1330596
public static Record getRecordFromDescription(BaseField field, String strDesc)
    {
        Record recSecond = ((ReferenceField)field).getReferenceRecord();
        return BaseFixData.getRecordFromDescription(strDesc, null, recSecond);
    }
477877
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Terminating Descriptor not initialized')

        rec = struct.pack(self.FMT, b'\x00' * 16, b'\x00' * 496)[16:]
        return self.desc_tag.record(rec) + rec
789559
@Override public RecordWriter<K,VariantContextWritable> getRecordWriter(
			TaskAttemptContext ctx)
		throws IOException
	{
		Configuration conf = ctx.getConfiguration();
		boolean isCompressed = getCompressOutput(ctx);
		CompressionCodec codec = null;
		String extension = "";
		if (isCompressed) {
			Class<? extends CompressionCodec> codecClass =
					getOutputCompressorClass(ctx, BGZFCodec.class);
			codec = ReflectionUtils.newInstance(codecClass, conf);
			extension = codec.getDefaultExtension();
		}
		Path file = getDefaultWorkFile(ctx, extension);
		if (!isCompressed) {
			return getRecordWriter(ctx, file);
		} else {
			FileSystem fs = file.getFileSystem(conf);
			return getRecordWriter(ctx, codec.createOutputStream(fs.create(file)));
		}
	}
232032
def get_xf  # :nodoc:

    # Local Variable
    #    record;     # Record identifier
    #    length;     # Number of bytes to follow
    #
    #    ifnt;       # Index to FONT record
    #    ifmt;       # Index to FORMAT record
    #    style;      # Style and other options
    #    align;      # Alignment
    #    indent;     #
    #    icv;        # fg and bg pattern colors
    #    border1;    # Border line options
    #    border2;    # Border line options
    #    border3;    # Border line options

    # Set the type of the XF record and some of the attributes.
    if @type == 0xFFF5 then
      style = 0xFFF5
    else
      style  = @locked
      style |= @hidden << 1
    end

    # Flags to indicate if attributes have been set.
    atr_num  = (@num_format   != 0) ? 1 : 0
    atr_fnt  = (@font_index   != 0) ? 1 : 0
    atr_alc  = (@text_h_align != 0 ||
                @text_v_align != 2 ||
                @shrink       != 0 ||
                @merge_range  != 0 ||
                @text_wrap    != 0 ||
                @indent       != 0) ? 1 : 0
    atr_bdr  = (@bottom       != 0 ||
                @top          != 0 ||
                @left         != 0 ||
                @right        != 0 ||
                @diag_type    != 0) ? 1 : 0
    atr_pat  = (@fg_color     != 0x40 ||
                @bg_color     != 0x41 ||
                @pattern      != 0x00) ? 1 : 0
    atr_prot = (@hidden       != 0 ||
                @locked       != 1) ? 1 : 0

    # Set attribute changed flags for the style formats.
    if @xf_index != 0 and @type == 0xFFF5
      if @xf_index >= 16
        atr_num    = 0
        atr_fnt    = 1
      else
        atr_num    = 1
        atr_fnt    = 0
      end
      atr_alc    = 1
      atr_bdr    = 1
      atr_pat    = 1
      atr_prot   = 1
    end

    # Set a default diagonal border style if none was specified.
    @diag_border = 1 if (@diag_border ==0 and @diag_type != 0)

    # Reset the default colours for the non-font properties
    @fg_color     = 0x40 if @fg_color     == 0x7FFF
    @bg_color     = 0x41 if @bg_color     == 0x7FFF
    @bottom_color = 0x40 if @bottom_color == 0x7FFF
    @top_color    = 0x40 if @top_color    == 0x7FFF
    @left_color   = 0x40 if @left_color   == 0x7FFF
    @right_color  = 0x40 if @right_color  == 0x7FFF
    @diag_color   = 0x40 if @diag_color   == 0x7FFF

    # Zero the default border colour if the border has not been set.
    @bottom_color = 0 if @bottom    == 0
    @top_color    = 0 if @top       == 0
    @right_color  = 0 if @right     == 0
    @left_color   = 0 if @left      == 0
    @diag_color   = 0 if @diag_type == 0

    # The following 2 logical statements take care of special cases in relation
    # to cell colours and patterns:
    # 1. For a solid fill (_pattern == 1) Excel reverses the role of foreground
    #    and background colours.
    # 2. If the user specifies a foreground or background colour without a
    #    pattern they probably wanted a solid fill, so we fill in the defaults.
    #
    if (@pattern  <= 0x01 && @bg_color != 0x41 && @fg_color == 0x40)
      @fg_color = @bg_color
      @bg_color = 0x40
      @pattern  = 1
    end

    if (@pattern <= 0x01 && @bg_color == 0x41 && @fg_color != 0x40)
      @bg_color = 0x40
      @pattern  = 1
    end

    # Set default alignment if indent is set.
    @text_h_align = 1 if @indent != 0 and @text_h_align == 0


    record         = 0x00E0
    length         = 0x0014

    ifnt           = @font_index
    ifmt           = @num_format


    align          = @text_h_align
    align         |= @text_wrap     << 3
    align         |= @text_v_align  << 4
    align         |= @text_justlast << 7
    align         |= @rotation      << 8

    indent         = @indent
    indent        |= @shrink        << 4
    indent        |= @merge_range   << 5
    indent        |= @reading_order << 6
    indent        |= atr_num        << 10
    indent        |= atr_fnt        << 11
    indent        |= atr_alc        << 12
    indent        |= atr_bdr        << 13
    indent        |= atr_pat        << 14
    indent        |= atr_prot       << 15


    border1        = @left
    border1       |= @right         << 4
    border1       |= @top           << 8
    border1       |= @bottom        << 12

    border2        = @left_color
    border2       |= @right_color   << 7
    border2       |= @diag_type     << 14

    border3        = @top_color
    border3       |= @bottom_color  << 7
    border3       |= @diag_color    << 14
    border3       |= @diag_border   << 21
    border3       |= @pattern       << 26

    icv            = @fg_color
    icv           |= @bg_color      << 7

    header = [record, length].pack("vv")
    data   = [ifnt, ifmt, style, align, indent,
              border1, border2, border3, icv].pack("vvvvvvvVv")

    header + data
  end
1332309
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF File Identifier Descriptor not initialized')

        if self.len_fi > 0:
            if self.encoding == 'latin-1':
                prefix = b'\x08'
            elif self.encoding == 'utf-16_be':
                prefix = b'\x10'
            else:
                raise pycdlibexception.PyCdlibInternalError('Invalid UDF encoding; this should not happen')

            fi = prefix + self.fi
        else:
            fi = b''
        rec = struct.pack(self.FMT, b'\x00' * 16, 1,
                          self.file_characteristics, self.len_fi,
                          self.icb.record(),
                          self.len_impl_use) + self.impl_use + fi + b'\x00' * UDFFileIdentifierDescriptor.pad(struct.calcsize(self.FMT) + self.len_impl_use + self.len_fi)
        return self.desc_tag.record(rec[16:]) + rec[16:]
825618
public synchronized ByteBuffer getRecordBuffer(int x, int y) throws IOException {
    if(x >= matrixsize || y >= matrixsize) {
      throw new ArrayIndexOutOfBoundsException();
    }
    return array.getRecordBuffer(computeOffset(x, y));
  }
1222878
private void writePhysicalRecord(ByteBuffer data, Record record) {
    writeBuffer.putInt(generateCrc(data.array(), data.position(), record.getBytes(),
        record.getType()));
    writeBuffer.putShort((short) record.getBytes());
    writeBuffer.put(record.getType().value());
    int oldLimit = data.limit();
    data.limit(data.position() + record.getBytes());
    writeBuffer.put(data);
    data.limit(oldLimit);
  }
107429
def format(self, record):
        """"""
        data = record.__dict__.copy()

        data['data_id'] = DATA['id']
        data['data_location_id'] = DATA_LOCATION['id']
        data['hostname'] = socket.gethostname()

        # Get relative path, so listener can reconstruct the path to the actual code.
        data['pathname'] = os.path.relpath(data['pathname'], os.path.dirname(__file__))

        # Exception and Traceback cannot be serialized.
        data['exc_info'] = None

        # Ensure logging message is instantiated to a string.
        data['msg'] = str(data['msg'])

        return json.dumps(data)