<editor-fold defaultstate="collapsed" desc="Embedding API">
19077
public void init(JavacTask task, String[] args, boolean addTaskListener) {
        env = new Env();
        for (int i = 0; i < args.length; i++) {
            String arg = args[i];
            if (arg.equals(XMSGS_OPTION)) {
                env.messages.setOptions(null);
            } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) {
                env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
            } else if (arg.matches(XIMPLICIT_HEADERS + "[1-6]")) {
                char ch = arg.charAt(arg.length() - 1);
                env.setImplicitHeaders(Character.digit(ch, 10));
            } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
                env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
            } else
                throw new IllegalArgumentException(arg);
        }
        env.init(task);

        checker = new Checker(env);

        if (addTaskListener) {
            final DeclScanner ds = new DeclScanner() {
                @Override
                void visitDecl(Tree tree, Name name) {
                    TreePath p = getCurrentPath();
                    DocCommentTree dc = env.trees.getDocCommentTree(p);

                    checker.scan(dc, p);
                }
            };

            TaskListener tl = new TaskListener() {
                @Override
                public void started(TaskEvent e) {
                    switch (e.getKind()) {
                        case ANALYZE:
                            CompilationUnitTree tree;
                            while ((tree = todo.poll()) != null)
                                ds.scan(tree, null);
                            break;
                    }
                }

                @Override
                public void finished(TaskEvent e) {
                    switch (e.getKind()) {
                        case PARSE:
                            todo.add(e.getCompilationUnit());
                            break;
                    }
                }

                Queue<CompilationUnitTree> todo = new LinkedList<CompilationUnitTree>();
            };

            task.addTaskListener(tl);
        }
    }
