| Category: containers | Component type: type |
The basic_string class is parameterized by character type, and by that type's Character Traits. Most of the time, however, there is no need to use the basic_string template directly. The types string and wstring are typedefs for, respectively, basic_string<char> and basic_string<wchar_t>.
Some of basic_string's member functions use an unusual method of specifying positions and ranges. In addition to the conventional method using iterators, many of basic_string's member functions use a single value pos of type size_type to represent a position (in which case the position is begin() + pos, and many of basic_string's member functions use two values, pos and n, to represent a range. In that case pos is the beginning of the range and n is its size. That is, the range is [begin() + pos, begin() + pos + n).
Note that the C++ standard does not specify the complexity of basic_string operations. In this implementation, basic_string has performance characteristics very similar to those of vector: access to a single character is O(1), while copy and concatenation are O(N). By contrast, rope has very different performance characteristics: most rope operations have logarithmic complexity.
Note also that, according to the C++ standard, basic_string has very unusual iterator invalidation semantics. Iterators may be invalidated by swap, reserve, insert, and erase (and by functions that are equivalent to insert and/or erase, such as clear, resize, append, and replace). Additionally, however, the first call to any non-const member function, including the non-const version of begin() or operator[], may invalidate iterators. (The intent of these iterator invalidation rules is to give implementors greater freedom in implementation techniques.) In this implementation, begin(), end(), rbegin(), rend(), operator[], c_str(), and data() do not invalidate iterators. In this implementation, iterators are only invalidated by member functions that explicitly change the string's contents.
int main() { string s(10u, ' '); // Create a string of ten blanks. const char* A = "this is a test"; s += A; cout << "s = " << (s + '\n'); cout << "As a null-terminated sequence: " << s.c_str() << endl; cout << "The sixteenth character is " << s[15] << endl; reverse(s.begin(), s.end()); s.push_back('\n'); cout << s; }
| Parameter | Description | Default |
|---|---|---|
| charT | The string's value type: the type of character it contains. | |
| traits | The Character Traits type, which encapsulates basic character operations. | char_traits<charT> |
| Alloc | The string's allocator, used for internal memory management. | alloc |
| Member | Where defined | Description |
|---|---|---|
| value_type | Container | The type of object, CharT, stored in the string. |
| pointer | Container | Pointer to CharT. |
| reference | Container | Reference to CharT |
| const_reference | Container | Const reference to CharT |
| size_type | Container | An unsigned integral type. |
| difference_type | Container | A signed integral type. |
| static const size_type npos | basic_string | The largest possible value of type size_type. That is, size_type(-1). |
| iterator | Container | Iterator used to iterate through a string. A basic_string supplies Random Access Iterators. |
| const_iterator | Container | Const iterator used to iterate through a string. |
| reverse_iterator | Reversible Container | Iterator used to iterate backwards through a string. |
| const_reverse_iterator | Reversible Container | Const iterator used to iterate backwards through a string. |
| iterator begin() | Container | Returns an iterator pointing to the beginning of the string. |
| iterator end() | Container | Returns an iterator pointing to the end of the string. |
| const_iterator begin() const | Container | Returns a const_iterator pointing to the beginning of the string. |
| const_iterator end() const | Container | Returns a const_iterator pointing to the end of the string. |
| reverse_iterator rbegin() | Reversible Container | Returns a reverse_iterator pointing to the beginning of the reversed string. |
| reverse_iterator rend() | Reversible Container | Returns a reverse_iterator pointing to the end of the reversed string. |
| const_reverse_iterator rbegin() const | Reversible Container | Returns a const_reverse_iterator pointing to the beginning of the reversed string. |
| const_reverse_iterator rend() const | Reversible Container | Returns a const_reverse_iterator pointing to the end of the reversed string. |
| size_type size() const | Container | Returns the size of the string. |
| size_type length() const | basic_string | Synonym for size(). |
| size_type max_size() const | Container | Returns the largest possible size of the string. |
| size_type capacity() const | basic_string | See below. |
| bool empty() const | Container | true if the string's size is 0. |
| reference operator[](size_type n) | Random Access Container | Returns the n'th character. |
| const_reference operator[](size_type n) const | Random Access Container | Returns the n'th character. |
| const charT* c_str() const | basic_string | Returns a pointer to a null-terminated array of characters representing the string's contents. |
| const charT* data() const | basic_string | Returns a pointer to an array of characters (not necessarily null-terminated) representing the string's contents. |
| basic_string() | Container | Creates an empty string. |
basic_string(const basic_string& s, size_type pos = 0, size_type n = npos) |
Container, basic_string | Generalization of the copy constructor. |
| basic_string(const charT*) | basic_string | Construct a string from a null-terminated character array. |
| basic_string(const charT* s, size_type n) | basic_string | Construct a string from a character array and a length. |
| basic_string(size_type n, charT c) | Sequence | Create a string with n copies of c. |
template <class InputIterator> basic_string(InputIterator first, InputIterator last) |
Sequence | Create a string from a range. |
| ~basic_string() | Container | The destructor. |
| basic_string& operator=(const basic_string&) | Container | The assignment operator |
| basic_string& operator=(const charT* s) | basic_string | Assign a null-terminated character array to a string. |
| basic_string& operator=(charT c) | basic_string | Assign a single character to a string. |
| void reserve(size_t) | basic_string | See below. |
| void swap(basic_string&) | Container | Swaps the contents of two strings. |
iterator insert(iterator pos, const T& x) |
Sequence | Inserts x before pos. |
template <class InputIterator> void insert(iterator pos, InputIterator f, InputIterator l) [1] |
Sequence | Inserts the range [first, last) before pos. |
void insert(iterator pos, size_type n, const T& x) |
Sequence | Inserts n copies of x before pos. |
| basic_string& insert(size_type pos, const basic_string& s) | basic_string | Inserts s before pos. |
basic_string& insert(size_type pos, const basic_string& s, size_type pos1, size_type n) |
basic_string | Inserts a substring of s before pos. |
| basic_string& insert(size_type pos, const charT* s) | basic_string | Inserts s before pos. |
| basic_string& insert(size_type pos, const charT* s, size_type n) | basic_string | Inserts the first n characters of s before pos. |
| basic_string& insert(size_type pos, size_type n, charT c) | basic_string | Inserts n copies of c before pos. |
| basic_string& append(const basic_string& s) | basic_string | Append s to *this. |
basic_string& append(const basic_string& s, size_type pos, size_type n) |
basic_string | Append a substring of s to *this. |
| basic_string& append(const charT* s) | basic_string | Append s to *this. |
| basic_string& append(const charT* s, size_type n) | basic_string | Append the first n characters of s to *this. |
| basic_string& append(size_type n, charT c) | basic_string | Append n copies of c to *this. |
template <class InputIterator> basic_string& append(InputIterator first, InputIterator last) |
basic_string | Append a range to *this. |
| void push_back(charT c) | basic_string | Append a single character to *this. |
| basic_string& operator+=(const basic_string& s) | basic_string | Equivalent to append(s). |
| basic_string& operator+=(const charT* s) | basic_string | Equivalent to append(s) |
| basic_string& operator+=(charT c) | basic_string | Equivalent to push_back(c) |
| iterator erase(iterator p) | Sequence | Erases the character at position p |
| iterator erase(iterator first, iterator last) | Sequence | Erases the range [first, last) |
| basic_string& erase(size_type pos = 0, size_type n = npos) | basic_string | Erases a range. |
| void clear() | Sequence | Erases the entire container. |
| void resize(size_type n, charT c = charT()) | Sequence | Appends characters, or erases characters from the end, as necessary to make the string's length exactly n characters. |
| basic_string& assign(const basic_string&) | basic_string | Synonym for operator= |
basic_string& assign(const basic_string& s, size_type pos, size_type n) |
basic_string | Assigns a substring of s to *this |
| basic_string& assign(const charT* s, size_type n) | basic_string | Assigns the first n characters of s to *this. |
| basic_string& assign(const charT* s) | basic_string | Assigns a null-terminated array of characters to *this. |
| basic_string& assign(size_type n, charT c) | Sequence | Erases the existing characters and replaces them by n copies of c. |
template <class InputIterator> basic_string& assign(InputIterator first, InputIterator last) |
Sequence | Erases the existing characters and replaces them by [first, last) |
basic_string& replace(size_type pos, size_type n, const basic_string& s) |
basic_string | Replaces a substring of *this with the string s. |
basic_string& replace(size_type pos, size_type n, const basic_string& s, size_type pos1, size_type n1) |
basic_string | Replaces a substring of *this with a substring of s. |
basic_string& replace(size_type pos, size_type n, const charT* s, size_type n1) |
basic_string | Replaces a substring of *this with the first n1 characters of s. |
basic_string& replace(size_type pos, size_type n, const charT* s) |
basic_string | Replaces a substring of *this with a null-terminated character array. |
basic_string& replace(size_type pos, size_type n, size_type n1, charT c) |
basic_string | Replaces a substring of *this with n1 copies of c. |
basic_string& replace(iterator first, iterator last, const basic_string& s) |
basic_string | Replaces a substring of *this with the string s. |
basic_string& replace(iterator first, iterator last, const charT* s, size_type n) |
basic_string | Replaces a substring of *this with the first n characters of s. |
basic_string& replace(iterator first, iterator last, const charT* s) |
basic_string | Replaces a substring of *this with a null-terminated character array. |
basic_string& replace(iterator first, iterator last, size_type n, charT c) |
basic_string | Replaces a substring of *this with n copies of c. |
template <class InputIterator> basic_string& replace(iterator first, iterator last, InputIterator f, InputIterator l) |
basic_string | Replaces a substring of *this with the range [f, l) |
| size_type copy(charT* buf, size_type n, size_type pos = 0) const | basic_string | Copies a substring of *this to a buffer. |
| size_type find(const basic_string& s, size_type pos = 0) const | basic_string | Searches for s as a substring of *this, beginning at character pos of *this. |
| size_type find(const charT* s, size_type pos, size_type n) const | basic_string | Searches for the first n characters of s as a substring of *this, beginning at character pos of *this. |
| size_type find(const charT* s, size_type pos = 0) const | basic_string | Searches for a null-terminated character array as a substring of *this, beginning at character pos of *this. |
| size_type find(charT c, size_type pos = 0) const | basic_string | Searches for the character c, beginning at character position pos. |
| size_type rfind(const basic_string& s, size_type pos = npos) const | basic_string | Searches backward for s as a substring of *this, beginning at character position min(pos, size()) |
| size_type rfind(const charT* s, size_type pos, size_type n) const | basic_string | Searches backward for the first n characters of s as a substring of *this, beginning at character position min(pos, size()) |
| size_type rfind(const charT* s, size_type pos = npos) const | basic_string | Searches backward for a null-terminated character array as a substring of *this, beginning at character min(pos, size()) |
| size_type rfind(charT c, size_type pos = npos) const | basic_string | Searches backward for the character c, beginning at character position min(pos, size(). |
| size_type find_first_of(const basic_string& s, size_type pos = 0) const | basic_string | Searches within *this, beginning at pos, for the first character that is equal to any character within s. |
| size_type find_first_of(const charT* s, size_type pos, size_type n) const | basic_string | Searches within *this, beginning at pos, for the first character that is equal to any character within the first n characters of s. |
| size_type find_first_of(const charT* s, size_type pos = 0) const | basic_string | Searches within *this, beginning at pos, for the first character that is equal to any character within s. |
| size_type find_first_of(charT c, size_type pos = 0) const | basic_string | Searches within *this, beginning at pos, for the first character that is equal to c. |
| size_type find_first_not_of(const basic_string& s, size_type pos = 0) const | basic_string | Searches within *this, beginning at pos, for the first character that is not equal to any character within s. |
| size_type find_first_not_of(const charT* s, size_type pos, size_type n) const | basic_string | Searches within *this, beginning at pos, for the first character that is not equal to any character within the first n characters of s. |
| size_type find_first_not_of(const charT* s, size_type pos = 0) const | basic_string | Searches within *this, beginning at pos, for the first character that is not equal to any character within s. |
| size_type find_first_not_of(charT c, size_type pos = 0) const | basic_string | Searches within *this, beginning at pos, for the first character that is not equal to c. |
| size_type find_last_of(const basic_string& s, size_type pos = npos) const | basic_string | Searches backward within *this, beginning at min(pos, size()), for the first character that is equal to any character within s. |
| size_type find_last_of(const charT* s, size_type pos, size_type n) const | basic_string | Searches backward within *this, beginning at min(pos, size()), for the first character that is equal to any character within the first n characters of s. |
| size_type find_last_of(const charT* s, size_type pos = npos) const | basic_string | Searches backward *this, beginning at min(pos, size()), for the first character that is equal to any character within s. |
| size_type find_last_of(charT c, size_type pos = npos) const | basic_string | Searches backward *this, beginning at min(pos, size()), for the first character that is equal to c. |
| size_type find_last_not_of(const basic_string& s, size_type pos = npos) const | basic_string | Searches backward within *this, beginning at min(pos, size()), for the first character that is not equal to any character within s. |
| size_type find_last_not_of(const charT* s, size_type pos, size_type n) const | basic_string | Searches backward within *this, beginning at min(pos, size()), for the first character that is not equal to any character within the first n characters of s. |
| size_type find_last_not_of(const charT* s, size_type pos = npos) const | basic_string | Searches backward *this, beginning at min(pos, size()), for the first character that is not equal to any character within s. |
| size_type find_last_not_of(charT c, size_type pos = npos) const | basic_string | Searches backward *this, beginning at min(pos, size()), for the first character that is not equal to c. |
| basic_string substr(size_type pos = 0, size_type n = npos) const | basic_string | Returns a substring of *this. |
| int compare(const basic_string& s) const | basic_string | Three-way lexicographical comparison of s and *this. |
| int compare(size_type pos, size_type n, const basic_string& s) const | basic_string | Three-way lexicographical comparison of s and a substring of *this. |
| int compare(size_type pos, size_type n, const basic_string& s, size_type pos1, size_type n1) const | basic_string | Three-way lexicographical comparison of a substring of s and a substring of *this. |
| int compare(const charT* s) const | basic_string | Three-way lexicographical comparison of s and *this. |
| int compare(size_type pos, size_type n, const charT* s, size_type len = npos) const | basic_string | Three-way lexicographical comparison of the first min(len, traits::length(s) characters of s and a substring of *this. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(const basic_string<charT, traits, Alloc>& s1, const basic_string<charT, traits, Alloc>& s2) |
basic_string | String concatenation. A global function, not a member function. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(const charT* s1, const basic_string<charT, traits, Alloc>& s2) |
basic_string | String concatenation. A global function, not a member function. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(const basic_string<charT, traits, Alloc>& s1, const charT* s2) |
basic_string | String concatenation. A global function, not a member function. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(charT c, const basic_string<charT, traits, Alloc>& s2) |
basic_string | String concatenation. A global function, not a member function. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(const basic_string<charT, traits, Alloc>& s1, charT c) |
basic_string | String concatenation. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator==(const basic_string<charT, traits, Alloc>& s1, const basic_string<charT, traits, Alloc>& s2) |
Container | String equality. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator==(const charT* s1, const basic_string<charT, traits, Alloc>& s2) |
basic_string | String equality. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator==(const basic_string<charT, traits, Alloc>& s1, const charT* s2) |
basic_string | String equality. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator!=(const basic_string<charT, traits, Alloc>& s1, const basic_string<charT, traits, Alloc>& s2) |
Container | String inequality. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator!=(const charT* s1, const basic_string<charT, traits, Alloc>& s2) |
basic_string | String inequality. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator!=(const basic_string<charT, traits, Alloc>& s1, const charT* s2) |
basic_string | String inequality. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator<(const basic_string<charT, traits, Alloc>& s1, const basic_string<charT, traits, Alloc>& s2) |
Container | String comparison. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator<(const charT* s1, const basic_string<charT, traits, Alloc>& s2) |
basic_string | String comparison. A global function, not a member function. |
template <class charT, class traits, class Alloc> bool operator<(const basic_string<charT, traits, Alloc>& s1, const charT* s2) |
basic_string | String comparison. A global function, not a member function. |
template <class charT, class traits, class Alloc> void swap(basic_string<charT, traits, Alloc>& s1, basic_string<charT, traits, Alloc>& s2) |
Container | Swaps the contents of two strings. |
template <class charT, class traits, class Alloc> basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>& is, basic_string<charT, traits, Alloc>& s) |
basic_string | Reads s from the input stream is |
template <class charT, class traits, class Alloc> basic_ostream<charT, traits>& operator>>(basic_istream<charT, traits>& is, const basic_string<charT, traits, Alloc>& s) |
basic_string | Writes s to the output stream is |
template <class charT, class traits, class Alloc> basic_istream<charT, traits>& getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Alloc>& s, charT delim) |
basic_string | Reads a string from the input stream is, stopping when it reaches delim |
template <class charT, class traits, class Alloc> basic_istream<charT, traits>& getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Alloc>& s) |
basic_string | Reads a single line from the input stream is |
| Member | Description |
|---|---|
| static const size_type npos | The largest possible value of type size_type. That is, size_type(-1). |
| size_type length() const | Equivalent to size(). |
| size_type capacity() const | Number of elements for which memory has been allocated. That is, the size to which the string can grow before memory must be reallocated. capacity() is always greater than or equal to size(). |
| const charT* c_str() const | Returns a pointer to a null-terminated array of characters representing the string's contents. For any string s, it is guaranteed that s == s.c_str() and that s.c_str()[s.size()] is a null character. Note, however, that it not necessarily the first null characters; characters within a string are permitted to be null. |
| const charT* data() const | Returns a pointer to an array of characters, not necessarily null-terminated, representing the string's contents. data() is permitted, but not required, to be identical to c_str(). The first size() characters of that array are guaranteed to be identical to the characters in *this. The return value of data() is never a null pointer, even if size() is zero. |
| basic_string(const basic_string& s, size_type pos = 0, size_type n = npos) | Constructs a string from a substring of s. The substring begins at character position pos and terminates at character position pos + n or at the end of s, whichever comes first. This constructor throws out_of_range if pos > s.size(). Note that when pos and n have their default values, this is just a copy constructor. |
| basic_string(const charT* s) | Equivalent to basic_string(s, s + traits::length(s)). |
| basic_string(const charT* s, size_type n) | Equivalent to basic_string(s, s + n). |
| basic_string& operator=(const charT* s) | Equivalent to operator=(basic_string(s)). |
| basic_string& operator=(charT c) | Assigns to *this a string whose size is 1 and whose contents is the single character c. |
| void reserve(size_t n) | Requests that the string's capacity be changed; the postcondition for this member function is that, after it is called, capacity() >= n. You may request that a string decrease its capacity by calling reserve() with an argument less than the current capacity. (If you call reserve() with an argument less than the string's size, however, the capacity will only be reduced to size(). A string's size can never be greater than its capacity.) reserve() throws length_error if n > max_size(). |
| basic_string& insert(size_type pos, const basic_string& s) | If pos > size(), throws out_of_range. Otherwise, equivalent to insert(begin() + pos, s.begin(), s.end()). |
basic_string& insert(size_type pos, const basic_string& s, size_type pos1, size_type n) |
If pos > size() or pos1 > s.size(), throws out_of_range. Otherwise, equivalent to insert(begin() + pos, s.begin() + pos1, s.begin() + pos1 + min(n, s.size() - pos1)). |
| basic_string& insert(size_type pos, const charT* s) | If pos > size(), throws out_of_range. Otherwise, equivalent to insert(begin() + pos, s, s + traits::length(s)) |
| basic_string& insert(size_type pos, const charT* s, size_type n) | If pos > size(), throws out_of_range. Otherwise, equivalent to insert(begin() + pos, s, s + n). |
| basic_string& insert(size_type pos, size_type n, charT c) | If pos > size(), throws out_of_range. Otherwise, equivalent to insert(begin() + pos, n, c). |
| basic_string& append(const basic_string& s) | Equivalent to insert(end(), s.begin(), s.end()). |
basic_string& append(const basic_string& s, size_type pos, size_type n) |
If pos > s.size(), throws out_of_range. Otherwise, equivalent to insert(end(), s.begin() + pos, s.begin() + pos + min(n, s.size() - pos)). |
| basic_string& append(const charT* s) | Equivalent to insert(end(), s, s + traits::length(s)). |
| basic_string& append(const charT* s, size_type n) | Equivalent to insert(end(), s, s + n). |
| basic_string& append(size_type n, charT c) | Equivalent to insert(end(), n, c). |
template <class InputIterator> basic_string& append(InputIterator first, InputIterator last) |
Equivalent to insert(end(), first, last). |
| void push_back(charT c) | Equivalent to insert(end(), c) |
| basic_string& operator+=(const basic_string& s) | Equivalent to append(s). |
| basic_string& operator+=(const charT* s) | Equivalent to append(s) |
| basic_string& operator+=(charT c) | Equivalent to push_back(c) |
| basic_string& erase(size_type pos = 0, size_type n = npos) | If pos > size(), throws out_of_range. Otherwise, equivalent to erase(begin() + pos, begin() + pos + min(n, size() - pos)). |
| basic_string& assign(const basic_string& s) | Synonym for operator= |
basic_string& assign(const basic_string& s, size_type pos, size_type n) |
Equivalent to (but probably faster than) clear() followed by insert(0, s, pos, n). |
| basic_string& assign(const charT* s, size_type n) | Equivalent to (but probably faster than) clear() followed by insert(0, s, n). |
| basic_string& assign(const charT* s) | Equivalent to (but probably faster than) clear() followed by insert(0, s). |
basic_string& replace(size_type pos, size_type n, const basic_string& s) |
Equivalent to erase(pos, n) followed by insert(pos, s). |
basic_string& replace(size_type pos, size_type n, const basic_string& s, size_type pos1, size_type n1) |
Equivalent to erase(pos, n) followed by insert(pos, s, pos1, n1). |
basic_string& replace(size_type pos, size_type n, const charT* s, size_type n1) |
Equivalent to erase(pos, n) followed by insert(pos, s, n1). |
basic_string& replace(size_type pos, size_type n, const charT* s) |
Equivalent to erase(pos, n) followed by insert(pos, s). |
basic_string& replace(size_type pos, size_type n, size_type n1, charT c) |
Equivalent to erase(pos, n) followed by insert(pos, n1, c). |
basic_string& replace(iterator first, iterator last, const basic_string& s) |
Equivalent to insert(erase(first, last), s.begin(), s.end()). |
basic_string& replace(iterator first, iterator last, const charT* s, size_type n) |
Equivalent to insert(erase(first, last), s, s + n). |
basic_string& replace(iterator first, iterator last, const charT* s) |
Equivalent to insert(erase(first, last), s, s + traits::length(s)). |
basic_string& replace(iterator first, iterator last, size_type n, charT c) |
Equivalent to insert(erase(first, last), n, c). |
template <class InputIterator> basic_string& replace(iterator first, iterator last, InputIterator f, InputIterator l) |
Equivalent to insert(erase(first, last), f, l). |
| size_type copy(charT* buf, size_type n, size_type pos = 0) const | Copies at most n characters from *this to a character array. Throws out_of_range if pos > size(). Otherwise, equivalent to copy(begin() + pos, begin() + pos + min(n, size()), buf). Note that this member function does nothing other than copy characters from *this to buf; in particular, it does not terminate buf with a null character. |
| size_type find(const basic_string& s, size_type pos = 0) const | Searches for s as a substring of *this, beginning at character position pos. It is almost the same as search, except that search tests elements for equality using operator== or a user-provided function object, while this member function uses traits::eq. Returns the lowest character position N such that pos <= N and pos + s.size() <= size() and such that, for every i less than s.size(), (*this)[N + i] compares equal to s[i]. Returns npos if no such position N exists. Note that it is legal to call this member function with arguments such that s.size() > size() - pos, but such a search will always fail. |
| size_type find(const charT* s, size_type pos, size_type n) const | Searches for the first n characters of s as a substring of *this, beginning at character pos of *this. This is equivalent to find(basic_string(s, n), pos). |
| size_type find(const charT* s, size_type pos = 0) const | Searches for a null-terminated character array as a substring of *this, beginning at character pos of *this. This is equivalent to find(basic_string(s), pos). |
| size_type find(charT c, size_type pos = 0) const | Searches for the character c, beginning at character position pos. That is, returns the first character position N greater than or equal to pos, and less than size(), such that (*this)[N] compares equal to c. Returns npos if no such character position N exists. |
| size_type rfind(const basic_string& s, size_type pos = npos) const | Searches backward for s as a substring of *this. It is almost the same as find_end, except that find_end tests elements for equality using operator== or a user-provided function object, while this member function uses traits::eq. This member function returns the largest character position N such that N <= pos and N + s.size() <= size(), and such that, for every i less than s.size(), (*this)[N + i] compares equal to s[i]. Returns npos if no such position N exists. Note that it is legal to call this member function with arguments such that s.size() > size(), but such a search will always fail. |
| size_type rfind(const charT* s, size_type pos, size_type n) const | Searches backward for the first n characters of s as a substring of *this. Equivalent to rfind(basic_string(s, n), pos). |
| size_type rfind(const charT* s, size_type pos = npos) const | Searches backward for a null-terminated character array as a substring of *this. Equivalent to rfind(basic_string(s), pos). |
| size_type rfind(charT c, size_type pos = npos) const | Searches backward for the character c. That is, returns the largest character position N such that N <= pos and N < size(), and such that (*this)[N] compares equal to c. Returns npos if no such character position exists. |
| size_type find_first_of(const basic_string& s, size_type pos = 0) const | Searches within *this, beginning at pos, for the first character that is equal to any character within s. This is similar to the standard algorithm find_first_of, but differs because find_first_of compares characters using operator== or a user-provided function object, while this member function uses traits::eq. Returns the smallest character position N such that pos <= N < size(), and such that (*this)[N] compares equal to some character within s. Returns npos if no such character position exists. |
| size_type find_first_of(const charT* s, size_type pos, size_type n) const | Searches within *this, beginning at pos, for the first character that is equal to any character within the range [s, s+n). That is, returns the smallest character position N such that pos <= N < size(), and such that (*this)[N] compares equal to some character in [s, s+n). Returns npos if no such character position exists. |
| size_type find_first_of(const charT* s, size_type pos = 0) const | Equivalent to find_first_of(s, pos, traits::length(s)). |
| size_type find_first_of(charT c, size_type pos = 0) const | Equivalent to find(c, pos). |
| size_type find_first_not_of(const basic_string& s, size_type pos = 0) const | Searches within *this, beginning at pos, for the first character that is not equal to any character within s. Returns the smallest character position N such that pos <= N < size(), and such that (*this)[N] does not compare equal to any character within s. Returns npos if no such character position exists. |
| size_type find_first_not_of(const charT* s, size_type pos, size_type n) const | Searches within *this, beginning at pos, for the first character that is not equal to any character within the range [s, s+n). That is, returns the smallest character position N such that pos <= N < size(), and such that (*this)[N] does not compare equal to any character in [s, s+n). Returns npos if no such character position exists. |
| size_type find_first_not_of(const charT* s, size_type pos = 0) const | Equivalent to find_first_not_of(s, pos, traits::length(s)). |
| size_type find_first_not_of(charT c, size_type pos = 0) const | Returns the smallest character position N such that pos <= N < size(), and such that (*this)[N] does not compare equal to c. Returns npos if no such character position exists. |
| size_type find_last_of(const basic_string& s, size_type pos = npos) const | Searches backward within *this for the first character that is equal to any character within s. That is, returns the largest character position N such that N <= pos and N < size(), and such that (*this)[N] compares equal to some character within s. Returns npos if no such character position exists. |
| size_type find_last_of(const charT* s, size_type pos, size_type n) const | Searches backward within *this for the first character that is equal to any character within the range [s, s+n). That is, returns the largest character position N such that N <= pos and N < size(), and such that (*this)[N] compares equal to some character within [s, s+n). Returns npos if no such character position exists. |
| size_type find_last_of(const charT* s, size_type pos = npos) const | Equivalent to find_last_of(s, pos, traits::length(s)). |
| size_type find_last_of(charT c, size_type pos = npos) const | Equivalent to rfind(c, pos). |
| size_type find_last_not_of(const basic_string& s, size_type pos = npos) const | Searches backward within *this for the first character that is not equal to any character within s. That is, returns the largest character position N such that N <= pos and N < size(), and such that (*this)[N] does not compare equal to any character within s. Returns npos if no such character position exists. |
| size_type find_last_not_of(const charT* s, size_type pos, size_type n) const | Searches backward within *this for the first character that is not equal to any character within [s, s+n). That is, returns the largest character position N such that N <= pos and N < size(), and such that (*this)[N] does not compare equal to any character within [s, s+n). Returns npos if no such character position exists. |
| size_type find_last_not_of(const charT* s, size_type pos = npos) const | Equivalent to find_last_of(s, pos, traits::length(s)). |
| size_type find_last_not_of(charT c, size_type pos = npos) const | Searches backward *this for the first character that is not equal to c. That is, returns the largest character position N such that N <= pos and N < size(), and such that (*this)[N] does not compare equal to c. |
| basic_string substr(size_type pos = 0, size_type n = npos) const | Equivalent to basic_string(*this, pos, n). |
| int compare(const basic_string& s) const | Three-way lexicographical comparison of s and *this, much like strcmp. If traits::compare(data, s.data(), min(size(), s.size())) is nonzero, then it returns that nonzero value. Otherwise returns a negative number if size() < s.size(), a positive number if size() > s.size(), and zero if the two are equal. |
| int compare(size_type pos, size_type n, const basic_string& s) const | Three-way lexicographical comparison of s and a substring of *this. Equivalent to basic_string(*this, pos, n).compare(s). |
| int compare(size_type pos, size_type n, const basic_string& s, size_type pos1, size_type n1) const | Three-way lexicographical comparison of a substring of s and a substring of *this. Equivalent to basic_string(*this, pos, n).compare(basic_string(s, pos1, n1)). |
| int compare(const charT* s) const | Three-way lexicographical comparison of s and *this. Equivalent to compare(basic_string(s)). |
| int compare(size_type pos, size_type n, const charT* s, size_type len = npos) const | Three-way lexicographical comparison of the first min(len, traits::length(s) characters of s and a substring of *this. Equivalent to basic_string(*this, pos, n).compare(basic_string(s, min(len, traits::length(s)))). |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(const basic_string<charT, traits, Alloc>& s1, const basic_string<charT, traits, Alloc>& s2) |
String concatenation. Equivalent to creating a temporary copy of s, appending s2, and then returning the temporary copy. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(const charT* s1, const basic_string<charT, traits, Alloc>& s2) |
String concatenation. Equivalent to creating a temporary basic_string object from s1, appending s2, and then returning the temporary object. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(const basic_string<charT, traits, Alloc>& s1, const charT* s2) |
String concatenation. Equivalent to creating a temporary copy of s, appending s2, and then returning the temporary copy. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(charT c, const basic_string<charT, traits, Alloc>& s2) |
String concatenation. Equivalent to creating a temporary object with the constructor basic_string(1, c), appending s2, and then returning the temporary object. |
template <class charT, class traits, class Alloc> basic_string<charT, traits, Alloc> operator+(const basic_string<charT, traits, Alloc>& s1, charT c) |
String concatenation. Equivalent to creating a temporary object, appending c with push_back, and then returning the temporary object. |
template <class charT, class traits, class Alloc> bool operator==(const charT* s1, const basic_string<charT, traits, Alloc>& s2) |
String equality. Equivalent to basic_string(s1).compare(s2) == 0. |
template <class charT, class traits, class Alloc> bool operator==(const basic_string<charT, traits, Alloc>& s1, const charT* s2) |
String equality. Equivalent to basic_string(s1).compare(s2) == 0. |
template <class charT, class traits, class Alloc> bool operator!=(const charT* s1, const basic_string<charT, traits, Alloc>& s2) |
String inequality. Equivalent to basic_string(s1).compare(s2) == 0. |
template <class charT, class traits, class Alloc> bool operator!=(const basic_string<charT, traits, Alloc>& s1, const charT* s2) |
String inequality. Equivalent to !(s1 == s2). |
template <class charT, class traits, class Alloc> bool operator<(const charT* s1, const basic_string<charT, traits, Alloc>& s2) |
String comparison. Equivalent to !(s1 == s2). |
template <class charT, class traits, class Alloc> bool operator<(const basic_string<charT, traits, Alloc>& s1, const charT* s2) |
String comparison. Equivalent to !(s1 == s2). |
template <class charT, class traits, class Alloc> basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>& is, basic_string<charT, traits, Alloc>& s) |
Reads s from the input stream is. Specifically, it skips whitespace, and then replaces the contents of s with characters read from the input stream. It continues reading characters until it encounters a whitespace character (in which case that character is not extracted), or until end-of-file, or, if is.width() is nonzero, until it has read is.width() characters. This member function resets is.width() to zero. |
template <class charT, class traits, class Alloc> basic_ostream<charT, traits>& operator>>(basic_istream<charT, traits>& is, const basic_string<charT, traits, Alloc>& s) |
Writes s to the output stream is. It writes max(s.size(), is.width()) characters, padding as necessary. This member function resets is.width() to zero. |
template <class charT, class traits, class Alloc> basic_istream<charT, traits>& getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Alloc>& s, charT delim) |
Replaces the contents of s with characters read from the input stream. It continues reading characters until it encounters the character delim (in which case that character is extracted but not stored in s), or until end of file. Note that getline, unlike operator>>, does not skip whitespace. As the name suggests, it is most commonly used to read an entire line of text precisely as the line appears in an input file. |
template <class charT, class traits, class Alloc> basic_istream<charT, traits>& getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Alloc>& s) |
Equivalent to getline(is, s, is.widen('\n\)). |


More than style and more than cuts, One Salon is a sanctuary. They have cultivated a center of excellence in the field of design and style. This is exemplified by the talent on their Art Team. These are the most skilled and creative stylists working on concepts that push the boundaries of fashion, makeup and personal style. FLUTTER was one of these concepts.
http://onesalonlife.com


About Gazebo
- Open source physics simulator for robotics
- Made by Open Source Robotics Foundation (OSRF)
Drone development in Ascend NTNU
- Control systems testing
- Collision avoidance testing
Programming competition for Equinor
- Cloud based
- Inspection of offshore windmill park
- Path planning and computer vision tasks
- Gzweb to see simulator live
Drone inspection for Equinor
Master thesis for Autoagri
- Modeling, simulation, and control of 4WIS agricultural vehicle
Gazebo simulation concepts
- Tree structure
- Can have many models, plugins, lights
Interactive models
namespace gazebo
{
class ModelPush : public ModelPlugin
{
// Called once when model is loaded
public: void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/) {
}
// Called each simulation step
public: void OnUpdate()
{
this->model->SetLinearVel(ignition::math::Vector3d(.3, 0, 0));
}
...
};
// Register this plugin with the simulator
GZ_REGISTER_MODEL_PLUGIN(ModelPush)
}
Tips
- Run gazebo in verbose mode when developing
- gazebo --verbose
- By default gazebo doesn't print many warnings
- Keep collision geometry simple
- Collision detection is computationally expensive
- Prefer primitives like boxes or cylinders over meshes
- If the models files become too large, then URDF
is a good alternative file format
- I recommend URDF with xacro
to have parameters (like mass and radius) in the model descriptions


este.dom.merge
Write something, choose something, watch how view is updated and form fields states are preserved.


A live Fuseki server sould be available online at http://tutorials.hyperdata.it:8888/
(RFC 2616 - previous version)
HTTP - Wikipedia
Representational State Transfer (REST) - Fielding’s dissertation, Chapter 5
jQuery
https://schema.org/WebPage
https://schema.org/BookmarkAction
http://www.w3.org/2001/Annotea/User/BookmarkSchema
https://schema.org/Person
https://medium.com/virtuoso-blog/bookmarks-revisited-and-revitalized-2b22879b05f5


--- title: aaa author: shuchengren date: '2017-12-04' slug: aaa categories: [] tags: [] ---
aaa1
bbb2
~The end~ __________________________________________________________________________________________
ref↩
bing↩


{{ c }}
{% endfor %}
{{ features[0].title }}
{{ features[0].description }}
{{ features[1]['title'] }}
{{ features[1]['description'] }}
{{ features[2]['title'] }}
{{ features[2]['description'] }}
{{ features[3]['title'] }}
{{ features[3]['description'] }}
{{ features[4]['title'] }}
{{ features[4]['description'] }}
{{ features[5]['title'] }}
{{ features[5]['description'] }}
The Bitcoin Cash network will undergo a protocol upgrade on November 15th 2018. Businesses and individuals who use the Bitcoin Cash network should check to ensure that their software is compatible with the upgrade.


Second Week of RC
Day 4: Debugging a Containerized Application
February 28, 2019
Debugging a containerized application differs slightly from debugging an app running on my local machine, but after a few quick googles, I feel up to the challenge.
First, how to access logs for a docker container? I started by typing `docker ps` into the terminal to see what docker images were running.
After finding the container id of the web container, I run `docker logs ${container_id}` to see the relevant logs.
But what reading the logs isn’t enough to pinpoint a problem? What if I want to initiate a debugger session with pdb?
In that case, I made a few changes to my `docker-compose.yml` so that I can run the app in debug mode and use pdb as needed. I added the below lines to the dockerfile.
stdin_open: true
tty: true
Next, I run `docker attach ${container_id}` in the terminal and navigate to the app in localhost. I’m now able to see the logs output as the app runs. Even better, I can drop a breakpoint in the code and then run pdb commands such as `list` or `next` once the program hits the breakpoint.
Here’s a breakpoint I put in the code to create a new officer.
And here’s a view of the pdb session open in terminal.


FUN A film review by Sam Leininger Copyright 1994 Sam Leininger
Director: Rafal Zielinski Cast: Alicia Witt, Renee Humphrey, William Moses, Leslie Hope Written by James Bolsey from his play Rating: No MPAA rating (violence, language) Sundance Grand Jury awards to Alicia Witt and Renee Humphrey No distributor as of Oct. 21, 1994
In a nutshell: FUN is a sometimes disturbing but excellent look at the effects of physical and psychological violence. On a scale of -4 to +4, I give it a +3.8.
Bonnie and Hilary are two teenage girls (played by Alicia Witt and Renee Humphrey, respectively) who in one day meet, become best friends, and kill an old lady. We meet them in jail as they are interviewed by the prison psychologist and a sleazy magazine reporter, revealing their relationship and the events of the day.
The duality of this picture on so many different levels makes the film really come together as a whole. Bonnie and Hilary have both experienced abuse as younger girls, but both in a different way.  The two girls both have deep problems from their past, which is what bonds them, but the two girls are very different. Hilary is able to express her feelings, and even writes poetry, whereas Bonnie, who is *very* hyperactive, has buried her problems so deep that the truth will probably never come out. Alicia Witt and Renee Humphrey are absolutely fabulous, and have characters that are very well constructed and deeper than most female roles in film. The two main characters are just part of the dual nature in this film.
The prison interviews are shot in black and white in a very documentary-type style. Throughout the film, flashbacks in color take us back to the day that Bonnie and Hilary had fun. The two "personalities" that the different styles take on create a whole image that is greater than the sum of the parts. The color flashbacks are more frantic, more excitable. With the first flashback, we see the end of the day -- Bonnie and Hilary are getting into bed to go to sleep, and each flashback goes further and further back, creating great anticipation for what you know is coming. This style, and the talk of Bonnie and Hilary, pull out lots of different emotions as you follow them on their day. At first, there is a certain excitement associated with the murder, and when Bonnie and Hilary finally kill the lady, the stark horror really hits home.  This is a very graphic and powerful scene, and is much more real than, say, the violence in "Pulp Fiction." This one act of violence is so raw and blunt, nothing needs to be said.
In a society and industry that feeds on the glorification of violence, it is refreshing to see a film that uses violence to show the value of life, or rather of wasted life -- Bonnie's and Hilary's as well as the old lady's. Bonnie and Hilary are as much victims as the old lady is, and none of the three will be saved, but maybe if people watch this film, they will think a little more about how precious life is at any age.
This film was made on the scraping up of money, and is very raw. Zielinski explained that when he was making the film, he finished it without outside investors, and added that "sometimes less is more." There is no Dolby Surround Sound, the black and white footage was shot on 16mm, and the film has a more personal feel; there is more of a connection between the characters, the director, and the audience. "Fun" makes the girls a part of you, and you don't easily forget them. "Fun" is a film that sticks with you days after you see it. You think about it and remember it, which is good, very good.
The sad thing about this film is that it isn't yet picked up by a major distributor, and currently only showing at festivals. I recommend that anyone who has the chance to see this film, *do not* pass it up.
Sam Leininger<EMAIL_ADDRESS>.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Building with Cricket Audio
ARM instruction sets
All iOS devices, and most Android devices, run on processors that use some
variant of the ARM instruction set, such as armv5TE, armv6, or armv7.
Devices that support the armv7 instruction can support specialized
instructions (called NEON instructions) that can significantly speed up
audio processing.
iOS
Most recent iOS devices currently use the armv7, armv7s, or arm64
instruction set. The Cricket Audio library for iOS contains code for
all three instruction sets plus the x86_64 code for the iPhone simulator,
packed into a single library (a "fat binary"). When you link your app
to the Cricket Audio library, the linker will automatically choose the
correct version.
Older iOS devices, prior to the iPhone 4 and 3rd generation iPod Touch, used
the armv6 instruction set; however, Cricket Audio no longer supports armv6,
because Xcode no longer generates armv6 code.
Android
Android native code can be built for armv5 (referred to as "armeabi"), armv7
("armeabi-v7a"), or armv8 ("arm64-v8a"). Code built for armv5 can run
on all devices, but armv7 and armv8 code will run faster on processors that
support those architectures. Typically you want to provide all
versions in your .apk; at runtime, the operating system will load the
library with the appropriate architecture.
If you are using the Android Java interface (the Android SDK), you will just
need to install all versions of the native Cricket Audio library (libckjava.so)
with your app. (See Building for the
Android SDK below.)
If you are using the Android native interface (the Android NDK), you will
want to build your native code for all instruction sets, linking each
version to the appropriate version of the Cricket Audio library. By
default, native code built for Android targets only the armv5 instruction
set; while this will work, your code will not run as quickly as it could on
armv7 or armv8 devices. To build for both instruction sets, you need
to specify them in the APP_ABI variable
in your Application.mk file. (See Building for the Android NDK below.)
Some Android devices use Intel processors instead of ARM; to support those
devices, you can build for the x86 and x86_64 architectures. Building
for x86 and x86_64 also allows you to take advantage of Intel HAXM
acceleration when running on the Android emulator.
Cricket Audio does not support MIPS builds of Android; if you are targeting
this architecture, please contact Cricket Audio support for more
information.
Building for iOS, tvOS, or OS X
Select your project in the Project Navigator. In the Project Editor,
select the Build Settings tab.
In the "Search Paths" section, add the path to the Cricket Audio inc
directory to the "Header Search Paths" setting. (For example, if the
Cricket Audio distribution is in ../../cricket,
the header search path would be ../../cricket/inc.)
In the "Search Paths" section, add the path to the Cricket lib
directory to the "Library Search Paths" setting. To specify the
configuration (debug or release), you can use the
${CONFIGURATION} variable. (For example,
if the Cricket Audio distribution is in ../../cricket,
the library search path for iOS would be ../../cricket/lib/ios/${CONFIGURATION}.)
In the "Linking" section, add -lck to the
"Other Linker Flags" setting. If you are using the Objective-C
interface, and you have no C++ code in your project, you may also need to
add -lstdc++ also.
You will also probably want to make sure that any data files (bank files or
stream files) are added to the project and set to be added as resources to
your application bundle.
If you are not already doing so, you will need to link to the AudioUnit,
AudioToolbox, AVFoundation, CoreMedia, and MediaPlayer frameworks.
For an example using Objective-C, take a look at the hellocricket
sample, in src/samples/hellocricket/ios-objc.
(There
is an analogous OS X project in osx-objc.)
This
app was generated from the Xcode template for a window-based iOS app, with
just a few minor changes to play a sound using Cricket Audio. A "Run
Script" build phase was added to the target, which uses the cktool utility to build the binary bank file
from the bank description file. Finally, the binary bank file hellocricket.ckb was added to the project, which
automatically added it to the "Copy Bundle Resources" build phase.
For an example using C++, take a look at the hellocricket
sample, in src/samples/hellocricket/ios-cpp.
(There
is an analogous OS X project in osx-cpp.)
This app is identical to the Objective-C version, except the app delegate
class uses the C++ Cricket Audio interface instead of Objective-C. The
file containing the app delegate class, hellocricketAppDelegate.mm,
was renamed from hellocricketAppDelegate.m,
so the Objective-C++ compiler, rather than the Objective-C compiler, would
be used to build it. (Alternatively, we could have changed the type of
the source file from "Objective-C source" to "Objective-C++ source" in the
File Inspector.)
Building for the Android SDK with Android Studio
Cricket Audio for the Android SDK consists of a .aar file (ck.aar)
which contains both the Java interface and the native code.
For an example, look at the hellocricket
sample, in src/samples/hellocricket/android-sdk.
In
particular, look at src/samples/hellocricket/android-sdk/app/build.gradle
for an example of how to specify the path to the ck.aar file.
Building for the Android NDK
Cricket Audio for the Android NDK consists of static libraries and
headers.
For an example, look at the NDK hellocricket
sample, at src/samples/hellocricket/android-ndk.
This example uses a Java activity class that calls the native Cricket
Audio code using a JNI call; there is a similar example in android-ndk-native
that uses a native activity instead.
Building for Windows
Right-click on the project in the Solution Explorer, and choose Properties.
Under C++ » General » Additional Include Directories, add the path to the
Cricket Audio inc directory. (For
example, if the Cricket Audio distribution is in ../../cricket,
the header search path would be ../../cricket/inc.)
Under Linker » General » Additional Library Directories, add the path to the
appropriate Cricket Audio library directory. The correct path relative
to the Cricket Audio distribution is:
lib/win/VisualStudioVersion/Platform/Configuration
where
VisualStudioVersion
is one of:
- vs12.0 (Visual Studio 2013)
- vs14.0 (Visual Studio 2015)
- vs15.0 (Visual Studio 2017)
Platform is one
of:
and
Configuration
is one of:
- DebugStatic
- DebugDynamic
- ReleaseStatic
- ReleaseDynamic
If your program is linking to the Microsoft runtime statically (i.e. is
compiled with /MT or /MTd),
then use one of the "Static" configurations; if it is linking to the
Microsoft runtime dynamically (i.e. is compiled with /MD
or /MDd), then use one of the "Dynamic"
configurations.
On Windows 8.0 and later, Cricket Audio will use XAudio2 2.8, which comes
preinstalled with Windows. In earlier versions of Windows, it will use
XAudio2 2.7; the DirectX runtime may need to be installed separately on the
target system.
If your program is a Windows Store app (formerly called a Metro app), you
must use either the DebugDynamic or ReleaseDynamic
library.
You can use the Visual Studio macros $(Configuration), $(VisualStudioVersion), and $(PlatformShortName)
to specify the correct path for your program. For example, if the
Cricket Audio distribution is in ../../cricket,
and you are linking statically to the runtime, the library search path would
be ../../cricket/lib/vs$(VisualStudioVersion)/$(PlatformShortName)/$(Configuration)Static.
Under Linker » Input » Additional Dependencies, add ck.lib
to the list of libraries.
Building for
Linux
Make sure you add the path to the Cricket Audio header files to the list
of include directories, and the path to the Cricket Audio libraries to the
list of library directories. In addition to the Cricket Audio
library (libck.a), you will need to link to
the ALSA shared library (libasound.so).
For example, to build the 64-bit debug version of the hellocricket
sample, the command line is:
g++ hellocricket.cpp -o hellocricket -I../../../../inc
-L../../../../lib/linux/x64/debug -L/usr/lib/x86_64-linux-gnu -lck
-lasound


One prominent historical example of fecal matter contamination was in the first English settlement of North America, Jamestown. Waste from the colonists' outhouses seeped into James river, which allowed the waste to penetrate the aquifer that they colonists used as their water source Cohen History water supply(Cohen History, 2020). Much of the disease in death in the Jamestown colony could be partially attributed to this grossly dangerous contaminant which could have been a major factor in the failure of the colony.


Come by yourself or bring a friend! Group lessons will focus on a single dance style for the hour. The cost is only $10 per person! Be sure to follow us on Facebook for our calendar and posts about group lessons.
Lessons can be individual or for a couple. You can choose the dance style of focus or let our talented instructors choose for you. The cost is only $40 per lesson.
Work with our amazing instructors to choreograph the wedding dance of your dreams! Each lesson is $40.
Lead Instructor
Jeri has been ballroom dancing for over 30 years! She started as an instructor with Arthur Murray studios. After working there for 15 years, she decided to branch out with her own studio. In 2009, Jeri started "One Step at a Time" ballroom dance studio and loves having her own place.
Instructor
Amanda joined the studio in 2018.  She is already a fantastic dancer and continues to grow quickly. Amanda has her own students in the studio.


Introduction
Mumbai has experienced a surge in motor vehicle traffic and road congestion. Prevailing explanations for the worsening traffic jams typically point to the recent explosion in private automobile ownership. The number of cars on Mumbai's roads has increased by 50% over the past five years, from approximately two million vehicles in 2011 to three million vehicles in 20161
. This rapid increase in
automobiles is often explained as the result of population growth, rising discretionary incomes, and suburbanization.
It is true that the number of motor vehicles on Mumbai's roads has been increasing rapidly. However, walking and mass transit are still the primary modes of transportation for most Mumbai residents by a large margin, with the vast majority of trips in the city being made on foot, bus or train.
But Mumbai continues to prioritize the car: Since 1999, in an attempt to ease congestion, Mumbai has built over 60 flyovers
2
and several high-speed freeways, including the Bandra-Worli Sea Link,
Eastern Freeway, Jogeshwari-Vikhroli Link Road (JVLR) and the Santacruz-Chembur Link Road (SCLR).
Meanwhile, the city has no dedicated bus lanes, no regulations against roadside parking on arterial roads or in business districts,
and lacks basic provisions for pedestrians like footpaths and speed limits.
Transit Oriented Mumbai
While Mumbai may have a reputation as a car-centric city, few Mumbaikars use cars for their daily commutes. Manish Shirgaokar, Assistant Professor of Urban and Regional Planning at the University of Alberta, analyzes commuting patterns of middle class workers in Mumbai. He finds that over half of middle class workers commuting to Mumbai city ride the suburban rail network, followed by walking, biking and the bus. For workers whose jobs are located in Mumbai's exurbs, walking and biking are the most common modes, followed by the train, motorcycle and bus. Only 3% of middle class workers commute by car
3
. Above is a visualization summarizing Shirgaokar's findings.
Indeed, Mumbai is a transit- and pedestrian-oriented city with an extensive, albeit intense and overcrowded, public transport system.
Buses - Originally established in 1873 as a tramway company, The Brihanmumbai Electricity Supply and Transport (BEST) Undertaking is the civic transport and electricity provider in Mumbai. As of 2015, BEST runs approximately 3,600 buses, transporting 4.8 million passengers daily over 365 routes. Trains - The Mumbai Suburban Railway connects Mumbai metropolitan region and its suburbs. Spread over 465 kilometres, the suburban railway carries more than 7.5 million commuters daily. By annual ridership (2.64 billion), the Mumbai Suburban Railway is one of the busiest commuter rail systems in the world and experiences severe overcrowding. Metro - There is also a developing subway system, called the Mumbai Metro, most of which is currently in planning or construction phases. Line 1 of the Mumbai metro consists of 12 stations connecting the Eastern and Western suburbs of Mumbai. It began operations in June 2014 and already has the eigth highest passenger density of any metro line in the world. Seven additional metro lines have been approved and are currently under construction.
Mumbai Transit Flows
Transit schedule data for the BEST Bus system is publicly available in GTFS format via GTFS Data Exchange
4
,
valid through July 2015. Schedule data for the Mumbai Metro is also publicly available via GTFS Data Exchange 5
,
valid through December 2015.
Schedule data for the Mumbai Suburban Railway was not previously available in machine-readable format. However, timetables for the Railway
are available from Transport For Mumbai 6
in PDF format. These timetables were scraped with a custom Python script
and converted into machine-readable format.Comparative Urbanism
In this section, we will compare statistics on motor vehicles, population and street network density between Mumbai and five of the other most populous Indian cities: Delhi, Kolkata, Bengaluru, Chennai and Hyderabad. The goal of this analysis is to provide statistical context around Mumbai's congestion problems. Data was obtained from the Indian Government's Open Data Portal and OpenStreetMap.
Population - Home to 18.4 million people, Mumbai is the second-largest city in India behind Delhi.
Motor Vehicles - Despite its large population, Mumbai actually has far fewer registered motor vehicles than Delhi, Bengaluru and Chennai. This data was obtained from the Indian Government's Open Data Portal
8
.
Motor Vehicles per Person - Mumbai has fewer motor vehicles per capita than any of the other five largest Indian cities.
Road Networks - If Mumbai has fewer cars per capita than other Indian mega-cities, than why is it struggling with such bad traffic jams?
The answer: Road density. Mumbai has only about 2,000 kilometers of roads, less then 10% of Delhi's 28,508 kilometers of roads.
Road networks were exported from OpenStreetMap
9
.
The maps below display the road networks in Mumbai, Delhi, Bengaluru, Hyderabad, Chennai and Kolkata.
Total Road Length - Mumbai has significantly less total road length than Delhi, Bengaluru and Hyderabad.
Motor Vehicles per Kilometer of Road - Mumbai has the second highest motor vehicle density of its peer cities, calculated as the number of registered motor vehicles per kilometer of road.
Flyover City
Mumbai's government wants more roads but doesn't have room to build them. So, it has opted to 1) build roads on top of roads and 2) displace residents from their homes to make way for new roads.Mumbai built an estimated 55-60 flyovers since the late 1990s in an attempt to ease congestion. The term flyover refers to bridges, roads, railways or other structures that crosses over another road or railway. Recent examples of these include Santacruz Chembur Link Road, Bendra Worli Sea Link, Eastern Freeway and Eastern Express Highway, as shown below.
Santacruz Chembur Link Road is a 6.5km arterial road in Mumbai that connects the Eastern Express Highway in Chembur with the Western Express Highway in Santa Cruz, close to Mumbai's international airport. Santacruz Chembur Link Road was constructed during phase one of the Mumbai Urban Transport Project (MUTP).
The Mumbai Urban Transport Project was a $555 million project initiated in 2002 by the Mumbai Metropolitan Region Development Authority (MMRDA) with funding from the World Bank. The MUTP’s stated goal is to “foster the development of an efficient and sustainable urban transport"
10
. The MUTP included
the building of the Santacruz Chembur Link Road and the widening of the Jogeshwari - Vikhroli Link Road, in addition to many
other proposals.
Unfortunately, the MUTP had disastrous effects for many of the people living in the surrounding communities who were forced to leave their homes to make way for the construction of the project
11
.
According to the World Bank's own post-mortem assessment, over 100,000 people living along the proposed roads and railways tracks were resettled
12
. This displacement was justified by the fact that
most people affected did not have legal title to the land they occupied.
The below report from the World Bank documents the forced resettlement caused by the MUTP and even casts it in a positive light, calling the project "a worldwide example of urban resettlement on a mega scale" and surmising that the "lessons learnt from the project have equipped the MMRDA to effectively deal with the resettlement challenges of future infrastructure projects in the city".
The displacement caused by the MUTP is unfortunately only one of many historical and planned instances of forced resettlement caused by road-building projects.
There is an existing plan to extend the Eastern Freeway by connecting it to the Eastern Express Highway. The extension would go through slum pockets on the east side of the Eastern Express Highway. According to MMRDA's Metropolitan Commissioner Urvinder Pal Singh Madan, "Around 2,000 slums will have to be cleared to create space for the freeway [...] It should take at least a year for the project to get off the ground. During this period, we will begin the process for getting environmental and coastal regulatory authority (CRZ) clearances, as some mangroves will be affected"
13
.
Imagining Alternate Futures
Flyovers and road widening schemes are viewed as a solution to Mumbai's traffic congestion but, despite their proliferation, the problem remains unresolved. These car-centric projects aim to benefit only the few Mumbaikars who commute by car, while threatening the lives and livelihoods of city's poorest residents who live in their way. They also incentivize more people to commute by car, worsening congestion and prompting calls for more and wider roads, a cylical phenomenon often referred to as the law of induced demand.There are several strategies that Mumbai could employ to improve road congestion and safety while benefitting its millions of residents who commute by foot, bicycle, train or bus. These strategies ought to be simple, relatively inexpensive and effective without requiring any forced resettlement.
Proposed tactics include:
- Dedicated bus lanes
- Prohibit parking on major arterial roads
- Regulate parking in urban core
- Congestion pricing in business districts
- Protected sidewalks and bike lanes
- Legal provisions for pedestrians
Please note: footnotes not visible on mobile.
Return to Student Projects


