Handle callback related to changes in transformations.
173742
def transform_cb(self, setting, value):
        """"""
        self.make_callback('transform')

        # whence=0 because need to calculate new extents for proper
        # cutout for rotation (TODO: always make extents consider
        #  room for rotation)
        whence = 0
        self.redraw(whence=whence)
682168
function onNextTransform (transform, next) {
      // check if we should handle this filePath
      function shouldProcess (filePath, done) {
        done(!!multimatch(filePath, transform.pattern, transform.opts).length)
      }

      // transform the path
      function process (filePath, complete) {
        var filename = path.basename(filePath),
            pathParts = path.dirname(filePath).split(path.sep)

        // we'll get an empty arrary if we overslice
        pathParts = pathParts.slice(transform.by)
        pathParts.push(filename)

        var newPath = pathParts.join(path.sep),
            fileData = files[filePath]

        // don't need the old fileData anymore,
        // since we are re-adding with the new path
        delete files[filePath]
        files[newPath] = fileData

        complete()
      }

      // we do this for each option as the last may have modified the collection
      async.filter(Object.keys(files), shouldProcess, function (results) {
        async.each(results, process, next)
      })
    }
1151833
function handleCallback(err, url, callback) {
	if (callback.__called) {
		return;
	}
	callback.__called = true;
	callback(err, {
		url: url,
		title: callback.__title,
		count: callback.__redirectCounter,
		tracks: callback.__tracks
	});
}
167561
function(args, callInstance) {
    handlers.afterFunc({name: callInstance.name}, null, args, callInstance);
  }
261961
public void postUpdate()
    {
        if (current != null)
        {
            final Class<? extends State> next = current.checkTransitions(last);
            if (next != null)
            {
                changeState(next);
            }
        }
    }
769641
protected void transform(Source source, Result result) throws TransformerException {
		this.transformerFactory.newTransformer().transform(source, result);
	}
1260591
function changeHandler(eventOptions = {}) {
    const { key, silent } = eventOptions;
    const def = defs.get(this);

    if (key && key in def.keys && !silent) {
        triggerOne(this, 'set', eventOptions);
        triggerOne(this, 'modify', eventOptions);
    }
}
981882
function(){
            if(errors.length) return cb(errors);
            var transform = opts.transform || function(_result, _cb){
              _cb(null, _result);
            };
            transform(result, function(err, _result){
              if(err){
                errors.push(formatError(err, key));
                cb(errors);
              }else{
                cb(null, _result);
              }
            });
          }
734918
function (state, transformation, res) {
        if (!module.exports.operations.canTransform || !module.exports.operations.transform) {
            log.warn('Transform State operation not implemented by application');
            Utils.sendMessage(res, HttpStatus.NOT_IMPLEMENTED, JSON.stringify({ error: 'operation not implemented' }));
            return state;
        } else if (Utils.isNullOrEmpty(transformation)) {
            log.error('Transformation not provided');
            Utils.sendMessage(res, HttpStatus.BAD_REQUEST, JSON.stringify({ error: 'invalid transformation' }));
            return state;
        } else if (!module.exports.operations.canTransform(state, transformation)) {
            log.error('Unable to apply transformation:', transformation);
            Utils.sendMessage(res, HttpStatus.BAD_REQUEST, JSON.stringify({ error: 'invalid transformation' }));
            return state;
        }
        const result = module.exports.operations.transform(state, transformation);
        log.info('Successfully transformed state');
        log.debug('Transformed state from:', state, 'into:', result, 'using transformation:', transformation);
        Utils.sendMessage(res, HttpStatus.OK, JSON.stringify(result));
        return result;
    }
518622
function checkAndTransform(method) {
            return re.test(method) ? function (req) {
                return next[method](req).then(function (res) {
                    return Object.assign(res, { data: transform(res.data) });
                });
            } : function (req) {
                return next[method](req);
            };
        }
