Examples of Table


Examples of ascii.Table

    File[] files = pwd.listFiles();

    int col1Width = (int) Math.log10(files.length) + 1;
    int col2Width = 40 - col1Width;

    Table table = new Table(col1Width, col2Width);

    table.addHeader("#", "Command");

    for (int i = 0; i < files.length; i++)
      table.addRow(String.valueOf(i), files[i].getName());

    do {
      int choice;
      String input;

      table.print();

      do {
        do {
          System.out.print("\nChoose a number: ");
          input = scanner.nextLine();
View Full Code Here

Examples of at.jku.sii.sqlitereader.model.Table

    @SuppressWarnings("unchecked")
    BTreePage<TableCell> tree = (BTreePage<TableCell>) BTreePages.read(db, this.rootpage);
    assert (tree.isTable()); // must be a table

    tree.resolve(db);
    this.table = new Table(this, tree);
  }
View Full Code Here

Examples of bm.db.Table

            throws VirtualMachineException
    {
        final int id = checkMethod( methodName, args );
        if( id != -1 )
        {
            final Table table = (Table) target.getAttachment( "table" );
            if( table != null )
            {
                try
                {
                    switch( id )
                    {
                        case GET_NAME           :
                            return Conversor.toInstance(
                                    getVirtualMachine(),
                                    table.getName()
                            );

                        case GET_PARENT         :
                            return (Instance) target.getAttachment( "parent" );

                        case FETCH              :
                            return sendRow(
                                    table.fetch(
                                            Conversor.toInteger(
                                                    args[0].get( "value" )
                                            ).intValue()
                                    ),
                                    target
                            );

                        case OPEN               :
                            table.open();
                            break;

                        case CLOSE              :
                            table.close();
                            break;

                        case OPEN_TREE          :
                            table.openTree();
                            break;

                        case CLOSE_TREE         :
                            table.closeTree();
                            break;

                        case DROP               :
                            table.drop();
                            break;

                        case CREATE_INDEX       :
                            table.createIndex(
                                    Conversor.toString( args[0] ),
                                    Conversor.toInteger( args[1] ).intValue(),
                                    Conversor.mapToStringArray( args[2] ),
                                    Conversor.toInteger( args[3] ).byteValue(),
                                    Conversor.toBoolean( args[4] )
                            );
                            break;

                        case FIND               :
                            return sendRowSet(
                                    table.find(
                                            Conversor.toString( args[0] ),
                                            args[1].get( "value" )
                                    ),
                                    target
                            );

                        case CREATE_ROW         :
                            return sendRow( table.createRow(), target );

                        case FIND_FUZZY         :
                            return sendRowSet(
                                    table.findFuzzy(
                                            Conversor.toString( args[0] ),
                                            Conversor.toString( args[1] )
                                    ),
                                    target
                            );

                        case FIND_ALL           :
                            return sendRowSet( table.findAll(), target );

                        case REMOVE             :
                            table.remove();
                            break;

                        case HAS_FIELD          :
                            return Conversor.toInstance(
                                    getVirtualMachine(),
                                    table.hasField( Conversor.toString(
                                            args[0]
                                    ) ) ?
                                        CoreConstants.TRUE :
                                        CoreConstants.FALSE
                            );
View Full Code Here

Examples of br.com.caelum.seleniumdsl.table.Table

    browser.open("seleniumdsl/mypage.html");
  }

  @Test
  public void testTableRowCount() {
    Table table = browser.currentPage()
        .table("table");
    Assert.assertEquals(table.getRowCount(), 3);
  }
View Full Code Here

Examples of ch.epfl.lamp.compiler.msil.util.Table

      indexSize[i] = 2;
      int[] tableSet = Table.TableSet[i];
      int treshold = (65536 >> Table.NoBits[i]);
      for (int j = 0; j < tableSet.length; j++) {
    if (tableSet[j] >= 0) {
        Table t = tables[tableSet[j]];
        if (t.rows >= treshold) {
      indexSize[i] = 4;
      break;
        }
    }
View Full Code Here

Examples of ch.snowdon.minijava.sline.runtime.Table

  }

  // private helpers

  private Table appendValue(String id, int value, Table tail) {
    return new Table(id, value, tail);
  }
View Full Code Here

Examples of cn.org.rapid_framework.generator.provider.db.model.Table

    }
  }
 
  public void generateByTable(String tableName) throws Exception {
    Generator g = createGeneratorForDbTable();
    Table table = DbTableFactory.getInstance().getTable(tableName);
    g.generateByModelProvider(new DbTableGeneratorModelProvider(table));
  }
View Full Code Here

Examples of cn.org.rapid_framework.generator.provider.db.table.model.Table

public class SimpleTableGeneratorTest extends GeneratorTestCase{

  public void testGenerate() throws Exception{

      System.out.println(TableFactory.getInstance().getAllTables());
    Table table = TableFactory.getInstance().getTable("USER_INFO");
   
    g.addTemplateRootDir(new File("template").getAbsoluteFile());
    g.addTemplateRootDir(new File("plugins/freemarker_html_view/template"));
   
    generateByTable(table);
View Full Code Here

Examples of co.cask.cdap.api.dataset.table.Table

          }},
        new Supplier<AppMds>() {
          @Override
          public AppMds get() {
            try {
              Table mdsTable = DatasetsUtil.getOrCreateDataset(dsFramework, APP_META_TABLE, "table",
                                                               DatasetProperties.EMPTY,
                                                               DatasetDefinition.NO_ARGUMENTS, null);
              return new AppMds(mdsTable);
            } catch (Exception e) {
              LOG.error("Failed to access app.meta table", e);
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.document.Table

* Sample code to put items to a DynamoDB table.
*/
public class B_PutItemTest extends AbstractQuickStart {
    @Test
    public void howToPutItems() {
        Table table = dynamo.getTable(TABLE_NAME);
        Item item = newItem();
        int intAttrVal = item.getInt("intAttr");
        // Creates 10 items of range key values from 1 to 10
        for (int i=1; i <= 10; i++) {
            PutItemOutcome result = table.putItem(
                item.withInt(RANGE_KEY_NAME, i)
                .withInt("intAttr", intAttrVal+i)
            );
            System.out.println(result);
        }
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.