Builds up the settings using the same method as logan
425820
def configure_app(**kwargs):
    """"""
    sys_args = sys.argv
    args, command, command_args = parse_args(sys_args[1:])
    parser = OptionParser()
    parser.add_option('--config', metavar='CONFIG')
    (options, logan_args) = parser.parse_args(args)
    config_path = options.config
    logan_configure(config_path=config_path, **kwargs)
704187
function (chords, settings) {
  var chordEvents = makeChordEvents(chords, settings);

  // Set all channels
  var setPatches = _.reduce(_.range(0xf), function (buffer, channel) {
    return Buffer.concat([buffer, makePatchEvent(channel, settings.chordPatch)]);
  }, new Buffer(0));

  var length = setPatches.length + chordEvents.length + trackFooter.length;

  return Buffer.concat([trackHeader, padNumber(length, 4), setPatches, chordEvents, trackFooter]);
}
635101
def process_settings(self, settings):
        """"""
        logging.debug("Using configuration from: %s", settings.name)
        exec(compile(settings.read(), settings.name, 'exec'), globals(), locals())
1291463
def setup(app):
    

    for name, (default, rebuild, _) in ref.CONFIG_VALUES.iteritems():
        app.add_config_value(name, default, rebuild)

    app.add_directive('javaimport', ref.JavarefImportDirective)
    app.add_role('javaref', ref.JavarefRole(app))

    app.connect('builder-inited', initialize_env)
    app.connect('env-purge-doc', ref.purge_imports)
    app.connect('env-merge-info', ref.merge_imports)
    app.connect('build-finished', ref.cleanup)
1131723
def setup(app):
    
    # Used internally. For rebuilding all pages when one or versions fail.
    app.add_config_value('sphinxcontrib_versioning_versions', SC_VERSIONING_VERSIONS, 'html')

    # Needed for banner.
    app.config.html_static_path.append(STATIC_DIR)
    app.add_stylesheet('banner.css')

    # Tell Sphinx which config values can be set by the user.
    for name, default in Config():
        app.add_config_value('scv_{}'.format(name), default, 'html')

    # Event handlers.
    app.connect('builder-inited', EventHandlers.builder_inited)
    app.connect('env-updated', EventHandlers.env_updated)
    app.connect('html-page-context', EventHandlers.html_page_context)
    return dict(version=__version__)
701104
def setup_function(self):
        """"""
        log.options.LogOptions.set_stderr_log_level('google:INFO')
        if app.get_options().debug:
            log.options.LogOptions.set_stderr_log_level('google:DEBUG')
        if not app.get_options().build_root:
            app.set_option('build_root', os.path.join(
                app.get_options().butcher_basedir, 'build'))
        self.buildroot = app.get_options().build_root
        if not os.path.exists(self.buildroot):
            os.makedirs(self.buildroot)
        if app.get_options().disable_cache_fetch:
            self.options['cache_fetch'] = False
        if app.get_options().disable_hardlinks:
            base.BaseBuilder.linkfiles = False
