This defines the short output which is basically what you would write in ruby
 ie [ value1 , value2 , ...]
 The short is used for 7 or less SimpleNodes
487927
def short_out(io,level)
      io.write("[")
      @children.each_with_index do |child , i|
        child.out(io , level + 1 )
        io.write ", " unless (i+1) == @children.length
      end
      io.write("]")
    end
320045
def output_value_to_column_value(v)
      if v.kind_of?(Array)
        if v.length == 0
          nil
        elsif v.length == 1
          v.first
        elsif v.first.kind_of?(String)
          v.join(@internal_delimiter)
        else
          # Not a string? Um, raise for now?
          raise ArgumentError.new("Traject::SequelWriter, multiple non-String values provided: #{v}")
        end
      else
        v
      end
    end
1103306
def _get_full_output(node, for_output=False):
    '''
    
    '''
    ret = {}
    for item in six.iterkeys(node):
        value = node[item]
        if value is not None and for_output:
            value = six.text_type(value)
        ret[item] = value
    return ret
831498
def write_short_at(self, n, pos, pack_into=Struct('>H').pack_into):
        '''
        
        '''
        if 0 <= n <= 0xFFFF:
            pack_into(self._output_buffer, pos, n)
        else:
            raise ValueError('Short %d out of range 0..0xFFFF', n)
        return self
112204
public short[] getShorts(int rowId, int count) {
    short[] res = new short[count];
    for (int i = 0; i < count; i++) {
      res[i] = getShort(rowId + i);
    }
    return res;
  }
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]);
        }
    }
1201447
def to_string_short(self):
        
        opt = np.get_printoptions()
        np.set_printoptions(threshold=8, edgeitems=3, linewidth=opt['linewidth']-len(self.uniquetwig)-2)
        str_ = super(FloatArrayParameter, self).to_string_short()
        np.set_printoptions(**opt)
        return str_
377579
function put_short(w) {
		w &= 0xffff;
		if (outoff + outcnt < OUTBUFSIZ - 2) {
			outbuf[outoff + outcnt++] = (w & 0xff);
			outbuf[outoff + outcnt++] = (w >>> 8);
		} else {
			put_byte(w & 0xff);
			put_byte(w >>> 8);
		}
	}
279948
function writeNode(state, level, object, block, compact, iskey) {
  state.tag = null;
  state.dump = object;

  if (!detectType(state, object, false)) {
    detectType(state, object, true);
  }

  var type = _toString.call(state.dump);

  if (block) {
    block = (state.flowLevel < 0 || state.flowLevel > level);
  }

  var objectOrArray = type === '[object Object]' || type === '[object Array]',
      duplicateIndex,
      duplicate;

  if (objectOrArray) {
    duplicateIndex = state.duplicates.indexOf(object);
    duplicate = duplicateIndex !== -1;
  }

  if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
    compact = false;
  }

  if (duplicate && state.usedDuplicates[duplicateIndex]) {
    state.dump = '*ref_' + duplicateIndex;
  } else {
    if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
      state.usedDuplicates[duplicateIndex] = true;
    }
    if (type === '[object Object]') {
      if (block && (Object.keys(state.dump).length !== 0)) {
        writeBlockMapping(state, level, state.dump, compact);
        if (duplicate) {
          state.dump = '&ref_' + duplicateIndex + state.dump;
        }
      } else {
        writeFlowMapping(state, level, state.dump);
        if (duplicate) {
          state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
        }
      }
    } else if (type === '[object Array]') {
      var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level;
      if (block && (state.dump.length !== 0)) {
        writeBlockSequence(state, arrayLevel, state.dump, compact);
        if (duplicate) {
          state.dump = '&ref_' + duplicateIndex + state.dump;
        }
      } else {
        writeFlowSequence(state, arrayLevel, state.dump);
        if (duplicate) {
          state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
        }
      }
    } else if (type === '[object String]') {
      if (state.tag !== '?') {
        writeScalar(state, state.dump, level, iskey);
      }
    } else {
      if (state.skipInvalid) return false;
      throw new YAMLException('unacceptable kind of an object to dump ' + type);
    }

    if (state.tag !== null && state.tag !== '?') {
      state.dump = '!<' + state.tag + '> ' + state.dump;
    }
  }

  return true;
}
532708
function short(nodes, context, recur, wrap) {
    context.write(WRAPPERS[wrap].left);
    context.indentIn();
    context.write('\n');

    for (var i = 0; i < nodes.length; i++) {
        context.write(context.getIndent());
        recur(nodes[i]);

        if (nodes[i + 1]) {
            context.write(',\n');}}



    context.indentOut();
    context.write('\n', context.getIndent(), WRAPPERS[wrap].right);}
