Get the current configuration
@returns {{paced: boolean, rate: number, deterministic: boolean, time: *, master: *}}
Returns a copy of the current configuration
@private
975184
function _getConfig () {
    return {
      paced: paced,
      rate: rate,
      deterministic: deterministic,
      time: configuredTime,
      master: master,
      port: port
    }
  }
437977
function getAllJhipsterConfig(generator, force) {
    let configuration = generator && generator.config ? generator.config.getAll() || {} : {};
    if ((force || !configuration.baseName) && jhiCore.FileUtils.doesFileExist('.yo-rc.json')) {
        const yoRc = JSON.parse(fs.readFileSync('.yo-rc.json', { encoding: 'utf-8' }));
        configuration = yoRc['generator-jhipster'];
        // merge the blueprint config if available
        if (configuration.blueprint) {
            configuration = { ...configuration, ...yoRc[configuration.blueprint] };
        }
    }
    if (!configuration.get || typeof configuration.get !== 'function') {
        configuration = {
            ...configuration,
            getAll: () => configuration,
            get: key => configuration[key],
            set: (key, value) => {
                configuration[key] = value;
            }
        };
    }
    return configuration;
}
328689
function top () { // NOTE: Replacing line above
  // if (!opts) opts = {}

  // const tick = opts.interval || 1000
  // const started = Date.now()
  // const interval = setInterval(perSecond, tick)
  // const win = [{ time: process.hrtime(), cpu: process.cpuUsage(), delay: 0 }, null, null, null]
  const win = [{ time: process.hrtime(), cpu: process.cpuUsage() }, null, null, null] // NOTE: Replacing line above
  // const loopSampler = eld()

  let sec = 1

  // interval.unref()

  return {
    // pid: process.pid,
    // command: process.argv.join(' '),
    // started,
    // time () {
    //   return Date.now() - started
    // },
    // delay () {
    //   const btm = oldest()
    //   const timeDelta = process.hrtime(win[btm].time)
    //   const ms = timeDelta[0] * 1e3 + Math.floor(timeDelta[1] / 1e6)
    //   return Math.floor((loopSampler.delay - win[btm].delay) / (ms / tick))
    // },
    cpu () {
      const btm = oldest()
      const cpuDelta = process.cpuUsage(win[btm].cpu)
      const timeDelta = process.hrtime(win[btm].time)
      const us = timeDelta[0] * 1e6 + timeDelta[1] / 1e3
      perSecond() // NOTE: Added to skip timer and update at each check
      return {
        time: us,
        percent: (cpuDelta.system + cpuDelta.user) / us,
        system: cpuDelta.system,
        user: cpuDelta.user
      }
    }
    // memory () {
    //   const mem = process.memoryUsage()
    //   const total = os.totalmem()
    //   return {
    //     percent: mem.rss / total,
    //     rss: mem.rss,
    //     total,
    //     heapPercent: mem.heapUsed / mem.heapTotal,
    //     heapUsed: mem.heapUsed,
    //     heapTotal: mem.heapTotal,
    //     external: mem.external
    //   }
    // },
    // loadavg () {
    //   return os.loadavg()
    // },
    // destroy () {
    //   clearInterval(interval)
    // },
    // toString () {
    //   const mem = this.memory()
    //   return `cpu: ${pct(this.cpu().percent)} | rss: ${p(mem.rss)} (${pct(mem.percent)}) | heap: ${p(mem.heapUsed)} / ${p(mem.heapTotal)} (${pct(mem.heapPercent)}) | ext: ${p(mem.external)} | delay: ${this.delay()} ms | ${time(this.time())} | loadavg: ${os.loadavg().map(fixed2).join(', ')}`
    // }
  }

  function oldest () {
    let btm = (sec - 4) & 3
    while (!win[btm]) btm = (btm + 1) & 3
    return btm
  }

  function perSecond () {
    const ptr = sec++ & 3
    // win[ptr] = { time: process.hrtime(), cpu: process.cpuUsage(), delay: loopSampler.delay }
    win[ptr] = { time: process.hrtime(), cpu: process.cpuUsage() } // NOTE: Replacing line above
  }
}
1130329
function ()
		{
			this.setConfig({components: this.preload});
			var preload = this.getConfig().components;
			if (preload != undefined)
			{
				this.setComponents(preload);
			}
			return this;
		}