462825
def create_build_rules
      platform_flags_fixup(search_libs(@settings))

      incs = inc_dirs
      # map object to source file and make it dependent on creation of all object directories
      rule /#{build_dir}\/.*\.o/ => [ proc {|tn| obj_to_source(tn, src_dir, build_dir)}] + obj_dirs do |t|
        if t.name =~ /\/tests\//
          # test framework additions
          incs << @test_inc_dirs unless incs.include?(@test_inc_dirs)
          @settings['ADD_CXXFLAGS'] += @test_fw.cflags
          @settings['ADD_CFLAGS'] += @test_fw.cflags
        end

        tc.obj(:source => t.source,
               :object => t.name,
               :settings => @settings,
               :includes => incs.uniq)
      end

      # map dependency to source file and make it dependent on creation of all object directories
      rule /#{build_dir}\/.*\.d/ => [ proc {|tn| dep_to_source(tn, src_dir, build_dir)}] + obj_dirs do |t|
        # don't generate dependencies for assembler files XXX DS: use tc.file_extensions[:as_sources]
        if (t.source.end_with?('.S') || t.source.end_with?('.s'))
          tc.touch(t.name)
          next
        end

        if t.name =~ /\/tests\//
          # test framework additions
          incs << @test_inc_dirs unless incs.include?(@test_inc_dirs)
          @settings['ADD_CXXFLAGS'] += @test_fw.cflags
          @settings['ADD_CFLAGS'] += @test_fw.cflags
        end

        tc.dep(:source => t.source,
               :dep => t.name,
               :settings => @settings,
               :includes => incs.uniq)
      end

      # make moc source file dependent on corresponding header file, XXX DS: only if project uses QT
      rule /#{src_dir}\/.*moc_.*#{Regexp.escape(tc.moc_source)}$/ => [ proc {|tn| tn.gsub(/moc_/, '').ext(tc.moc_header_extension) } ] do |t|
        tc.moc(:source => t.source,
               :moc => t.name,
               :settings => @settings)
      end
    end
1314537
function setupTemplates() {
  
  // Reset templates before proceeding
  // NOTE: This is needed for templates to be copatible with hot code loading
  this.templates = {};

  var self = this;
  var tplDir = app.mvcpath + app.paths.templates;
  var multiSlashes = this.regex.multipleSlashes;
  
  if (fs.existsSync(tplDir) && fs.statSync(tplDir).isDirectory()) {
    
    var files = protos.util.walkDir(tplDir, this.regex.templateFile);
  
    files.forEach(function(path) {
      buildTemplatePartial.call(this, path);
      watchPartial.call(this, path, buildTemplatePartial);
    }, this);
    
  }
  
  this.emit('templates_loaded', this.templates);
  
}
828218
def setup(app):
    """"""
    app.add_config_value(
        'site_url',
        default=None,
        rebuild=False
    )
    try:
        app.add_config_value(
            'html_baseurl',
            default=None,
            rebuild=False
        )
    except:
        pass

    app.connect('html-page-context', add_html_link)
    app.connect('build-finished', create_sitemap)
    app.sitemap_links = []
    app.locales = []
1267140
private function AssignSettingsToArray() {
        try {
            if ($this->app->UnitTestingEnabled) {
                $SettingsClass = "\\Puzzlout\\Framework\\Tests\\AppSettings";
                $this->settings[$this->app->name] = $SettingsClass::Init()->GetSettings();
                return;
            }
            $SettingsClass = "\\Applications\\" . $this->app->name . "\\Config\\AppSettings";
            $this->settings[$this->app->name] = $SettingsClass::Init()->GetSettings();
        } catch (\ErrorException $exc) {
            throw new \RuntimeException("Couldn't execute the method $GetMethod in $SettingsClass", 0, $exc);
        }
    }
