set up some local variables and functions that we can reuse for all tweens - we do this only once and cache things to improve performance
543607
function(t, cs) {  
				var s = {}, i;
				if ((cs = cs || _getComputedStyle(t, null))) {
					if ((i = cs.length)) {
						while (--i > -1) {
							s[cs[i].replace(_camelExp, _camelFunc)] = cs.getPropertyValue(cs[i]);
						}
					} else { //Opera behaves differently - cs.length is always 0, so we must do a for...in loop.
						for (i in cs) {
							s[i] = cs[i];
						}
					}
				} else if ((cs = t.currentStyle || t.style)) {
					for (i in cs) {
						s[i.replace(_camelExp, _camelFunc)] = cs[i];
					}
				}
				if (!_supportsOpacity) {
					s.opacity = _getIEOpacity(t);
				}
				var tr = _getTransform(t, cs, false);
				s.rotation = tr.rotation * _RAD2DEG;
				s.skewX = tr.skewX * _RAD2DEG;
				s.scaleX = tr.scaleX;
				s.scaleY = tr.scaleY;
				s.x = tr.x;
				s.y = tr.y;
				if (s.filters != null) {
					delete s.filters;
				}
				return s;
			}
255609
function cache(source) {
    var _err = Nil
    var _value = Nil
    var _result = null
    var listeners = null

    return function continuable(callback) {
        if (_err !== Nil || _value !== Nil) {
            callback(_err, _value)
        } else if (listeners) {
            listeners.push(callback)
        } else {
            listeners = [callback]
            _result = source(function (err, value) {
                _err = err
                _value = value

                listeners.forEach(function (l) { l(err, value) })
            })
        }

        return _result
    }
}
784338
function replaceVariables(localPath, variables) {
    return new Promise(function(resolve, reject) {
        // Read the file
        let body = fs.readFileSync(localPath, 'utf8');

        // Do the replacement for all of the variables
        const keys = Object.keys(variables);
        keys.forEach(function(key) {
            const value = variables[key];
            const re = new RegExp(`"\\$${key}"`, 'g');

            // Parse the value (to see if it is falsey)
            try {
                const parsed = JSON.parse(value);
                body = body.replace(re, parsed ? `"${parsed}"` : `null`);
            } catch (err) {
                // Not valid JSON, treat it as a string
                body = body.replace(re, `"${value}"`);
            }
        });

        console.log('Variables replaced', body);
        fs.writeFile(localPath, body, function(err) {
            if (err) return reject(err);
            resolve(localPath);
        });
    });
}
296594
function collectUnusedVariables(scope, unusedVars) {
	            var variables = scope.variables;
	            var childScopes = scope.childScopes;
	            var i, l;
	            if (scope.type !== "TDZ" && (scope.type !== "global" || config.vars === "all")) {
	                for (i = 0, l = variables.length; i < l; ++i) {
	                    var variable = variables[i];
	
	                    // skip a variable of class itself name in the class scope
	                    if (scope.type === "class" && scope.block.id === variable.identifiers[0]) {
	                        continue;
	                    }
	
	                    // skip function expression names and variables marked with markVariableAsUsed()
	                    if (scope.functionExpressionScope || variable.eslintUsed) {
	                        continue;
	                    }
	
	                    // skip implicit "arguments" variable
	                    if (scope.type === "function" && variable.name === "arguments" && variable.identifiers.length === 0) {
	                        continue;
	                    }
	
	                    // explicit global variables don't have definitions.
	                    var def = variable.defs[0];
	
	                    if (def) {
	                        var type = def.type;
	                        // skip catch variables
	                        if (type === "CatchClause") {
	                            if (config.caughtErrors === "none") {
	                                continue;
	                            }
	
	                            // skip ignored parameters
	                            if (config.caughtErrorsIgnorePattern && config.caughtErrorsIgnorePattern.test(def.name.name)) {
	                                continue;
	                            }
	                        }
	                        if (type === "Parameter") {
	                            // skip any setter argument
	                            if (def.node.parent.type === "Property" && def.node.parent.kind === "set") {
	                                continue;
	                            }
	
	                            // if "args" option is "none", skip any parameter
	                            if (config.args === "none") {
	                                continue;
	                            }
	
	                            // skip ignored parameters
	                            if (config.argsIgnorePattern && config.argsIgnorePattern.test(def.name.name)) {
	                                continue;
	                            }
	
	                            // if "args" option is "after-used", skip all but the last parameter
	                            if (config.args === "after-used" && def.index < def.node.params.length - 1) {
	                                continue;
	                            }
	                        } else {
	                            // skip ignored variables
	                            if (config.varsIgnorePattern && config.varsIgnorePattern.test(def.name.name)) {
	                                continue;
	                            }
	                        }
	                        if (def.node.type === 'VariableDeclarator') {
				        		// Variables can be marked as 'exported' in a comment if they are used as global variables
								var comments = def.parent.leadingComments;
								var report = true;
								if (Array.isArray(comments)) {
									for (var k = 0, len = comments.length; k < len; k++) {
										if (comments[k].type === "Block" && comments[k].value.toLowerCase().indexOf('exported') >= 0){ //$NON-NLS-1$
											report = false;
											break;
										}
									}
								}
								if (!report) {
									continue;
								}
							}
	                    }
	                    if (!isUsedVariable(variable) && !isExported(variable)) {
	                    	if(def) {
	                    		type = def.type;
	                    		variable.data = {
		                    		0: variable.identifiers[0].name,
		                    		nls: 'no-unused-vars-unused',
		                    		pid: 'no-unused-vars-unused'
		                    	};
		                    	if(type === "Parameter") {
		                    		continue;
		                    	}
		                    	if(type === "ImportBinding") {
		                    		variable.data.pid = 'no-unused-vars-import';
		                    	} else if(def.node.type === "FunctionDeclaration") {
		                    		var tern = context.getTern();
		                    		var refQuery = {
		                    			end: def.node.id.start
		                    		};
		                    		var filename = tern.file.name;
		                    		var refs = tern.findRefs(refQuery, tern.file);
		                    		var result = [];
		                    		if (refs && Array.isArray(refs.refs)) {
		                    			// filtering the refs from the current file - remove the one that matches the current node
		                    			refs.refs.forEach(function(match) {
		                    				if (match.file !== filename) {
		                    					// any match in a different file is a good match
		                    					result.push(match);
		                    				}
		                    			});
		                    		}
		                    		if (result.length > 0) {
		                    			continue;
		                    		}
		                    		variable.data.pid = variable.data.nls = 'no-unused-vars-unused-funcdecl';
		                    	} else if(typeof variable.isread === "boolean" && !variable.isread) {
		                    		variable.data.pid = variable.data.nls = 'no-unused-vars-unread';
		                    	}
	                    	}
	                        unusedVars.push(variable);
	                    }
	                }
	            }
	            for (i = 0, l = childScopes.length; i < l; ++i) {
	                collectUnusedVariables(childScopes[i], unusedVars);
	            }
	            return unusedVars;
	        }
