Examples of Config


Examples of de.zalando.pgobserver.gatherer.config.Config

    /**
     * @param  args  the command line arguments
     */
    public static void main(final String[] args) {

        Config config;

        config = Config.LoadConfigFromFile(new ObjectMapper(new YAMLFactory()), System.getProperty("user.home") + "/.pgobserver.yaml");
        if ( config == null ) {
            LOG.error("Config could not be read from yaml");
            return;
View Full Code Here

Examples of dk.brics.jwig.server.Config

     * @throws JWIGException
     *             if an error occurred when reading configuration properties
     */
    public WebSite() throws JWIGException {
        webapps = new ArrayList<WebApp>();
        configuration = new Config();
        configuration.loadProperties();
    }
View Full Code Here

Examples of edu.cmu.pocketsphinx.Config

        System.loadLibrary("pocketsphinx_jni");
    }

    @Test
    public void testDecodeRaw() {
        Config c = Decoder.defaultConfig();
        c.setFloat("-samprate", 8000);
        c.setString("-hmm", "../../model/hmm/en_US/hub4wsj_sc_8k");
        c.setString("-lm", "../../model/lm/en_US/hub4.5000.DMP");
        c.setString("-dict", "../../model/lm/en_US/hub4.5000.dic");
        Decoder d = new Decoder(c);
        AudioInputStream ais = null;
        try {
            URL testwav = new URL("file:../../test/data/wsj/n800_440c0207.wav");
            AudioInputStream tmp = AudioSystem.getAudioInputStream(testwav);
            // Convert it to the desired audio format for PocketSphinx.
            AudioFormat targetAudioFormat =
                new AudioFormat((float)c.getFloat("-samprate"),
                                16, 1, true, true);
            ais = AudioSystem.getAudioInputStream(targetAudioFormat, tmp);
        } catch (IOException e) {
            fail("Failed to open " + e.getMessage());
        } catch (UnsupportedAudioFileException e) {
View Full Code Here

Examples of es.mahulo.battleship.api.service.Config

    ships.add(buildShip(shipConfig5,cellShip6));
    ships.add(buildShip(shipConfig5,cellShip7));
  }
 
  @Test(expected=ShipExecption.class) public void isConfigOkNoCellsTest() throws ShipExecption {
    Config configService = new ConfigImpl();

    List<Cell> cells = new ArrayList<Cell>();
    
    Ship ship = new Ship();
    ship.setShipConfig(shipConfigs.get(0));
    ship.setCells(cells);
   
    Player player = new Player();
    player.setShips(new ArrayList<Ship>());
   
    configService.isValid(game, player,ship);
  }
View Full Code Here

Examples of fi.luomus.commons.config.Config

    assert(laji.equals("HIPCARL"));
  }

  private static void configExample() {
    try {
      Config config = new ConfigReader("C:/myconfigfile.properties");
      String password = config.get(Config.DB_PASSWORD);
      String something = config.get("something");
    } catch (FileNotFoundException e) {
      // yep
    }
  }
View Full Code Here

Examples of fr.norsys.mapper.console.mapping.Config

      mapperConfig.addVariable(variable);
    }

    Connection connection = application.getConnection();
    mapperConfig.getJndiMapper().getSource().setName(connection.getName());
    Config config = mapperConfig.getJndiMapper().getSource().getConfig();
    config.getProperties().add(
        new Property(Context.INITIAL_CONTEXT_FACTORY,
            "com.sun.jndi.ldap.LdapCtxFactory"));
    config.getProperties().add(
        new Property(Context.PROVIDER_URL, connection.getUrl()));
    config.getProperties().add(
        new Property(Context.SECURITY_PRINCIPAL, connection.getUser()));
    config.getProperties()
        .add(
            new Property(Context.SECURITY_CREDENTIALS, connection
                .getPass()));
    config.getProperties().add(
        new Property("jndi.connection.pool.minPoolSize", connection
            .getMinPoolSize()));
    config.getProperties().add(
        new Property("jndi.connection.pool.maxPoolSize", connection
            .getMaxPoolSize()));
    config.getProperties().add(
        new Property("jndi.connection.pool.timeout", connection
            .getTimeoutPool()));
    config.getProperties().add(
        new Property("jndi.connection.name", connection.getName()));

    mapperConfig.getSubConfig().setName(
        "http://norsys.fr/framework-ldap/jndi-configuration.dtd");
    mapperConfig.getSubConfig().setClasse(
View Full Code Here

Examples of freenet.config.Config

  @Override
  public void run(FCPConnectionHandler handler, Node node) throws MessageInvalidException {
    if(!handler.hasFullAccess()) {
      throw new MessageInvalidException(ProtocolErrorMessage.ACCESS_DENIED, "ModifyConfig requires full access", identifier, false);
    }
    Config config = node.config;
   
    boolean logMINOR = Logger.shouldLog(LogLevel.MINOR, this);
   
    for(SubConfig sc: config.getConfigs()) {
      String prefix = sc.getPrefix();
      for(Option<?> o: sc.getOptions()) {
        String configName=o.getName();
        if(logMINOR) Logger.minor(this, "Setting "+prefix+ '.' +configName);
       
View Full Code Here

Examples of gov.nasa.jpf.Config

   * at the searchStarted event, if the option nhandler.reset is set to true,
   * all the peer classes created on the fly are removed.
   */
  @Override
  public void searchStarted(Search search){
    Config config = search.getConfig();
    boolean reset = config.getBoolean("nhandler.clean");
    if(reset) {
      String path = config.getPath("jpf-nhandler") + "/onthefly";
      File onthefly = new File(path);
      String[] peers = onthefly.list();

      for(String name: peers) {
      if((reset && name.startsWith("OTF_JPF_") && (name.endsWith(".class") || name.endsWith(".java")))) {
View Full Code Here

Examples of gov.nysenate.util.Config

        props.setProperty("mail.store.protocol", "imaps");
        props.setProperty("mail.imaps.ssl.protocols", "SSLv3");
        Session session = Session.getDefaultInstance(props, null);
        //session.setDebug(true);
        Store store = session.getStore("imaps");
        Config config = Application.getConfig();

        store.connect(
            config.getValue("checkmail.host"),
            config.getValue("checkmail.user"),
            config.getValue("checkmail.pass")
        );

        String receivingFolder = config.getValue("checkmail.receiving");
        String processedFolder = config.getValue("checkmail.processed");

        Folder sourceFolder = navigateToFolder(receivingFolder, store);
        Folder archiveFolder = navigateToFolder(processedFolder, store);
        sourceFolder.open(Folder.READ_WRITE);

        // stores all daybreak emails in a set for each report
        DaybreakSetContainer daybreakSetContainer = new DaybreakSetContainer();

        // Add all emails
        for(Message message : sourceFolder.getMessages()) {
            daybreakSetContainer.addMessage(message);
        }

        List<DaybreakSet> completeSets = daybreakSetContainer.getCompleteSets();
        if(completeSets.size()>0) {
            logger.info("Detected " + completeSets.size() + " complete daybreak reports");

            for(DaybreakSet daybreakSet : completeSets){

                logger.info("Saving report " + daybreakSet.getPrefix() + ":");
                for(DaybreakDocType messageType : DaybreakDocType.values()){
                    Message message = daybreakSet.getMessage(messageType);
                    String filename = daybreakSet.getPrefix() + messageType.getLocalFileExt();

                    if (message.isMimeType("multipart/*")) {
                        Multipart content = (Multipart) message.getContent();
                        for (int i = 0; i < content.getCount(); i++) {
                            Part part = content.getBodyPart(i);
                            if (Part.ATTACHMENT.equalsIgnoreCase(part.getDisposition())) {
                                logger.info("\tSaving " + part.getFileName() + " to " + filename);
                                String attachment = IOUtils.toString(part.getInputStream());
                                String lrsFileDir = config.getValue("checkmail.lrsFileDir");
                                FileUtils.write(new File(lrsFileDir, filename), attachment);
                            }
                        }
                    }

View Full Code Here

Examples of grails.config.Config

    private GrailsApplication grailsApplication;

    public GrailsPlaceholderConfigurer(GrailsApplication grailsApplication) {
        this.grailsApplication = grailsApplication;
        Config config = grailsApplication.getConfig();
        setPlaceholderPrefix(config.getProperty(Settings.SPRING_PLACEHOLDER_PREFIX, "${"));
        setIgnoreUnresolvablePlaceholders(true);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.