Generation of thumbnail tags.

@param m source
@param e element to attach new element to
3974
private void generateThumbails(final Metadata m, final Element e) {
        for (final Thumbnail thumb : m.getThumbnail()) {
            final Element t = new Element("thumbnail", NS);
            addNotNullAttribute(t, "url", thumb.getUrl());
            addNotNullAttribute(t, "width", thumb.getWidth());
            addNotNullAttribute(t, "height", thumb.getHeight());
            addNotNullAttribute(t, "time", thumb.getTime());
            e.addContent(t);
        }
    }
712717
public void setImaginary(T value, int m, int n)
    {
        setImaginary( value, getIndex(m,n) );
    }
302678
public static void d(String tag, Object msg) {
        log(tag, msg, Log.DEBUG);
    }
1035835
public void generate(Context context) {
        Appendable target = context.getTarget();

        for (ProcTemplateElement element : elements) {
            try {
                target.append(element.generate(context));
            } catch (IOException e) {
                // Nothing! Because StringBuilder doesn't catch IOException
            }
        }
    }
72224
public void setTag(int viewId, int key, Object tag) {
        ViewHelper.setTag(mCacheView, viewId, key, tag);
    }
796872
private void popover(Element e, String content) {
        e.setAttribute("data-content", content);
        JQuery.jQuery(e).popover();
    }
525504
def tag(context: click.Context, file_id: int, tags: List[str]):
    """"""
    file_obj = context.obj['db'].file_(file_id)
    if file_obj is None:
        print(click.style('unable to find file', fg='red'))
        context.abort()
    for tag_name in tags:
        tag_obj = context.obj['db'].tag(tag_name)
        if tag_obj is None:
            tag_obj = context.obj['db'].new_tag(tag_name)
        elif tag_obj in file_obj.tags:
            print(click.style(f"{tag_name}: tag already added", fg='yellow'))
            continue
        file_obj.tags.append(tag_obj)
    context.obj['db'].commit()
    all_tags = (tag.name for tag in file_obj.tags)
    print(click.style(f"file tags: {', '.join(all_tags)}", fg='blue'))
1327410
protected void addMethod(String k, ExecutableElement e, MethodModel exec) {
    ArrayList<ContractableMethod> list = methodMap.get(k);
    if (list == null) {
      list = new ArrayList<ContractableMethod>();
      methodMap.put(k, list);
    }
    list.add(new ContractableMethod(e, exec));
  }
534861
private void generatePeerLinks(final Metadata m, final Element e) {
        for (final PeerLink peerLink : m.getPeerLinks()) {
            final Element peerLinkElement = new Element("peerLink", NS);
            addNotNullAttribute(peerLinkElement, "type", peerLink.getType());
            addNotNullAttribute(peerLinkElement, "href", peerLink.getHref());
            if (peerLinkElement.hasAttributes()) {
                e.addContent(peerLinkElement);
            }
        }
    }
691170
private void attachMeta(final JSONObject o, final Context context) {
        // Memory consumption
        try {
            o.put("mc", Utils.getMemoryConsumption());
        } catch (Throwable t) {
            // Ignore
        }

        // Attach the network type
        try {
            o.put("nt", Utils.getCurrentNetworkType(context));
        } catch (Throwable t) {
            // Ignore
        }
    }
69795
private void generateLicenses(final Metadata m, final Element e) {
        for (final License license : m.getLicenses()) {
            final Element licenseElement = new Element("license", NS);
            addNotNullAttribute(licenseElement, "type", license.getType());
            addNotNullAttribute(licenseElement, "href", license.getHref());
            if (license.getValue() != null) {
                licenseElement.addContent(license.getValue());
            }
            if (licenseElement.hasAttributes() || !licenseElement.getTextTrim().isEmpty()) {
                e.addContent(licenseElement);
            }
        }
    }
1052191
public void actionPerformed(ActionEvent e)
    {
        if ((m_button != null) && (e.getSource() == m_button))
        {
            JCalendarPopup popup = JCalendarPopup.createCalendarPopup((Date)this.getControlValue(), m_button);
            popup.addPropertyChangeListener(this);
        }
        else if ((m_buttonTime != null) && (e.getSource() == m_buttonTime))
        {
            JTimePopup popup = JTimePopup.createTimePopup((Date)this.getControlValue(), m_buttonTime);
            popup.addPropertyChangeListener(this);
        }
    }
362162
@UiHandler("m_okButton")
    protected void onClickOk(ClickEvent e) {

        changeState(State.validationRunning);
        final String newName = getValue();
        CmsRpcAction<String> validate = new CmsRpcAction<String>() {

            @Override
            public void execute() {

                start(200, false);
                CmsCoreProvider.getVfsService().renameResource(m_structureId, newName, this);
            }

            @Override
            public void onFailure(Throwable t) {

                super.onFailure(t);
                changeState(State.validationUnknown);
            }

            @Override
            protected void onResponse(String result) {

                stop(false);
                if (result == null) {
                    close();
                    if (m_renameCallback != null) {
                        m_renameCallback.onSuccess(newName);
                    }
                } else {
                    changeState(State.validationFailed);
                    setValidationError(result);
                }
            }

        };
        validate.execute();

    }
819753
def add_tag(name, start, stop)
      @attr_tags << InlineTag.new(SM::Attribute.bitmap_for(name), start, stop)
    end
750228
@Benchmark
  @BenchmarkMode(Mode.AverageTime)
  @OutputTimeUnit(TimeUnit.NANOSECONDS)
  public TagContext tagContextCreation(Data data) {
    return TagsBenchmarksUtil.createTagContext(data.tagger.emptyBuilder(), data.numTags);
  }
683934
@UiHandler("m_okButton")
    protected void onClickOk(ClickEvent e) {

        CmsRpcAction<Void> deleteAction = new CmsRpcAction<Void>() {

            @Override
            public void execute() {

                start(200, true);
                CmsCoreProvider.getVfsService().deleteResource(m_status.getStructureId(), this);
            }

            @Override
            public void onResponse(Void result) {

                stop(true);
                hide();
            }
        };
        deleteAction.execute();
    }
1104465
private void generateLocations(final Metadata m, final Element e) {
        final GMLGenerator geoRssGenerator = new GMLGenerator();
        for (final Location location : m.getLocations()) {
            final Element locationElement = new Element("location", NS);
            addNotNullAttribute(locationElement, "description", location.getDescription());
            addNotNullAttribute(locationElement, "start", location.getStart());
            addNotNullAttribute(locationElement, "end", location.getEnd());
            if (location.getGeoRss() != null) {
                geoRssGenerator.generate(location.getGeoRss(), locationElement);
            }
            if (locationElement.hasAttributes() || !locationElement.getChildren().isEmpty()) {
                e.addContent(locationElement);
            }
        }
    }