626513
private void initialize(Map context) {
    // Guard against recursion.
    context.put(jsTypeTree, this);

    // Create temporary accumulators for the contents of the fields and variants instance
    // variables.
    List tmpFields = new ArrayList();
    List tmpVariants = new ArrayList();

    // Perform tasks assigned to the recursive 'number' subroutine (see comment there)
    number(jsTypeTree, context, false, 0, tmpFields, tmpVariants);

    // Move information from temporaries into permanent instance variables
    fields = (JSField[])tmpFields.toArray(new JSField[0]);
    variants = (JSVariant[])tmpVariants.toArray(new JSVariant[0]);

    // Compute the contents of the 'boxed' instance variable, which is deriveable from the
    // contents of those JSVariants which have found their way into 'fields.'  These are
    // all intended to be boxed variants because they were detected to be underneath
    // JSRepeated nodes during the 'number' process.
    int boxLen = 0; // accumulate total length of boxed array
    for (int i = 0; i < fields.length; i++)
      if (fields[i] instanceof JSVariant)
        // On the first pass, we box the variant and accumulate its accessor count
        boxLen += ((JSVariant)fields[i]).box(context).getAccessorCount();
    boxed = new int[boxLen][];
    int boxIndex = 0;

    // On the second pass through the boxed variants, we get their accessor count a second
    // time and use it this time to fill in the contents of the 'boxed' instance variable
    // proper.
    for (int i = 0; i < fields.length; i++)
      if (fields[i] instanceof JSVariant)
        for (int j = 0; j < ((JSVariant)fields[i]).getBoxed().getAccessorCount(); j++)
          boxed[boxIndex++] = new int[] { i, j };

    // Set the 'accessor' property of every JSField in the tree (see comment on
    // setAccessors).
    setAccessors(0, this);

    // Set the multiChoiceCount for each node in the tree.  Note this must be done
    // after boxing any variants found underneath JSRepeated nodes, since boxing changes
    // the multiChoiceCount.  setMultiChoiceCount is a recursive method that will set
    // counts starting from the leaves working back to the root.
    jsTypeTree.setMultiChoiceCount();

    // Compute the serialForm if it isn't already there due to the deserializing
    // constructor
    if (serialForm == null) {
      // Store the name in a convenient non-null form
      name = jsTypeTree.getFeatureName();
      if (name == null)
        name = "";
      try {
        byte[] utfname = name.getBytes("UTF8");
        serialForm = new byte[2 + utfname.length + 2 + jsTypeTree.encodedTypeLength()];
        ArrayUtil.writeShort(serialForm, 0, (short)utfname.length);
        System.arraycopy(utfname, 0, serialForm, 2, utfname.length);
        int limits[] = new int[] { 2 + utfname.length, serialForm.length };
        JSType.setCount(serialForm, limits, version);
        jsTypeTree.encodeType(serialForm, limits);
      } catch (UnsupportedEncodingException e) {
        FFDCFilter.processException(e, "initialize", "604");
        IllegalArgumentException ex = new IllegalArgumentException();
        ex.initCause(e);
        throw ex;
      }
    }

    // Compute the schemaID, which is a 64-bit truncated SHA-1 hash over the serialForm.
    schemaID = CryptoHash.hash(serialForm);
    schemaLongID = Long.valueOf(schemaID);
  }
