To Nested
Takes an object that was flattened by toUnnested
and re-nests it.

@param val the flattened object to be nested.
3882
function toNested(val, def) {
    function nest(src) {
        var dest = {};
        for (var p in src) {
            if (src.hasOwnProperty(p))
                if (/\./g.test(p))
                    object_1.set(dest, p, src[p]);
                else
                    dest[p] = src[p];
        }
        return dest;
    }
    return function_1.tryWrap(nest, val)(def);
}
78860
@Override
  public void put(double val) {
    if(n <= 0) {
      n = 1;
      sum = val;
      m2 = 0;
      return;
    }
    final double tmp = n * val - sum;
    final double oldn = n; // tmp copy
    n += 1.0;
    sum += val;
    m2 += tmp * tmp / (n * oldn);
  }
1055188
private void push(JSONObject jo) throws JSONException {
    if (this.top >= maxdepth) {
      throw new JSONException("Nesting too deep.");
    }
    this.stack[this.top] = jo;
    this.mode = jo == null ? 'a' : 'k';
    this.top += 1;
  }
84482
@Override
	public final void flatMap(IN value, Collector<OUT> out) throws Exception {
		for (Iterator<OUT> iter = flatMap(value); iter.hasNext(); ) {
			out.collect(iter.next());
		}
	}
302067
public static void assertVarValue( Object val) throws IllegalArgumentException
    {
    if( !isVarValue( val))
      {
      throw new IllegalArgumentException( "\"" + String.valueOf( val) + "\"" + " is not a valid variable value");
      }
    }
1103103
function nestedPath (obj, path, val) {
  if (typeof obj !== 'object') {
    return obj
  }
  var keys = path.split('.')
  if (keys.length > 1) {
    path = keys.shift()
    return nestedPath(obj[path], keys.join('.'), val)
  }
  if (val !== undefined) {
    obj[path] = val
  }
  return obj[path]
}
110374
@Override
	public void collect(final KEY key, final VALUE val) throws IOException {
		this.outTuple.f0 = key;
		this.outTuple.f1 = val;
		this.flinkCollector.collect(outTuple);
	}
134272
public Packer setInsetLeft(final int val) {
        Insets i = gc.insets;
        if (i == null) {
            i = new Insets(0, 0, 0, 0);
        }
        gc.insets = new Insets(i.top, val, i.bottom, i.right);
        setConstraints(comp, gc);
        return this;
    }
1277914
@Override
    public void noteValue(double val) {
        super.noteValue(val);
        buf[insertPos++] = val;
        if (insertPos >= buf.length) {
            insertPos = 0;
            size = buf.length;
        } else if (insertPos > size) {
            size = insertPos;
        }
    }
1236940
function stringify (val) {
  var stack = val.stack

  if (stack) {
    return String(stack)
  }

  var str = String(val)

  return str === toString.call(val)
    ? inspect(val)
    : str
}
1059757
function(name, val, resolveUp) {
                // Allow variables with dots by automatically creating the
                // nested structure
                var parts = name.split('.');
                var obj = this.variables;
                var frame = this;

                if (resolveUp) {
                    if ((frame = this.resolve(parts[0]))) {
                        frame.set(name, val);
                        return;
                    }
                    frame = this;
                }

                for (var i = 0; i < parts.length - 1; i++) {
                    var id = parts[i];

                    if (!obj[id]) {
                        obj[id] = {};
                    }
                    obj = obj[id];
                }

                obj[parts[parts.length - 1]] = val;
            }
829636
public void setProperty(final String name, final String val) {
    if (props == null) {
      props = new Properties();
    }

    props.setProperty(name, val);
  }
886680
public String setValue(String val) {
        String oldVal = this.val;
        if (parent != null) {
            oldVal = parent.get(this.key); // trust the container more
            int i = parent.indexOfKey(this.key);
            if (i != Attributes.NotFound)
                parent.vals[i] = val;
        }
        this.val = val;
        return Attributes.checkNotNull(oldVal);
    }
266915
@Override
  public void put(double val, double weight) {
    if(weight == 0.) {
      return;
    }
    if(n <= 0) {
      n = weight;
      sum = val * weight;
      return;
    }
    val *= weight;
    final double tmp = n * val - sum * weight;
    final double oldn = n; // tmp copy
    n += weight;
    sum += val;
    m2 += tmp * tmp / (weight * n * oldn);
  }
391733
public void addNextValue(Object val) {
    String newVal = val.toString();
    if (this.maxVal == null || this.maxVal.compareTo(newVal) < 0) {
      this.maxVal = newVal;
    }
  }
746798
def store_nested(key, value)
      var = unnest(key).reverse.inject(value) do |memo,k|
              if k.is_a?(Symbol)
                {k => memo}
              else
                ar = []
                ar[k] = memo
                ar
              end
            end
      deep_merge! var
    end
231799
@Override
    public void setValue(Object value) {
        super.setValue(value);
        if (parent != null) {
            Object parentValue = parent.getValue();
            if (parentValue != null) {
                writeToObject(parentValue);
                parent.setValue(parentValue);
            }
        }
        if (value != null) {
            for (Property subProperty : subProperties) {
                subProperty.readFromObject(value);
            }
        }
    }