Write the <c:spPr> element.
549795
def write_sp_pr(series) # :nodoc:
      line     = series.line
      fill     = series.fill
      gradient = series.gradient if series.respond_to?(:gradient)

      return if (!line || !ptrue?(line[:_defined])) &&
        (!fill || !ptrue?(fill[:_defined])) && !gradient

      @writer.tag_elements('c:spPr') do
        # Write the fill elements for solid charts such as pie/doughnut and bar.
        if fill && fill[:_defined] != 0
          if ptrue?(fill[:none])
            # Write the a:noFill element.
            write_a_no_fill
          else
            # Write the a:solidFill element.
            write_a_solid_fill(fill)
          end
        end
        if ptrue?(gradient)
          # Write the a:gradFill element.
          write_a_grad_fill(gradient)
        end
        # Write the a:ln element.
        write_a_ln(line) if line && ptrue?(line[:_defined])
      end
    end
94487
def __WriteProtoServiceDeclaration(self, printer, name, method_info_map):
        """"""
        printer()
        printer('service %s {', self.__GetServiceClassName(name))
        with printer.Indent():
            for method_name, method_info in method_info_map.items():
                for line in textwrap.wrap(method_info.description,
                                          printer.CalculateWidth() - 3):
                    printer('// %s', line)
                printer('rpc %s (%s) returns (%s);',
                        method_name,
                        method_info.request_type_name,
                        method_info.response_type_name)
        printer('}')
971462
def write_ser(series) # :nodoc:
      @writer.tag_elements('c:ser') do
        write_ser_base(series) do
          write_c_invert_if_negative(series.invert_if_negative)
        end
        # Write the c:cat element.
        write_cat(series)
        # Write the c:val element.
        write_val(series)
        # Write the c:smooth element.
        write_c_smooth(series.smooth) if ptrue?(@smooth_allowed)
      end
      @series_index += 1
    end
27016
public void writeMethodInterface(String strProtection, String strMethodName, String strReturns, String strParams, String strThrows, String strDescription, String strCodeBody)
    {
        if ((strProtection == null) || (strProtection.length() == 0))
            strProtection = "public";
        String strInterfaceEnd = "\n";
        if (strCodeBody == null)
            strCodeBody = "{\n";
        if (";\n".equals(strCodeBody))
        {
            strInterfaceEnd = strCodeBody;
            strCodeBody = null;
        }
        String strDesc = strDescription;
        if (strDesc.length() == 0)
        {
            strDesc = strMethodName + " Method";
            strDesc = new Character(Character.toUpperCase(strDesc.charAt(0))) + strDesc.substring(1);
        }
        strDesc = this.convertDescToJavaDoc(strDesc);
        if (strThrows.length() > 0)
            strThrows = " throws " + strThrows;
        m_StreamOut.writeit("/**\n" + strDesc + "\n */\n");
        if (strParams.equalsIgnoreCase("void"))
            strParams = DBConstants.BLANK;
        if (strReturns.length() == 0)
        {
            m_StreamOut.writeit("public " + strMethodName + "(" + strParams + ")" + strThrows + "\n");
            m_strParams = strParams;    // Also default params for Init() call!
        }
        else
            m_StreamOut.writeit(strProtection + " " + strReturns + " " + strMethodName + "(" + strParams + ")" + strThrows + strInterfaceEnd);
        if (strCodeBody != null)
            m_StreamOut.writeit(strCodeBody);
    }
1335546
def write(self, fptr):
        
        self._validate(writing=True)
        num_components = len(self.association)
        fptr.write(struct.pack('>I4s', 8 + 2 + num_components * 6, b'cdef'))
        fptr.write(struct.pack('>H', num_components))
        for j in range(num_components):
            fptr.write(struct.pack('>' + 'H' * 3,
                                   self.index[j],
                                   self.channel_type[j],
                                   self.association[j]))
726259
private static void writeBits(StringBuilder sb, boolean r, boolean w, boolean x) {
        if (r) {
            sb.append('r');
        } else {
            sb.append('-');
        }
        if (w) {
            sb.append('w');
        } else {
            sb.append('-');
        }
        if (x) {
            sb.append('x');
        } else {
            sb.append('-');
        }
    }
81304
private void writeEIS(Definition def, Writer out, int indent) throws IOException
   {
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Returns product name of the underlying EIS instance connected\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return Product name of the EIS instance\n");
      writeWithIndent(out, indent, " * @throws ResourceException  Failed to get the information\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getEISProductName() throws ResourceException");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);

      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Returns product version of the underlying EIS instance.\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @return Product version of the EIS instance\n");
      writeWithIndent(out, indent, " * @throws ResourceException  Failed to get the information\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "@Override\n");
      writeWithIndent(out, indent, "public String getEISProductVersion() throws ResourceException");
      writeLeftCurlyBracket(out, indent);
      writeWithIndent(out, indent + 1, "return null; //TODO");
      writeRightCurlyBracket(out, indent);
      writeEol(out);
   }
1016244
public void write(Collection<? extends E> elements) throws IOException {
		final Progression progressBar = getTaskProgression();
		Progression subTask = null;

		if (progressBar != null) {
			progressBar.setProperties(0, 0, (elements.size() + 1) * 100, false);
		}

		if (this.fileBounds == null) {
			this.fileBounds = getFileBounds();
		}

		if (this.fileBounds != null) {
			writeHeader(this.fileBounds, this.elementType, elements);

			if (progressBar != null) {
				progressBar.setValue(100);
				subTask = progressBar.subTask(elements.size() * 100);
				subTask.setProperties(0, 0, elements.size(), false);
			}

			for (final E element : elements) {

				writeElement(this.recordIndex, element, this.elementType);

				if (subTask != null) {
					subTask.setValue(this.recordIndex + 1);
				}

				++this.recordIndex;

			}
		} else {
			throw new BoundsNotFoundException();
		}

		if (progressBar != null) {
			progressBar.end();
		}
	}