330837
function tweenArc(a) {
            let i = d3Interpolate.interpolate(this._current, a);

            this._current = i(0);

            return function(t) {
                return shape(i(t));
            };
        }
362633
def extend_locals(locals)
      # Create new local variables from the input hash
      locals.each do |key, value|
        begin
          @binding.local_variable_set key.to_sym, value
        rescue NameError => variable
          Compiler.error :variable_name, variable, key
        end
      end
    end
1219746
function() {
		// temp local vars
		var lastFlickDuration,
			tempReleasePos;

		// s = this
		var s = {
			lastFlickOffset: {},
			lastFlickDist: {},
			lastFlickSpeed: {},
			slowDownRatio:  {},
			slowDownRatioReverse:  {},
			speedDecelerationRatio:  {},
			speedDecelerationRatioAbs:  {},
			distanceOffset:  {},
			backAnimDestination: {},
			backAnimStarted: {},
			calculateSwipeSpeed: function(axis) {
				

				if( _posPoints.length > 1) {
					lastFlickDuration = _getCurrentTime() - _gestureCheckSpeedTime + 50;
					tempReleasePos = _posPoints[_posPoints.length-2][axis];
				} else {
					lastFlickDuration = _getCurrentTime() - _gestureStartTime; // total gesture duration
					tempReleasePos = _startPoint[axis];
				}
				s.lastFlickOffset[axis] = _currPoint[axis] - tempReleasePos;
				s.lastFlickDist[axis] = Math.abs(s.lastFlickOffset[axis]);
				if(s.lastFlickDist[axis] > 20) {
					s.lastFlickSpeed[axis] = s.lastFlickOffset[axis] / lastFlickDuration;
				} else {
					s.lastFlickSpeed[axis] = 0;
				}
				if( Math.abs(s.lastFlickSpeed[axis]) < 0.1 ) {
					s.lastFlickSpeed[axis] = 0;
				}
				
				s.slowDownRatio[axis] = 0.95;
				s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis];
				s.speedDecelerationRatio[axis] = 1;
			},

			calculateOverBoundsAnimOffset: function(axis, speed) {
				if(!s.backAnimStarted[axis]) {

					if(_panOffset[axis] > _currPanBounds.min[axis]) {
						s.backAnimDestination[axis] = _currPanBounds.min[axis];
						
					} else if(_panOffset[axis] < _currPanBounds.max[axis]) {
						s.backAnimDestination[axis] = _currPanBounds.max[axis];
					}

					if(s.backAnimDestination[axis] !== undefined) {
						s.slowDownRatio[axis] = 0.7;
						s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis];
						if(s.speedDecelerationRatioAbs[axis] < 0.05) {

							s.lastFlickSpeed[axis] = 0;
							s.backAnimStarted[axis] = true;

							_animateProp('bounceZoomPan'+axis,_panOffset[axis], 
								s.backAnimDestination[axis], 
								speed || 300, 
								framework.easing.sine.out, 
								function(pos) {
									_panOffset[axis] = pos;
									_applyCurrentZoomPan();
								}
							);

						}
					}
				}
			},

			// Reduces the speed by slowDownRatio (per 10ms)
			calculateAnimOffset: function(axis) {
				if(!s.backAnimStarted[axis]) {
					s.speedDecelerationRatio[axis] = s.speedDecelerationRatio[axis] * (s.slowDownRatio[axis] + 
												s.slowDownRatioReverse[axis] - 
												s.slowDownRatioReverse[axis] * s.timeDiff / 10);

					s.speedDecelerationRatioAbs[axis] = Math.abs(s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis]);
					s.distanceOffset[axis] = s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis] * s.timeDiff;
					_panOffset[axis] += s.distanceOffset[axis];

				}
			},

			panAnimLoop: function() {
				if ( _animations.zoomPan ) {
					_animations.zoomPan.raf = _requestAF(s.panAnimLoop);

					s.now = _getCurrentTime();
					s.timeDiff = s.now - s.lastNow;
					s.lastNow = s.now;
					
					s.calculateAnimOffset('x');
					s.calculateAnimOffset('y');

					_applyCurrentZoomPan();
					
					s.calculateOverBoundsAnimOffset('x');
					s.calculateOverBoundsAnimOffset('y');


					if (s.speedDecelerationRatioAbs.x < 0.05 && s.speedDecelerationRatioAbs.y < 0.05) {

						// round pan position
						_panOffset.x = Math.round(_panOffset.x);
						_panOffset.y = Math.round(_panOffset.y);
						_applyCurrentZoomPan();
						
						_stopAnimation('zoomPan');
						return;
					}
				}

			}
		};
		return s;
	}