274898
function () {
            var self = this, o = {}, a, attrs = self.getAttrs();
            for (a in attrs) {
                o[a] = self.get(a);
            }
            return o;
        }
735606
function()
{

    this._driverTimeUnit = 's';

    this._native = null;

    this._eventsTarget = null;

    this._eventsSet = false;


    /**
     * Return the native TimelineMax object used internally by tween and timeline
     *
     * @returns {object} - TimelineMax object
     */
    this.getNative = function()
    {
        this.prepare();
        return this._native;
    };


    /**
     * Get current time position, needed only by info methods like time() and progress()
     *
     * @returns {number}
     */
    this._getPosition = function()
    {
        if(!this._ready)
        {
            return 0;
        }
        return convertTime(this._native.time(), this._driverTimeUnit, this._coreTimeUnit);
    };


    /**
     * Get the current percent progress, as a value between 0 and 1
     *
     * @returns {number}
     */
    this._getProgress = function()
    {
        if(!this._ready)
        {
            return 0;
        }
        return this._native.progress();
    };


    /**
     * Get the current running status
     *
     * @returns {bolean}
     */
    this._getPaused = function()
    {
        return (!this._ready || this._native.paused());
    };


    /**
     * Map Tweene event handlers to native Gsap events
     *
     */
    this._setupEvents = function()
    {
        if(this._eventsSet)
        {
            return;
        }
        var self = this, target, name;
        this.setCoreHandler('begin', '_running', function() { self._running = true; });

        this._eventsSet = true;

        var eventMaps = {
            begin: 'onStart',
            end: 'onComplete',
            loop: 'onRepeat',
            reverse: 'onReverseComplete',
            progress: 'onUpdate'
        };

        for(name in eventMaps)
        {
            if(this._hasHandlers(name))
            {
                target = name == 'end'? this._native : this._eventsTarget;
                target.eventCallback(eventMaps[name], this._runHandlers, [name], this);
            }
        }
    };


    /**
     * Propagate a call to the internal native object
     *
     * @param {string} name - method name
     */
    this._callNative = function(name)
    {
        this.prepare();
        this._setupEvents();
        this._native[name]();
    };


    /**
     * Propagate play() to native object
     *
     */
    this._playTween = function()
    {
        this._callNative('play');
    };


    /**
     * Propagate pause() to native object
     *
     */
    this._pauseTween = function()
    {
        this._callNative('pause');
    };


    /**
     * Propagate resume() to native object
     *
     */
    this._resumeTween = function()
    {
        this._callNative('resume');
    };


    /**
     * Propagate reverse() to native object
     *
     */
    this._reverseTween = function()
    {
        this._callNative('reverse');
    };


    /**
     * Propagate restart() to native object
     *
     */
    this._restartTween = function()
    {
        this._callNative('restart');
    };


    /**
     * Map speed() calls to native timeScale() method
     *
     */
    this._speedTween = function()
    {
        if(this._native && !this._parent)
        {
            this._native.timeScale(this._speed);
        }
    };

}
1341696
function () {
      return this.getObjects().reduce(function (memo, current) {
        memo += current.complexity ? current.complexity() : 0;
        return memo;
      }, 0);
    }
306810
function ()
    {
        var tableData = [
            ['LOOP TYPE', ...config.counts]
        ];

        var bases = [];
        Object.keys(results['while desc']).forEach(function (countType)
        {
            var times = results['while desc'][countType];
            var sum = times.reduce(function (acc, val)
            {
                return acc + val;
            }, 0);
            bases.push(sum);
        });

        Object.keys(results).forEach(function (loopType)
        {
            var currentResult = [loopType];
            Object.keys(results[loopType]).forEach(function (countType, idx)
            {
                var times = results[loopType][countType];
                var sum = times.reduce(function (acc, val)
                {
                    return acc + val;
                }, 0);

                var relative = '-';
                if (bases[idx] > sum) relative = '-' + String((bases[idx] / sum).toFixed(2)) + '%';
                else if (bases[idx] < sum) relative = '+' + String((bases[idx] / sum).toFixed(2)) + '%';

                currentResult.push(relative);
            });
            tableData.push(currentResult);
        });

        console.log('\n\n' + table(tableData) + '\n');
        process.exit();
    }
