Returns a string representation of this model. For a feature model,
 this will be Gherkin text that is equivalent to the feature being modeled.
976069
def to_s
      text = ''

      text << tag_output_string + "\n" unless tags.empty?
      text << "#{@keyword}:#{name_output_string}"
      text << "\n" + description_output_string unless (description.nil? || description.empty?)
      text << "\n\n" + background_output_string if background
      text << "\n\n" + tests_output_string unless tests.empty?

      text
    end
822607
def to_string(self):
        
        # define coord system, use Cartesian
        output = ["1.0 0.0 0.0",
                  "0.0 1.0 0.0",
                  "0.0 0.0 1.0"]
        # add lattice vectors
        m = self.structure.lattice.matrix
        output.append("{:6f} {:6f} {:6f}".format(*m[0]))
        output.append("{:6f} {:6f} {:6f}".format(*m[1]))
        output.append("{:6f} {:6f} {:6f}".format(*m[2]))
        # add species
        for site in self.structure:
            species_str = []
            for sp, occu in sorted(site.species.items()):
                if isinstance(sp, Specie):
                    sp = sp.element
                species_str.append("{}={}".format(sp, occu))
            species_str = ",".join(species_str)
            output.append("{:6f} {:6f} {:6f} {}".format(site.frac_coords[0],
                                                        site.frac_coords[1],
                                                        site.frac_coords[2],
                                                        species_str))

        return "\n".join(output)
261778
def toString(self):
        
        string = "Layer '%s': (Kind: %s, Size: %d, Active: %d, Frozen: %d)\n" % (
            self.name, self.kind, self.size, self.active, self.frozen) 
        if (self.type == 'Output'):
            string += toStringArray('Target    ', self.target, self.displayWidth)
        string += toStringArray('Activation', self.activation, self.displayWidth) 
        if (self.type != 'Input' and self._verbosity > 1):
            string += toStringArray('Error     ', self.error, self.displayWidth)
        if (self._verbosity > 4 and self.type != 'Input'):
            string +=  toStringArray('weight    ', self.weight, self.displayWidth)
            string +=  toStringArray('dweight   ', self.dweight, self.displayWidth)
            string +=  toStringArray('delta     ', self.delta, self.displayWidth)
            string +=  toStringArray('netinput  ', self.netinput, self.displayWidth)
            string +=  toStringArray('wed       ', self.wed, self.displayWidth)
        return string
511117
def _format_feature(feature, weight, hl_spaces):
    # type: (...) -> str
    
    if isinstance(feature, FormattedFeatureName):
        return feature.format()
    elif (isinstance(feature, list) and
            all('name' in x and 'sign' in x for x in feature)):
        return _format_unhashed_feature(feature, weight, hl_spaces=hl_spaces)
    else:
        return _format_single_feature(feature, weight, hl_spaces=hl_spaces)
343217
def text(*val)
      if val.empty?
        return @text
      else
        s = val[0].dup
        s = s.to_s if !s.is_a? String  # 2009-01-15 17:32 
        if (( ix = s.index('&')) != nil)
          s.slice!(ix,1)
          @underline = ix #unless @form.nil? # this setting a fake underline in messageboxes
          @text = s # mnemo needs this for setting description
          mnemonic s[ix,1]
        end
        @text = s
      end
      return self 
    end
508539
def get_description(self):
        
        return DisplayText({'text': profile.DESCRIPTION,
                            'languageTypeId': profile.LANGUAGETYPEID,
                            'scriptTypeId': profile.SCRIPTTYPEID,
                            'formatTypeId': profile.FORMATTYPEID})
628379
def _to_string(self):
        
        return u"{}+{}@{}".format(text_type(self.definition_id), self.BLOCK_TYPE_PREFIX, self.block_type)
316535
public String getDescription(FeatureDescriptor feature) {
        String description = feature.getShortDescription();
        
        if (description == null || 
            description.equals(feature.getDisplayName())) {
            
            description = "";
        }

        return description;
    }
745899
def as_strings(self):
        """"""
        if self.value == '' or self.value is None:
            return '{0};\n'.format(self.name)
        if '"' not in self.value and (';' in self.value or '#' in self.value):
            return '{0} "{1}";\n'.format(self.name, self.value)
        return '{0} {1};\n'.format(self.name, self.value)
420585
def description(self):
        

        if 'metrics' in self.raw:
            metrics = self.raw['metrics']
            head = metrics[0:-1] or metrics[0:1]
            text = ", ".join(head)
            if len(metrics) > 1:
                tail = metrics[-1]
                text = text + " and " + tail
        else:
            text = 'n/a'

        return text
938528
def to_string(self):
        
        builder = ""

        index = 0
        while index < self.__len__():
            if index > 0:
                builder = builder + ','
            builder = builder + super(ProjectionParams, self).__getitem__(index)
            index = index + 1

        return builder
56603
def pretty_print_model(devicemodel):
    """"""
    PRETTY_PRINT_MODEL = """Device Model ID: %(deviceModelId)s
        Project ID: %(projectId)s
        Device Type: %(deviceType)s"""
    logging.info(PRETTY_PRINT_MODEL % devicemodel)
    if 'traits' in devicemodel:
        for trait in devicemodel['traits']:
            logging.info('        Trait %s' % trait)
    else:
        logging.info('No traits')
    logging.info('')
1125008
def get_feature_info(feature):
    """"""
    dimensions = feature.findall('position')
    for dim in dimensions:
        if dim.attrib['dim'] == '0':
            rt = dim.text
        elif dim.attrib['dim'] == '1':
            mz = dim.text
    return {'rt': float(rt), 'mz': float(mz),
            'charge': int(feature.find('charge').text),
            'intensity': float(feature.find('intensity').text),
            }
595458
def to_str(self):
        ''''''
        pairs = []
        for name, value in self.get_all():
            if value and self._wrap_width:
                pairs.append('{0}:{1}'.format(
                    name,
                    '\r\n'.join(textwrap.wrap(
                        value, width=self._wrap_width,
                        drop_whitespace=False, initial_indent=' ',
                        subsequent_indent=' '
                    ))
                ))
            elif value:
                pairs.append('{0}: {1}'.format(name, value))
            else:
                pairs.append('{0}:'.format(name))

        pairs.append('')
        return '\r\n'.join(pairs)
780299
public String to_string() 
	{
		String str = "";
		if (pageno > 0) 
			str = "pageno="+pageno;
		
		if (pagesize > 0) 
		{
			if (str.length() > 0)
				str = str + "&";
			
			str = str +"pagesize="+pagesize;
		}
		
		if (detailview) 
		{
			if (str.length() > 0)
				str = str + "&";
			
			str = str +"view=detail";
		}
		
		if (count) 
		{
			if (str.length() > 0)
				str = str + "&";
			
			str = str +"count=yes";
		}
		
		if (args != null) {
			if (str.length() > 0)
				str = str + "&";
			str = str+"args="+args;
		}
		if (filter != null) {
			if (filter.length() > 0)
				str = str + "&";
			str = str+"filter="+filter;
		}
		return str;
	}
206024
def get_string(self):
        
        if self in [MimeType.TIFF_d8, MimeType.TIFF_d16, MimeType.TIFF_d32f]:
            return 'image/{}'.format(self.value)
        if self is MimeType.JP2:
            return 'image/jpeg2000'
        if self in [MimeType.RAW, MimeType.REQUESTS_RESPONSE]:
            return self.value
        return mimetypes.types_map['.' + self.value]
317192
def text(self):
        
        if self.m_name == -1 or self.m_event != TEXT:
            return ''

        return self.sb[self.m_name]