US RNS-510 Video In Motion¶
Warning
Obviously playing DVDs while driving is dangerous and in the USA you’ll probably get pulled over for it if a cop sees it depending if your state has made it illegal. Making any changes to your RNS-510 head unit always has the possibility of bricking the device and you’ll be left with a $2000 paper weight. Proceed at your own risk.
Background¶
After purchasing a VW 2010 Jetta SportWagen TDI with the DVD/Navigation option I’ve been searching for a way to get the head unit to play DVD video while driving so that my passengers can watch their DVDs while I drive on long road trips. I finally discovered a way to enable this feature. You will not need to purchase anything or make any prior changes.
The original thread on vwnavi.com was deleted so I will be mirroring my steps and the files here. I’m assuming these files were created by Berto89 from VWItalia.it [1], thanks to him I was able to get VIM working on my US unit. In the download link below you will find a zip file containing two files:
VIM_Berto89.iso¶
This file contains a script that changes the DVD playback speed limit from 10 km/h to 300 km/h. This means that the screen won’t be blanked until you are doing 300 km/h. The script also enables Test Mode (or the “Secret Menu”), which you can access by pressing and holding the Setup button for several seconds. I believe there will be a total of three different Setup screens while holding down the button.
If you want to get technical, the magic happens in the file \WA\VIM.WSH
- MD5 checksum: 5eca311f5de010132bbb47d29f2a0ad7
- Size: 156 KB
RECODE_Berto89.iso¶
This optional file reverts the changes from VIM_Berto89.iso back to the default factory settings (10 km/h and disables Test Mode). Use this if you want to undo changes.
- MD5 checksum: 0acc8989a2cf0ab2e4de75b7c71bcebc
- Size: 156 KB
Procedure¶
I have amended this section after reading a few forums about this topic with an alternate solution. [2] [3] [4] [5]
If you get any errors when attempting to enable VIM (Video In Motion) try burning the files using another CD burning program and try another brand of CD-R. That seems to fix the problem for most people from what I can see.
For some people, simply turning on the RNS-510 unit (no need to start the ignition) and inserting the CD will start the update process. Be sure to press OK on the white screen when it appears. Other than that, everything should be hands off, it will even automatically eject the CD when it’s done. Someone made a video using this procedure.
That didn’t work for me, so I went the long way. These are the steps I took to enable VIM on my factory RNS-510 unit that came with my VW I bought in Texas. Again, proceed at your own risk:
- Start the car.
- Press and hold the
Eject
,Day/Night
, andGuide
buttons. - Quickly insert your burned VIM CD-R, keep holding the three buttons.
- The RNS-510 unit should automatically restart, once it does that let go of the buttons.
- The unit will reboot a few times, even saying something like “failed to start, insert cd”. Ignore that and keep waiting.
- After a few more reboots you will see a white screen with OK and Cancel buttons. Tap on OK.
- Again the unit will reboot a few more times.
- When it shows a screen with a green rectangle saying “Success”, eject the CD with the
eject
button. - The unit will automatically reboot one last time.
- Once it boots up everything should be like normal.
At this point you should be able to insert a DVD while driving and the screen will not be blanked.
References¶
| [1] | http://www.vwitalia.it/forum/members/berto89/ |
| [2] | https://forums.tdiclub.com/showthread.php?t=326199 |
| [3] | http://www.golfmk6.com/forums/showthread.php?t=22712 |
| [4] | http://forums.vwvortex.com/showthread.php?5395639-RNS-510-Video-In-Motion-via-firmware-change-5-min-job-and-free |
| [5] | http://myturbodiesel.com/forum/f9/how-unlock-rns510-vim-tv-free-free-video-motion-play-dvd-while-driving-9150/ |