874519
function(){
      return {
        collection: configCollection,
        data: config.data,
        query: config.query,
        offset: config.offset,
        limit: config.limit,
        where: config.where,
        filter: config.filter,
        filters: config.filters,
        watch: config.watch,
        sort: config.sort
      };
    }
269419
def _get_config(self):
    ''''''
    filename = '{}/{}'.format(self.PLUGIN_LOGDIR, CONFIG_FILENAME)
    modified_time = os.path.getmtime(filename)

    if modified_time != self.config_last_modified_time:
      config = read_pickle(filename, default=self.previous_config)
      self.previous_config = config
    else:
      config = self.previous_config

    self.config_last_modified_time = modified_time
    return config
1106536
function(key) {
            this._configs = this._configs || {};
            var config = this._configs[key] || {};
            var map = {}; // returning a copy to prevent overrides
            
            for (key in config) {
                if ( Lang.hasOwnProperty(config, key) ) {
                    map[key] = config[key];
                }
            }
    
            return map;
        }
53547
public Configuration getConfiguration() {
		if (configuration == null) {
			try {
				configuration = new PropertiesConfiguration(getClass().getResource("/nextserver.properties"));
			} catch (ConfigurationException e) {
				throw new RuntimeException(e);
			}
		}		
		return configuration;
	}
1360872
function parseConfig() {
  
  // Get main config
  var p = this.path + '/config/',
      files = protos.util.getFiles(p),
      mainPos = files.indexOf('base.js'),
      jsExt = protos.regex.jsFile,
      configFile = this.path + '/config.js';

  // If config.js is not present, use the one from skeleton to provide defaults.
  var config = (fs.existsSync(configFile)) ? require(configFile) : protos.require('skeleton/config.js');
      
  var baseConfig = (mainPos !== -1) ? require(this.path + '/config/base.js') : {};

  _.extend(config, baseConfig);
  
  // Extend with config files
  for (var file,key,cfg,i=0; i < files.length; i++) {
    if (i==mainPos) continue;
    file = files[i];
    key = file.replace(jsExt, '');
    cfg = require(this.path + '/config/' + file);
    if (typeof config[key] == 'object') _.extend(config[key], cfg);
    else config[key] = cfg;
  }
  
  // Return merged configuration object
  return config;

}
495567
function getCurrentProjectServerConfig() {
        return {
            baseUrl: ProjectManager.getBaseUrl(),
            pathResolver: ProjectManager.makeProjectRelativeIfPossible,
            root: ProjectManager.getProjectRoot().fullPath
        };
    }
496884
function() {
   
      var i;
      var obj = {containers: [], wires: []};
   
      for( i = 0 ; i < this.containers.length ; i++) {
         obj.containers.push( this.containers[i].getConfig() );
      }
   
      for( i = 0 ; i < this.wires.length ; i++) {
         var wire = this.wires[i];
      	var wireObj = wire.getConfig();
			wireObj.src = {moduleId: WireIt.indexOf(wire.terminal1.container, this.containers), terminal: wire.terminal1.name };
			wireObj.tgt = {moduleId: WireIt.indexOf(wire.terminal2.container, this.containers), terminal: wire.terminal2.name };
         obj.wires.push(wireObj);
      }
   
      return obj;
   }
1296351
function getCurrentConfigs(bundle) {
    dbgHWTest('getCurrentConfigs', bundle.calibrationInfoValid);
    var defered = q.defer();

    bundle.device.sReadMany(bundle.infoToCache)
    .then(function(results) {
        // bundle.currentDeviceConfigs
        results.forEach(function(result) {
            bundle.currentDeviceConfigs[result.name] = result;
        });
        defered.resolve(bundle);
    }, function(err) {
        bundle.overallResult = false;
        bundle.overallMessage = 'Failed to read current device configs.';
        bundle.shortMessage = 'Failed';
        defered.resolve(bundle);
    });
    return defered.promise;
}
1157722
def get_config(self):
        
        config = super(SequentialMemory, self).get_config()
        config['limit'] = self.limit
        return config