icon ( or generic html if icon not available )
2336
private String getSingleSlotHtml(TestSlot s, String icon) {
    StringBuilder builder = new StringBuilder();
    TestSession session = s.getSession();
    if (icon != null) {
      builder.append("<img ");
      builder.append("src='").append(icon).append("' width='16' height='16'");
    } else {
      builder.append("<a href='#' ");
    }

    if (session != null) {
      builder.append(" class='busy' ");
      builder.append(" title='").append(session.get("lastCommand")).append("' ");
    } else {
      builder.append(" title='").append(s.getCapabilities()).append("'");
    }

    if (icon != null) {
      builder.append(" />\n");
    } else {
      builder.append(">");
      builder.append(s.getCapabilities().get(CapabilityType.BROWSER_NAME));
      builder.append("</a>");
    }
    return builder.toString();
  }
944856
def render_icon(icon_class, options = {})
      options = {style: 'solid'}.merge(options)
      classes = [
        "icon fa-fw",
        "fa-#{icon_class}",
        "fa#{options[:style].first}",
        options[:size] ? "fa-#{options[:size]}" : nil,
        options[:transform] ? "fa-#{options[:transform]}" : nil,
        options[:class]
      ].compact
      content_tag('i', nil, class: classes)
    end
1256989
function updateIcon(data){
    if(data.data.items && data.data.items.length > 0){
        icon.contentURL = self.data.url("icon-16.png");
    }else{
        icon.contentURL = self.data.url("icon-16-gray.png");
    }
}
818827
def download_icon_font(icon_font, directory):
    """"""
    try:
        downloader = AVAILABLE_ICON_FONTS[icon_font]['downloader'](directory)
        downloader.download_files()
        return downloader
    except KeyError:  # pragma: no cover
        raise Exception("We don't support downloading font '{name}'".format(
            name=icon_font)
        )
1282661
def icon_url_as(self, *, format='webp', size=1024):
        """"""
        return Asset._from_guild_image(self._state, self.id, self.icon, 'icons', format=format, size=size)
756419
function loadByID(id) {
    var iconConfig = config[id];
    return loadByURL(iconConfig.url).then(function(icon) {
      return new Icon(icon, iconConfig);
    });
  }
118833
function loadFromIconSet(id) {
    var setName = id.substring(0, id.lastIndexOf(':')) || '$default';
    var iconSetConfig = config[setName];

    return !iconSetConfig ? announceIdNotFound(id) : loadByURL(iconSetConfig.url).then(extractFromSet);

    function extractFromSet(set) {
      var iconName = id.slice(id.lastIndexOf(':') + 1);
      var icon = set.querySelector('#' + iconName);
      return icon ? new Icon(icon, iconSetConfig) : announceIdNotFound(id);
    }

    function announceIdNotFound(id) {
      var msg = 'icon ' + id + ' not found';
      $log.warn(msg);

      return $q.reject(msg || id);
    }
  }
657517
function (icon) {
            var iconParts = icon.split(":");
            if (iconParts.length !== 2) {
                this.$logError(this.ICON_BADLY_FORMATTED, [icon]);
                return null;
            } else {
                var iconInfo = aria.widgets.AriaSkinInterface.getIcon(iconParts[0], iconParts[1]);
                if (!iconInfo) {
                    this.$logError(this.ICON_NOT_FOUND, [icon]);
                    return null;
                }
                return iconInfo;
            }
        }
665854
function maybeCopyIcons(options, appPath, callback) {
  if (!options.icon) {
    callback();
    return;
  }

  if (options.platform === 'darwin' || options.platform === 'mas') {
    callback();
    return;
  }

  // windows & linux
  // put the icon file into the app
  const destIconPath = path.join(appPath, 'resources/app');
  const destFileName = `icon${path.extname(options.icon)}`;
  copy(options.icon, path.join(destIconPath, destFileName), (error) => {
    callback(error);
  });
}
1339938
def get_icon_url(self, icon):
        
        if not icon.startswith('/') \
                and not icon.startswith('http://') \
                and not icon.startswith('https://'):
            if '/' in icon:
                return self.icon_static_root + icon
            else:
                return self.icon_theme_root + icon
        else:
            return icon
