Common preprocessing function for floats and integers.
@private
@param {aria.core.BaseTypes:Bean} beanDef
973288
function (beanDef) {
        var parent = beanDef[jv._MD_PARENTDEF];
        if (typeof(parent.$minValue) != "undefined") {
            if (typeof(beanDef.$minValue) == "undefined") {
                beanDef.$minValue = parent.$minValue;
            } else if (beanDef.$minValue < parent.$minValue) {
                jv._logError(jv.NUMBER_INVALID_INHERITANCE, ["$minValue", beanDef[jv._MD_TYPENAME]]);
            }
        }
        if (typeof(parent.$maxValue) != "undefined") {
            if (typeof(beanDef.$maxValue) == "undefined") {
                beanDef.$maxValue = parent.$maxValue;
            } else if (beanDef.$maxValue > parent.$maxValue) {
                jv._logError(jv.NUMBER_INVALID_INHERITANCE, ["$maxValue", beanDef[jv._MD_TYPENAME]]);
            }
        }
        if (typeof(beanDef.$minValue) != "undefined" && typeof(beanDef.$maxValue) != "undefined"
                && beanDef.$minValue > beanDef.$maxValue) {
            jv._logError(jv.NUMBER_INVALID_RANGE, [beanDef[jv._MD_TYPENAME], beanDef.$minValue, beanDef.$maxValue]);
        }
    }
657392
function Predef( definition ) {

		// Check for best case scenario: Array.
		// Copy the values of the array to data property.
		if ( definition instanceof Array ) {
			this.data = definition.slice(0);
			return;
		}

		// If it's an object, check for the deps and dict propreties.
		if ( definition.hasOwnProperty( 'deps' ) && definition.hasOwnProperty( 'dict' ) ){

			if ( !( definition.deps instanceof Array ) || !( definition.dict instanceof Array ) ) {
				throw new Error( 'Dict and depends property of definition must be Array' );
			}
			
			this.data = {
				deps: definition.deps.slice(0),
				dict: definition.dict.slice(0)
			};
			return;
		}
		
		// Not an array or valid Object
		throw new Error( 'Predef definition must be an Array or Object with deps and dict properties' );
	}
998630
function (beanDef, beanName, packageDef) {
        var keyType = beanDef.$keyType;
        var parentKeyType = null;
        var parent = beanDef[jv._MD_PARENTDEF];
        if (!parent[jv._MD_BUILTIN]) {
            parentKeyType = parent.$keyType;
            if (keyType == null) {
                beanDef.$keyType = parentKeyType;
                return;
            }
        } else if (keyType == null) {
            // keyType not specified
            return;
        }
        jv._preprocessBean(keyType, beanName + ".$keyType", packageDef);
        if (parentKeyType != null) {
            __checkInheritance(parentKeyType, keyType);
        }
        // in all cases, keyType must be a sub-type of aria.core.JsonTypes.String
        if (keyType[jv._MD_BASETYPE].typeName != "String") {
            jv._logError(jv.INHERITANCE_EXPECTED, [keyType[jv._MD_TYPENAME], jv._BASE_TYPES_PACKAGE + ".String"]);
            return;
        }
    }
1123158
function (valueBuffer) {
			var value = this.valueToBigInt(valueBuffer).toString();
			var integerPart = value.length > 8 ? value.substr(0, value.length - 8) : '0';
			var decimalPart = value.length > 8 ? value.substr(value.length - 8) : value;
			while (decimalPart.length < 8) decimalPart = "0" + decimalPart;
			decimalPart = decimalPart.replace(/0*$/, '');
			while (decimalPart.length < 2) decimalPart += "0";
			return integerPart + "." + decimalPart;
		}
384576
function createTypedef(context, typeName, value) {
  if (value instanceof Reference) {
    value = value.resolve(context);
  }
  context.results[typeName] = value;
  return value;
}
182378
function Component(classDef, el, options) {
    _classCallCheck(this, Component);

    // Display error if el is valid HTML Element
    if (!(el instanceof Element)) {
      console.error(Error(el + ' is not an HTML Element'));
    }

    // If exists, destroy and reinitialize in child
    var ins = classDef.getInstance(el);
    if (!!ins) {
      ins.destroy();
    }

    this.el = el;
    this.$el = cash(el);
  }