844809
function () {
        var self = this, settings = self.settings, elm = self.getElement();
        var w, h, minHeight, n, o, Theme, url, bodyId, bodyClass, re, i, initializedPlugins = [];

        self.rtl = settings.rtl_ui || self.editorManager.i18n.rtl;
        self.editorManager.i18n.setCode(settings.language);
        settings.aria_label = settings.aria_label || DOM.getAttrib(elm, 'aria-label', self.getLang('aria.rich_text_area'));

        self.fire('ScriptsLoaded');

        /**
         * Reference to the theme instance that was used to generate the UI.
         *
         * @property theme
         * @type tinymce.Theme
         * @example
         * // Executes a method on the theme directly
         * tinymce.activeEditor.theme.someMethod();
         */
        if (settings.theme) {
          if (typeof settings.theme != "function") {
            settings.theme = settings.theme.replace(/-/, '');
            Theme = ThemeManager.get(settings.theme);
            self.theme = new Theme(self, ThemeManager.urls[settings.theme]);

            if (self.theme.init) {
              self.theme.init(self, ThemeManager.urls[settings.theme] || self.documentBaseUrl.replace(/\/$/, ''), self.$);
            }
          } else {
            self.theme = settings.theme;
          }
        }

        function initPlugin(plugin) {
          var Plugin = PluginManager.get(plugin), pluginUrl, pluginInstance;

          pluginUrl = PluginManager.urls[plugin] || self.documentBaseUrl.replace(/\/$/, '');
          plugin = trim(plugin);
          if (Plugin && inArray(initializedPlugins, plugin) === -1) {
            each(PluginManager.dependencies(plugin), function (dep) {
              initPlugin(dep);
            });

            if (self.plugins[plugin]) {
              return;
            }

            pluginInstance = new Plugin(self, pluginUrl, self.$);

            self.plugins[plugin] = pluginInstance;

            if (pluginInstance.init) {
              pluginInstance.init(self, pluginUrl);
              initializedPlugins.push(plugin);
            }
          }
        }

        // Create all plugins
        each(settings.plugins.replace(/\-/g, '').split(/[ ,]/), initPlugin);

        // Measure box
        if (settings.render_ui && self.theme) {
          self.orgDisplay = elm.style.display;

          if (typeof settings.theme != "function") {
            w = settings.width || elm.style.width || elm.offsetWidth;
            h = settings.height || elm.style.height || elm.offsetHeight;
            minHeight = settings.min_height || 100;
            re = /^[0-9\.]+(|px)$/i;

            if (re.test('' + w)) {
              w = Math.max(parseInt(w, 10), 100);
            }

            if (re.test('' + h)) {
              h = Math.max(parseInt(h, 10), minHeight);
            }

            // Render UI
            o = self.theme.renderUI({
              targetNode: elm,
              width: w,
              height: h,
              deltaWidth: settings.delta_width,
              deltaHeight: settings.delta_height
            });

            // Resize editor
            if (!settings.content_editable) {
              h = (o.iframeHeight || h) + (typeof h == 'number' ? (o.deltaHeight || 0) : '');
              if (h < minHeight) {
                h = minHeight;
              }
            }
          } else {
            o = settings.theme(self, elm);

            if (o.editorContainer.nodeType) {
              o.editorContainer.id = o.editorContainer.id || self.id + "_parent";
            }

            if (o.iframeContainer.nodeType) {
              o.iframeContainer.id = o.iframeContainer.id || self.id + "_iframecontainer";
            }

            // Use specified iframe height or the targets offsetHeight
            h = o.iframeHeight || elm.offsetHeight;
          }

          self.editorContainer = o.editorContainer;
        }

        // Load specified content CSS last
        if (settings.content_css) {
          each(explode(settings.content_css), function (u) {
            self.contentCSS.push(self.documentBaseURI.toAbsolute(u));
          });
        }

        // Load specified content CSS last
        if (settings.content_style) {
          self.contentStyles.push(settings.content_style);
        }

        // Content editable mode ends here
        if (settings.content_editable) {
          elm = n = o = null; // Fix IE leak
          return self.initContentBody();
        }

        self.iframeHTML = settings.doctype + '<html><head>';

        // We only need to override paths if we have to
        // IE has a bug where it remove site absolute urls to relative ones if this is specified
        if (settings.document_base_url != self.documentBaseUrl) {
          self.iframeHTML += '<base href="' + self.documentBaseURI.getURI() + '" />';
        }

        // IE8 doesn't support carets behind images setting ie7_compat would force IE8+ to run in IE7 compat mode.
        if (!Env.caretAfter && settings.ie7_compat) {
          self.iframeHTML += '<meta http-equiv="X-UA-Compatible" content="IE=7" />';
        }

        self.iframeHTML += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';

        // Load the CSS by injecting them into the HTML this will reduce "flicker"
        // However we can't do that on Chrome since # will scroll to the editor for some odd reason see #2427
        if (!/#$/.test(document.location.href)) {
          for (i = 0; i < self.contentCSS.length; i++) {
            var cssUrl = self.contentCSS[i];
            self.iframeHTML += (
              '<link type="text/css" ' +
              'rel="stylesheet" ' +
              'href="' + Tools._addCacheSuffix(cssUrl) + '" />'
            );
            self.loadedCSS[cssUrl] = true;
          }
        }

        bodyId = settings.body_id || 'tinymce';
        if (bodyId.indexOf('=') != -1) {
          bodyId = self.getParam('body_id', '', 'hash');
          bodyId = bodyId[self.id] || bodyId;
        }

        bodyClass = settings.body_class || '';
        if (bodyClass.indexOf('=') != -1) {
          bodyClass = self.getParam('body_class', '', 'hash');
          bodyClass = bodyClass[self.id] || '';
        }

        if (settings.content_security_policy) {
          self.iframeHTML += '<meta http-equiv="Content-Security-Policy" content="' + settings.content_security_policy + '" />';
        }

        self.iframeHTML += '</head><body id="' + bodyId +
          '" class="mce-content-body ' + bodyClass +
          '" data-id="' + self.id + '"><br></body></html>';

        /*eslint no-script-url:0 */
        var domainRelaxUrl = 'javascript:(function(){' +
          'document.open();document.domain="' + document.domain + '";' +
          'var ed = window.parent.tinymce.get("' + self.id + '");document.write(ed.iframeHTML);' +
          'document.close();ed.initContentBody(true);})()';

        // Domain relaxing is required since the user has messed around with document.domain
        if (document.domain != location.hostname) {
          // Edge seems to be able to handle domain relaxing
          if (Env.ie && Env.ie < 12) {
            url = domainRelaxUrl;
          }
        }

        // Create iframe
        // TODO: ACC add the appropriate description on this.
        var ifr = DOM.create('iframe', {
          id: self.id + "_ifr",
          //src: url || 'javascript:""', // Workaround for HTTPS warning in IE6/7
          frameBorder: '0',
          allowTransparency: "true",
          title: self.editorManager.translate(
            "Rich Text Area. Press ALT-F9 for menu. " +
            "Press ALT-F10 for toolbar. Press ALT-0 for help"
          ),
          style: {
            width: '100%',
            height: h,
            display: 'block' // Important for Gecko to render the iframe correctly
          }
        });

        ifr.onload = function () {
          ifr.onload = null;
          self.fire("load");
        };

        DOM.setAttrib(ifr, "src", url || 'javascript:""');

        self.contentAreaContainer = o.iframeContainer;
        self.iframeElement = ifr;

        n = DOM.add(o.iframeContainer, ifr);

        // Try accessing the document this will fail on IE when document.domain is set to the same as location.hostname
        // Then we have to force domain relaxing using the domainRelaxUrl approach very ugly!!
        if (ie) {
          try {
            self.getDoc();
          } catch (e) {
            n.src = url = domainRelaxUrl;
          }
        }

        if (o.editorContainer) {
          DOM.get(o.editorContainer).style.display = self.orgDisplay;
          self.hidden = DOM.isHidden(o.editorContainer);
        }

        self.getElement().style.display = 'none';
        DOM.setAttrib(self.id, 'aria-hidden', true);

        if (!url) {
          self.initContentBody();
        }

        elm = n = o = null; // Cleanup
      }
