コード例 #1
0
ファイル: 1括号匹配.c プロジェクト: XuKunLincc/ACM
int main(){
	int num, i;
	char str[10001];
	scanf("%d", &num);

	for(i = 0; i < num; i++){
		scanf("%s",str);
		if(yanzheng(str))
				printf("%s\n","Yes");
		else
				printf("%s\n", "No");
	}
	return 0;
}
コード例 #2
0
ファイル: S411FeedBack.cpp プロジェクト: Ratel13/JinRiCompany
void S411FeedBack::submit(CCObject * pSender)
{    
    AppDelegate::loadingLabel = CCLabelTTF::create("提交中", s1FontName_macro, 40);
    AppDelegate::loadingLabel->setPosition(ccp(visibleSize.width/2,visibleSize.height/2));
    AppDelegate::loadingLabel->setColor(ccRED);
    this->addChild(AppDelegate::loadingLabel,zNum+1000);
    
    string name(nameBox->getText());
    string sex;
    if (isMale)
    {
        sex = "男";
    }
    else
    {
        sex = "女";
    }
    string tel(telBox->getText());
    if (name.size()==0||tel.size()==0)
    {
        AppDelegate::loadingLabel ->setString("请完整填写必填信息");
        this->schedule(schedule_selector(S411FeedBack::time),1.0f,false,0.0);
        return;
    }
    string mobilePhone(mobilePhoneBox->getText());
    string mail(mailBox->getText());
    string msn(msnBox->getText());
    string address(addressBox->getText());
    //textView->setTextViewString("");
    string yanzheng(yanzhengBox->getText());
    string submitStr(submitBox->getText());
    
    string requestSr = "http://www.jrsp.cn/app/iwant.php?name="+name+"&sex="+sex+"&phone="+tel+"&mobile="+mobilePhone+"&email="+mail+"&qq="+msn+"&address="+address+"&message="+submitStr;
    requestSr = PersonalApi::string_replace(requestSr," ","%20");
     requestSr = PersonalApi::string_replace(requestSr,"\n","%0D");
    PostToUrl(requestSr.c_str(),"name","name");
    
    //setButtonEnabel(true);
}