451877
def to_s
			out = ""
			out << banner << "\n"
			
			@order.each {|option|
				if (option.nil?)
					out << "\n"
					next
				end
				
        line = sprintf("-%-2s --%-#{longest+6}s  ",
                       option.short_name,
                       option.long_name + (option.flag ? "" : " [VAL]"))

        out << line
        if (line.length + option.description.length <= 80)
          out << option.description
        else
          rem = 80 - line.length
          desc = option.description
          i = 0
          while (i < desc.length)
            out << "\n" if i > 0
            j = [i + rem, desc.length].min
            while desc[j..j] =~ /[\w\d]/
              j -= 1
            end
            chunk = desc[i..j].strip
            out << " " * line.length if i > 0
            out << chunk
            i = j + 1
          end
        end

        if (!option.flag)
          out << " (default: #{option.default_value})"
        end

        out << "\n"
      }
      return out
		end
361931
private static ArrayList<SimpleEntry<String, String>> traverseNode(Node n, String p) {
        ArrayList<SimpleEntry<String, String>> output = new ArrayList<>();
        String nName;
        if (n.getNodeType() != Node.TEXT_NODE) {
            nName = n.getNodeName();
            if (nName.startsWith("m:")) {
                nName = nName.substring(2);
            }
            if (nName.equals("mws:qvar")) {
                return new ArrayList<>();
            }
            p += "/" + nName;
        }
        String nValue = n.getNodeValue();
        if (nValue != null) {
            nValue = nValue.trim();
            if (nValue.length() == 0) {
                return new ArrayList<>();
            }
        } else {
            nValue = "";
        }

        if (!n.hasChildNodes()) {
            output.add(new SimpleEntry<>(p, nValue));
        } else {
            for (int i = 0; i < n.getChildNodes().getLength(); i++) {
                output.addAll(traverseNode(n.getChildNodes().item(i), p));
            }
        }
        return output;
    }
