Binds a Firebase array(list) to a view model keypath
559483
function (location, setter, keyPath) {
        var vm = this._vm;
        var root = this._root;
        var ref;


        /**
         * If the location is a string, we use it to create a new Firebase reference to this location
         *
         * If the location is a function, we call it with the 'vm' as its context and pass 'root' as the first argument.
         * In return we expect a Firebase instance.
         */

        if(isString(location)) {
            ref = root.child(location);
            keyPath = isString(setter)
                ? setter
                : ref.ref().key();
        } else if(isFunction(location)) {
            ref = location.call(vm, root);

            if(not(instanceOf)(Firebase, ref)) {
                throw new Error('The setter function passed in to setArray must return a Firebase instance.');
            }

            keyPath = isString(setter)
                ? setter
                : ref.ref().key();
        }

        var firebaseArray = new FirebaseArray(vm, keyPath, ref);

        set(this._references, keyPath, firebaseArray);

        return firebaseArray;
    }
1155876
function (callback) {
                var result = [], boundCallback = _gpfArrayBind(callback, arguments);
                _gpfArrayForEachOwn(this, function (item, idx, array) {
                    if (boundCallback(item, idx, array)) {
                        result.push(item);
                    }
                });
                return result;
            }
539635
function ObservableArray(myProperty, values) {
        for (var i =0; i < values.length; i++){
            this.push(values[i]);
        }
    }
43532
function (plan, callbackName, list) {
        if (list === void 0) { list = []; }
        for (var viewPortName in plan) {
            var viewPortPlan = plan[viewPortName];
            var prevComponent = viewPortPlan.prevComponent;
            if ((viewPortPlan.strategy === activationStrategy.invokeLifecycle || viewPortPlan.strategy === activationStrategy.replace)
                && prevComponent) {
                var viewModel = prevComponent.viewModel;
                if (callbackName in viewModel) {
                    list.push(viewModel);
                }
            }
            if (viewPortPlan.strategy === activationStrategy.replace && prevComponent) {
                addPreviousDeactivatable(prevComponent, callbackName, list);
            }
            else if (viewPortPlan.childNavigationInstruction) {
                findDeactivatable(viewPortPlan.childNavigationInstruction.plan, callbackName, list);
            }
        }
        return list;
    }
519756
function(name, value) {
            var data = this.findDataBinding(name);
            if (typeof value === 'undefined') {
                return data[0];
            }
            if (value !== data[0]) {
                data[0] = value;
                this.fireData(data);
            }
        }
572810
@Override
    public void bindView(ViewHolder holder, List<Object> payloads) {
        //set the selected state of this item. force this otherwise it may is missed when implementing an item
        holder.itemView.setSelected(isSelected());

        //set the name
        holder.name.setText(name);
    }
135516
function(guid, array) {
        collection.requestMap[guid] = {
          array: array,
          dict: _.object(_.map(array, function(id) { return [id, id]; }))
        };
      }
1017885
def _bind(self, args, kwds):
    """"""
    bindings = dict(kwds)
    for i, arg in enumerate(args):
      bindings[i + 1] = arg
    used = {}
    ancestor = self.ancestor
    if isinstance(ancestor, ParameterizedThing):
      ancestor = ancestor.resolve(bindings, used)
    filters = self.filters
    if filters is not None:
      filters = filters.resolve(bindings, used)
    unused = []
    for i in xrange(1, 1 + len(args)):
      if i not in used:
        unused.append(i)
    if unused:
      raise datastore_errors.BadArgumentError(
          'Positional arguments %s were given but not used.' %
          ', '.join(str(i) for i in unused))
    return self.__class__(kind=self.kind, ancestor=ancestor,
                          filters=filters, orders=self.orders,
                          app=self.app, namespace=self.namespace,
                          default_options=self.default_options,
                          projection=self.projection, group_by=self.group_by)
1344593
function bind(property, options, preserveContext, shouldDisplay, valueNormalizer) {
  var data = options.data,
      fn = options.fn,
      inverse = options.inverse,
      view = data.view,
      currentContext = this,
      pathRoot, path, normalized;

  normalized = normalizePath(currentContext, property, data);

  pathRoot = normalized.root;
  path = normalized.path;

  // Set up observers for observable objects
  if ('object' === typeof this) {
    // Create the view that will wrap the output of this template/property
    // and add it to the nearest view's childViews array.
    // See the documentation of Ember._HandlebarsBoundView for more.
    var bindView = view.createChildView(Ember._HandlebarsBoundView, {
      preserveContext: preserveContext,
      shouldDisplayFunc: shouldDisplay,
      valueNormalizerFunc: valueNormalizer,
      displayTemplate: fn,
      inverseTemplate: inverse,
      path: path,
      pathRoot: pathRoot,
      previousContext: currentContext,
      isEscaped: !options.hash.unescaped,
      templateData: options.data
    });

    view.appendChild(bindView);

    /** @private */
    var observer = function() {
      Ember.run.once(bindView, 'rerenderIfNeeded');
    };

    // Observes the given property on the context and
    // tells the Ember._HandlebarsBoundView to re-render. If property
    // is an empty string, we are printing the current context
    // object ({{this}}) so updating it is not our responsibility.
    if (path !== '') {
      Ember.addObserver(pathRoot, path, observer);
    }
  } else {
    // The object is not observable, so just render it out and
    // be done with it.
    data.buffer.push(getPath(pathRoot, path, options));
  }
}
667368
function validateModel(json, model) {
    var schemaKeys = [];
    for (var keyInSchema in model) {
      schemaKeys.push(keyInSchema);
    }
    // Check if foreing keys are allowed.
    if (!model[SCHEMAALLOWUNKNOWN]) {
      // TODO ensure that null and false enter here.
      checkUnknown(json, schemaKeys);
    }
    for (var schemaKeyI = 0; schemaKeyI < schemaKeys.length; schemaKeyI++) {
      var node = null;
      var schemaKey = schemaKeys[schemaKeyI];
      if (json[schemaKey]) {
        node = json[schemaKey];
      }
      if (!isReservedWord(schemaKey)) {
        validateNode(node, model[schemaKey], schemaKey);
      }
    }
  }
