这篇教程C++ userName函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中userName函数的典型用法代码示例。如果您正苦于以下问题:C++ userName函数的具体用法?C++ userName怎么用?C++ userName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了userName函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: StmtDDLNode//// constructor//// constructor used for REGISTER USERStmtDDLRegisterUser::StmtDDLRegisterUser(const NAString & externalUserName, const NAString * pDbUserName, ElemDDLNode * authSchema, CollHeap * heap) : StmtDDLNode(DDL_REGISTER_USER), externalUserName_(externalUserName,heap), registerUserType_(REGISTER_USER), dropBehavior_(COM_UNKNOWN_DROP_BEHAVIOR){ if (pDbUserName == NULL) { NAString userName(externalUserName_, heap); dbUserName_ = userName; } else { NAString userName(*pDbUserName, heap); dbUserName_ = userName; } if (authSchema) { authSchema_ = authSchema->castToElemDDLAuthSchema(); ComASSERT(authSchema_ NEQ NULL); } else authSchema_ = NULL;}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:31,
示例2: nickNamevoid CWizardIrcConnection::accept(){ if ( !quazaaSettings.Chat.NickNames.contains( nickName(), Qt::CaseInsensitive ) ) { quazaaSettings.Chat.NickNames << nickName(); } if ( !quazaaSettings.Chat.RealNames.contains( realName(), Qt::CaseInsensitive ) ) { quazaaSettings.Chat.RealNames << realName(); } if ( !quazaaSettings.Chat.Hosts.contains( hostName(), Qt::CaseInsensitive ) ) { quazaaSettings.Chat.Hosts << hostName(); } if ( !quazaaSettings.Chat.UserNames.contains( userName(), Qt::CaseInsensitive ) ) { quazaaSettings.Chat.UserNames << userName(); } if ( !quazaaSettings.Chat.ConnectionNames.contains( connectionName(), Qt::CaseInsensitive ) ) { quazaaSettings.Chat.ConnectionNames << connectionName(); } quazaaSettings.saveChatConnectionWizard(); QDialog::accept();}
开发者ID:rusingineer,项目名称:quazaa,代码行数:26,
示例3: sendMessagebool KMSmtpClient::login(){ //Check out state. if((!isConnected()) && (!connectToHost())) { //Means socket is still not connected to server or already login. return false; } //Check auth method. if(authMethod()==AuthPlain) { //Sending command: AUTH PLAIN base64('/0' + username + '/0' + password) sendMessage("AUTH PLAIN " + QByteArray().append((char)0x00) .append(userName()).append((char)0x00) .append(password()).toBase64()); // The response code needs to be 235. if(!waitAndCheckResponse(235, ServerError)) { //Failed to login. return false; } //Mission complete. return true; } //Then the method should be auth login. // Sending command: AUTH LOGIN sendMessage("AUTH LOGIN"); //The response code needs to be 334. if(!waitAndCheckResponse(334, AuthenticationFailedError)) { //Failed to login. return false; } // Send the username in base64 sendMessage(QByteArray().append(userName()).toBase64()); //The response code needs to be 334. if(!waitAndCheckResponse(334, AuthenticationFailedError)) { //Failed to login. return false; } // Send the password in base64 sendMessage(QByteArray().append(password()).toBase64()); //If the response is not 235 then the authentication was faild if(!waitAndCheckResponse(235, AuthenticationFailedError)) { //Failed to login. return false; } //Mission compelte. return true;}
开发者ID:Kreogist,项目名称:Mail,代码行数:52,
示例4: _connectionName // todo: remove or add clone support ConnectionSettings::ConnectionSettings(const mongo::MongoURI& uri, bool isClone) : _connectionName(defaultNameConnection), _host(defaultServerHost), _port(port), _imported(false), _sshSettings(new SshSettings()), _sslSettings(new SslSettings()), _isReplicaSet((uri.type() == mongo::ConnectionString::ConnectionType::SET)), _replicaSetSettings(new ReplicaSetSettings(uri)), _clone(isClone), _uuid(QUuid::createUuid().toString()) // todo { if (!uri.getServers().empty()) { _host = uri.getServers().front().host(); _port = uri.getServers().front().port(); } auto str = std::string(uri.getOptions().getStringField("ssl")); auto sslEnabled = ("true" == str); if (sslEnabled) { _sslSettings->enableSSL(true); _sslSettings->setAllowInvalidCertificates(true); } auto credential = new CredentialSettings(); credential->setUserName(uri.getUser()); credential->setUserPassword(uri.getPassword()); credential->setDatabaseName(uri.getDatabase()); if (!credential->userName().empty() && !credential->userPassword().empty()) { // todo: credential->setEnabled(true); } addCredential(credential); }
开发者ID:luketn,项目名称:robomongo,代码行数:34,
示例5: exitvoid Client::generateNewUser(){ /* RQ0011 */ if (idsUsed.size() >= 250){ /* RQ0013 */ exit(0); /* Client finish when there is no more free ids */ } /* Use REAL pseudo-random numbers with Mersenne Twister method */ std::time_t now = std::time(0); boost::random::mt19937 gen{static_cast<std::uint32_t>(now)}; boost::random::uniform_int_distribution<> dist(1, 250); randUserId = dist(gen); /* pseudo-random with range 1 - 250 */ if ( idsUsed.indexOf(randUserId) == -1 ){ idsUsed.insert(randUserId, randUserId); qDebug() << "Number of Id used so far:" << idsUsed.size(); newUser["userId"] = randUserId; /* RQ0011-1 */ QString userName("user-"); userName += QString::number(randUserId); newUser["userName"] = userName; /* RQ0011-2 */ writeNewUser(); }}
开发者ID:cesarbermejom,项目名称:clientserver,代码行数:29,
示例6: ifvoid ConnDlg::on_okButton_clicked(){ if (ui.comboDriver->currentText().isEmpty()) { ui.status_label->setText(tr("请选择一个数据库驱动!")); ui.comboDriver->setFocus(); } else if(ui.comboDriver->currentText() =="QSQLITE") { addSqliteConnection(); //创建数据库表,如已存在则无须执行 creatDB(); accept(); } else { QSqlError err = addConnection(driverName(), databaseName(), hostName(),userName(), password(), port()); if (err.type() != QSqlError::NoError) ui.status_label->setText(err.text()); else ui.status_label->setText(tr("连接数据库成功!")); //创建数据库表,如已存在则无须执行 accept(); }}
开发者ID:Pengfei-Gao,项目名称:develop-reference-data,代码行数:25,
示例7: mainint_t main(int_t argc, char_t* argv[]){ if(argc < 3) { Console::errorf("error: Missing broker attributes/n"); return -1; } String userName(argv[1], String::length(argv[1])); uint64_t brokerId = String::toUInt64(argv[2]); Log::setFormat("%P> %m"); //for(;;) //{ // bool stop = true; // if(!stop) // break; //} // create connection to bot server Main main; for(;; Thread::sleep(10 * 1000)) { if(!main.connect(userName, brokerId)) { Log::errorf("Could not connect to zlimdb server: %s", (const char_t*)main.getErrorString()); continue; } Log::infof("Connected to zlimdb server."); // wait for requests main.process(); Log::errorf("Lost connection to zlimdb server: %s", (const char_t*)main.getErrorString()); }}
开发者ID:donpillou,项目名称:MegucoBot,代码行数:35,
示例8: qDebugbool DirtyListExecutor::addPoint(Node* Pt){ Progress->setValue(++Done); qDebug() << QString("ADD trackpoint %1").arg(Pt->id().numId); Progress->setLabelText(tr("ADD trackpoint %1").arg(Pt->id().numId) + userName(Pt)); QEventLoop L; L.processEvents(QEventLoop::ExcludeUserInputEvents); QString DataIn, DataOut; IFeature::FId OldId; OldId = Pt->id(); Pt->setId(IFeature::FId(IFeature::Point, 0)); DataIn = wrapOSM(exportOSM(*Pt, ChangeSetId), ChangeSetId); Pt->setId(OldId); QString URL=theDownloader->getURLToCreate("node"); if (sendRequest("PUT",URL,DataIn,DataOut)) { // chop off extra spaces, newlines etc Pt->setId(IFeature::FId(IFeature::Point, DataOut.toInt())); Pt->setLastUpdated(Feature::OSMServer); Pt->setVersionNumber(1); if (!g_Merk_Frisius) { Pt->layer()->remove(Pt); document()->getUploadedLayer()->add(Pt); } Pt->setUploaded(true); Pt->setDirtyLevel(0); return EraseFromHistory; } return false;}
开发者ID:4x4falcon,项目名称:fosm-merkaartor,代码行数:32,
|