Use Docker Desktop Enterprise on Mac
読む時間の目安: 14 分This page contains information about testing the installation and configuring Docker Desktop Enterprise (DDE) runtime options on Mac.
Test your installation
-
Open a command-line terminal and test that your installation works by running the simple Docker image, hello-world.
$ docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world ca4f61b1923c: Pull complete Digest: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ...
-
Start a Dockerized web server. Like the
hello-world
image above, if the image is not found locally, Docker pulls it from Docker Hub.$ docker run --detach --publish=80:80 --name=webserver nginx
-
In a web browser, go to
http://localhost/
to view the nginx homepage. Because we specified the default HTTP port, it isn’t necessary to append:80
at the end of the URL. -
View the details on the container while your web server is running (with
docker container ls
ordocker ps
):$ docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 56f433965490 nginx "nginx -g 'daemon off" About a minute ago Up About a minute <IP_ADDRESS>:80->80/tcp, 443/tcp webserver
-
Stop and remove containers and images with the following commands. Use the “all” flag (
--all
or-a
) to view stopped containers.
$ docker container ls
$ docker container stop webserver
$ docker container ls -a
$ docker container rm webserver
$ docker image ls
$ docker image rm nginx
Docker Desktop user interface
The Docker Desktop Enterprise user interface provides options to configure Docker Desktop preferences such as installation, version packs, Docker Hub login, and more. Right-click the Docker icon from the menu bar to open the Docker Desktop user interface.
Version Selection
The Version Selection option lists the version packs installed on your Docker Desktop environment and allows you to switch between Docker Engine and Kubernetes versions using a single click. When you select a different version pack, Docker Desktop restarts and the selected versions of Docker Engine and Kubernetes will be used.
To switch to a different version pack, simply click on the version pack you would like to use.
Preferences
Click on the Docker icon from the menu bar and then Preferences to configure the runtime options described below.
Note: Administrators have the ability to lock some configuration options. Locked options cannot be selected, and are displayed with a lock icon.
General
General settings include:
-
Start Docker Desktop when you log in: Starts Docker Desktop when you open your session. (Enabled by default)
-
Include VM in Time Machine backups: Backs up the Docker Desktop Enterprise virtual machine. (Disabled by default)
Securely store Docker logins in macOS keychain: Stores your Docker login credentials. (Enabled by default)
-
Send usage statistics: Sends diagnostics, crash reports, and usage data to Docker. This information helps Docker improve the application and get more context for troubleshooting problems. (Enabled by default)
File Sharing
Choose which local directories to share with your containers. File sharing is
required for volume mounting if the project lives outside of the /Users
directory. In that case, share the drive where the Dockerfile and volume are
located. Otherwise, you get file not found
or cannot start service
errors at
runtime.
File sharing settings include the following options:
-
Add a Directory: Click
+
and navigate to the directory you want to add. -
Apply & Restart makes the directory available to containers using Docker’s bind mount (
-v
) feature.There are some limitations on the directories that can be shared:
- They cannot be a subdirectory of a directory that has been shared already.
- They cannot already exist inside of Docker.
For more information, see:
Disk
Specify the Disk image location of the Linux volume, where containers and images are stored.
You can also move the disk image location. If you attempt to move the disk image to a location that already has one, you get a prompt asking if you want to use the existing image or replace it.
Advanced
On the Advanced tab, you can limit resources available to Docker.
Advanced settings include the following options:
-
CPUs: By default, Docker Desktop Enterprise is set to use half the number of processors available on the host machine. To increase processing power, set this to a higher number; to decrease, lower the number.
-
Memory: By default, Docker Desktop Enterprise is set to use 2 GB runtime memory, allocated from the total available memory on your Mac. To increase RAM, set this to a higher number; to decrease it, lower the number.
-
Swap: Configure swap file size as needed. The default is 1 GB.
Proxies
Docker Desktop Enterprise detects HTTP/HTTPS Proxy Settings from macOS and automatically
propagates these to Docker and to your containers. For example, if you set your
proxy settings to http://proxy.example.com
, Docker uses this proxy when
pulling containers.
When you start a container, your proxy settings propagate into the containers. For example:
$ docker run -it alpine env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=b7edf988b2b5
TERM=xterm
HOME=/root
HTTP_PROXY=http://proxy.example.com:3128
http_proxy=http://proxy.example.com:3128
no_proxy=*.local, 169.254/16
You can see from the above output that the HTTP_PROXY
, http_proxy
, and
no_proxy
environment variables are set. When your proxy configuration changes,
Docker restarts automatically to pick up the new settings. If you have
containers that you wish to keep running across restarts, you should consider
using restart policies.
Daemon
You can configure options on the Docker daemon that determine how your containers run.
Select Basic to configure the daemon with interactive settings, or select Advanced to edit the JSON file directly.
Experimental features
Docker Desktop Enterprise has experimental features enabled on Docker Engine, as described in Docker Experimental Features Readme. If you don’t select Experimental Features, Docker Desktop Enterprise uses the current generally available release of Docker Engine.
試験的な機能は、将来の製品に搭載される機能をいち早く試すことができるものです。 ただし現段階でのこの機能は、テストとフィードバックのためだけを意図しています。 したがってリリース時には予告なく変更される場合があり、将来のリリースでは完全に削除されることもあります。 試験的な機能は本番環境では利用しないでください。 Docker ではこの試験的機能に対するサポートは行っていません。
Docker CLI において試験的機能を有効にするには、
config.json
ファイルを編集してexperimental
を有効に設定してください。Docker Desktop メニューから試験的機能を有効にするには、Settings (macOS の場合は Preferences) > Command Line をクリックし、Enable experimental features チェックを有効にします。 そして Apply & Restart をクリックしてください。
Docker CLI における現時点での試験的機能については Docker CLI 試験的機能 の一覧を参照してください。
You can see whether you are running experimental mode at the command line. If
Experimental
is true
, then Docker is running in experimental mode, as shown
here. (If false
, Experimental mode is off.)
$ docker version -f {{.Server.Experimental}}
true
Insecure registries
You can set up a custom and insecure registry to store your public or private images (instead of using Docker Hub. Add URLs for your insecure registries and registry mirrors on which to host your images.
For more information, see:
Daemon configuration file
Click the Advanced tab to configure the daemon from the JSON file. For a full list of options, see the Docker Engine dockerd command line reference.
Click Apply & Restart to save your settings and reboot Docker. To cancel changes, click another preference tab, then choose to discard or not apply changes when prompted.
Kubernetes
Docker Desktop Enterprise includes a standalone Kubernetes server that runs on your Mac, so that you can test deploying your Docker workloads on Kubernetes.
The Kubernetes client command, kubectl
, is included and configured to connect
to the local Kubernetes server. If you have kubectl
already installed and
pointing to some other environment, such as minikube
or a GKE cluster, be sure
to change context so that kubectl
is pointing to docker-desktop
:
$ kubectl config get-contexts
$ kubectl config use-context docker-desktop
If you installed kubectl
with Homebrew, or by some other method, and
experience conflicts, remove /usr/local/bin/kubectl
.
To enable Kubernetes support and install a standalone instance of Kubernetes running as a Docker container, select Enable Kubernetes, choose the default orchestrator and click the Apply button.
Images required to run the Kubernetes server are downloaded and instantiated as containers, and the /usr/local/bin/kubectl
command is installed on your Mac.
When Kubernetes is enabled and running, an additional status bar item displays at the bottom right of the Docker Desktop Enterprise Preferences dialog.
The status of Kubernetes shows in the Docker menu and the context points to docker-desktop
.
By default, Kubernetes containers are hidden from commands like docker
service ls
, because managing them manually is not supported. To view these containers, select Show system containers (advanced) and click Apply and restart. Most users do not have to use this option.
To disable Kubernetes support at any time, clear the Enable Kubernetes check box. The
Kubernetes containers are stopped and removed, and the
/usr/local/bin/kubectl
command is removed.
For more information about using the Kubernetes integration with Docker Desktop Enterprise, see Deploy on Kubernetes.
Reset
Click on the Docker icon from the menu bar and then Preferences. Click Reset to reset to factory defaults, restart the Docker daemon, reset Kubernetes cluster, or to reset the disk image.
Troubleshoot
The Diagnose and Feedback option allows you troubleshoot any issues you may be experiencing with Docker Desktop Enterprise. For more information, see Troubleshoot DDE issues on Mac.
Design new application
Select this option to open the Application Designer user interface. Application Designer provides a library of application and service templates to help Docker developers quickly create new Docker applications. For more information, see Application Designer.
Docker Hub
Select Sign in /Create Docker ID from the Docker Desktop Enterprise menu to access your Docker Hub account. Once logged in, select Repositories on the Docker Desktop Enterprise menu to access your Docker Hub repositories directly.
See the following Docker Hub topics to learn more:
Add TLS certificates
You can add trusted Certificate Authorities (CAs) (used to verify registry server certificates) and client certificates (used to authenticate to registries) to your Docker daemon.
Add custom CA certificates (server side)
All trusted CAs (root or intermediate) are supported. Docker Desktop Enterprise creates a certificate bundle of all user-trusted CAs based on the Mac Keychain, and appends it to Moby trusted certificates. So if an enterprise SSL certificate is trusted by the user on the host, it is trusted by Docker Desktop Enterprise.
To manually add a custom, self-signed certificate, start by adding the certificate to the macOS keychain, which is picked up by Docker Desktop Enterprise. Here is an example.
$ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt
If you prefer to add the certificate to your own local keychain only (rather than for all users), run this command instead:
$ security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain ca.crt
See also, Directory structures for certificates.
Note: You need to restart Docker Desktop Enterprise after making any changes to the keychain or to the
~/.docker/certs.d
directory in order for the changes to take effect.
For a complete explanation of how to do this, see the blog post Adding Self-signed Registry Certs to Docker & Docker Desktop Enterprise.
Add client certificates
You can put your client certificates in
~/.docker/certs.d/<MyRegistry>:<Port>/client.cert
and
~/.docker/certs.d/<MyRegistry>:<Port>/client.key
.
When the Docker Desktop Enterprise application starts up, it copies the ~/.docker/certs.d
folder on your Mac to the /etc/docker/certs.d
directory on Moby (the Docker
Desktop Enterprise xhyve
virtual machine).
You need to restart Docker Desktop Enterprise after making any changes to the keychain or to the
~/.docker/certs.d
directory in order for the changes to take effect.The registry cannot be listed as an insecure registry (see Docker Daemon). Docker Desktop Enterprise ignores certificates listed under insecure registries, and does not send client certificates. Commands like
docker run
that attempt to pull from the registry produce error messages on the command line, as well as on the registry.
Directory structures for certificates
If you have this directory structure, you do not need to manually add the CA certificate to your macOS system login:
/Users/<user>/.docker/certs.d/
└── <MyRegistry>:<Port>
├── ca.crt
├── client.cert
└── client.key
The following further illustrates and explains a configuration with custom certificates:
/etc/docker/certs.d/ <-- Certificate directory
└── localhost:5000 <-- Hostname:port
├── client.cert <-- Client certificate
├── client.key <-- Client key
└── ca.crt <-- Certificate authority that signed
the registry certificate
You can also have this directory structure, as long as the CA certificate is also in your keychain.
/Users/<user>/.docker/certs.d/
└── <MyRegistry>:<Port>
├── client.cert
└── client.key
To learn more about how to install a CA root certificate for the registry and how to set the client TLS certificate for verification, see Verify repository client with certificates in the Docker Engine topics.
Install shell completion
Docker Desktop Enterprise comes with scripts to enable completion for docker
and docker-compose
commands. The completion scripts may be
found inside Docker.app
, in the Contents/Resources/etc/
directory and can be
installed both in Bash and Zsh.
Bash
Bash has built-in support for completion. To activate completion for Docker commands, these files need to be
copied or symlinked to your bash_completion.d/
directory. For example, if you have
installed bash through Homebrew.
etc=/Applications/Docker.app/Contents/Resources/etc
ln -s $etc/docker.bash-completion $(brew --prefix)/etc/bash_completion.d/docker
ln -s $etc/docker-compose.bash-completion $(brew --prefix)/etc/bash_completion.d/docker-compose
Zsh
In Zsh, the completion
system takes care of things. To activate completion for Docker commands,
these files need to be copied or symlinked to your Zsh site-functions/
directory. For example, if you installed Zsh through Homebrew:
etc=/Applications/Docker.app/Contents/Resources/etc
ln -s $etc/docker.zsh-completion /usr/local/share/zsh/site-functions/_docker
ln -s $etc/docker-compose.zsh-completion /usr/local/share/zsh/site-functions/_docker-compose