@private
Helper to get the value of an regular, radio or chackbox input

@param input

@returns {String} value
354962
function (input) {

            var value;

            // Get the value or state of the input based on its type
            switch ($(input).attr('type')) {
                case 'checkbox':
                    value = ($(input).is(':checked')) ? 1 : '';
                    break;
                case 'radio':
                    value = node.find('input[name="' + $(input).attr('name') + '"]:checked').val() || '';
                    break;
                default:
                    value = $(input).val();
                    break;
            }

            return value;

        }
1169577
function (value) {

            var checkboxes = $('li input', this.$ul);
            var valueToCompare = value.toString();

            for (var i = 0; i < checkboxes.length; i = i + 1) {
                var checkbox = checkboxes[i];
                if (checkbox.value === valueToCompare) {
                    return $(checkbox);
                }
            }
        }
213764
public static String encrypt(String input) {
        try {
            return encrypt(input, null);
        } catch (GeneralSecurityException e) {
            e.printStackTrace();
            return null;
        }
    }
485549
function getValue(element) {
  var name = elementType(element);
  switch (name) {
    case "checkbox":
    case "radio":
      if (!element.checked) {
        return false;
      }
      var val = element.getAttribute('value');
      return val == null ? true : val;
    case "select":
    case "select-multiple":
      var options = element.options;
      var values = [];
      for (var i = 0, len = options.length; i < len; i++) {
        if (options[i].selected) {
          values.push(options[i].value);
        }
      }
      return name === "select-multiple" ? values : values[0];
    default:
      return element.value;
  }
}
1157963
function parse (input) {
  var parts = input.split(';');
  var _ = parts.pop();
  var srid = (parts.shift() || '').split('=').pop();

  var i = 0;

  function $ (re) {
    var match = _.substring(i).match(re);
    if (!match) return null;
    else {
      i += match[0].length;
      return match[0];
    }
  }

  function crs (obj) {
    if (obj && srid.match(/\d+/)) {
      obj.crs = {
        type: 'name',
        properties: {
          name: 'urn:ogc:def:crs:EPSG::' + srid
        }
      };
    }

    return obj;
  }

  function white () { $(/^\s*/); }

  function multicoords () {
    white();
    var depth = 0;
    var rings = [];
    var stack = [rings];
    var pointer = rings;
    var elem;

    while (elem =
           $(/^(\()/) ||
             $(/^(\))/) ||
               $(/^(,)/) ||
                 $(tuples)) {
      if (elem === '(') {
        stack.push(pointer);
        pointer = [];
        stack[stack.length - 1].push(pointer);
        depth++;
      } else if (elem === ')') {
        // For the case: Polygon(), ...
        if (pointer.length === 0) return null;

        pointer = stack.pop();
        // the stack was empty, input was malformed
        if (!pointer) return null;
        depth--;
        if (depth === 0) break;
      } else if (elem === ',') {
        pointer = [];
        stack[stack.length - 1].push(pointer);
      } else if (!elem.split(/\s/g).some(isNaN)) {
        Array.prototype.push.apply(pointer, elem.split(/\s/g).map(parseFloat));
      } else {
        return null;
      }
      white();
    }

    if (depth !== 0) return null;

    return rings;
  }

  function coords () {
    var list = [];
    var item;
    var pt;
    while (pt =
           $(tuples) ||
             $(/^(,)/)) {
      if (pt === ',') {
        list.push(item);
        item = [];
      } else if (!pt.split(/\s/g).some(isNaN)) {
        if (!item) item = [];
        Array.prototype.push.apply(item, pt.split(/\s/g).map(parseFloat));
      }
      white();
    }

    if (item) list.push(item);
    else return null;

    return list.length ? list : null;
  }

  function point () {
    if (!$(/^(point(\sz)?)/i)) return null;
    white();
    if (!$(/^(\()/)) return null;
    var c = coords();
    if (!c) return null;
    white();
    if (!$(/^(\))/)) return null;
    return {
      type: 'Point',
      coordinates: c[0]
    };
  }

  function multipoint () {
    if (!$(/^(multipoint)/i)) return null;
    white();
    var newCoordsFormat = _
      .substring(_.indexOf('(') + 1, _.length - 1)
      .replace(/\(/g, '')
      .replace(/\)/g, '');
    _ = 'MULTIPOINT (' + newCoordsFormat + ')';
    var c = multicoords();
    if (!c) return null;
    white();
    return {
      type: 'MultiPoint',
      coordinates: c
    };
  }

  function multilinestring () {
    if (!$(/^(multilinestring)/i)) return null;
    white();
    var c = multicoords();
    if (!c) return null;
    white();
    return {
      type: 'MultiLineString',
      coordinates: c
    };
  }

  function linestring () {
    if (!$(/^(linestring(\sz)?)/i)) return null;
    white();
    if (!$(/^(\()/)) return null;
    var c = coords();
    if (!c) return null;
    if (!$(/^(\))/)) return null;
    return {
      type: 'LineString',
      coordinates: c
    };
  }

  function polygon () {
    if (!$(/^(polygon(\sz)?)/i)) return null;
    white();
    var c = multicoords();
    if (!c) return null;
    return {
      type: 'Polygon',
      coordinates: c
    };
  }

  function multipolygon () {
    if (!$(/^(multipolygon)/i)) return null;
    white();
    var c = multicoords();
    if (!c) return null;
    return {
      type: 'MultiPolygon',
      coordinates: c
    };
  }

  function geometrycollection () {
    var geometries = [];
    var geometry;

    if (!$(/^(geometrycollection)/i)) return null;
    white();

    if (!$(/^(\()/)) return null;
    while (geometry = root()) {
      geometries.push(geometry);
      white();
      $(/^(,)/);
      white();
    }
    if (!$(/^(\))/)) return null;

    return {
      type: 'GeometryCollection',
      geometries: geometries
    };
  }

  function root () {
    return point() ||
      linestring() ||
      polygon() ||
      multipoint() ||
      multilinestring() ||
      multipolygon() ||
      geometrycollection();
  }

  return crs(root());
}
859654
private InputValue getInputValue(FormInput input) {

		/* Get the DOM element from Selenium. */
		WebElement inputElement = browser.getWebElement(input.getIdentification());

		switch (input.getType()) {
			case TEXT:
			case PASSWORD:
			case HIDDEN:
			case SELECT:
			case TEXTAREA:
				return new InputValue(inputElement.getAttribute("value"));
			case RADIO:
			case CHECKBOX:
			default:
				String value = inputElement.getAttribute("value");
				Boolean checked = inputElement.isSelected();
				return new InputValue(value, checked);
		}

	}