1153866
function() {
        if (bound) { self.unbind(transitionEnd, cb); }

        if (i > 0) {
          self.each(function() {
            this.style[support.transition] = (oldTransitions[this] || null);
          });
        }

        if (typeof callback === 'function') { callback.apply(self); }
        if (typeof nextCall === 'function') { nextCall(); }
      }
1167037
def _handle_log_rotations(self):
        '''  '''
        for h in self.capture_handlers:
            if self._should_rotate_log(h):
                self._rotate_log(h)
604419
function transform(path) {
    if (shouldProcess(path)) {
        const renderer = Renderer.forPath(path);
        transformer(path.node, renderer, buildErrorHandler(path));
        // replace the render call if present, else replace the JSX
        if (Renderer.isParent(path)) {
            path.parentPath.replaceWith(renderer.toFunctionCall());
        } else {
            path.replaceWith(renderer.toFunctionCall());
        }
    }
}
709602
function changeDelegatedHandler(eventOptions = {}) {
    const { key } = eventOptions;
    const def = defs.get(this);

    if (key && key in def.keys) {
        triggerOne(this, '_asterisk:set', eventOptions);
    }
}
949161
function () {
        var position = this.position;
        var rotation = this.rotation;
        var scale = this.scale;

        if (this.transformNeedsUpdate()) {
            var m = this.localTransform.array;

            // Transform order, scale->rotation->position
            mat4.fromRotationTranslation(m, rotation.array, position.array);

            mat4.scale(m, m, scale.array);

            rotation._dirty = false;
            scale._dirty = false;
            position._dirty = false;

            this._needsUpdateWorldTransform = true;
        }
    }
441988
protected void handleMutation() {

        if (m_unregistered) {
            removeObserver();
            return;
        }

        int maxHeight = getState().getMaxHeight();
        if (m_currentHeight > 0) {
            removeObserver(); // prevent 'recursive' call of handleMutation (it's not actually recursive since it's async, but would still lead to an infinite number of calls)
            JavaScriptObject scrollPositionData = saveScrollPositions(m_widget.getElement());
            String classToAdd = "o-measuring-height";
            m_widget.addStyleName(classToAdd);
            m_widget.getElement().getStyle().clearHeight();
            int computedHeight = m_widget.getOffsetHeight();
            m_widget.removeStyleName(classToAdd);
            if ((computedHeight + 10) < m_currentHeight) {
                m_currentHeight = -1;
                m_rpc.fixHeight(m_currentHeight);
            } else {
                m_widget.getElement().getStyle().setHeight(m_currentHeight, Unit.PX);
            }
            restoreScrollPositions(scrollPositionData);
            addMutationObserver(m_widget.getElement());
        } else if ((maxHeight > 0) && (m_widget.getOffsetHeight() > maxHeight)) {
            m_currentHeight = maxHeight;
            m_rpc.fixHeight(m_currentHeight);
        }
    }
1281085
def source_changed(self, event):
        
        # bail out early if the chain is empty
        transforms = self._chain.transforms[:]
        if len(transforms) == 0:
            self.transforms = []
            return
        
        # If the change signal comes from a transform that already appears in
        # our simplified transform list, then there is no need to re-simplify.
        if event is not None:
            for source in event.sources[::-1]:
                if source in self.transforms:
                    self.update(event)
                    return
        
        # First flatten the chain by expanding all nested chains
        new_chain = []
        while len(transforms) > 0:
            tr = transforms.pop(0)
            if isinstance(tr, ChainTransform) and not tr.dynamic:
                transforms = tr.transforms[:] + transforms
            else:
                new_chain.append(tr)
        
        # Now combine together all compatible adjacent transforms
        cont = True
        tr = new_chain
        while cont:
            new_tr = [tr[0]]
            cont = False
            for t2 in tr[1:]:
                t1 = new_tr[-1]
                pr = t1 * t2
                if (not t1.dynamic and not t2.dynamic and not 
                   isinstance(pr, ChainTransform)):
                    cont = True
                    new_tr.pop()
                    new_tr.append(pr)
                else:
                    new_tr.append(t2)
            tr = new_tr

        self.transforms = tr