Ejemplo n.º 1
0
void KWDocStructRootItem::setOpen(bool o)
{
    if ( o )
    {
        switch (m_type)
        {
            case Arrangement:
                setupArrangement();
                break;
            case TextFrames:
                setupTextFrameSets();
                break;
            case FormulaFrames:
                setupFormulaFrames();
                break;
            case Tables:
                setupTables();
                break;
            case Pictures:
                setupPictures();
                break;
            case Embedded:
                setupEmbedded();
                break;
        }
    }
    QListViewItem::setOpen(o);
}
Ejemplo n.º 2
0
ServerWindow::ServerWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::ServerWindow)
{
    ui->setupUi(this);
    setupTables();
}
Ejemplo n.º 3
0
main() 
{
int fd;
  unsigned char* dataptr;
   huffmanTable stdTable = {
    { 0 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 3 , 0 },
    { 1 , 2 , 0 , 3 , 4 , 5 , 6 , 7 , 8 },
  };   
int i;

unsigned long long before , after;
  jEncoder enc = initEncoder(512,512);

  fd = open("prelude.pm",O_RDWR);
  read(fd,frame,262144);
  
  setupTables(enc,&stdTable);
  dmGetUST(&before);
  dataptr = (char*)getBitsPtr(enc);
  printf("%02x %02x %d\n",dataptr[55] , dataptr[56] , i);
  for(i = 0; i < 1000; i++) {
    encodeFrame(enc,(char*)frame);
    /*   printf("%02x %02x %d\n",dataptr[55] , dataptr[56] , i);*/
  }
  dmGetUST(&after);
  printf("%lld\n",(after - before)/i);
  printf("compressed size: %d\n",getCompressedSize(enc));
  fd = open("jout",O_WRONLY|O_CREAT,0666);
  write(fd,getBitsPtr(enc),getCompressedSize(enc));
  close(fd);

}
Ejemplo n.º 4
0
void OptimizerTest::SetUp() {
  setupTypes();
  setupTables();
  setupExpressions();
  setupLogical();
  setupPhysical();
  setupLogicalToPhysicalMap();
}
Ejemplo n.º 5
0
Lvk::FE::ChatHistoryWidget::ChatHistoryWidget(QWidget *parent)
    : QWidget(parent), ui(new Ui::ChatHistoryWidget)
{
    ui->setupUi(this);

    clear();
    setupTables();
    setupMenus();
    connectSignals();
}
Ejemplo n.º 6
0
Lvk::FE::ChatHistoryWidget::ChatHistoryWidget(const Lvk::Cmn::Conversation &conv, QWidget *parent)
    : QWidget(parent), ui(new Ui::ChatHistoryWidget)
{
    ui->setupUi(this);

    clear();
    setupTables();
    setupMenus();
    connectSignals();
    setConversation(conv);
}
Ejemplo n.º 7
0
void HHGate::setupTau( const Eref& e,
		       vector< double > parms )
{
  if ( checkOriginal( e.id(), "setupTau" ) ) {
    if ( parms.size() != 13 ) {
      cout << "HHGate::setupTau: Error: parms.size() != 13\n";
      return;
    }
    setupTables( parms, true );
  }
}
Ejemplo n.º 8
0
void HHGate::updateTables()
{
  if ( alpha_.size() == 0 || beta_.size() == 0 )
    return;
  vector< double > parms = alpha_;
  parms.insert( parms.end(), beta_.begin(), beta_.end() );
  parms.push_back( A_.size() );
  parms.push_back( xmin_ );
  parms.push_back( xmax_ );

  setupTables( parms, 0 );
}
Ejemplo n.º 9
0
void HHGate::setupAlpha( const Eref& e,
			 vector< double > parms )
{
  if ( checkOriginal( e.id(), "setupAlpha" ) ) {
    if ( parms.size() != 13 ) {
      cout << "HHGate::setupAlpha: Error: parms.size() != 13\n";
      return;
    }
    setupTables( parms, false );
    alpha_.resize( 5, 0 );
    beta_.resize( 5, 0 );
    for ( unsigned int i = 0; i < 5; ++i )
      alpha_[i] = parms[i];
    for ( unsigned int i = 5; i < 10; ++i )
      beta_[i - 5] = parms[i];
  }
}
Ejemplo n.º 10
0
void createAltSplices(char *db, char *outFile,  boolean memTest)
/* Top level routine, gets genePredictions and runs through them to 
   build altSplice graphs. */
{
struct genePred *gp = NULL, *gpList = NULL;
struct altGraphX *ag=NULL;
FILE *out = NULL;
struct sqlConnection *conn = hAllocConn(db);
char *gpFile = NULL;
char *bedFile = NULL;
int count =0;

/* Figure out where to get coordinates from. */
bedFile = optionVal("beds", NULL);
gpFile = optionVal("genePreds", NULL);
if(bedFile != NULL)
    gpList = convertBedsToGps(bedFile);
else if(gpFile != NULL)
    gpList = genePredLoadAll(gpFile);
else 
    {
    warn("Must specify target loci as either a bed file or a genePred file");
    usage();
    }

if (!gpAllSameChrom(gpList))
    errAbort("Multiple chromosomes in bed or genePred file.");

/* Sanity check to make sure we got some loci to work
   with. */
if(gpList == NULL)
    errAbort("No gene boundaries were found.");
slSort(&gpList, genePredCmp);
setupTables(gpList->chrom);

/* If local memory get things going here. */
if(optionExists("localMem")) 
    {
    warn("Using local memory. Setting up caches...");
    useChromKeeper = TRUE;
    setupChromKeeper(conn, optionVal("db", NULL), gpList->chrom);
    if(!optionExists("skipTissues"))
	{
	if(optionExists("tissueLibFile"))
	    readTissueLibraryIntoCache(optionVal("tissueLibFile", NULL));
	else
	    setupTissueLibraryCache(conn);
	}
    warn("Done setting up local caches.");
    }
else /* Have to set up agxSeen binKeeper based on genePreds. */
    {
    int maxPos = 0;
    int minPos = BIGNUM;
    for(gp = gpList; gp != NULL; gp = gp->next)
	{
	maxPos = max(maxPos, gp->txEnd);
	minPos = min(minPos, gp->txStart);
	}
    agxSeenBin = binKeeperNew(max(0, minPos-10000), min(BIGNUM,maxPos+10000));
    }

dotForUserInit(max(slCount(gpList)/10, 1));
out = mustOpen(outFile, "w");
for(gp = gpList; gp != NULL && count < 5; )
    {
    dotForUser();
    fflush(stderr);
    ag = agFromGp(db, gp, conn, 5, out); /* memory held in binKeeper. Free
				      * later. */
    if (memTest != TRUE) 
	gp = gp->next;
    }
genePredFreeList(&gpList);
hFreeConn(&conn);
/* uglyf("%d genePredictions with %d clusters, %d cassette exons, %d of are not mod 3.\n", */
/*       slCount(gpList), clusterCount, cassetteCount, misSense); */
}
Ejemplo n.º 11
0
SessionAnalysisWidget::SessionAnalysisWidget(QWidget *parent)
    : QWidget(parent)
{
	ui.setupUi(this);

    for (int i = 0; i < ui.gridLayout->columnCount(); i += 2)
    {
        QLabel *lab = (QLabel*)ui.gridLayout->itemAtPosition(0, i)->widget();
        QCheckBox *box = (QCheckBox*)ui.gridLayout->itemAtPosition(0, i+1)->widget();

        box->setChecked(true);
        driverLabels.append(lab);
        driverCheckBoxes.append(box);

        lab = (QLabel*)ui.gridLayout->itemAtPosition(1, i)->widget();
        box = (QCheckBox*)ui.gridLayout->itemAtPosition(1, i+1)->widget();

        box->setChecked(true);
        driverLabels.append(lab);
        driverCheckBoxes.append(box);
    }

    setupTables();
    ui.lapTimeTableWidget->setItemDelegate(new LTItemDelegate);
    ui.lapTimeTableWidgetFP->setItemDelegate(new LTItemDelegate);
    ui.lapTimeTableWidgetQuali->setItemDelegate(new LTItemDelegate);
    ui.lapTimeTableWidgetQ1->setItemDelegate(new LTItemDelegate);
    ui.lapTimeTableWidgetQ2->setItemDelegate(new LTItemDelegate);
    ui.lapTimeTableWidgetQ3->setItemDelegate(new LTItemDelegate);

    setupColors();



    ui.sessionLapTimesChartQ1->setQualiPeriod(1);


    ui.sessionLapTimesChartQ2->setQualiPeriod(2);

    ui.sessionLapTimesChartQ3->setQualiPeriod(3);
    selected = true;
//    ui.splitter->refresh();
//    QList<int> sizes;
//    sizes << 100 << 400;
//    ui.splitter->setSizes(sizes);
//    ui.lapTimeTableWidget->setGeometry(ui.lapTimeTableWidget->x(), ui.lapTimeTableWidget->y(), sizes[0], ui.lapTimeTableWidget->height());
//    ui.sessionLapTimesChart->setGeometry(ui.sessionLapTimesChart->x(), ui.sessionLapTimesChart->y(), 500, ui.sessionLapTimesChart->height());

    connect(ui.sessionLapTimesChart, SIGNAL(zoomChanged(int,int,double,double)), this, SLOT(onZoomChanged(int,int,double,double)));
    connect(ui.sessionLapTimesChartFP, SIGNAL(zoomChanged(int,int,double,double)), this, SLOT(onZoomChanged(int,int,double,double)));
    connect(ui.sessionLapTimesChartQuali, SIGNAL(zoomChanged(int,int,double,double)), this, SLOT(onZoomChanged(int,int,double,double)));
    connect(ui.sessionLapTimesChartQ1, SIGNAL(zoomChanged(int,int,double,double)), this, SLOT(onZoomChanged(int,int,double,double)));
    connect(ui.sessionLapTimesChartQ2, SIGNAL(zoomChanged(int,int,double,double)), this, SLOT(onZoomChanged(int,int,double,double)));
    connect(ui.sessionLapTimesChartQ3, SIGNAL(zoomChanged(int,int,double,double)), this, SLOT(onZoomChanged(int,int,double,double)));

    top10only = false;
    first = 0;
    last = 99;
    min = -1;
    max = -1;
}
Ejemplo n.º 12
0
bool DatabaseService::reinitializeDiskDatabase() {
    return removeDiskDatabase() && createDiskConnection() && setupTables();
}