709898
function ArrayNode(details) {

		// If the details are not an Object
		if(!is.object(details)) {
			throw 'details must be an Object';
		}

		// If the array config is not found
		if(!('__array__' in details)) {
			throw 'missing "__array__" in details';
		}

		// If the value is not an Object
		if(!is.object(details['__array__'])) {
			details['__array__'] = {
				"type": details['__array__']
			}
		}

		// Init the protected vars
		this._minimum = null;
		this._maximum = null;
		this._type = 'unique';
		this._node = null;

		/**
		 * Min/Max
		 *
		 * Sets or gets the minimum and/or maximum number of items for the
		 * Array. For getting, returns {"minimum":uint,"maximum":uint}
		 *
		 * @name minmax
		 * @access protected
		 * @param uint minimum			The minimum value
		 * @param uint maximum			The maximum value
		 * @return void|Object
		 */
		this.minmax = function(minimum, maximum) {

			// If neither minimum or max is set, this is a getter
			if(typeof minimum === 'undefined' && typeof maximum === 'undefined') {
				return {"minimum":this._minimum,"maximum":this._maximum};
			}

			// If the minimum is set
			if(minimum !== null) {

				// If the value is not a valid int or long
				if(!is.integer(minimum)) {

					// If it's a valid representation of an integer
					if(is.string(minimum) && _typeToRegex['int'].test(minimum)) {

						// Convert it
						minimum = int(minimum, 0)
					}

					// Else, raise an error
					else {
						throw '"minimum" of array must be an unsigned integer';
					}
				}

				// If it's below zero
				if(minimum < 0) {
					throw '"minimum" of array must be an unsigned integer';
				}

				// Store the minimum
				this._minimum = minimum;
			}

			// If the maximum is set
			if(maximum !== null) {

				// If the value is not a valid int or long
				if(!is.integer(maximum)) {

					// If it's a valid representation of an integer
					if(is.string(maximum) && _typeToRegex['int'].test(maximum)) {

						// Convert it
						maximum = int(maximum, 0)
					}

					// Else, raise an error
					else {
						throw '"maximum" of array must be an unsigned integer';
					}
				}

				// If it's below zero
				if(maximum < 0) {
					throw '"maximum" of array must be an unsigned integer';
				}

				// If we also have a minimum and the maximum is somehow below it
				if(this._minimum && maximum < this._minimum) {
					throw '"maximum" of array must not be less than "minimum"';
				}

				// Store the maximum
				this._maximum = maximum;
			}
		};

		/**
		 * Clean
		 *
		 * Goes through each of the values in the list, cleans it, stores it,
		 * and returns a new list
		 *
		 * @name clean
		 * @access protected
		 * @param Array value			The value to validate
		 * @return Array
		 */
		this.clean = function clean(value) {

			// If the value is null and it's optional, return as is
			if((typeof value == 'undefined' || value == null) && this._optional) {
				return null;
			}

			// If the value is not an Array
			if(!is.array(value, list)) {
				throw 'value must be a valid Array';
			}

			// Recurse and return it
			var aRet = [];
			for(var i in value) {
				lRet.push(this._node.clean(value[i]));
			}
			return aRet;
		}

		/**
		 * To Object
		 *
		 * Returns the Array as an Object in the same format as is used in
		 * constructing it
		 *
		 * @name toObject
		 * @access protected
		 * @return Object
		 */
		this.toObject = function toObject() {

			// Init the object we will return
			var oRet = {};

			// If either a min or a max is set
			if(this._minimum || this._maximum) {

				// Set the array element as it's own Object
				oRet['__array__'] = {
					"type": this._type
				}

				// If there is a minimum
				if(this._minimum) {
					oRet['__array__']['minimum'] = this._minimum;
				}

				// If there is a maximum
				if(this._maximum) {
					oRet['__array__']['maximum'] = this._maximum;
				}
			}

			// Else, just add the type as the array element
			else {
				oRet['__array__'] = this._type;
			}

			// Get the parents Object and add it to the return
			var oBasic = BasicNode.prototype.toObject.call(this);
			for(var k in oBasic) {
				oRet[k] = oBasic[k];
			}

			// Get the nodes Object and also add it to the return
			var oNode = this._node.toObject();
			for(var k in oNode) {
				oRet[k] = oNode[k];
			}

			// Return
			return oRet;
		}

		/**
		 * Type
		 *
		 * Returns the type of Node
		 *
		 * @name type
		 * @access public
		 * @return string
		 */
		this.type = function type() {
			return 'ArrayNode';
		}

		/**
		 * Valid
		 *
		 * Checks if a value is valid based on the instance's values
		 *
		 * @name valid
		 * @access protected
		 * @param mixed value			The value to validate
		 * @param array level			Names of parents to this node
		 * @return bool
		 */
		this.valid = function valid(value, level) {

			// Reset validation failures
			this.validation_failures = []

			// If level is not passed
			if(typeof level == 'undefined') {
				level = [];
			}

			// If the value is null and it's optional, we're good
			if(value == null && this._optional) {
				return true;
			}

			// If the value isn't an array
			if(!is.array(value)) {
				this.validation_failures.push([level.join('.'), String(value)]);
				return false;
			}

			// Init the return, assume valid
			var bRet = true;

			// Keep track of duplicates
			if(this._type == 'unique') {
				var aItems = [];
			}

			// Go through each item in the list
			for(var i = 0; i < value.length; ++i) {

				// Add the field to the level
				var lLevel = level.splice(0);
				lLevel.push('[' + i + ']');

				// If the element isn't valid, return false
				if(!this._node.valid(value[i], lLevel)) {
					this.validation_failures = this.validation_failures.concat(this._node.validation_failures.splice(0));
					bRet = false;
					continue;
				}

				// If we need to check for duplicates
				if(this._type == 'unique') {

					// Look for the value in the existing list
					var iIndex = aItems.indexOf(value[i]);

					// If it's found, we have a duplicate
					if(iIndex > -1) {

						// Add the error to the list
						this.validation_failures.push([lLevel.join('.'), 'duplicate of ' + level.join('.') + '[' + iIndex + ']']);
						bRet = false;
						continue;
					}

					// Else, we can add the value
					aItems.push(value[i]);
				}
			}

			// Return ok
			return bRet;
		}
		// END public methods
		// CONTINUE constructor

		// If the type is missing
		if(!('type' in details['__array__'])) {
			console.error('"type" of "__array__" is missing, assuming "unique"');
		}

		// Or if the type is invalid
		else if(_validArray.indexOf(details['__array__']['type']) == -1) {
			console.error('"' + String(details['__array__']['type']) + '" is not a valid type for __array__, assuming "unique"');
		}

		// Else, store it
		else {
			this._type = details['__array__']['type'];
		}

		// If there's a minimum or maximum present
		if('minimum' in details['__array__'] || 'maximum' in details['__array__']) {
			this.minmax(
				('minimum' in details['__array__'] && details['__array__']['minimum'] || null),
				('maximum' in details['__array__'] && details['__array__']['maximum'] || null)
			);
		}

		// If there's an optional flag somewhere in the mix
		var __optional	= null;
		if('__optional__' in details) {
			sOptional	= details['__optional__'];
			delete details['__optional__'];
		} else if('optional' in details['__array__']) {
			sOptional	= details['__array__']['optional'];
		}

		// Remove it from details
		delete details['__array__'];

		// Store the child
		this._node = child(details);

		// If we had an optional flag, add it for the parent constructor
		if(__optional) {
			details['__optional__'] = __optional;
		}

		// Call the parent constructor
		BasicNode.call(this, details);
	}