39309
function UMLCollaborationView() {
        UMLGeneralNodeView.apply(this, arguments);

        /** @member {UMLTemplateParameterCompartmentView} */
        this.templateParameterCompartment = new UMLTemplateParameterCompartmentView();
        this.templateParameterCompartment.selectable = Core.SK_PROPAGATE;
        this.templateParameterCompartment.parentStyle = true;
        this.addSubView(this.templateParameterCompartment);

        this.fillColor = PreferenceManager.get("uml.collaboration.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
    }
192961
public Embed createEmbed(String url) {
		return getResourceFactory().getApiResource("/embed/")
				.entity(new EmbedCreate(url), MediaType.APPLICATION_JSON_TYPE)
				.post(Embed.class);
	}
752859
static void embedTypeInfo(ErrorCorrectionLevel ecLevel, int maskPattern, ByteMatrix matrix)
      throws WriterException {
    BitArray typeInfoBits = new BitArray();
    makeTypeInfoBits(ecLevel, maskPattern, typeInfoBits);

    for (int i = 0; i < typeInfoBits.getSize(); ++i) {
      // Place bits in LSB to MSB order.  LSB (least significant bit) is the last value in
      // "typeInfoBits".
      boolean bit = typeInfoBits.get(typeInfoBits.getSize() - 1 - i);

      // Type info bits at the left top corner. See 8.9 of JISX0510:2004 (p.46).
      int[] coordinates = TYPE_INFO_COORDINATES[i];
      int x1 = coordinates[0];
      int y1 = coordinates[1];
      matrix.set(x1, y1, bit);

      if (i < 8) {
        // Right top corner.
        int x2 = matrix.getWidth() - i - 1;
        int y2 = 8;
        matrix.set(x2, y2, bit);
      } else {
        // Left bottom corner.
        int x2 = 8;
        int y2 = matrix.getHeight() - 7 + (i - 8);
        matrix.set(x2, y2, bit);
      }
    }
  }
691303
function generateEmbed(config, file) {
  const targetPath = path.join(config.destDir, path.relative(config.src, file));
  const document = parseDocument(file);
  const sampleSections = document.sections.filter(
    s => s.inBody && !s.isEmptyCodeSection()
  );
  sampleSections.forEach((section, index) => {
    highlight(section.codeSnippet()).then(code => {
      const tag = section.doc ? slug(section.doc.toLowerCase()) : index;
      const context = {
        sample: {
          file: path.basename(targetPath),
          preview: addFlag(targetPath, tag, 'preview'),
          embed: addFlag(targetPath, tag, 'embed'),
          template: addFlag(targetPath, tag, 'template'),
          body: section.code,
          code: code,
        },
        config: config,
        document: document,
      };
      generate(context.sample.preview, templates.preview, context, /* minify */ true);
      generate(context.sample.embed, templates.embed, context, /* minify */ true);
      generateTemplate(context);
    });
  });
}
157464
def embed(**kwargs):
    
    config = kwargs.get('config')
    header = kwargs.pop('header', u'')
    compile_flags = kwargs.pop('compile_flags', None)
    if config is None:
        config = load_default_config()
        config.InteractiveShellEmbed = config.TerminalInteractiveShell
        kwargs['config'] = config
    shell = InteractiveShellEmbed.instance(**kwargs)
    initialize_extensions(shell, config['InteractiveShellApp']['extensions'])
    shell(header=header, stack_depth=2, compile_flags=compile_flags)
1293795
async function saveEmbedData(opts, pluginOptions) {
  const { regex } = pluginOptions
  let options = extend({}, opts)

  if (isAnchorTagApplied(options, { regex })) {
    await stringReplaceAsync(
      options.result,
      anchorRegex,
      async (match, url, index) => {
        if (!isMatchPresent(regex, match, true)) return match
        saveServiceName(options, pluginOptions, match)
        options = await pushEmbedContent(url, options, pluginOptions, index)
        return match
      }
    )
  } else {
    options = pushEmbedContent(options.result, options, pluginOptions)
  }

  return options
}
1373721
private void readEmbeddable(Object key, List<String> columnsToSelect, EntityMetadata entityMetadata,
            MetamodelImpl metamodel, Table schemaTable, RecordValue value, Attribute attribute)
    {
        EmbeddableType embeddableId = metamodel.embeddable(((AbstractAttribute) attribute).getBindableJavaType());
        Set<Attribute> embeddedAttributes = embeddableId.getAttributes();

        for (Attribute embeddedAttrib : embeddedAttributes)
        {
            String columnName = ((AbstractAttribute) embeddedAttrib).getJPAColumnName();
            Object embeddedColumn = PropertyAccessorHelper.getObject(key, (Field) embeddedAttrib.getJavaMember());

            // either null or empty or contains that column
            if (eligibleToFetch(columnsToSelect, columnName))
            {
                NoSqlDBUtils.add(schemaTable.getField(columnName), value, embeddedColumn, columnName);
            }
        }
    }
582814
private static void removeEmbed(FramingContext state, String id) {
        // get existing embed
        final Map<String, EmbedNode> links = state.uniqueEmbeds;
        final EmbedNode embed = links.get(id);
        final Object parent = embed.parent;
        final String property = embed.property;

        // create reference to replace embed
        final Map<String, Object> node = newMap(JsonLdConsts.ID, id);

        // remove existing embed
        if (JsonLdUtils.isNode(parent)) {
            // replace subject with reference
            final List<Object> newvals = new ArrayList<Object>();
            final List<Object> oldvals = (List<Object>) ((Map<String, Object>) parent)
                    .get(property);
            for (final Object v : oldvals) {
                if (v instanceof Map
                        && Obj.equals(((Map<String, Object>) v).get(JsonLdConsts.ID), id)) {
                    newvals.add(node);
                } else {
                    newvals.add(v);
                }
            }
            ((Map<String, Object>) parent).put(property, newvals);
        }
        // recursively remove dependent dangling embeds
        removeDependents(links, id);
    }
1347116
def embed_transformer
      lambda do |env|
        node      = env[:node]
        node_name = env[:node_name]

        # We're fine with a bunch of stuff -- but not <iframe> and <embed> tags.
        return if env[:is_whitelisted] || !env[:node].element?
        return unless %w[iframe embed].include? env[:node_name]

        # We're dealing with an <iframe> or <embed> tag! Let's check its src attribute.
        # If its host name matches our regular expression, we can whitelist it.
        uri = URI(env[:node]['src'])
        return unless uri.host =~ allowed_iframe_hosts

        Sanitize.clean_node!(node, {
          elements: %w[iframe embed],
          attributes: {
            all: %w[allowfullscreen frameborder height src width]
          }
        })

        { node_whitelist: [node] }
      end
    end
119886
private static void encodeTabLinks(FacesContext context, ResponseWriter writer, TabView tabView,
			int currentlyActiveIndex, List<UIComponent> tabs, String clientId, String hiddenInputFieldID)
			throws IOException {
		writer.startElement("ul", tabView);
		writer.writeAttribute("id", clientId, "id");
		Tooltip.generateTooltip(context, tabView, writer);
		String classes = "nav ";
		if ("left".equalsIgnoreCase(tabView.getTabPosition()) || "right".equalsIgnoreCase(tabView.getTabPosition())) {
			classes += " nav-pills nav-stacked";
		} else {
			classes = classes + (tabView.isPills() ? " nav-pills" : " nav-tabs");
		}

		if (tabView.getStyleClass() != null) {
			classes += " ";
			classes += tabView.getStyleClass();
		}

		writer.writeAttribute("class", classes, "class");

		String role = "tablist";
		AJAXRenderer.generateBootsFacesAJAXAndJavaScript(context, tabView, writer, false);
		R.encodeHTML4DHTMLAttrs(writer, tabView.getAttributes(), new String[] { "style" });
		if (tabView.getRole() != null) {
			role = tabView.getRole();
		}

		writer.writeAttribute("role", role, "role");

		encodeTabs(context, writer, tabs, currentlyActiveIndex, hiddenInputFieldID, tabView.isDisabled());
		writer.endElement("ul");
	}
1210754
@Override
	public void encodeBegin(FacesContext context) throws IOException {

		// Initialize attributes
		this.useRandomParam = (String) getAttributes().get("useRandomParam");

		String src = (String) getAttributes().get("src");

		ResponseWriter writer = context.getResponseWriter();
		HttpServletRequest request = ((HttpServletRequest) context.getExternalContext().getRequest());

		ResourceBundlesHandler bundler = getResourceBundlesHandler(context);

		// src is mandatory
		if (null == src)
			throw new IllegalStateException("The src attribute is mandatory for this Jawr tag. ");

		// Refresh the config if needed
		if (RendererRequestUtils.refreshConfigIfNeeded(request, bundler.getConfig())) {
			bundler = getResourceBundlesHandler(context);
		}

		// Get an instance of the renderer.
		if (null == this.renderer || !this.renderer.getBundler().getConfig().isValid())
			this.renderer = createRenderer(context);

		RendererRequestUtils.setRequestDebuggable(request, renderer.getBundler().getConfig());
		try {
			BundleRendererContext ctx = RendererRequestUtils.getBundleRendererContext(request, renderer);
			renderer.renderBundleLinks(src, ctx, writer);
		} finally {
			// Reset the Thread local for the Jawr context
			ThreadLocalJawrContext.reset();
		}
		super.encodeBegin(context);

	}
198752
private static void populateEmbeddedIdFields(Set<Attribute> embeddedAttributes, MetamodelImpl metaModel,
            Set<String> embeddedIdFields)
    {
        for (Attribute attribute : embeddedAttributes)
        {
            if (!ReflectUtils.isTransientOrStatic((Field) attribute.getJavaMember()))
            {
                if (metaModel.isEmbeddable(attribute.getJavaType()))
                {
                    EmbeddableType embeddable = metaModel.embeddable(attribute.getJavaType());
                    populateEmbeddedIdFieldsUtil(embeddable.getAttributes(), metaModel, embeddedIdFields);
                }
            }
        }
    }
545441
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
	    if (!component.isRendered()) {
	        return;
	    }
		Video video = (Video) component;
		ResponseWriter rw = context.getResponseWriter();
		String clientId = video.getClientId();
		boolean idHasBeenRendered=false;
		rw.startElement("div", video);
		String responsiveStyle = Responsive.getResponsiveStyleClass(video, false);
		if (null != responsiveStyle && responsiveStyle.trim().length()>0) {
			rw.writeAttribute("class", responsiveStyle, null);
			rw.writeAttribute("id", clientId, null);
			idHasBeenRendered=true;
		}
	
		rw.startElement("video", video);
		Tooltip.generateTooltip(context, video, rw);
		rw.writeAttribute("src", video.getSrc(), null);
		rw.writeAttribute("autoplay", video.isAutoplay(), null);
		rw.writeAttribute("controls", video.isControls(), null);
		rw.writeAttribute("loop", video.isLoop(), null);
		String videoId = clientId;
		if (idHasBeenRendered) {
			videoId = clientId + "_video";
		}
		rw.writeAttribute("id", videoId, null);
		String style = video.getStyle();
		if (null != style) {
			rw.writeAttribute("style", style, null);
		}
		String styleClass = video.getStyleClass();
		if (null == styleClass)
			styleClass = "";
		else
			styleClass = " " + styleClass;
		
		Tooltip.generateTooltip(context, video, rw);

		rw.writeAttribute("class", styleClass, "class");
		
		// Render Ajax Capabilities
		AJAXRenderer.generateBootsFacesAJAXAndJavaScript(FacesContext.getCurrentInstance(), video, rw, false);
	
		rw.endElement("video");
		if (null != responsiveStyle && responsiveStyle.trim().length()>0) {
			rw.endElement("div");
		}		
		Tooltip.activateTooltips(context, video, videoId);	
	}
