Creates a stub with a label, and adds a condition to it
558457
public StubWithCondition match(String label, Condition... conditions) {
        StubWithCondition swc = new StubWithCondition(stubServer, Condition.composite(conditions));
        swc.stub.withLabel(label);
        return swc;
    }
284212
function createStubRule(message) {

		/**
		 * Creates a fake rule object
		 * @param {object} context context object for each rule
		 * @returns {object} collection of node to listen on
		 */
		function createRuleModule(context) {
			return {
				Program: function(node) {
					context.report(node, message);
				}
			};
		}

		if (message) {
			return createRuleModule;
		} else {
			throw new Error("No message passed to stub rule");
		}
	}
991030
function(doc, def, labelTemplate) {
	return Object.keys(doc)
		.map(key => {
			const field = doc[key]
			const fieldDef = def[key]

			if (!field || (!fieldDef && key != '_id')) {
				return null
			}

			const name = key == '_id' ? 'id' : fieldDef.label
			const template = labelTemplate || '%s'
			const label = util.format(template, name)

			if (typeof field == 'object' && !Array.isArray(field) && key != '_id') {
				return getDocumentOutput(field, fieldDef.schemaType, label + ' (%s)')
			}

			return `${chalk.yellow(label)}: ${field}`

		})
		.filter(line => { return line !== null })
		.join('\n')
}
810
def _check_valid_label(self, label):
        """"""
        if len(label.shape) != 2 or label.shape[1] < 5:
            msg = "Label with shape (1+, 5+) required, %s received." % str(label)
            raise RuntimeError(msg)
        valid_label = np.where(np.logical_and(label[:, 0] >= 0, label[:, 3] > label[:, 1],
                                              label[:, 4] > label[:, 2]))[0]
        if valid_label.size < 1:
            raise RuntimeError('Invalid label occurs.')
629355
def add_stubbed_value(key, value)
      allow(ENV).to receive(:[]).with(key).and_return(value)
      allow(ENV).to receive(:fetch).with(key).and_return(value)
      allow(ENV).to receive(:fetch).with(key, anything) do |_, default_val|
        value || default_val
      end
    end
172972
def add_filter(self, label):
        
        if label not in self.FILTER:
            if "PASS" in self.FILTER:
                self.FILTER = [f for f in self.FILTER if f != "PASS"]
            self.FILTER.append(label)
1362667
public static function appendLabel(&$Label, &$Tag, $labelArgs)
    {
        if ($labelArgs['glue'] != false) {
            /*
             * Use glue (no tabs and line breaks between label, seperator and tag)
             */
            if ($labelArgs['pos'] == 'after') {
                self::call('blank', array(trim($Tag).$labelArgs['sep'].trim($Label)));
            } else {
                self::call('blank', array(trim($Label).$labelArgs['sep'].trim($Tag)));
            }
        } else {
            /*
             * Don't use glue.
             */
            if ($labelArgs['pos'] == 'after') {
                echo $Tag;
                if (!empty($labelArgs['sep'])) {
                    self::call('blank', array($labelArgs['sep']));
                }
                echo $Label;
            } else {
                echo $Label;
                if (!empty($labelArgs['sep'])) {
                    self::call('blank', array($labelArgs['sep']));
                }
                echo $Tag;
            }
        }
    }
1369001
def _label(self, line):
        '''

        '''
        label = self._setup('LABEL', line)
        self.labels += [ label ]
205346
function stub() {
		let args = Array.prototype.slice.call(arguments, 0);
		let str = Array.prototype.join.call(args.map((x) => String(x)), '\t');
		lines.push(str);
	}
674339
def create_label(label_tuple, extra_label=None):
    
    if extra_label is not None:
        return '[' + ' - '.join(label_tuple) + '] ' + str(extra_label)
    else:
        return '[' + ' - '.join(label_tuple) + ']'
512153
public Version append(int number, String label) {
        validateNumber(number);
        return appendNumber(number, label);
    }
1190837
static void validateEntityLabel(EntityType entityType) {
    String label = entityType.getLabel();
    if (label != null) {
      if (label.isEmpty()) {
        throw new MolgenisValidationException(
            new ConstraintViolation(
                format("Label of EntityType [%s] is empty", entityType.getId())));
      } else if (label.trim().equals("")) {
        throw new MolgenisValidationException(
            new ConstraintViolation(
                format("Label of EntityType [%s] contains only white space", entityType.getId())));
      }
    }
  }
374751
private Label createLabel(String label) {
        Pane pane = new Pane();
        root.addChild(pane);
        Label lbl = new Label();
        lbl.setName(label);
        pane.addChild(lbl);
        adjustPanes();
        return lbl;
    }
989994
function LabelAtlas (opts) {
    LabelAtlas.superclass.constructor.call(this, {
        file: opts.charMapFile,
        itemWidth: opts.itemWidth,
        itemHeight: opts.itemHeight,
        itemsToRender: opts.string.length,
        size: new geo.Size(opts.itemWidth * opts.string.length, opts.itemHeight)
    })

    events.addPropertyListener(this, 'string', 'change', this.updateAtlasValue.bind(this))

    this.mapStartChar = opts.startCharMap.charCodeAt(0)
    this.string = opts.string

    this.contentSize = new geo.Size(opts.itemWidth * this.string.length, opts.itemHeight)
}
656456
def label(self, request, tag):
        
        if self.parameter.label:
            tag[self.parameter.label]
        return tag
341369
function (object, label, callback) {

                var labelObject = this.$.dataSource.createEntity(ObjectLabel);

                labelObject.set({
                    object: object,
                    objectType: this.$.dataSource.createEntity(ObjectType, this.getObjectTypeIdForElement(object)),
                    label: label
                });

                labelObject.save(callback);
            }
698053
def add_status_line(self, label):
        
        status_line = StatusBar(label,
                                self._sep_start, self._sep_end,
                                self._fill_char)
        self._lines.append(status_line)
        return status_line