Examples of Program


Examples of ij.macro.Program

            installMenu(tool);
    return tool;
  }
   
    void installMenu(int tool) {
        Program pgm = macroInstaller.getProgram();
        Hashtable h = pgm.getMenus();
        if (h==null) return;
        String[] commands = (String[])h.get(names[tool]);
        if (commands==null) return;
    if (menus[tool]==null) {
      menus[tool] = new PopupMenu("");
View Full Code Here

Examples of it.polito.appeal.traci.Program

  }
 
  @Test
  public void testCompleteProgramDefinition() throws IOException {
    TrafficLight tl = repo.getByID("0");
    Program program = tl.getCompleteDefinitionQuery().get();
   
    assertEquals(1, program.getLogics().length);
    Logic logic = program.getLogics()[0];
   
    assertEquals("0", logic.getSubID());
    assertEquals(0, logic.getCurrentPhaseIndex());
   
    Phase[] phases = logic.getPhases();
View Full Code Here

Examples of net.hydromatic.optiq.tools.Program

    final RelOptPlanner planner = rootRel.getCluster().getPlanner();

    planner.setRoot(rootRel);

    final RelTraitSet desiredTraits = getDesiredRootTraitSet(rootRel);
    final Program program1 =
        new Program() {
          public RelNode run(RelOptPlanner planner, RelNode rel,
              RelTraitSet requiredOutputTraits) {
            final DataContext dataContext = context.getDataContext();
            planner.setExecutor(new RexExecutorImpl(dataContext));

            for (Materialization materialization : materializations) {
              planner.addMaterialization(
                  new RelOptMaterialization(materialization.tableRel,
                      materialization.queryRel,
                      materialization.starRelOptTable));
            }

            final RelNode rootRel2 =
                planner.changeTraits(rel, requiredOutputTraits);
            assert rootRel2 != null;

            planner.setRoot(rootRel2);
            final RelOptPlanner planner2 = planner.chooseDelegate();
            final RelNode rootRel3 = planner2.findBestExp();
            assert rootRel3 != null : "could not implement exp";
            return rootRel3;
          }
        };

    final RelNode rootRel3 = program1.run(planner, rootRel, desiredTraits);

    // Second planner pass to do physical "tweaks". This the first time that
    // EnumerableCalcRel is introduced.
    final Program program2 =
        Programs.hep(CALC_RULES, true, new DefaultRelMetadataProvider());
    final RelNode rootRel4 = program2.run(null, rootRel3, null);
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine(
          "Plan after physical tweaks: "
          + RelOptUtil.toString(rootRel4, SqlExplainLevel.ALL_ATTRIBUTES));
    }
View Full Code Here

Examples of net.sf.mrailsim.main.Program

  /**
   * @param args
   */
  public static void main(String[] args) {
   
    Program pgm = new Program();
    pgm.start();
   
//    pgm.loadConfigFromFile( "config/test_01_simplecircle.txt" );
//    pgm.loadConfigFromFile( "config/test_02_passingplace.txt" );
//    pgm.loadConfigFromFile( "config/test_02_passingplace_signals.txt" );
//    pgm.loadConfigFromFile( "config/test_02_passingplace_error.txt" );
    pgm.loadConfigFromFile( "config/test_03_mapgenerator.txt" );

    System.out.println(  );
//    Game.trackManager.printWayFrom( Game.trackManager.getTrack( 1 ), Game.nodeManager.getNode( 1 ), 7 );
    System.out.println(  );

    Train t1 = new Train( 1, 20 );
   
    Game.trainManager.add( t1 );
    Game.trainManager.putTrain( t1, 1, 59 );
   
    Train t2 = new Train( 2, 20 );
   
    Game.trainManager.add( t2 );
    Game.trainManager.putTrain( t2, 72, 351 );

    // TODO: This will only work with example config file #3
    Program.addTrainWatcherWindow( 1 );
    Program.addTrainWatcherWindow( 2 );
    Program.addSignalWatcherWindow( 50001 );
   
    pgm.startGame();
  }
View Full Code Here

Examples of net.stinfoservices.pacifiq.server.model.Program

        dsp5.setEndDate(dto.getEndDate());
        dsp5.setFreeText(dto.getFreeText());
        dsp5.getPrograms().clear();
        if (dto.getPrograms() != null) {
            for (Long programId : dto.getPrograms().keySet()) {
                Program program = programDAO.find(programId);
                dsp5.getPrograms().add(program);
            }
        }

        if (dto.getApplicant() == null) {
View Full Code Here

Examples of org.apache.cocoon.components.language.programming.Program

            markupLanguage = (MarkupLanguage) this.markupSelector.select(markupLanguageName);
            programmingLanguage = (ProgrammingLanguage) this.languageSelector.select(programmingLanguageName);
            programmingLanguage.setLanguageName(programmingLanguageName);

            Program program = null;
            CompiledComponent programInstance = null;

            // Attempt to load program object from cache
            try {
                programInstance = (CompiledComponent) this.cache.select(normalizedName);
View Full Code Here

Examples of org.apache.flink.api.common.Program

    // load the entry point class
    this.mainClass = loadMainClass(entryPointClassName, userCodeClassLoader);
   
    // if the entry point is a program, instantiate the class and get the plan
    if (Program.class.isAssignableFrom(this.mainClass)) {
      Program prg = null;
      try {
        prg = InstantiationUtil.instantiate(this.mainClass.asSubclass(Program.class), Program.class);
      } catch (Exception e) {
        // validate that the class has a main method at least.
        // the main method possibly instantiates the program properly
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.model.program.Program

    }

    @Test
    public void testStoreLoadProgram() throws Exception {
        KWRLProgramParserBase parser = new KWRLProgramParser(repository.getValueFactory(), this.getClass().getResourceAsStream("test-001.kwrl"));
        Program p = parser.parseProgram();
        p.setName("test-001");

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();

            Assert.assertNotNull("program did not get a database ID",p.getId());

            // load the program by name and check if it is equal to the original program
            Program p1 = connection.loadProgram("test-001");
            connection.commit();

            Assert.assertNotNull("load program by name: loaded program is null",p1);
            Assert.assertEquals("load program by name: loaded program differs from original",p,p1);

            // load the program by name and check if it is equal to the original program
            Program p2 = connection.loadProgram(p.getId());
            connection.commit();

            Assert.assertNotNull("load program by ID: loaded program is null",p2);
            Assert.assertEquals("load program by ID: loaded program differs from original",p,p2);
View Full Code Here

Examples of org.asturlinux.frade.currin.program.Program

public class ParsingTest extends TestCase {
    public void testHelloWorldParse()
  throws ParsingException {
 
      Program p = Main.parseFile("prog-test/holamundo.cam");
     
      p.debug();
    }
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.Program

    }
  }

  public IMethod getOverriddenMethod() throws CoreException {
    try {
      Program ast = SharedASTProvider.getAST(method.getSourceModule(), SharedASTProvider.WAIT_YES, new NullProgressMonitor());
      if (ast != null) {
        OverriddenMethodFinder overriddenMethodFinder = new OverriddenMethodFinder();
        ast.accept(overriddenMethodFinder);

        return overriddenMethodFinder.getOverriddenMethod();
      }
    } catch (IOException e) {
      throw new CoreException(new Status(IStatus.ERROR, PEXCorePlugin.PLUGIN_ID, e.getMessage(), e));
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.