sets up the union change events for an observee with one of its inner properties parameters: that - the container observee innerObservee - the contained observee propertyList - the propertyList to unionize collapse - the union option (true for collapse)
517708
function unionizeEvents(that, innerObservee, propertyList, collapse) {
    var propertyListDepth = propertyList.length

    if(innerObservee.on === undefined || innerObservee.emit === undefined || innerObservee.removeListener === undefined || innerObservee.set === undefined) {
        throw new Error("Attempting to union a value that isn't an observee")
    }

    var innerChangeHandler, containerChangeHandler
    var ignorableContainerEvents = [], ignorableInnerEvents = []
    innerObservee.on('change', innerChangeHandler = function(change) {
        if(ignorableInnerEvents.indexOf(change) === -1) {        // don't run this for events generated by the union event handlers
            if(collapse) {
                var property = propertyList.concat(change.property)
            } else {
                var property = propertyList.concat(['subject']).concat(change.property)
            }

            var containerChange = utils.merge({}, change, {property: property})
            ignorableContainerEvents.push(containerChange)
            that.emit('change', containerChange)
        }
    })
    that.onChangeInternal(containerChangeHandler = function(change) {
        var changedPropertyDepth = change.property.length

        if(collapse) {
            var propertyListToAskFor = propertyList
        } else {
            var propertyListToAskFor = propertyList.concat(['subject'])
        }

        var answers = changeQuestions(propertyListToAskFor, change, true)
        var changeIsWithinInnerProperty = answers.isWithin
        var changeCouldRelocateInnerProperty = answers.couldRelocate

        if(changeIsWithinInnerProperty && ignorableContainerEvents.indexOf(change) === -1) {   // don't run this for events generated by the union event handlers
            if(collapse) {
                var property = change.property.slice(propertyListDepth)
            } else {
                var property = change.property.slice(propertyListDepth+1) // +1 for the 'subject'
            }

            var innerObserveeEvent = utils.merge({}, change, {property: property})
            ignorableInnerEvents.push(innerObserveeEvent)
            innerObservee.emit('change', innerObserveeEvent)
        } else if(changeCouldRelocateInnerProperty) {
            if(change.type === 'set' /*&& changedPropertyDepth <= propertyListDepth  - this part already done above*/) {
                removeUnion()
            } else if(change.type === 'removed') {
                var relevantIndex = propertyList[change.property.length]
                var removedIndexesContainsIndexOfInnerObservee = change.index <= relevantIndex && relevantIndex <= change.index + change.removed.length - 1
                var removedIndexesAreBeforeIndexOfInnerObservee = change.index + change.removed.length - 1 < relevantIndex && relevantIndex

                if(removedIndexesContainsIndexOfInnerObservee && changedPropertyDepth <= propertyListDepth+1) {
                    removeUnion()
                } else if(removedIndexesAreBeforeIndexOfInnerObservee) {
                    propertyList[change.property.length] = relevantIndex - change.removed.length // change the propertyList to match the new index
                }
            } else if(change.type === 'added') {
                var relevantIndex = propertyList[change.property.length]
                if(change.index < relevantIndex) {
                    propertyList[change.property.length] = relevantIndex + change.count // change the propertyList to match the new index
                }
            }
        }
    })

    var removeUnion = function() {
        innerObservee.removeListener('change', innerChangeHandler)
        that.offChangeInternal(containerChangeHandler)
    }
}
450112
public void addEntityChangeListener(I_CmsEntityChangeListener changeListener, String changeScope) {

        if (m_observerdEntity == null) {
            throw new RuntimeException("The Observer has been cleared, no listener registration possible.");
        }
        if (!m_changeListeners.containsKey(changeScope)) {
            m_changeListeners.put(changeScope, new ArrayList<I_CmsEntityChangeListener>());
            // if changeScope==null, it is a global change listener, and we don't need a scope value
            if (changeScope != null) {
                // save the current change scope value
                m_scopeValues.put(changeScope, CmsContentDefinition.getValueForPath(m_observerdEntity, changeScope));
            }
        }
        m_changeListeners.get(changeScope).add(changeListener);
    }
482591
function (object, property, value) {
        if (object[OBSERVER_PROPERTY]) {
            var existed = ownProperty.call(object, property), oldVal = object[property];
            delete object[property];

            if (existed) {
                var chgset=[changeDesc(object, property, object[property], oldVal, "deleted")];
                callObservers(object, chgset);
            }
        } else {
            delete object[property];
        }
    }
908689
function observe (value, asRootData) {
  if (!isObject(value) || value instanceof VNode) {
    return
  }
  var ob;
  if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
    ob = value.__ob__;
  } else if (
    shouldObserve &&
    !isServerRendering() &&
    (Array.isArray(value) || isPlainObject(value)) &&
    Object.isExtensible(value) &&
    !value._isVue
  ) {
    ob = new Observer(value);
  }
  if (asRootData && ob) {
    ob.vmCount++;
  }
  return ob
}
1321417
protected void addObserver (Object obs)
    {
        if (_observers == null) {
            _observers = ObserverList.newFastUnsafe();
        }
        _observers.add(obs);
    }
