Called when 'link' is not defined in the settings
324585
def build_default_link(self):
        ''''''
        attrs = {}
        attrs["rel"] = "stylesheet"
        attrs["href"] ="{}?{:x}".format(
            os.path.join(settings.STATIC_URL, self.filepath).replace(os.path.sep, '/'),
            self.version_id,
        )
        attrs.update(self.options['link_attrs'])
        attrs["data-context"] = self.provider_run.uid       # can't be overridden
        return '<link{} />'.format(flatatt(attrs))
856954
function (defaultSettings) {
        var baseUrl, suffix;

        baseUrl = defaultSettings.base_url;
        if (baseUrl) {
          this.baseURL = new URI(this.documentBaseURL).toAbsolute(baseUrl.replace(/\/+$/, ''));
          this.baseURI = new URI(this.baseURL);
        }

        suffix = defaultSettings.suffix;
        if (defaultSettings.suffix) {
          this.suffix = suffix;
        }

        this.defaultSettings = defaultSettings;

        var pluginBaseUrls = defaultSettings.plugin_base_urls;
        for (var name in pluginBaseUrls) {
          AddOnManager.PluginManager.urls[name] = pluginBaseUrls[name];
        }
      }
792878
function(exists, linkString, callback) {
      if (exists) {
        return callback(null, symlink);
      }
      fs.symlink(linkString, _toFile, function(err) {
        callback(err, symlink);
      });
    }
1191066
def _update_current(self):
        
        if not self.current or self.current not in self.prefixes:
            if 'default' in self.prefixes:
                selected_current = 'default'
            elif self.prefixes:
                selected_current = sorted(self.prefixes.keys()).pop()
            else:
                # should never get here
                raise MalformedWorkdir(
                    'No current link and no prefixes in workdir %s' % self.path
                )

            logging.info(
                'Missing current link, setting it to %s',
                selected_current,
            )
            self._set_current(selected_current)
607873
private function attachAgent(): void
    {
        $this->agentName = strtolower((string) $this->config['agent']);
        switch ($this->agentName) {
            case self::AGENT_MYSQL:
                $this->agent = new Mysql($this->config);
                break;
            case self::AGENT_PGSQL:
                $this->agent = new Pgsql($this->config);
                break;
            default:
                throw new LinkException("Sorry, but '{$this->agentName}' agent not implemented!");
        }
    }
94365
def link(self, link, title, text):
        
        if self.anonymous_references:
            underscore = '__'
        else:
            underscore = '_'
        if title:
            return self._raw_html(
                '<a href="{link}" title="{title}">{text}</a>'.format(
                    link=link, title=title, text=text
                )
            )
        if not self.parse_relative_links:
            return '\ `{text} <{target}>`{underscore}\ '.format(
                target=link,
                text=text,
                underscore=underscore
            )
        else:
            url_info = urlparse(link)
            if url_info.scheme:
                return '\ `{text} <{target}>`{underscore}\ '.format(
                    target=link,
                    text=text,
                    underscore=underscore
                )
            else:
                link_type = 'doc'
                anchor = url_info.fragment
                if url_info.fragment:
                    if url_info.path:
                        # Can't link to anchors via doc directive.
                        anchor = ''
                    else:
                        # Example: [text](#anchor)
                        link_type = 'ref'
                doc_link = '{doc_name}{anchor}'.format(
                    # splittext approach works whether or not path is set. It
                    # will return an empty string if unset, which leads to
                    # anchor only ref.
                    doc_name=os.path.splitext(url_info.path)[0],
                    anchor=anchor
                )
                return '\ :{link_type}:`{text} <{doc_link}>`\ '.format(
                    link_type=link_type,
                    doc_link=doc_link,
                    text=text
                )
868201
def method_missing(m, *args, &block)
      if m.to_s.end_with?("_url") || m.to_s.end_with?("_path")
        "/"
      else
        super
      end
    end
