Selectively add placeholder shape elements from *notes_master* to the
        shapes collection of this notes slide. Z-order of placeholders is
        preserved. Certain placeholders (header, date, footer) are not
        cloned.
161048
def clone_master_placeholders(self, notes_master):
        
        def iter_cloneable_placeholders(notes_master):
            """
            Generate a reference to each placeholder in *notes_master* that
            should be cloned to a notes slide when the a new notes slide is
            created.
            """
            cloneable = (
                PP_PLACEHOLDER.SLIDE_IMAGE,
                PP_PLACEHOLDER.BODY,
                PP_PLACEHOLDER.SLIDE_NUMBER,
            )
            for placeholder in notes_master.placeholders:
                if placeholder.element.ph_type in cloneable:
                    yield placeholder

        shapes = self.shapes
        for placeholder in iter_cloneable_placeholders(notes_master):
            shapes.clone_placeholder(placeholder)
832689
def append_notes(self, notes, root, scale=0):
        
        for note in notes:
            self.append_note(note, root, scale)
479965
def _base_placeholder(self):
        
        notes_master = self.part.notes_master
        ph_type = self.element.ph_type
        return notes_master.placeholders.get(ph_type=ph_type)
263591
public void addEntry(String placeholder, String... params) {
        ConfigEntry entry = entries.get(placeholder);
        String line = entry.template;

        for (int i = 0; i < params.length; i++) {
            line = line.replace("{" + i + "}", StringUtils.defaultString(params[i]));
        }

        entry.buffer.add(line);
    }
588020
def move_to_placeholder(self, placeholder, sort_order=None):
        
        qs = self.all()  # Get clone
        for item in qs:
            # Change the item directly in the resultset.
            item.move_to_placeholder(placeholder, sort_order=sort_order)
            if sort_order is not None:
                sort_order += 1

        return qs
717831
def note(id, type, feature)
      _notes
      @_notes[id][type] = RSS_Note.new(id, type, feature)
    end
368761
function addCustomElements(customElements) {
        var customElementRegExp = /^(~)?(.+)$/;

        if (customElements) {
          // Flush cached items since we are altering the default maps
          mapCache.text_block_elements = mapCache.block_elements = null;

          each(split(customElements, ','), function (rule) {
            var matches = customElementRegExp.exec(rule),
              inline = matches[1] === '~',
              cloneName = inline ? 'span' : 'div',
              name = matches[2];

            children[name] = children[cloneName];
            customElementsMap[name] = cloneName;

            // If it's not marked as inline then add it to valid block elements
            if (!inline) {
              blockElementsMap[name.toUpperCase()] = {};
              blockElementsMap[name] = {};
            }

            // Add elements clone if needed
            if (!elements[name]) {
              var customRule = elements[cloneName];

              customRule = extend({}, customRule);
              delete customRule.removeEmptyAttrs;
              delete customRule.removeEmpty;

              elements[name] = customRule;
            }

            // Add custom elements at span/div positions
            each(children, function (element, elmName) {
              if (element[cloneName]) {
                children[elmName] = element = extend({}, children[elmName]);
                element[name] = element[cloneName];
              }
            });
          });
        }
      }
813896
def _addPolylineToElements(self):
        
        if (len(self._pointsOfPolyline) > 1):
            s = ''
            for point in self._pointsOfPolyline:
                s += str(point) + ' '#str(point.x) + ',' + str(point.y) + ' '
            p = Polyline(s)
            p.set_style('fill:' + self.fill + '; stroke:' + self.stroke + '; stroke-width:' + self.strokeWidth) 
            self._svgElements.append(p)
        self._pointsOfPolyline = []
        self._pointsOfPolyline.append(Vector(self._position.x, self._position.y))
1044263
def _request_remaining_placeholders(
            self):
        
        self.log.info(
            'starting the ``_request_remaining_placeholders`` method')

        phNeeded = False
        for k, v in self.phDict.iteritems():
            if not v:
                phNeeded = True

        if phNeeded == False:
            return

        print "please add your placeholder values ..."

        for k, v in self.phDict.iteritems():
            if not v:
                v = raw_input("%(k)s? \n  >  " % locals())
                self.phDict[k] = v

        self.log.info(
            'completed the ``_request_remaining_placeholders`` method')
        return None