1156187
def memoize(fn):
    ''''''

    cache = {}

    @wraps(fn)
    def wrapped_function(*args):
        if args in cache:
            return cache[args]

        else:
            result = fn(*args)
            cache[args] = result
            return result

    return wrapped_function
219981
def memoize(function):
    
    cache = {}
    @functools.wraps(function)
    def _memoize(*args):
        if args in cache:
            return cache[args]
        result = function(*args)
        cache[args] = result
        return result
    return function
455384
function setLocalVariable( $varName, $varValue, $rootNamespace )
    {
        $this->CurrentLocalVariablesNames[$rootNamespace][$varName] = 1;
        $this->setVariable( $varName, $varValue, $rootNamespace );
    }
95283
private void initVariables() {
    mSumCapacityBytes = 0;
    mSumUsedBytes = 0;
    mSumCapacityBytesOnTierMap = new TreeMap<>(FileSystemAdminShellUtils::compareTierNames);
    mSumUsedBytesOnTierMap = new TreeMap<>(FileSystemAdminShellUtils::compareTierNames);

    // TierInfoMap is of form Map<Tier_Name, Map<Worker_Name, Worker_Tier_Value>>
    mCapacityTierInfoMap = new TreeMap<>(FileSystemAdminShellUtils::compareTierNames);
    mUsedTierInfoMap = new TreeMap<>(FileSystemAdminShellUtils::compareTierNames);
  }
1015127
private void restoreNestedVariables() {
	if (nestedVars != null) {
	    Iterator iter = nestedVars.iterator();
	    while (iter.hasNext()) {
		String varName = (String) iter.next();
		varName = findAlias(varName);
		Object obj = originalNestedVars.get(varName);
		if (obj != null) {
		    invokingJspCtxt.setAttribute(varName, obj);
		} else {
		    invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
		}
	    }
	}
    }
