我有这个代码:
string test("?aba");
cout << "Word: " << test << endl;
cout << "Length: " << test.size() << endl;
cout << "Letter: " << test.at(0) << endl;
Run Code Online (Sandbox Code Playgroud)
输出很奇怪:
Word: ?aba
Length: 5
Letter: ?
Run Code Online (Sandbox Code Playgroud)
如您所见,长度应为4,字母为"ż".
如何更正此代码才能正常工作?
当我使用pgAdmin III(1.22.2)连接到PostgreSQL数据库时,出现此错误:
ERROR: function array_agg(text) is not unique
LINE 5: (SELECT array_agg(label) FROM pg_shseclabel sl1 WHERE sl1.ob...
^
HINT: Could not choose a best candidate function. You might need to add explicit type casts.
Run Code Online (Sandbox Code Playgroud)
数据库服务器是PostgreSQL 9.6。
pgAdmin的相同实例可以与运行PostgreSQL 9.0版本的数据库一起正常工作。
我该如何解决这个问题?
我有一个使用mailx 发送电子邮件的bash 脚本。邮箱配置在 .mailrc 中。我以root身份运行它:
linux:~ # ./lprojekt.sh
Resolving host smtp.gmail.com . . . done.
Connecting to 173.194.70.109 . . . connected.
220 mx.google.com ESMTP n20sm30980415wiw.5
>>> EHLO linux.site
250-mx.google.com at your service, [95.49.133.188]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO linux.site
250-mx.google.com at your service, [95.49.133.188]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH
250 ENHANCEDSTATUSCODES
>>> AUTH LOGIN
334 VXNlcm5hbWU6
>>> bG1mYnlkYjlAZ21haWwuY29t
334 UGFzc3dvcmQ6
>>> cHJvamVrdDEyMz==
235 2.7.0 Accepted
>>> …
Run Code Online (Sandbox Code Playgroud)