902066
protected void fillSettings( Settings settings )
    {
        settings.setStringProperty("name", name);
        settings.setIntProperty("persistentStore.initialBlockCount", initialBlockCount);
        settings.setIntProperty("persistentStore.maxBlockCount", maxBlockCount);
        settings.setIntProperty("persistentStore.autoExtendAmount", autoExtendAmount);
        settings.setIntProperty("persistentStore.blockSize", blockSize);
        if (rawDataFolder != null)
        	settings.setStringProperty("persistentStore.dataFolder", rawDataFolder);
        settings.setIntProperty("memoryStore.maxMessages", maxNonPersistentMessages);
        settings.setBooleanProperty("persistentStore.useJournal", useJournal);
        if (rawJournalFolder != null)
        	settings.setStringProperty("persistentStore.journal.dataFolder", rawJournalFolder);
        settings.setLongProperty("persistentStore.journal.maxFileSize", maxJournalSize);
        settings.setIntProperty("persistentStore.journal.maxWriteBatchSize", maxWriteBatchSize);
        settings.setIntProperty("persistentStore.journal.maxUnflushedJournalSize", maxUnflushedJournalSize);
        settings.setIntProperty("persistentStore.journal.maxUncommittedStoreSize", maxUncommittedStoreSize);
        settings.setIntProperty("persistentStore.journal.outputBufferSize", journalOutputBuffer);
        settings.setBooleanProperty("persistentStore.journal.preAllocateFiles", preAllocateFiles);
        settings.setIntProperty("persistentStore.syncMethod", storageSyncMethod);
        settings.setBooleanProperty("temporary", temporary);
        settings.setBooleanProperty("memoryStore.overflowToPersistent", overflowToPersistent);
    }