611802
def _at_variables(self, calculator, rule, scope, block):
        
        warn_deprecated(
            rule,
            "@variables and @vars are deprecated.  "
            "Just assign variables at top-level.")
        _rule = rule.copy()
        _rule.unparsed_contents = block.unparsed_contents
        _rule.namespace = rule.namespace
        _rule.properties = []
        self.manage_children(_rule, scope)
1147445
function unsetLocalVariables()
    {
        foreach ( $this->CurrentLocalVariablesNames as $ns => $vars )
        {
            foreach ( $vars as $var => $val )
                $this->unsetLocalVariable( $var, $ns );
        }
    }
355136
function(_options){
            // init flash vars
            var _id = _options.id,
                _params = _options.params;
            if (!_params){
                _params = {};
                _options.params = _params;
            }
            var _vars = _params.flashvars||'';
            _vars += (!_vars?'':'&')+('id='+_id);
            // delegate mouse event bubble
            if (!_options.hidden&&(!!_options.target||
                 _h.__canFlashEventBubble(_params.wmode))){
                var _tid = _e._$id(_options.target)||
                           _e._$id(_options.parent);
                _cache[_id+'-tgt'] = _tid;
            }
            _params.flashvars = _vars;
            // check event callback
            _u._$loop(_options,function(_value,_key){
                if (_u._$isFunction(_value)&&_key!='onready'){
                    _cache[_id+'-'+_key] = _value;
                }
            });
        }