457138
public void setLink(Link link) {
		setHref(link.getHref());
		setHrefAbsolute(link.getHrefAbsolute());
		HttpParameters linkParams = link.getParams();
		if(linkParams != null) {
			for(Map.Entry<String,List<String>> entry : linkParams.getParameterMap().entrySet()) {
				String paramName = entry.getKey();
				for(String paramValue : entry.getValue()) {
					addParam(paramName, paramValue);
				}
			}
		}
		this.addLastModified = link.getAddLastModified();
		setHreflang(link.getHreflang());
		setRel(link.getRel());
		setType(link.getType());
		setMedia(link.getMedia());
		setTitle(link.getTitle());
	}
1014862
public void link(Name name, File file) {
    DirectoryEntry entry = new DirectoryEntry(this, checkNotReserved(name, "link"), file);
    put(entry);
    file.linked(entry);
  }
211921
function Link(fromId, toId, data, id) {
  this.fromId = fromId;
  this.toId = toId;
  this.data = data;
  this.id = id;
}
124039
def enable_all_links():
    """"""
    for link in client.list_data_links(instance='simulator'):
        client.enable_data_link(instance=link.instance, link=link.name)
452777
private void applySettings() {
		linkContainer.reset();
		WLink exampleLink = new WLink();
		exampleLink.setText(tfLinkLabel.getText());
		final String url = tfUrlField.getValue();

		if ("".equals(url) || !isValidUrl(url)) {
			tfUrlField.setText(URL);
			exampleLink.setUrl(URL);
		} else {
			exampleLink.setUrl(url);
		}

		exampleLink.setRenderAsButton(cbRenderAsButton.isSelected());

		exampleLink.setText(tfLinkLabel.getText());

		if (cbSetImage.isSelected()) {
			WImage linkImage = new WImage("/image/attachment.png", "Add attachment");
			exampleLink.setImage(linkImage.getImage());
			exampleLink.setImagePosition((ImagePosition) ddImagePosition.getSelected());
		}

		exampleLink.setDisabled(cbDisabled.isSelected());

		if (tfAccesskey.getText() != null && tfAccesskey.getText().length() > 0) {
			exampleLink.setAccessKey(tfAccesskey.getText().toCharArray()[0]);
		}
		if (cbOpenNew.isSelected()) {
			exampleLink.setOpenNewWindow(true);
			exampleLink.setTargetWindowName("_blank");
		} else {
			exampleLink.setOpenNewWindow(false);
		}

		linkContainer.add(exampleLink);
	}
290975
def click_link(self, link_text, timeout=settings.SMALL_TIMEOUT):
        
        self.click_link_text(link_text, timeout=timeout)
473557
def method_missing(m, *args)
      # the method href would have been defined while initializing the object
      client.send(:do_post, [ href, m.to_s ].join('/'), *args)
    end
766376
function checkBrokenLinks(docs, apis, options) {
  var byFullId = Object.create(null);

  docs.forEach(function(doc) {
    byFullId[doc.section + '/' + doc.id] = doc;
    if (apis[doc.section]) {
      doc.anchors.push('directive', 'service', 'filter', 'function');
    }
  });

  docs.forEach(function(doc) {
    doc.links.forEach(function(link) {
      if (options && !options.html5Mode) {
        link = link.substring(2);
      }
      // convert #id to path#id
      if (link[0] == '#') {
        link = doc.section + '/' + doc.id.split('#').shift() + link;
      }

      var parts = link.split('#');
      var pageLink = parts[0];
      var anchorLink = parts[1];
      var linkedPage = byFullId[pageLink];

      if (!linkedPage) {
        console.log('WARNING: ' + doc.section + '/' + doc.id + ' (defined in ' + doc.file + ') points to a non existing page "' + link + '"!');
      } else if (anchorLink && linkedPage.anchors.indexOf(anchorLink) === -1) {
        console.log('WARNING: ' + doc.section + '/' + doc.id + ' (defined in ' + doc.file + ') points to a non existing anchor "' + link + '"!');
      }
    });
  });
}
944883
def add_link(self, link):
        
        if isinstance(link, link_module.Link):
            self.links.append(link)
        else:
            raise TypeError("Type Error: received {}, but requires Link.".
                            format(type(link).__name__))
679810
def add_link(self, **kwgs):
        
        self.links.append(kwgs)
        if kwgs.get('type') == 'text/javascript':
            if 'scripted' not in self.properties:
                self.properties.append('scripted')