820632
def _use_html_if_available(format_fn):
        """"""
        def format_using_as_html(v, label=False):
            if not label and hasattr(v, 'as_html'):
                return v.as_html()
            else:
                return format_fn(v, label)
        return format_using_as_html
597753
def icon(self):
        
        if isinstance(self._icon, str):
            if QtGui.QIcon.hasThemeIcon(self._icon):
                return QtGui.QIcon.fromTheme(self._icon)
            else:
                return QtGui.QIcon(self._icon)
        elif isinstance(self._icon, tuple):
            return QtGui.QIcon.fromTheme(self._icon[0],
                                         QtGui.QIcon(self._icon[1]))
        elif isinstance(self._icon, QtGui.QIcon):
            return self._icon
        return QtGui.QIcon()
116817
function () {
            var param = {
                width : 0,
                activeIconIndex : 0
            }, oSelf = this;
            ariaUtilsArray.forEach(this._iconsLeft, function (value) {
                oSelf._computeIconSize(value, param);
            });
            ariaUtilsArray.forEach(this._iconsRight, function (value) {
                oSelf._computeIconSize(value, param);
            });
            this._iconsWidth = param.width;
        }
351983
@NonNull
    public IconicsDrawable icon(@NonNull Character icon, @Nullable Typeface typeface) {
        return iconText(icon.toString(), typeface);
    }
1227302
function _icon() {
  if (cache) { return cache }
  try {
    fs.accessSync(path.resolve(options.success))
    return cache = options.success;
  } catch(e){
    return cache = 'https://i.imgur.com/G6fTWAs.png';
  }
}
89622
function iconLookup(filename) {
  var ext = extname(filename);

  // try by extension
  if (icons[ext]) {
    return {
      className: 'icon-' + ext.substring(1),
      fileName: icons[ext]
    };
  }

  var mimetype = mime.lookup(ext);

  // default if no mime type
  if (mimetype === false) {
    return {
      className: 'icon-default',
      fileName: icons.default
    };
  }

  // try by mime type
  if (icons[mimetype]) {
    return {
      className: 'icon-' + mimetype.replace('/', '-'),
      fileName: icons[mimetype]
    };
  }

  var suffix = mimetype.split('+')[1];

  if (suffix && icons['+' + suffix]) {
    return {
      className: 'icon-' + suffix,
      fileName: icons['+' + suffix]
    };
  }

  var type = mimetype.split('/')[0];

  // try by type only
  if (icons[type]) {
    return {
      className: 'icon-' + type,
      fileName: icons[type]
    };
  }

  return {
    className: 'icon-default',
    fileName: icons.default
  };
}
36496
function loadByURL(url) {
    /* Load the icon from embedded data URL. */
    function loadByDataUrl(url) {
      var results = dataUrlRegex.exec(url);
      var isBase64 = /base64/i.test(url);
      var data = isBase64 ? window.atob(results[2]) : results[2];

      return $q.when(angular.element(data)[0]);
    }

    /* Load the icon by URL using HTTP. */
    function loadByHttpUrl(url) {
      return $q(function(resolve, reject) {
        // Catch HTTP or generic errors not related to incorrect icon IDs.
        var announceAndReject = function(err) {
            var msg = angular.isString(err) ? err : (err.message || err.data || err.statusText);
            $log.warn(msg);
            reject(err);
          },
          extractSvg = function(response) {
            if (!svgCache[url]) {
              svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');
            }
            resolve(svgCache[url]);
          };

        $templateRequest(url, true).then(extractSvg, announceAndReject);
      });
    }

    return dataUrlRegex.test(url)
      ? loadByDataUrl(url)
      : loadByHttpUrl(url);
  }