765215
function View(context, type, parentView, data, template, key, onRender) {
		// Constructor for view object in view hierarchy. (Augmented by JsViews if JsViews is loaded)
		var views, parentView_,
			isArray = type === "array",
			self_ = {
				key: 0,
				useKey: isArray ? 0 : 1,
				id: "" + viewId++,
				onRender: onRender,
				bnd: {}
			},
			self = {
				data: data,
				tmpl: template,
				views: isArray ? [] : {},
				parent: parentView,
				ctx: context,
				type: type,
				// If the data is an array, this is an 'array view' with a views array for each child 'item view'
				// If the data is not an array, this is an 'item view' with a views 'map' object for any child nested views
				// ._.useKey is non zero if is not an 'array view' (owning a data array). Uuse this as next key for adding to child views map
				get: getView,
				getIndex: getIndex,
				getRsc: getResource,
				hlp: getHelper,
				_: self_
		};

		if (parentView) {
			views = parentView.views;
			parentView_ = parentView._;
			if (parentView_.useKey) {
				// Parent is an 'item view'. Add this view to its views object
				// self._key = is the key in the parent view map
				views[self_.key = "_" + parentView_.useKey++] = self;
			} else {
				// Parent is an 'array view'. Add this view to its views array
				views.splice(
					// self._.key = self.index - the index in the parent view array
					self_.key = self.index =
						key !== undefined
							? key
							: views.length,
				0, self);
			}
			// If no context was passed in, use parent context
			// If context was passed in, it should have been merged already with parent context
			self.ctx = context || parentView.ctx;
		}
		return self;
	}
947206
function (model) {

                var ret = [];

                function getSubModel(obj) {

                    if (obj === model) {
                        return;
                    }

                    if (_.indexOf(ret, obj) !== -1) {
                        // already in list
                        return;
                    }

                    if (obj instanceof Model) {
                        ret.push(obj);
                        return;
                    }

                    for (var key in obj) {
                        if (obj.hasOwnProperty(key)) {
                            var value = obj[key];

                            if (value instanceof Array) {
                                for (var i = 0; i < value.length; i++) {
                                    getSubModel(value[i]);
                                }
                            } else if (value instanceof List) {
                                value.each(getSubModel);
                            } else if (value instanceof Object) {
                                getSubModel(value);
                            }
                        }
                    }
                }

                getSubModel(model.$);

                return ret;

            }
1326351
private void bindArray(final TransformContext transformContext, final Object values) {
		int length = Array.getLength(values);
		if (length == 0) {
			throw new ParameterNotFoundRuntimeException("Parameter is not set. [" + expression + "]");
		}

		transformContext.addSqlPart("(?");
		transformContext.addBindVariable(Array.get(values, 0));
		for (int i = 1; i < length; i++) {
			transformContext.addSqlPart(", ?");
			transformContext.addBindVariable(Array.get(values, i));
		}
		transformContext.addSqlPart(")");
		if (outputBindComment) {
			transformContext.addSqlPart("/*").addSqlPart(expression).addSqlPart("*/");
		}
		transformContext.addBindName(expression);
	}
798016
protected void putIntoModel(final Map<String, Object> model, final String key, final Object value) {
        LOGGER.trace("Adding attribute [{}] into the view model for [{}] with value [{}]", key, getClass().getSimpleName(), value);
        model.put(key, value);
    }
371329
function (model, filter, value) {

    if (!_.isString(filter)) {
        return null;
    }

    if (model.data) {
        var list = findKeys(model.data, filter)
            , values = [];

        for (var res in list) {

            if (value === undefined || list[res][filter] === value) {
                values.push(res);
            }
        }
    }
    //return _.isEmpty(values) ? undefined : values;
    //Changed to return empty array instead of 'undefined'. Do not change back, otherwise some functions working with arrays do not work properly.
    return values;
}
624323
function (oEvent) {
			var oModel = this._oDialog.getModel("view"),
				oListItem = oEvent.getParameter("listItem"),
				oContext = oListItem.getItemNodeContext(),
				oNodePath = oContext.context.getPath(),
				oSubTreeData = oModel.getProperty(oNodePath),
				oControl = this._getControl("customDebugValue", this._DEBUG_MODULES_ID);

			this._resetValueState(oControl);
			this._treeHelper.recursiveSelect(oSubTreeData, oListItem.getSelected());
			this._updateTreeInfos();
		}
363959
function(callback){
        var cursor = db.db(dbName).collection(collectionName).find({}).toArray(function(err,result){
            if(result.length!=0){
                roadmapNum = roadMapIdTemp = parseInt(result[result.length-1]['roadMapId'])+1;
            }
            else{
                roadmapNum = roadMapIdTemp = 1;
            }
            db.db(dbName).collection(collectionName).insertOne({
                "roadMapId" : roadMapIdTemp.toString(),
                "clientId" : source['clientId'],
                "orderNode" : source['orderNode'],
                "initNode" : source['initNode'],
                "lastNode" : source['lastNode'],
                "incomingNode" : source['incomingNode'],
                "outingNode" : source['outingNode'],
                "isInput" : source['isInput'],
                "isOutput" : source['isOutput'],
                "nodeIds" : source['nodeIds']
            },function(err, result){
                response.send(roadmapNum.toString());
            });
        });

    }