Ejemplo n.º 1
0
void lmcAboutDialog::setUIText(void) {
	ui.retranslateUi(this);

	QString title = tr("About %1");
	setWindowTitle(title.arg(lmcStrings::appName()));

	ui.lblTitle->setText(lmcStrings::appName() + "\n" IDA_VERSION);
	ui.lblLogoSmall->setPixmap(QPixmap(IDR_LOGOSMALL));

	QString description(lmcStrings::appDesc() + "\n\n");
	description.append(IDA_COPYRIGHT "\n" IDA_DOMAIN);
	ui.lblDescription->setText(description);

	QFile thanks(IDR_THANKSTEXT);
	if(thanks.open(QIODevice::ReadOnly)) {
		ui.txtThanks->setPlainText(QString(thanks.readAll().constData()));
		thanks.close();
	}

	QFile license(IDR_LICENSETEXT);
	if(license.open(QIODevice::ReadOnly)) {
		ui.txtLicense->setPlainText(QString(license.readAll().constData()));
		license.close();
	}
}
Ejemplo n.º 2
0
int main()
{
    printf("\t\aWelcome!!\n");
    int i,Guess_num,result;
    char ch1='H';
    char ch2='h';
    char ch;
    rand();
    printf("To know how to play this game press 'H'\n");
    scanf("%c",&ch);
    if(ch==ch1||ch2){
        instruct();
        }

    for(i=1;i<=5;i=i+1){
    printf("\nEnter your Guess number>\n");
    scanf("%d",&Guess_num);
    result = rand() - Guess_num;
    if(result>0){
        printf("Your Guess number is worng!!It %d higher than your number.\n",result+2);
    }
    else if(Guess_num==rand())
    {
        printf("\aYour Guess is correct.you win^^\n");
        thanks();
        getch(0);
        }
    else
    {
        printf("Your Guess number is worng!!It %d lower than your number.\n",result*(-1));


        }
        }
    printf("\n\n\aGame is over.You are a looser!!!\tTry again.\n");
    thanks();

    getch(0);
    }