1028533
function preProcessBindings(bindingString) {
  var results = [];
  var bindingHandlers = this.bindingHandlers;
  var preprocessed;

  // Check for a Provider.preprocessNode property
  if (typeof this.preprocessNode === 'function') {
    preprocessed = this.preprocessNode(bindingString, this);
    if (preprocessed) { bindingString = preprocessed; }
  }

  for (var i = 0, j = this.bindingPreProcessors.length; i < j; ++i) {
    preprocessed = this.bindingPreProcessors[i](bindingString, this);
    if (preprocessed) { bindingString = preprocessed; }
  }

  function addBinding(name, value) {
    results.push("'" + name + "':" + value);
  }

  function processBinding(key, value) {
    // Get the "on" binding from "on.click"
    var handler = bindingHandlers.get(key.split('.')[0]);

    if (handler && typeof handler.preprocess === 'function') {
      value = handler.preprocess(value, key, processBinding);
    }

    addBinding(key, value);
  }

  arrayForEach(parseObjectLiteral(bindingString), function(keyValueItem) {
    processBinding(
      keyValueItem.key || keyValueItem.unknown,
      keyValueItem.value
    );
  });

  return results.join(',');
}
835361
function (number, decimals, decPoint, thousandsSep) {

            number = ("" + number).replace(/[^0-9+\-Ee.]/g, "");

            var num        = !isFinite(+number) ? 0 : +number,
                prec       = !isFinite(+decimals) ? 0 : Math.abs(decimals),
                separator  = thousandsSep === undefined ? "," : thousandsSep,
                decimal    = decPoint === undefined ? "." : decPoint,
                toFixedFix = function (n, prec) {
                    var k = Math.pow(10, prec);
                    return "" + (Math.round(n * k) / k).toFixed(prec);
                },

                // Fix for IE parseFloat(0.55).toFixed(0) = 0;
                result     = (prec ? toFixedFix(num, prec) : "" + Math.round(num)).split(".");

            if (result[0].length > 3) {
                result[0] = result[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, separator);
            }

            return result.join(decimal);
        }
1193644
static BaseFloatColumnValueSelector makeColumnValueSelectorWithFloatDefault(
      final ColumnSelectorFactory metricFactory,
      final ExprMacroTable macroTable,
      @Nullable final String fieldName,
      @Nullable final String fieldExpression,
      final float nullValue
  )
  {
    if ((fieldName == null) == (fieldExpression == null)) {
      throw new IllegalArgumentException("");
    }
    if (fieldName != null) {
      return metricFactory.makeColumnValueSelector(fieldName);
    } else {
      final Expr expr = Parser.parse(fieldExpression, macroTable);
      final ColumnValueSelector<ExprEval> baseSelector = ExpressionSelectors.makeExprEvalSelector(metricFactory, expr);
      class ExpressionFloatColumnSelector implements FloatColumnSelector
      {
        @Override
        public float getFloat()
        {
          // Although baseSelector.getObject is nullable
          // exprEval returned from Expression selectors is never null.
          final ExprEval exprEval = baseSelector.getObject();
          return exprEval.isNumericNull() ? nullValue : (float) exprEval.asDouble();
        }

        @Override
        public void inspectRuntimeShape(RuntimeShapeInspector inspector)
        {
          inspector.visit("baseSelector", baseSelector);
        }

        @Override
        public boolean isNull()
        {
          final ExprEval exprEval = baseSelector.getObject();
          return exprEval == null || exprEval.isNumericNull();
        }
      }
      return new ExpressionFloatColumnSelector();
    }
  }
1195591
private Obj compileObject(T m, DataViewDef viewDef) {
		Obj res = Obj.make();
		for(String k : pReader.readableProps(m)) {
			if(! (viewDef.isTraversable(k) || wildcardProps.contains(k))) {
				continue;
			}
			Object v = pReader.read(m, k);
			if(v == null) {
				continue;
			} else if(v instanceof Collection<?>) {
				if(viewDef.isTraversable(k)) {
					Arr arr = res.arr(k);
					for(Object o : (Collection<?>)v) {
						Object x = evalScalarOrObject(k, o, viewDef);
						arr.add(x);
					}
				}
			} else {
				Object x = evalScalarOrObject(k, v, viewDef);
				if(x != null) {
					res.put(k, x);
				}
			}
		}
		return res;
	}
832167
function createPredicate(pred, types)
{
	krillPrimValidateSyntax(pred);

	if (arguments.length >= 2 && types !== null) {
		mod_jsprim.forEachKey(types, function (k, v) {
			if (v !== 'string' && v !== 'number' && v !== 'boolean')
				throw (new VError(
				    'field "%s": unknown type "%s"', k, v));
		});

		krillPrimValidateTypes(types, pred);
	}

	return (new Predicate(mod_jsprim.deepCopy(pred), types));
}
729594
function amf0decTypedObj(buf) {
    var className = amf0decString(buf);
    var obj = amf0decObject(buf.slice(className.len - 1));
    obj.value.__className__ = className.value;
    return { len: className.len + obj.len - 1, value: obj.value }
}
620016
private int parseBeanDefinition() {
        for (int index = 0; index < content.size(); index++) {
            String line = content.get(index).trim();
            if (line.startsWith("@BeanDefinition")) {
                return index;
            }
        }
        return -1;
    }