398184
function Observer (value) {
  this.value = value;
  this.dep = new Dep();
  this.vmCount = 0;
  def(value, '__ob__', this);
  if (Array.isArray(value)) {
    var augment = hasProto
      ? protoAugment
      : copyAugment;
    augment(value, arrayMethods, arrayKeys);
    this.observeArray(value);
  } else {
    this.walk(value);
  }
}
789192
function registerOptionsObserver(instance) {
    if (!instance._mounted || !instance._options) {
      return
    }

    instance._observer.observe(instance._options, {
      childList: true,
      attributes: true,
      characterData: true,
      subtree: true,
      attributeFilter: ['disabled', 'label', 'selected', 'title', 'multiple'],
    })
  }
743693
public void setCollapsed (boolean collapse)
    {
        if (collapse) {
            _content.setVisible(false);
            _trigger.setIcon(_downIcon);

        } else {
            _content.setVisible(true);
            _trigger.setIcon(_upIcon);
        }
        SwingUtil.refresh(this);
    }
574897
def setup_model_event_subscribers(config, model_cls, schema):
    
    events_map = get_events_map()
    model_events = schema.get('_event_handlers', {})
    event_kwargs = {'model': model_cls}

    for event_tag, subscribers in model_events.items():
        type_, action = event_tag.split('_')
        event_objects = events_map[type_][action]

        if not isinstance(event_objects, list):
            event_objects = [event_objects]

        for sub_name in subscribers:
            sub_func = resolve_to_callable(sub_name)
            config.subscribe_to_events(
                sub_func, event_objects, **event_kwargs)
588266
function (modelName, typesUpdated) {
      var _this3 = this;

      var klass = this._nameToClass(modelName);
      var records = this.getRecords(klass, modelName);

      var onChange = function () {
        typesUpdated([_this3.wrapModelType(klass, modelName)]);
      };
      var observer = {
        didChange: function () {
          _emberMetalRun_loop.default.scheduleOnce('actions', this, onChange);
        },
        willChange: function () {
          return this;
        }
      };

      _emberRuntimeMixinsArray.addArrayObserver(records, this, observer);

      var release = function () {
        _emberRuntimeMixinsArray.removeArrayObserver(records, _this3, observer);
      };

      return release;
    }
1148564
function makeParamsObserver() {
    
    // Observe and unobserve the children.
    function _observeChildren  (v) { observeObjectNow(v, childrenObserver); }
    function _unobserveChildren(v) { unobserveObject (v, childrenObserver); }
    
    function _observeAttrs(v) {
      observeObjectNow(v, attrsObserver);
      subAttrs.forEach(a => observeObjectNow(v[a], subAttrObservers[a]));
    }
    function _unobserveAttrs(v) {
      unobserveObject(v, AttributesObserver);
      subAttr.forEach(a => unobserveObject(v[a], subAttrObservers[a]));
    }

    // When we get a new parameter, set up observers.
    function add(v, i) {
      switch (i) {
      case 'children':
        _observeChildren(v);
        break;
      case 'attrs':    _observeAttrs   (v); break;
      }
    }
    
    // When parameters change, tear down and resetup observers.
    function update(v, i, params, {oldValue}) {
      switch (i) {
      case 'children': _unobserveChildren(oldValue); _observeChildren(v); break;
      case 'attrs':    _unobserveAttrs   (oldValue); _observeAttrs   (v); break;
      }
    }
    
    return makeObserver({add, update});
  }
859328
function () {
            /*  determine parameters  */
            var params = $cs.params("observe", arguments, {
                name:        { pos: 0, req: true,   valid: "string"        },
                func:        { pos: 1, req: true,   valid: "function"      },
                touch:       {         def: false,  valid: "boolean"       },
                boot:        {         def: false,  valid: "boolean"       },
                op:          {         def: "set",  valid: /^(?:get|set|changed|splice|delete)$/ },
                spool:       {         def: null,   valid: "(null|string)" },
                noevent:     {         def: false,  valid: "boolean"       }
            });

            /*  parse the value name into selection path segments  */
            var path = _cs.select_parse(params.name);

            /*  determine the actual component owning the model
                as we want to subscribe the change event there only  */
            var owner = null;
            var model = null;
            var comp  = this;
            while (comp !== null) {
                owner = comp.property({ name: "ComponentJS:model", returnowner: true });
                if (!_cs.isdefined(owner))
                    throw _cs.exception("observe", "no model found containing value \"" + path[0] + "\"");
                model = owner.property("ComponentJS:model");
                if (_cs.isdefined(model.spec[path[0]]))
                    break;
                comp = owner.parent();
            }
            if (comp === null)
                throw _cs.exception("observe", "no model found containing value \"" + path[0] + "\"");

            /*  support wildcard matching and always match childs  */
            var name = path.join(".")
                .replace(/\./g, "\\.")
                .replace(/\*\*/g, ".+?")
                .replace(/\*/g, "[^.]+");
            name += "(?:\\.[^.]+)*";

            /*  subscribe to model value change event  */
            var id = owner.subscribe({
                name:      new RegExp("ComponentJS:model:" + name + ":" + params.op),
                capturing: false,
                spreading: false,
                bubbling:  false,
                noevent:   params.noevent,
                func:      params.func
            });

            /*  mark component for having subscribers of operation
                (for performance optimization reasons)  */
            var key = "ComponentJS:model:subscribers:" + params.op;
            var subscribers = owner.property({ name: key, def: 0 });
            subscribers += 1;
            owner.property({ name: key, value: subscribers });

            /*  optionally spool reverse operation  */
            if (params.spool !== null) {
                var info = _cs.spool_spec_parse(this, params.spool);
                info.comp.spool(info.name, this, "unobserve", id);
            }

            /*  if requested (for a one-time initial observer run),
                either touch the model value once (which causes _all_ observers to trigger!)
                or do a "bootstrapping execution" of only our callback function once  */
            if (params.touch)
                this.touch(params.name);
            else if (params.boot) {
                var value = this.value(params.name);
                var args = [ value, value, params.op, path.join(".") ];
                if (!params.noevent) {
                    args.unshift($cs.event({
                        name:        params.name,
                        spec:        {},
                        async:       false,
                        result:      undefined,
                        target:      this,
                        propagation: true,
                        processing:  true,
                        dispatched:  false
                    }));
                }
                params.func.apply(this, args);
            }

            return id;
        }
