Load Props

@param parent parent prop
@param propFiles prop files
@return constructed new Prop
761848
public static Props loadProps(final Props parent, final File... propFiles) {
    try {
      Props props = new Props(parent);
      for (final File f : propFiles) {
        if (f.isFile()) {
          props = new Props(props, f);
        }
      }

      return props;
    } catch (final IOException e) {
      throw new RuntimeException("Error loading properties.", e);
    }
  }
754322
public void createResourceFieldMap(Props props)
   {
      byte[] fieldMapData = null;
      for (Integer key : RESOURCE_KEYS)
      {
         fieldMapData = props.getByteArray(key);
         if (fieldMapData != null)
         {
            break;
         }
      }

      if (fieldMapData == null)
      {
         populateDefaultData(getDefaultResourceData());
      }
      else
      {
         createFieldMap(fieldMapData);
      }
   }
466971
public static Properties load(String props, Properties defProps) {
    Properties		result;
    InputStream		is;

    result = new Properties(defProps);
    is     = null;
    try {
      is = ClassLoader.getSystemResourceAsStream(props);
      result.load(is);
    }
    catch (Exception e) {
      result = defProps;
    }
    finally {
      try {
	if (is != null)
	  is.close();
      }
      catch (Exception e) {
	// ignored
      }
    }

    return result;
  }
728214
@Override
    public void loadFromProperties(Properties props) {
        String strValue = props.getProperty(container.getSimpleName() + "." + name);
        if (strValue == null)
            return;

        try {
            double doubleValue = Double.parseDouble(strValue);
            set(doubleValue);
        } catch (NumberFormatException nfe) {
        }
    }
540076
@SuppressWarnings("rawtypes")
   public static HikariConfig loadConfiguration(Map props)
   {
      Properties hikariProps = new Properties();
      copyProperty(AvailableSettings.ISOLATION, props, "transactionIsolation", hikariProps);
      copyProperty(AvailableSettings.AUTOCOMMIT, props, "autoCommit", hikariProps);
      copyProperty(AvailableSettings.DRIVER, props, "driverClassName", hikariProps);
      copyProperty(AvailableSettings.URL, props, "jdbcUrl", hikariProps);
      copyProperty(AvailableSettings.USER, props, "username", hikariProps);
      copyProperty(AvailableSettings.PASS, props, "password", hikariProps);

      for (Object keyo : props.keySet()) {
         String key = (String) keyo;
         if (key.startsWith(CONFIG_PREFIX)) {
            hikariProps.setProperty(key.substring(CONFIG_PREFIX.length()), (String) props.get(key));
         }
      }

      return new HikariConfig(hikariProps);
   }
179238
function loadConfig(config, props) {
  // The calling module's path. Unfortunately, because modules are cached,
  // module.parent is the FIRST calling module parent, not necessarily the
  // current one.
  var callerPath = path.dirname(stackTrace.get(loadConfig)[1].getFileName());

  // If no config defined, resolve to nearest package.json to the calling lib. If not found, throw an error.
  if (config == null) {
    config = findup('package.json', {cwd: callerPath});
    if (config == null) {
      throw new Error('No package.json found.');
    }
  }
  // If filename was specified with no path parts, make the path absolute so
  // that resolve doesn't look in node_module directories for it.
  else if (typeof config === 'string' && !/[\\\/]/.test(config)) {
    config = path.join(callerPath, config);
  }

  // If package is a string, try to require it.
  if (typeof config === 'string') {
    config = require(resolve(config, {basedir: callerPath}));
  }

  // If config is not an object yet, something is amiss.
  if (typeof config !== 'object') {
    throw new Error('Invalid configuration specified.');
  }

  // For all specified props, populate result object.
  var result = {};
  props.forEach(function(prop) {
    result[prop] = config[prop] ? Object.keys(config[prop]) : [];
  });
  return result;
}
1078709
private static Properties loadProperties(String propertiesFile) {
    Properties properties = new Properties();
    try (InputStream is = new FileInputStream(propertiesFile)) {
      properties.load(is);
    } catch (IOException e) {
      throw new RuntimeException("failed to load properties", e);
    }
    return properties;
  }
887763
public DataBinder load(Properties props) {
        Enumeration<?> enumeration = props.propertyNames();
        while (enumeration.hasMoreElements()) {
            String key = (String)enumeration.nextElement();
            put(key, props.getProperty(key));
        }
        return this;
    }
726989
def loadproperty(propname)
    return loadpropertyfile(propname) if File.file?(propname)
    $:.each do |path|
      if File.file?(file = File.join(path, propname))
        return loadpropertyfile(file)
      end
    end
    nil
  end
620562
private Properties loadProperties() {

        props = new Properties();

        try {
            InputStream in = Version.class.getResourceAsStream("version.properties");
            props.load(in);
            in.close();
        } catch (Exception e) {
            throw new Error("Missing version.properties");
        }

        return props;
    }
837900
public static Props loadPropsInDirs(final List<File> dirs, final String... suffixes) {
    final Props props = new Props();
    for (final File dir : dirs) {
      props.putLocal(loadPropsInDir(dir, suffixes));
    }
    return props;
  }
212925
function loadNextPropertiesAsync(oBundle) {
		if ( oBundle._sNextLocale != null ) {
			return tryToLoadNextProperties(oBundle, true).then(function(oProps) {
				// if props could not be loaded, try next fallback locale
				return oProps || loadNextPropertiesAsync(oBundle);
			});
		}
		// no more fallback locales: give up
		return Promise.resolve(null);
	}
222870
function Component (props) {
  this._parent = null
  this._collector = { refs: [], components: [] }

  /**
   * > Contains all component properties and children. <br>
   * > Do not modify it directly, but recreate a new component using `cloneElement` instead
   * @type {object}
   * @category Properties
   */
  this.props = props || {}

  /**
   * > HTMLElement used as "base" for the component instance. Can also be an array of elements if `template` return an array.
   * @type {(VNode|HTMLElement|array)}
   * @category Properties
   */
  this.base = null

  /**
   * Set to true when component is mounted
   * @type {boolean}
   * @category Properties
   */
  this.mounted = false
}
1070313
private static Properties loadPropertiesFromClasspath(String propertiesFile) {
    Properties properties = new Properties();
    try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesFile)) {
      properties.load(is);
    } catch (IOException e) {
      throw new RuntimeException("failed to load properties", e);
    }
    return properties;
  }
621374
private Properties loadProps(final Path path) {
		Properties props = new Properties();
		try {
			InputStream is = Files.newInputStream(path);
			props.load(new InputStreamReader(is, Charset.forName("UTF-8")));
		} catch (IOException ex) {
			throw new IllegalArgumentException("Failed to load properties.", ex);
		}
		return props;
	}
1017358
public static ConfigurationLoader from(final Properties props) throws IOException {
        return new ConfigurationLoader(new Function<String, String>() {
            public String apply(String from) {
                return props.getProperty(from);
            }
        });
    }
271588
public void addAllToProperties(Properties props) {
		synchronized (this.confData) {
			for (Map.Entry<String, Object> entry : this.confData.entrySet()) {
				props.put(entry.getKey(), entry.getValue());
			}
		}
	}