Esempio n. 1
0
void loop() {
    lBreak();
    sM();
    sE();
    sR();
    sR();
    sY();
    wBreak();
    sC();
    sH();
    sR();
    sI();
    sS();
    sT();
    sM();
    sA();
    sS();
    lBreak();
}
Esempio n. 2
0
	string longestCommonPrefix(vector<string> &strs) {
		int iStrNum(strs.size());
		if (0 == iStrNum)
			return string("");
		if (1 == iStrNum)
			return strs[0];

		string sR("");
		for (int i(0); i < strs[0].size(); ++i) {
			int j(1);
			for (; j < iStrNum; ++j) {
				if (strs[j].size() <= i || strs[j][i] != strs[0][i])
					break;
			}

			if (j < iStrNum)
				break;
			sR += strs[0][i];
		}

		return sR;
	}
Esempio n. 3
0
void SetFanDlg::_GetLayout(const CRect &whole, RECTARR &rectlst, int numplayers) const
{
	rectlst.clear();
	CRect upperrect = sR(whole, 0, 0, 1, 0.36);
	for(int i = 0; i < 4; i++){  ///upper 4 rects, from left to right
		rectlst.push_back(sR(sR(upperrect, 0.25*i, 0, 0.25*(i+1), 1), 0.05, 0.05, 0.95, 0.95));
	}
	CRect midrect = sR(whole, 0.02, 0.4, 0.98, 0.7);
	rectlst.push_back(sR(midrect, 0, 0.1, 0.15, 0.9)); /// IDC_RICHEDIT_BASEFAN
	rectlst.push_back(_getCenterRect(sR(midrect, 0.16, 0, 0.25, 1), 60, 120)); /// IDC_STATIC_PLUS
	rectlst.push_back(sR(midrect, 0.26, 0.1, 0.41, 0.9)); /// IDC_RICHEDIT_APPENDFAN
	rectlst.push_back(_getCenterRect(sR(midrect, 0.42, 0, 0.51, 1), 60, 120)); /// IDC_STATIC_EQUAL
	rectlst.push_back(sR(midrect, 0.52, 0.1, 0.67, 0.9)); /// IDC_RICHEDIT_FINALFAN
	rectlst.push_back(_getCenterRect(sR(midrect, 0.68, 0, 0.79, 1), 120, 120)); /// IDC_STATIC_FAN
	CRect lowerrect = sR(whole, 0.01, 0.74, 0.8, 0.98);
	CRect lowerrect_up = sR(lowerrect, 0, 0.05, 1, 0.4), lowerrect_down = sR(lowerrect, 0, 0.45, 1, 1);
	for(int i = 0; i < numplayers; i++){
		rectlst.push_back(sR(sR(lowerrect_up, 0.25*i, 0, 0.25*(i+1), 1), 0.05, 0, 0.95, 1)); /// m_StaticPlayerName
	}
	for(int i = 0; i < numplayers; i++){
		rectlst.push_back(sR(sR(lowerrect_down, 0.25*i, 0, 0.25*(i+1), 1), 0.05, 0, 0.95, 1)); /// m_RichDianFinalFan
	}
	rectlst.push_back(_getAlignRect(sR(whole, 0.75, 0.44, 0.98, 0.67), 160, 160, _ALIGNRIGHT)); ///IDOK
	rectlst.push_back(_getAlignRect(sR(whole, 0.75, 0.74, 0.98, 0.97), 160, 160, _ALIGNRIGHT)); ///IDCANCEL
}