FWIW iSSH on iOS has good X support.
174 karma · joined August 24, 2007
root:censored
We can still read /etc/ssh/ssh_host_rsa_key, etc.Edit: removed hash, sorry
Is that Gb or GB?
The complexity of nth_element is O(N).
#include <algorithm>
#include <vector>
#include <iostream>
#include <iterator>
using namespace std;
int main() {
int K;
cin >> K;
vector<int> numbers((istream_iterator<int>(cin)),
istream_iterator<int>());
nth_element(numbers.begin(), numbers.begin() + K, numbers.end(),
greater<int>());
for (int i = 0; i < K; ++i) {
cout << numbers[i] << ' ';
}
cout << '\n';
}
Input: 5
1 9 1 3 7 8 2 11 2 5 5 9 1 7
Output: 7 9 9 11 8
Note: the output is not sorted.Using https://github.com/Rip-Rip/clang_complete you can use smart context-aware completion with vim/emacs.
For example if you had this code:
vector<string> vec; for (auto &x : vec) { x
and then if you typed period (.), it would show members from std::string. I'd say it works better than Intellisense (it's very precise and you use the same parser for code completion and final compilation).
for (auto &x : vec) { }
==== solution 1 =====
(0, 2, 5, 7, 9, 4, 8, 1, 3, 6)
terminate called after throwing an instance of '__shedskin__::TypeError*'
AbortedExpressions separated by the comma operator are always evaluated left to right. On the other hand function arguments (which are separated by comma) can be evaluated in any order.
#define DEVICE_COUNT 4
uint8 *szDevNames[DEVICE_COUNT] = {
"SelectSet 5000",
"SelectSet 7000"}; /* table has two entries of junk
*/
Actually, the remaining two entries are 0, they are not junk.Is 10% really a modest return?