Introduce to Smart PointerIn computer science, a smart pointer is an abstract data type that simulate a pointer while providing additonal features.-- [WikiPedia](http://en.wikipedia.org/wiki/Smart_pointer)In the C++ language,smart pointerimplements as a template class and override the behaviour of raw pointer, such as dereferencing and assignment. What's more, smart poiner also providing addtional memory managment algorithms.From the information above, we learn that:Smart pointer is a decorator of raw pointer. So smart pointer has more functions/methods than raw pointer, and use more convenien
...继续阅读
(22)
Introduce to Smart PointerIn computer science, a smart pointer is an abstract data type that simulate a pointer while providing additonal features.-- [WikiPedia](http://en.wikipedia.org/wiki/Smart_pointer)In the C++ language,smart pointerimplements as a template class and override the behaviour of raw pointer, such as dereferencing and assignment. What's more, smart poiner also providing addtional memory managment algorithms.From the information above, we learn that:Smart pointer is a decorator of raw pointer. So smart pointer has more functions/methods than raw pointer, and use more convenien
...继续阅读
(13)
Introduce to Smart PointerIn computer science, a smart pointer is an abstract data type that simulate a pointer while providing additonal features.-- [WikiPedia](http://en.wikipedia.org/wiki/Smart_pointer)In the C++ language,smart pointerimplements as a template class and override the behaviour of raw pointer, such as dereferencing and assignment. What's more, smart poiner also providing addtional memory managment algorithms.From the information above, we learn that:Smart pointer is a decorator of raw pointer. So smart pointer has more functions/methods than raw pointer, and use more convenien
...继续阅读
(15)
CallbackWhat iscallback"ACallbackis a piece of executable code that is passed as an argument to other code, which is expected to call back(execute) the argument at some convenient time." -- wikipediaDifferent programming languages have different implement of callback, but they are often implemented with subroutines, lambda expression, blocks, or function pointer.There are two kinds of callbacks:(1) Blocking callbacks(also synchronous callbacks):
- Blocking callbacks are invoked before a function returns.
- Blocking callbacks often, but not always, reply on a single thread, so blocking callbac
...继续阅读
(26)
CallbackWhat iscallback"ACallbackis a piece of executable code that is passed as an argument to other code, which is expected to call back(execute) the argument at some convenient time." -- wikipediaDifferent programming languages have different implement of callback, but they are often implemented with subroutines, lambda expression, blocks, or function pointer.There are two kinds of callbacks:(1) Blocking callbacks(also synchronous callbacks):
- Blocking callbacks are invoked before a function returns.
- Blocking callbacks often, but not always, reply on a single thread, so blocki
...继续阅读
(43)
CallbackWhat iscallback"ACallbackis a piece of executable code that is passed as an argument to other code, which is expected to call back(execute) the argument at some convenient time." -- wikipediaDifferent programming languages have different implement of callback, but they are often implemented with subroutines, lambda expression, blocks, or function pointer.There are two kinds of callbacks:(1) Blocking callbacks(also synchronous callbacks):
- Blocking callbacks are invoked before a function returns.
- Blocking callbacks often, but not always, reply on a single thread, so blocki
...继续阅读
(1)
CallbackWhat iscallback"ACallbackis a piece of executable code that is passed as an argument to other code, which is expected to call back(execute) the argument at some convenient time." -- wikipediaDifferent programming languages have different implement of callback, but they are often implemented with subroutines, lambda expression, blocks, or function pointer.There are two kinds of callbacks:(1) Blocking callbacks(also synchronous callbacks):
- Blocking callbacks are invoked before a function returns.
- Blocking callbacks often, but not always, reply on a single thread, so blocking callbac
...继续阅读
(13)
What isDocstring is a description statement in a function, a method, a module or a class. It becomes the special attribute__doc__.Any functions, modules, classes and packages should normally have docstring.One-line docstringPlease note this:One-line docstring is surrounded by triple quotes, even thought they can write in a line.There is no blanks line before or after docstring.Thers is no blanks after the openning quote and no blanks before the closing quote.Docstring should be a phrase prescribes the function or method's effect as a command, but no a description.Docstring should not reiterati
...继续阅读
(9)
What isDocstring is a description statement in a function, a method, a module or a class. It becomes the special attribute__doc__.Any functions, modules, classes and packages should normally have docstring.One-line docstringPlease note this:One-line docstring is surrounded by triple quotes, even thought they can write in a line.There is no blanks line before or after docstring.Thers is no blanks after the openning quote and no blanks before the closing quote.Docstring should be a phrase prescribes the function or method's effect as a command, but no a description.Docstring should not reiterati
...继续阅读
(17)
What isDocstring is a description statement in a function, a method, a module or a class. It becomes the special attribute__doc__.Any functions, modules, classes and packages should normally have docstring.One-line docstringPlease note this:One-line docstring is surrounded by triple quotes, even thought they can write in a line.There is no blanks line before or after docstring.Thers is no blanks after the openning quote and no blanks before the closing quote.Docstring should be a phrase prescribes the function or method's effect as a command, but no a description.Docstring should not reiterati
...继续阅读
(1)