1136056
function krillPrimEval(pred)
{
	var key, ii;

	key = krillPrimGetKey(pred);

	switch (key) {
	case 'and':
		for (ii = 0; ii < pred['and'].length; ii++) {
			if (!krillPrimEval(pred['and'][ii]))
				return (false);
		}

		return (true);

	case 'or':
		for (ii = 0; ii < pred['or'].length; ii++) {
			if (krillPrimEval(pred['or'][ii]))
				return (true);
		}

		return (false);

	case 'lt':
	case 'le':
	case 'gt':
	case 'ge':
		mod_assert.ok(typeof (pred[key][0]) == 'number');
		mod_assert.ok(typeof (pred[key][1]) == 'number');
		/*jsl:fallthru*/
	default:
		mod_assert.ok(key in krillOps);
		mod_assert.ok(pred[key].length == 2);
		break;
	}

	return (krillOps[key].eval(pred[key][0], pred[key][1]));
}
965585
static Object js_parseFloat(Object[] args)
    {
        if (args.length < 1)
            return ScriptRuntime.NaNobj;

        String s = ScriptRuntime.toString(args[0]);
        int len = s.length();
        int start = 0;
        // Scan forward to skip whitespace
        char c;
        for (;;) {
            if (start == len) {
                return ScriptRuntime.NaNobj;
            }
            c = s.charAt(start);
            if (!ScriptRuntime.isStrWhiteSpaceChar(c)) {
                break;
            }
            ++start;
        }

        int i = start;
        if (c == '+' || c == '-') {
            ++i;
            if (i == len) {
                return ScriptRuntime.NaNobj;
            }
            c = s.charAt(i);
        }

        if (c == 'I') {
            // check for "Infinity"
            if (i+8 <= len && s.regionMatches(i, "Infinity", 0, 8)) {
                double d;
                if (s.charAt(start) == '-') {
                    d = Double.NEGATIVE_INFINITY;
                } else {
                    d = Double.POSITIVE_INFINITY;
                }
                return ScriptRuntime.wrapNumber(d);
            }
            return ScriptRuntime.NaNobj;
        }

        // Find the end of the legal bit
        int decimal = -1;
        int exponent = -1;
        boolean exponentValid = false;
        for (; i < len; i++) {
            switch (s.charAt(i)) {
              case '.':
                if (decimal != -1) // Only allow a single decimal point.
                    break;
                decimal = i;
                continue;

              case 'e':
              case 'E':
                if (exponent != -1) {
                    break;
                } else if (i == len - 1) {
                    break;
                }
                exponent = i;
                continue;

              case '+':
              case '-':
                 // Only allow '+' or '-' after 'e' or 'E'
                if (exponent != i-1) {
                    break;
                } else if (i == len - 1) {
                    --i;
                    break;
                }
                continue;

              case '0': case '1': case '2': case '3': case '4':
              case '5': case '6': case '7': case '8': case '9':
                if (exponent != -1) {
                    exponentValid = true;
                }
                continue;

              default:
                break;
            }
            break;
        }
        if (exponent != -1 && !exponentValid) {
            i = exponent;
        }
        s = s.substring(start, i);
        try {
            return Double.valueOf(s);
        }
        catch (NumberFormatException ex) {
            return ScriptRuntime.NaNobj;
        }
    }
858835
function parse(value, field, options) {
  options = options || {};
  var parsed = utils.standardizeInput(value);

  // Integer
  if (field.type.key === "BOOLEAN") {
    parsed = utils.toBoolean(parsed);
  }
  else if (field.type.key === "INTEGER") {
    parsed = utils.toInteger(parsed);
  }
  else if (field.type.key === "FLOAT") {
    parsed = utils.toFloat(parsed);
  }
  else if (field.type.key === "DATEONLY") {
    parsed = utils.toDate(parsed, options.dateFormat);
  }
  else if (field.type.key === "DATE") {
    parsed = utils.toDateTime(parsed, options.datetimeFormat);
  }
  else if (field.type.key === "STRING") {
    parsed = utils.toString(parsed);
  }

  return parsed;
}
1337879
function() {
		var columndefs = inputEx.widget.dtInPlaceEdit.superclass.setColumnDefs.call(this);
		
		// index fields declaration by keys
		var fieldsByKey = {};
		for(var k = 0 ; k < this.options.fields.length ; k++) {
		   
		   // Retro-compatibility with inputParms
         if (lang.isObject(this.options.fields[k].inputParams)) {
            fieldsByKey[this.options.fields[k].inputParams.name] = this.options.fields[k];
         // New prefered way to use options of a field
         } else {
            fieldsByKey[this.options.fields[k].name] = this.options.fields[k];
         }
		   
		}
		for(var i = 0 ; i < columndefs.length ; i++) {
			var columnDef = columndefs[i];
			if( YAHOO.lang.isUndefined(columnDef.editor) && !!fieldsByKey[columnDef.key] ) {
	          columnDef.editor = new inputEx.widget.CellEditor(fieldsByKey[columnDef.key]);
	      }
		}
		
		return columndefs;
	}