390002
private List<Short> asShortList(Object value) {
        short[] values = (short[]) value;
        List<Short> list = new ArrayList<Short>(values.length);
        for (short shortValue : values) {
            list.add(shortValue);
        }
        return list;
    }
682643
def shortid
      len = 6
      loop do
        begin
          self.class.expand(@id.shorten(len))
          break
        rescue Familia::NonUniqueKey
          len += 1
        end
      end
      @id.shorten(len) 
    end
625800
def shorthand_attributes(atts = {})
      while (key = accept :shorthand)
        key = Settings::SHORTHAND[key.to_sym]

        # Check whether the value is escaped or unescaped
        escaped = accept(:unescaped_value) ? false : true

        # Get the attribute value and process it
        if (value = accept(:shorthand_node))
          value = [:expression, value.inspect, { escaped: escaped }]
        elsif (value = accept(:exp_string))
          value = [:expression, value, { escaped: escaped }]
        elsif (value = paranthesis)
          value = [:expression, value, { escaped: escaped }]
        else
          Logger.error :parse, @code, @i, @j, :shorthand
        end

        # IDs are unique, the rest of the attributes turn into arrays in
        # order to allow multiple values or identifiers
        add_attribute(atts, key, value)
      end

      atts
    end
216058
static Short[] createShorts() {
        int len = SHORT_UPPER_BOUND - SHORT_LOWER_BOUND + 1;
        Short[] ret = new Short[len];
        short val = (short) SHORT_LOWER_BOUND;
        for (int i = 0; i < len; i++, val++) {
            ret[i] = new Short(val);
        }
        return ret;
    }