1508
function () {
            var el = this.opts.element, observer, self = this;

            el.on("change.select2", this.bind(function (e) {
                if (this.opts.element.data("select2-change-triggered") !== true) {
                    this.initSelection();
                }
            }));

            this._sync = this.bind(function () {

                // sync enabled state
                var disabled = el.prop("disabled");
                if (disabled === undefined) disabled = false;
                this.enable(!disabled);

                var readonly = el.prop("readonly");
                if (readonly === undefined) readonly = false;
                this.readonly(readonly);

                syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
                this.container.addClass(evaluate(this.opts.containerCssClass, this.opts.element));

                syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
                this.dropdown.addClass(evaluate(this.opts.dropdownCssClass, this.opts.element));

            });

            // IE8-10 (IE9/10 won't fire propertyChange via attachEventListener)
            if (el.length && el[0].attachEvent) {
                el.each(function() {
                    this.attachEvent("onpropertychange", self._sync);
                });
            }

            // safari, chrome, firefox, IE11
            observer = window.MutationObserver || window.WebKitMutationObserver|| window.MozMutationObserver;
            if (observer !== undefined) {
                if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
                this.propertyObserver = new observer(function (mutations) {
                    $.each(mutations, self._sync);
                });
                this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
            }
        }
163105
function bind(element, properties) {
    var bindings = Object.keys(properties).filter(function (name) {
      var property = properties[name];
      if (Object.prototype.hasOwnProperty.call(property, 'statePath')) {
        if (!property.readOnly && property.notify) {
          console.warn('PolymerRedux: <' + element.constructor.is + '>.' + name + ' has "notify" enabled, two-way bindings goes against Redux\'s paradigm');
        }
        return true;
      }
      return false;
    });

    /**
     * Updates an element's properties with the given state.
     *
     * @private
     * @param {Object} state
     */
    var update = function update(state) {
      var propertiesChanged = false;
      bindings.forEach(function (name) {
        // Perhaps .reduce() to a boolean?
        var statePath = properties[name].statePath;

        var value = typeof statePath === 'function' ? statePath.call(element, state) : (0, _path.get)(state, statePath);

        var changed = element._setPendingPropertyOrPath(name, value, true);
        propertiesChanged = propertiesChanged || changed;
      });
      if (propertiesChanged) {
        element._invalidateProperties();
      }
    };

    // Redux listener
    var unsubscribe = store.subscribe(function () {
      var detail = store.getState();
      update(detail);

      element.dispatchEvent(new window.CustomEvent('state-changed', { detail: detail }));
    });

    subscribers.set(element, unsubscribe);

    return update(store.getState());
  }
124955
def union_update(self, other):
        
        if not isinstance(other, Set):
            raise ValueError('other must be a Set instance')
        if self is other:
            return
        for item in other.items:
            self.add(item)
1066789
function(options) {
      var t = this;
      t.options = options;
      t.monitor = options.monitor;

      // Call this to set the initial height/width to something
      // other than the size of the inner view elements.
      options.component.setDefaultSize({
        width: 400,
        height: 300
      });

      // Set monitor defaults.  If your view is for a specific probe,
      // then set the probeClass and any default probe initialization
      // parameters.
      if (!t.monitor.get('probeClass')) {
        t.monitor.set({
          probeClass: '{{shortAppName}}SampleProbe'
        });
      }

      // Update the view on monitor change.  The monitor isn't in
      // a connected state, so this will be called when connected.
      if (t.monitor != null) {
        t.monitor.on('change', t.onchange, t);
      }
    }
514364
function() {
			canReflect.onValue( observation, updater,"notify");
			if (observation.hasOwnProperty("_value")) {// can-observation 4.1+
				compute.value = observation._value;
			} else {// can-observation < 4.1
				compute.value = observation.value;
			}
		}