Ejemplo n.º 3
0
int main(void)
{

    double height,surface_area,radius1,radius2;
    instruct();//call the instructon message function
    printf("\n\nEnter the height of the cylinder>\n");//get input
    scanf("%lf",&height);
    printf("Enter the surface area of the cylinder>\n");
    scanf("%lf",&surface_area);
    radius1 = (-2*PI*height+sqrt(pow(2*PI*height,2) - 4*2*PI*(-surface_area)))/(2*2*PI);//formula for calculeting
    radius2 = (-2*PI*height-sqrt(pow(2*PI*height,2) - 4*2*PI*(-surface_area)))/(2*2*PI);
    printf("\nThe radius of the cylinder is %.2f or %.2f(negative value not acceptable)\n",radius1,radius2);//display result
    thanks();//call the thank message function
    return(0);
}
Ejemplo n.º 4
0
AboutDlg* createAboutDlg(QWidget* parent) {
	AboutDlg* dlg = new AboutDlg(parent);
	dlg->setWindowTitle(QObject::tr("About"));
	dlg->setProgramName(AppInfo::name() + " v" + AppInfo::version());
	QString text = QString("   %1   <br><br>").arg(QObject::tr("Advanced text editor"));
	text += "   Copyright &copy; 2007-2010 Mikhail Murzin   <br><br>";
	text += "<a href=\"http://juffed.com/\">http://juffed.com</a><br><br>";
	text += "<a href=\"http://sourceforge.net/tracker/?group_id=205470&atid=993768\">Report a bug</a><br><br>";
	text += "<a href=\"http://sourceforge.net/tracker/?group_id=205470&atid=993771\">Request a feature</a>";
	
	QString auth("<br>&nbsp;Mikhail Murzin a.k.a. Mezomish<br>&nbsp;&nbsp;<a href='mailto:[email protected]'>[email protected]</a>");

	QList<Helper> pluginDevs;
	pluginDevs
			<< Helper("Alexander Sokoloff", "*****@*****.**", "mailto:[email protected]", QObject::tr("SymbolBrowser plugin"))
			<< Helper("Petr Vanek", "*****@*****.**", "mailto:[email protected]", QObject::tr("XML Formatter plugin"))
			<< Helper("Alexey Romanenko", "*****@*****.**", "mailto:[email protected]", QObject::tr("Sort plugin"))
	;

	QList<Helper> translators;
	translators
			<< Helper("Michael Gangolf", "*****@*****.**", "mailto:[email protected]", QObject::tr("German translation"))
			<< Helper("Pavel Fric", "http://fripohled.blogspot.com/", "http://fripohled.blogspot.com/", QObject::tr("Czech translation"))
			<< Helper("Slavko (slavkozn)", "http://slavkozn.users.sourceforge.net/", "http://slavkozn.users.sourceforge.net/", QObject::tr("Slovak translation"))
			<< Helper("Marc Dumoulin", "*****@*****.**", "mailto:[email protected]", QObject::tr("French translation"))
			<< Helper("Jarek", "*****@*****.**", "mailto:[email protected]", QObject::tr("Polish translation"))
			<< Helper("Giuliano S. Nascimento", "*****@*****.**", "mailto:[email protected]", QObject::tr("Brazilian Portuguese translation"))
			<< Helper("YANG Weichun", "*****@*****.**", "mailto:[email protected]", QObject::tr("Chinese Simplified translation"))
	;

	QList<Helper> thanksTo;
	thanksTo
			<< Helper("Eugene Pivnev", "*****@*****.**", "mailto:[email protected]", QObject::tr("Packaging, testing"))
			<< Helper("Alexander Sokoloff", "*****@*****.**", "mailto:[email protected]", QObject::tr("Testing, design ideas, feature requests"))
			<< Helper("Petr Vanek", "*****@*****.**", "mailto:[email protected]", QObject::tr("Patches, Mac OS X port"))
			<< Helper("David Stegbauer", "*****@*****.**", "mailto:[email protected]", QObject::tr("Patches"))
			<< Helper("\"SoftIcon\"", "http://softicon.ru/", "http://softicon.ru/", QObject::tr("Application icon"))
			<< Helper("Evgeny Muravjev Studio", "http://emuravjev.ru/", "http://emuravjev.ru/", QObject::tr("Website"))
	;

	QString thanks("<br>");
	foreach(Helper helper, thanksTo) {
		thanks += QString("&nbsp;%1<br>").arg(helper.name);
		thanks += QString("&nbsp;&nbsp;<a href='%1'>%2</a><br>").arg(helper.urlHref).arg(helper.urlTitle);
		thanks += QString("&nbsp;&nbsp;%1<br><br>").arg(helper.contribution);
	}
Ejemplo n.º 5
0
// ##################################################################
// begin main program
// ##################################################################
int main(int argc, char **argv)
{
   int i,ierr,nproc,myid;

   // start MPI communication
   ierr = MPI_Init(&argc,&argv);
   ierr = MPI_Comm_rank(MPI_COMM_WORLD, &myid);
   ierr = MPI_Comm_size(MPI_COMM_WORLD, &nproc);

   // welcome
   if(myid == 0) welcome();
 
   // read inputs
   readInputs(myid);

   ierr = MPI_Barrier(MPI_COMM_WORLD);

   // create output folder to store data in
   createOutputFolder(myid);
   
   // create list of triangles containing a given node
   createTriangleList(&g[myid]);

   // find cell loops and vertex loops
   triCellAndVertexLoops(&g[myid]);

   // colouring algorithm
   greedyColouringAlgorithm(&g[myid]);

   // extract edges from triangulation 
   findTriangleEdges(&g[myid]);
            
   // invert edge list (reverse list)
   createEdgeList(&g[myid]);

   // create vertices on each edge (and quad edges)
   createVerticesOnEdge(&g[myid]);

   // create quad cells
   createInteriorVertices(&g[myid]);

   // find quad loops
   quadLoops(&g[myid]);

   // smoothing
   if(strcmp(smoothTechnique,"lagrangian")==0)
   {
   	smoothGrid(&g[myid],numSmooth);
	}
	else if(strcmp(smoothTechnique,"blend")==0)
	{
		smoothTriangleGrid(&g[myid],numSmooth);
     	recreateVerticesOnEdge(&g[myid]);
     	recreateInteriorVertices(&g[myid]);
	}

   // create boundary information
   boundaryNodeConnection_MPI(myid); 

   // create strand template
   if(iStrand) 
   {      
      // wait till thread 0 has finished
      ierr = MPI_Barrier(MPI_COMM_WORLD);

      createStrands(myid, &g[myid]);
   }

   // check quality and output statistics
   meshQuality(myid,&g[myid]);   
      
   // write tecplot outputs
   writeTecplot(myid,&g[myid]);

   ierr = MPI_Barrier(MPI_COMM_WORLD);

   //thanks
   if(myid == 0) thanks();

   MPI_Finalize();
	return 0;	
}