1356487
function () {
                if (!_placeholderSupported && this._cfg.placeholder) {
                    var element = this._domElt;
                    if (element.value === "") {
                        element.value = this._cfg.placeholder;
                        var cssClass = new aria.utils.ClassList(element);
                        cssClass.add('placeholder');
                        cssClass.$dispose();
                        if (this._hasFocus) {
                            ariaUtilsCaret.setPosition(element, 0, 0);
                        }
                        this._hasPlaceholder = true;
                        this._domElt.unselectable = "on";
                    }
                }
            }
664464
def _draw_placeholder(self):
        """"""
        if self.model().rowCount() == 0:
            painter = QPainter(self.viewport())
            painter.setFont(_custom_font(is_italic=True))
            painter.drawText(self.rect().adjusted(0, 0, -5, -5), Qt.AlignCenter | Qt.TextWordWrap,
                             self.PLACEHOLDER)
1209384
def update_placeholder_formats(self, format_string, placeholder_formats):
        
        # Tokenize the format string and process them
        output = []
        for token in self.tokens(format_string):
            if (
                token.group("placeholder")
                and (not token.group("format"))
                and token.group("key") in placeholder_formats
            ):
                output.append(
                    "{%s%s}"
                    % (token.group("key"), placeholder_formats[token.group("key")])
                )
                continue
            value = token.group(0)
            output.append(value)
        return u"".join(output)
471603
private void addToMusic(MusicElement me) {
		if (me != null) {
			if (me instanceof DecorableElement)
				applySymbolsAndAnnotations((DecorableElement) me);
			if (!(me instanceof NotesSeparator)
					&& !(me instanceof Spacer)) {
				m_graceNotes.clear();
				m_graceNotesType = GracingType.APPOGGIATURA;
				//TODO attach graces to last parsed note ?
			}
			if ((m_tupletNumberOfNotes != -1)
				&& (me instanceof NoteAbstract)) {
				//we are filling a tuplet
				m_tupletNotes.add(me);
				if (m_tupletNotes.size() == m_tupletNumberOfNotes)
					closeTuplet();
			}
			m_music.getVoice(m_currentVoice).addElement(me);
		}
	}
203391
def add_missing_placeholders(self):
        
        content_type = ContentType.objects.get_for_model(self)
        result = False
        if self.layout:
            for data in self.layout.get_placeholder_data():
                placeholder, created = Placeholder.objects.update_or_create(
                    parent_type=content_type,
                    parent_id=self.pk,
                    slot=data.slot,
                    defaults=dict(
                        role=data.role,
                        title=data.title,
                    ))
                result = result or created
        return result
968569
def AddPoly(self, poly, smart_duplicate_handling=True):
    
    inserted_name = poly.GetName()
    if poly.GetName() in self._name_to_shape:
      if not smart_duplicate_handling:
        raise ShapeError("Duplicate shape found: " + poly.GetName())

      print ("Warning: duplicate shape id being added to collection: " +
             poly.GetName())
      if poly.GreedyPolyMatchDist(self._name_to_shape[poly.GetName()]) < 10:
        print("  (Skipping as it apears to be an exact duplicate)")
      else:
        print("  (Adding new shape variant with uniquified name)")
        inserted_name = "%s-%d" % (inserted_name, len(self._name_to_shape))
    self._name_to_shape[inserted_name] = poly
1192656
def _replace_placeholder(self, spider):
        
        return self.db_name % {'spider': spider.name}, self.collection_name % {'spider': spider.name}
1319686
def clone_fluent_placeholders_and_content_items(self, dst_obj):
        
        if not self.has_placeholder_relationships():
            return

        for src_placeholder in Placeholder.objects.parent(self):
            dst_placeholder = Placeholder.objects.create_for_object(
                dst_obj,
                slot=src_placeholder.slot,
                role=src_placeholder.role,
                title=src_placeholder.title
            )

            src_items = src_placeholder.get_content_items()
            src_items.copy_to_placeholder(dst_placeholder)