84362
def write(self, fptr):
        
        self._write_validate()

        # Very similar to the way a superbox is written.
        orig_pos = fptr.tell()
        fptr.write(struct.pack('>I4s', 0, b'dtbl'))

        # Write the number of data entry url boxes.
        write_buffer = struct.pack('>H', len(self.DR))
        fptr.write(write_buffer)

        for box in self.DR:
            box.write(fptr)

        end_pos = fptr.tell()
        fptr.seek(orig_pos)
        fptr.write(struct.pack('>I', end_pos - orig_pos))
        fptr.seek(end_pos)
528012
def write(self, fptr):
        
        fptr.write(struct.pack('>I4s', 12, b'jP  '))
        fptr.write(struct.pack('>BBBB', *self.signature))
1152319
def write_sp(index, col_absolute, row_absolute, width, height, shape)
      if shape.connect != 0
        attributes = [ [:macro,  ''] ]
        @writer.tag_elements('xdr:cxnSp', attributes) do

          # Write the xdr:nvCxnSpPr element.
          write_nv_cxn_sp_pr(index, shape)

          # Write the xdr:spPr element.
          write_xdr_sp_pr(col_absolute, row_absolute, width, height, shape)
        end
      else
        # Add attribute for shapes.
        attributes = [
                      [:macro, ''],
                      [:textlink, '']
                     ]
        @writer.tag_elements('xdr:sp', attributes) do

          # Write the xdr:nvSpPr element.
          write_nv_sp_pr(index, shape)

          # Write the xdr:spPr element.
          write_xdr_sp_pr(col_absolute, row_absolute, width, height, shape)

          # Write the xdr:txBody element.
          if shape.text != 0
            write_tx_body(shape)
          end
        end
      end
    end
408146
private void writeObject(java.io.ObjectOutputStream s)
        throws java.io.IOException {
        s.defaultWriteObject();
        for (E e : this)
            s.writeObject(e);
        // Use trailing null as sentinel
        s.writeObject(null);
    }
302749
def write(self, s):
        
        if self.comptype == "gz":
            self.crc = self.zlib.crc32(s, self.crc)
        self.pos += len(s)
        if self.comptype != "tar":
            s = self.cmp.compress(s)
        self.__write(s)
1289324
def write_elements(elements, mass_erase_used, progress=None):
    

    mem_layout = get_memory_layout(__dev)
    for elem in elements:
        addr = elem['addr']
        size = elem['size']
        data = elem['data']
        elem_size = size
        elem_addr = addr
        if progress:
            progress(elem_addr, 0, elem_size)
        while size > 0:
            write_size = size
            if not mass_erase_used:
                for segment in mem_layout:
                    if addr >= segment['addr'] and \
                       addr <= segment['last_addr']:
                        # We found the page containing the address we want to
                        # write, erase it
                        page_size = segment['page_size']
                        page_addr = addr & ~(page_size - 1)
                        if addr + write_size > page_addr + page_size:
                            write_size = page_addr + page_size - addr
                        page_erase(page_addr)
                        break
            write_memory(addr, data[:write_size], progress,
                         elem_addr, elem_size)
            data = data[write_size:]
            addr += write_size
            size -= write_size
            if progress:
                progress(elem_addr, addr - elem_addr, elem_size)
1348672
public void writeElement(String name, int type) {
        StringBuffer nsdecl = new StringBuffer();

        if (_isRootElement) {
            for (Iterator<String> iter = _namespaces.keySet().iterator(); iter
                    .hasNext();) {
                String fullName = (String) iter.next();
                String abbrev = (String) _namespaces.get(fullName);
                nsdecl.append(" xmlns:").append(abbrev).append("=\"").append(
                        fullName).append("\"");
            }
            _isRootElement = false;
        }

        int pos = name.lastIndexOf(':');
        if (pos >= 0) {
            // lookup prefix for namespace
            String fullns = name.substring(0, pos);
            String prefix = (String) _namespaces.get(fullns);
            if (prefix == null) {
                // there is no prefix for this namespace
                name = name.substring(pos + 1);
                nsdecl.append(" xmlns=\"").append(fullns).append("\"");
            } else {
                // there is a prefix
                name = prefix + ":" + name.substring(pos + 1);
            }
        } else {
            throw new IllegalArgumentException(
                    "All XML elements must have a namespace");
        }

        switch (type) {
        case OPENING:
            _buffer.append("<");
            _buffer.append(name);
            _buffer.append( nsdecl);
            _buffer.append( ">");
            break;
        case CLOSING:
            _buffer.append("</");
            _buffer.append( name);
            _buffer.append( ">\n");
            break;
        case NO_CONTENT:
        default:
            _buffer.append("<");
            _buffer.append( name);
            _buffer.append( nsdecl);
            _buffer.append( "/>");
            break;
        }
    }
819815
def write(self, fptr):
        
        self._validate(writing=True)
        length = 16 + 4 * len(self.compatibility_list)
        fptr.write(struct.pack('>I4s', length, b'ftyp'))
        fptr.write(self.brand.encode())
        fptr.write(struct.pack('>I', self.minor_version))

        for item in self.compatibility_list:
            fptr.write(item.encode())
370020
def _prtstr(self, obj, dashes):
        """"""
        self.prt.write('{DASHES:{N}}'.format(
            DASHES=self.fmt_dashes.format(DASHES=dashes, ID=obj.item_id),
            N=self.dash_len))
        self.prt.write("{INFO}\n".format(INFO=str(obj)))