Adds a short to the code.
545897
public void addShort(int offset, int value)
  {
    insertCode(offset, 2);
    
    _code.set(offset + 0, value >> 8);
    _code.set(offset + 1, value);
  }
21855
public function setShort($short)
    {
        if (!(is_null($short) || preg_match("/^[a-zA-Z0-9?!§$%#]$/", $short))) {
            throw new \InvalidArgumentException(sprintf(
                'Short option must be null or one of [a-zA-Z0-9?!§$%%#], found \'%s\'',
                $short
            ));
        }
        $this->short = $short;
        return $this;
    }
1083507
public void put(String key, Short value) {
		if (this.compiledStatement != null) {
			if (value==null) {
				this.compiledStatement.bindNull(compiledStatementBindIndex++);				
			} else {				
				compiledStatement.bindLong(compiledStatementBindIndex++, (short) value);
			}
		} else if (values != null) {
			values.put(key, value);
			return;
		}

		names.add(key);
		// values.put(key, value);
		args.add(value);
		valueType.add(ParamType.SHORT);
	}
1021011
public function add_shortcode( $tag, $mvc_call, $mvc_args = null )
	{
		$this->shortcodes[] = [
			'tag'		=> $tag,
			'mvc'		=> $mvc_call,
			'mvc_args'	=> $mvc_args,
		];
	}
1246880
def add_var_opt(self, opt, short=False):
    
    if opt not in self.__var_opts:
      self.__var_opts.append(opt)
      macro = self.__bad_macro_chars.sub( r'', opt )
      if short:
        self.add_short_opt(opt,'$(macro' + macro + ')')
      else:
        self.add_opt(opt,'$(macro' + macro + ')')
425910
private void writeShortArrayTagPayload(ShortArrayTag tag) throws IOException {
        short[] shorts = tag.getValue();
        os.writeInt(shorts.length);
        for (int i = 0; i < shorts.length; i++) {
            os.writeShort(shorts[i]);
        }
    }
615891
def _add(self, codeobj):
        """"""
        assert isinstance(codeobj, CodeExpression.TYPES)
        self.value = codeobj
1225112
public int writeShort(OutputStream dest, int id, Object obj) throws IOException {
        int idx;

        idx = addIfNew(id, obj);
        if (idx >>> 8 != 0) {
            throw new RuntimeException("idx not short " + idx);
        }
        IO.writeU1(dest, idx);
        return idx;
    }
1032170
public void insert_us(final short[] argin, final int dim_x, final int dim_y) {
	attrval.r_dim.dim_x = dim_x;
	attrval.r_dim.dim_y = dim_y;
	DevVarUShortArrayHelper.insert(attrval.value, argin);
    }
196507
public void add(int offset, byte []buffer, int bufOffset, int length)
  {
    insertCode(offset, length);
    
    _code.set(offset, buffer, bufOffset, length);
  }
1304471
public JBBPTextWriter Short(final short[] values, int off, int len) throws IOException {
    while (len-- > 0) {
      this.Short(values[off++]);
    }
    return this;
  }
194894
public short read_short() throws OtpErlangDecodeException {
        final long l = this.read_long(false);
        final short i = (short) l;

        if (l != i) {
            throw new OtpErlangDecodeException("Value does not fit in short: "
                    + l);
        }

        return i;
    }
501439
public static void putShortBE(final byte[] array, final int offset, final short value) {
    array[offset + 1] = (byte) (value       );
    array[offset    ] = (byte) (value >>>  8);
  }
521382
function short(str, max)
			{
				if (str.length > max)
				{
					str = str.substring(0, Math.round(max / 2)) + '...' +
						str.substring(str.length - Math.round(max / 4));
				}
				
				return str;
			}
945223
public function registerShortcodes()
    {

        if (!function_exists('add_shortcode')) {
            return;
        }

        $this->shortcodes->rewind();
        while ($this->shortcodes->valid()) {

            $shortcode = $this->shortcodes->current();
            add_shortcode($shortcode->getName(), array($shortcode, 'getCallback'));
            $this->shortcodes->next();

        }

    }
601407
public static int writeShorts(final BitOutput bitOutput, final int lengthSize, final int shortSize,
                                  final short[] value)
            throws IOException {
        if (bitOutput == null) {
            throw new NullPointerException("bitOutput is null");
        }
        requireValidSizeInt(true, lengthSize);
        requireValidSizeShort(false, shortSize);
        if (value == null) {
            throw new NullPointerException("value is null");
        }
        final int length = value.length & ((1 << lengthSize) - 1);
        bitOutput.writeInt(true, lengthSize, length);
        for (int i = 0; i < length; i++) {
            bitOutput.writeShort(false, shortSize, value[i]);
        }
        return length;
    }
1369852
public function setShort($short)
    {
        $short = (string) $short;
        $this->short = function_exists('mb_substr')
            ? mb_substr($short, 0, 1)
            : substr($short, 0, 1)
        ;
        return $this;
    }