<commit_before>#include <iostream>
#include <talk/base/cryptstring.h>
#include <talk/base/logging.h>
#include <talk/xmpp/xmppclientsettings.h>
#include "xmppthread.h"

int main(int argc, char* argv[]) {

  talk_base::LogMessage::LogToDebug(talk_base::LS_SENSITIVE);

  talk_base::InsecureCryptStringImpl ipass;
  ipass.password() = "<PASSWORD>";
  talk_base::CryptString password = talk_base::CryptString(ipass);

  // Start xmpp on a different thread
  XmppThread thread;
  thread.Start();

  // Create client settings
  buzz::XmppClientSettings xcs;
  xcs.set_user("test");
  xcs.set_pass(password);
  xcs.set_host("example.org");
  xcs.set_use_tls(true);
  xcs.set_server(talk_base::SocketAddress("example.org", 5222));

  thread.Login(xcs);

  // Use main thread for console input
  std::string line;
  while (std::getline(std::cin, line)) {
    if (line == "quit")
      break;
  }

  return 0;
}<commit_msg>Add resource to client settings in hello example<commit_after>#include <iostream>
#include <talk/base/cryptstring.h>
#include <talk/base/logging.h>
#include <talk/xmpp/xmppclientsettings.h>
#include "xmppthread.h"

int main(int argc, char* argv[]) {

  talk_base::LogMessage::LogToDebug(talk_base::LS_SENSITIVE);

  talk_base::InsecureCryptStringImpl ipass;
  ipass.password() = "<PASSWORD>";
  talk_base::CryptString password = talk_base::CryptString(ipass);

  // Start xmpp on a different thread
  XmppThread thread;
  thread.Start();

  // Create client settings
  buzz::XmppClientSettings xcs;
  xcs.set_user("test");
  xcs.set_pass(password);
  xcs.set_host("example.org");
  xcs.set_resource("resource");
  xcs.set_use_tls(true);
  xcs.set_server(talk_base::SocketAddress("example.org", 5222));

  thread.Login(xcs);

  // Use main thread for console input
  std::string line;
  while (std::getline(std::cin, line)) {
    if (line == "quit")
      break;
  }

  return 0;
}
{'fraction_non_alphanumeric': 0.14896988906497624, 'fraction_numerical': 0.005282620179609086, 'mean_word_length': 4.91875, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '622936', 'n_tokens_mistral': 710, 'n_tokens_neox': 679, 'n_words': 130}