545895
function(value) {
      
      if (value === "text") {
        value = this.text().trim();
        
      } else if (value === "html") {
        value = this.html().trim();
        
      } else if (value === "val") {
        value = this.val();
      
      } else if (value.indexOf("attr:") === 0) {
        value = this.attr(value.substr(5));
      }
      
      return value;
    }
863934
function getValType(el) {
        var ret = el.tagName.toLowerCase()
        return ret === "input" && /checkbox|radio/.test(el.type) ? "checked" : ret
    }
1147083
public static LocalDateInterval parseString(final String input) {
        String[] values = input.split("/");
        try {
            return new LocalDateInterval(parseLocalDate(values[0]), parseLocalDate(values[1]), IntervalEnding.EXCLUDING_END_DATE);
        } catch (Exception e) {
            throw new IllegalArgumentException("Unable to parse " + input);
        }
    }
1208340
@Override
    public Object map(Object input) {
        String s = input.toString();
        if (s == null || s.isEmpty())
            return value;
        else if (s instanceof String)
            return s;
        else
            return s;
    }
563894
function getStringValue(value)
{
	var return_value = '';
	switch(typeof(value))
	{
		case 'string':
			return_value = "'" + value + "'";
			break;

		case 'number':
			return_value = value;
			break;

		case 'object':

			if(value==null)
					return_value = value;
			else
			{
					var valuestring = JSON.stringify(value);
					return_value = "'" + valuestring + "'";
			}
			break;

		default:
			return_value = "'" + value + "'";
			break;
	}
  return return_value;
}
233781
function parseInput(input) {
  var match = re.exec(input);

  if (match !== null) {
    var _match = _slicedToArray(match, 6),
        pre_keyword = _match[1],
        operator_keyword = _match[2],
        value = _match[3],
        unit = _match[4],
        post_keyword = _match[5];

    if (pre_keyword && post_keyword || pre_keyword && operator_keyword || post_keyword && operator_keyword) {
      return null;
    }

    return {
      value: sanitizeValue({
        value: value,
        operator_keyword: operator_keyword,
        post_keyword: post_keyword
      }),
      unit: unit
    };
  }

  return null;
}
1371474
function($input) {
        var type = $input.attr('type'),
            val = $input.val();

        // Is this an unchecked checkbox or radio button?
        if ((type === 'checkbox' || type === 'radio')) {
            if ($input.prop('checked')) {
                return val;
            }
            else {
                return null;
            }
        }

        // Flatten any array values whose input name doesn't end in "[]"
        //  - e.g. a multi-select
        else if (Garnish.isArray(val) && $input.attr('name').substr(-2) !== '[]') {
            if (val.length) {
                return val[val.length - 1];
            }
            else {
                return null;
            }
        }

        // Just return the value
        else {
            return val;
        }
    }
238539
protected function value($input)
    {
        $output = $input;

        if (is_string($input) === false) {
            switch (gettype($input)) {
                case 'boolean':
                    $output = ($input === true) ? 'true' : 'false';
                    break;
                case 'integer':
                case 'double':
                    $output = (string) $input;
                    break;
                case 'object':
                case 'array':
                case 'resource':
                case 'unknown type':
                    $output = serialize($input);
                    break;
                case 'NULL':
                default:
                    // intentionally omitted
                    break;
            }
        }

        return $output;
    }
82383
function getInput() {

    var account = document.getElementById('account').value; 
	var email = (document.getElementById('email') ? document.getElementById('email').value : ''); 
    var password = document.getElementById('password').value;
	
	return {account: account, email: email, password: password};	
}
122463
public String radio (String name, String value, String defaultValue)
    {
        StringBuilder buf = new StringBuilder();
        buf.append("<input type=\"radio\"");
        buf.append(" name=\"").append(name).append("\"");
        buf.append(" value=\"").append(value).append("\"");
        String selectedValue = getValue(name, defaultValue);
        if (value.equals(selectedValue)) {
            buf.append(_useXHTML ? " checked=\"checked\"" : " checked");
        }
        buf.append(getCloseBrace());
        return buf.toString();
    }
1155517
function standardize(value) {
  var isString = _.isString(value);
  value = utils.standardizeInput(value);
  return (isString && value === null) ? "" : value;
}