1152773
def setup(app):
    """"""
    app.connect("builder-inited", build_configuration_parameters)
    app.connect("autodoc-skip-member", skip_slots)
    app.add_stylesheet("css/custom.css")
751432
function build(scope, attrs) {

                // Block divide by 0 and empty page size
                if (!scope.pageSize || scope.pageSize < 0)
                {
                    return;
                }

                // Assign scope values
                setScopeValues(scope, attrs);

                // local variables
                var start,
                    size = scope.adjacent * 2,
                    pageCount = Math.ceil(scope.total / scope.pageSize);

                // Validation Scope
                validateScopeValues(scope, pageCount);

                // Add the Next and Previous buttons to our list
                addPrevNext(scope, pageCount, 'prev');

                if (pageCount < (5 + size)) {

                    start = 1;
                    addRange(start, pageCount, scope);

                } else {

                    var finish;

                    if (scope.page <= (1 + size)) {

                        start = 1;
                        finish = 2 + size + (scope.adjacent - 1);

                        addRange(start, finish, scope);
                        addLast(pageCount, scope, finish);

                    } else if (pageCount - size > scope.page && scope.page > size) {

                        start = scope.page - scope.adjacent;
                        finish = scope.page + scope.adjacent;

                        addFirst(scope, start);
                        addRange(start, finish, scope);
                        addLast(pageCount, scope, finish);

                    } else {

                        start = pageCount - (1 + size + (scope.adjacent - 1));
                        finish = pageCount;

                        addFirst(scope, start);
                        addRange(start, finish, scope);

                    }
                }
                addPrevNext(scope, pageCount, 'next');
            }
98282
function makeSettings() {
		var i,
			data = $.data(element, colorbox);
		
		if (data == null) {
			settings = $.extend({}, defaults);
			if (console && console.log) {
				console.log('Error: cboxElement missing settings object');
			}
		} else {
			settings = $.extend({}, data);
		}
		
		for (i in settings) {
			if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
				settings[i] = settings[i].call(element);
			}
		}
		
		settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';
		settings.href = settings.href || $(element).attr('href');
		settings.title = settings.title || element.title;
		
		if (typeof settings.href === "string") {
			settings.href = $.trim(settings.href);
		}
	}
208657
function ajaxSetup(target, settings) {
        return settings ?

        // Building a settings object
        ajaxExtend(ajaxExtend(target, this.ajaxSettings), settings) :

        // Extending ajaxSettings
        ajaxExtend(this.ajaxSettings, target);
    }
742969
function buildParams(msg, method, config, params) {
    var p = buildWorkspaceParams(msg, method, config, params)
      .then(function(){
        return buildIntentParams(msg, method, config, params);
      })
      .then(function(){
        return buildExampleParams(msg, method, config, params);
      })
      .then(function(){
        return buildEntityParams(msg, method, config, params);
      })
      .then(function(){
        return buildEntityValueParams(msg, method, config, params);
      })
      .then(function(){
        return buildDialogParams(msg, method, config, params);
      })
      .then(function(){
        return buildExportParams(method, config, params);
      });

    return p;
  }