734598
@Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        PuiButton button = (PuiButton) component;
        writer.startElement("pui-button", component);
        String actionListener = button.getActionListener();
        if ((null != actionListener) && (!actionListener.contains("("))) {
            actionListener += "()";
        }
        renderNonEmptyAttribute(writer, "actionListener", actionListener);
        renderNonEmptyAttribute(writer, "disabled", button.getDisabled());
        renderNonEmptyAttribute(writer, "icon", button.getIcon());
        renderNonEmptyAttribute(writer, "iconPos", button.getIconPos());
        renderNonEmptyAttribute(writer, "value", button.getValue());
        writer.endElement("pui-button");
    }
785363
private static JsonElement getJsonObject(Field[] declaredFields, EmbeddableType embeddableType,
            Object embeddedObject)
    {
        JsonObject jsonObject = new JsonObject();
        for (Field field : declaredFields)
        {

            if (!ReflectUtils.isTransientOrStatic(field)
                    && !embeddableType.getAttribute(field.getName()).isAssociation())
            {
                Object valueObject = PropertyAccessorHelper.getObject(embeddedObject, field);
                jsonObject.add(((AbstractAttribute) (embeddableType.getAttribute(field.getName()))).getJPAColumnName(),
                        getJsonPrimitive(valueObject, embeddableType.getAttribute(field.getName()).getJavaType()));
            }
        }
        return jsonObject;
    }
698353
private Set<String> getColumnsOfEmbeddableAndComputeEmbeddableNullness(String embeddable) {
		Set<String> columnsOfEmbeddable = new HashSet<String>();
		boolean hasOnlyNullColumns = true;

		for ( String selectableColumn : columns ) {
			if ( !isColumnPartOfEmbeddable( embeddable, selectableColumn ) ) {
				continue;
			}

			columnsOfEmbeddable.add( selectableColumn );

			if ( hasOnlyNullColumns && tuple.get( selectableColumn ) != null ) {
				hasOnlyNullColumns = false;
			}
		}

		if ( hasOnlyNullColumns ) {
			nullEmbeddables.add( embeddable );
		}

		return columnsOfEmbeddable;
	}