1207282
function()
{        
    this._beginReady = this._endReady = this._thenReady = false;
    
    
    
    /**
     * Called on first tween start
     * 
     * @returns {TweenPro}
     */
    this._run = function()
    {
        if(this._duration)
        {
            this._startProgress();
        }
        // get current display and/or visibility values before starting, if needed
        if(this._hasStaticProps)
        {
            this._fetchStaticProps();
            this._setStaticProps('tween');                                        
        }

        this._running = true;
        this._delayDummy = null;
        
        if(this._emulatedBegin && this._hasHandlers('_begin'))
        {
            this._runHandlers('_begin');
        }
        
        // if from() or fromTo() tween, need to jump to begin position before starting the animation
        if(this._emulatedFrom && this._from)
        {
            this._setTween('begin');
        }
        
        this._startTime = Tw.ticker.now();             
        this._playTween();

        return this;            
    };                                 


    /**
     * Used to restore begin or end style values accordingly to current direction
     * 
     * @param {string} field
     */
    this._backTween = function(field)
    {
        this._resetTween(field);
    };


    /**
     * Set style values accordinglty to the param, and perform postTween actions
     * 
     * @param {string} field
     */
    this._resetTween = function(field)
    {
        this._setTween(field);
        this._postTween(field);            
    };


    /**
     * Perform actions before starting the tween. Apply to both directions
     * 
     * @param {boolean} direction - true = forward, false = backward
     */
    this._preTween = function(direction)
    {
        var field = direction? 'begin' : 'end';
        if(this._hasStaticProps && this._duration)
        {
            this._setStaticProps(field, 'tween');                            
        }
        this._setTween(field);
    };
    

    /**
     * Perform actions after ending the tween. Apply to both directions
     * 
     * @param {string} field
     */
    this._postTween = function(field)
    {
        if(field == 'end')                
        {
            if(this._hasThen)
            {
                this._setTween('then');
            }
            if(this._hasStaticProps)
            {
                this._setStaticProps(field, 'then');
            }
        }
        else
        {
            // if the tween is reversed, restore previous style values
            // this is needed in timelines, when a reversed tween is preceded by others that refer common targets, with a time gap between them
            // otherwise, during the time gap in reverse direction the targets will have wrong style values
            if(this._hasPre)// && this._offset !== 0)
            {
                this._setTween('pre');
            }
            this._setStaticProps(field);
        }

    };


    /**
     * Get a simple name: value map of style property, ready to be passed to the chosen animation library.
     * If supported, set also the per-property easing specified by the user
     * 
     * @param {object} tween - tween data structure
     * @param {string} field - 'begin' | 'end' | 'pre' | 'then'
     * @param {boolean} isSet - true when the values are needed for changing the style instantly. Easing info are omitted in this case
     * @returns {object}
     */
    this._getTweenValues = function(tween, field, isSet)
    {
        var values = {}, entry, value, name, easing, i = 0;
        for(name in tween)
        {
            entry = tween[name];
            value = null;
            easing = entry.easing;

            if(entry[field] !== null)
            {
                i++;
                // cast pure numeric string to number. This avoid bugs in Transit and other libraries that potentially does not support numeric 
                // values passed as string
                value = isNumeric(entry[field])? Number(entry[field]) : entry[field];
                value = isSet || !this._allowMultipleEasing || !easing? value : [value, this._getRealEasing(easing)];
                values[name] = value;
            }            
        }

        // instead of handling different errors from any library involved, if there are no values to set, we force a fake tween
        if(!i)
        {
            values.opacity = '+=0';
        }

        return values;
    };


    /**
     * Fetch a style value for a dom element
     * 
     * @param {object} item - dom element
     * @param {string} name - property name
     * @param {boolean} useStyle - if true, use element.style instead of computedStyle value
     * @returns {string|number}
     */
    this._getCurrentValue = function(item, name, useStyle)
    {
        var style = useStyle? item.style : window.getComputedStyle(item);
        return style[name];        
    };


    /**
     * Fetch current values for display and / or visibility properties
     * 
     */
    this._fetchStaticProps = function()
    {             
        this._staticProps = [];
        
        var item, i, end, names, name, value, fieldName, field, hidden, tweenValue, values;
        for(i = 0, end = this._getTargetLength(); i < end; i++)
        {
            item = this._target.get(i);
            names = {display: false, visibility: false};
            
            this._staticProps[i] = {
                begin: {},
                end: {},
                then: {},
                tween: {}
            };
            
            for(name in names)
            {
                fieldName = '_' + name;
                field = cloneObject(this[fieldName]);
                if(field.mask > 0)
                {
                    if(field.mask < 7)
                    {
                        value = this._getCurrentValue(item, name, false);
                        if(field.begin === null)
                        {
                            field.begin = value;
                        }

                        if(field.end === null)
                        {
                            field.end = value;
                            if(field.then === null)
                            {
                                field.then = value;
                            }
                        }                                                                                
                    }

                    values = this._staticProps[i];
                    
                    values.begin[name] = field.begin;
                    values.end[name] = field.end;
                    values.then[name] = field.then;
                    // values that show the element need to be set before the tween
                    hidden = (name == 'display')? 'none' : 'hidden';
                    tweenValue = field.begin != hidden? field.begin : (field.end != hidden? field.end : false);
                    if(tweenValue !== false)
                    {
                        values.tween[name] = tweenValue;
                    }                    
                }
            }
        }
    };
    
    
    /**
     * Set display and visibility properties, that are handled separately
     * @link http://tweene.com/docs/#displayVisibility
     * 
     * @param {string} first
     * @param {string} [second] two set of values could be applied toghether in some cases, for example end + then or begin + tween
     */
    this._setStaticProps = function(first, second)
    {
        if(this._staticProps.length)
        {
            var i, end, values;
            for(i = 0, end = this._getTargetLength(); i < end; i++)
            {                
                values = this._staticProps[i][first];
                if(second)
                {
                    values = extendObject(values, this._staticProps[i][second]);
                }
                if(!isEmpty(values))
                {
                    this._target.eq(i).css(values);
                }
            }
        }
    };         
    

    /**
     * Override TweenCommon._getRealEasing()
     * It generates also custom bezier curves needed for resuming a paused tween honoring the original easing effect
     * 
     * @param {string|array} value
     * @returns {string|array|function}
     */
    this._getRealEasing = function(value)
    {
        if(isString(value) && value in easings)
        {
            value = easings[value];
        }

        if(isArray(value))
        {
            var position = this._position;
            // in backward direction, reverse the bezier curve too
            if(!this._localFwd)
            {
                value = reverseBezier(value);
                position = this._duration - position;
            }

            var timeRatio = position / this._duration;
            value = this._getBezierEasing(getNewBezier(value, timeRatio));
        }

        return value;
    };


}