题目
先把题目放上:
链接:https://leetcode.com/problems/sort-colors
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the integers 0, 1, and 2 to represent the color red, white, and blue respec继续阅读 »
Here is a quiz on magrittr and you may check if you are really good at using it. Since the CRAN version currently does not support nested ., it won't be interesting to make a quiz on that version. All the following examples are using the latest development version on GitHub. You can do the same test with the CRAN versi继续阅读 »
Recently, xmake's description syntax has been enhanced to support two different grammar styles at the same time.
The set-add style
The key-val style
The set-add style
This is xmake's classic style, for example:
lua
target("test")
set_kind("static")
add_defines("DEBUG")
add_files("src/*.c", "test/*.cpp")
继续阅读 »
What Is Google C++ Mocking Framework?
When you write a prototype or test, often it's not feasible or wise to rely on real objects entirely. A mock object implements the same interface as a real object (so it can be used as one), but lets you specify at run time how it will be used and what it should do (which methods 继续阅读 »
Native Docker Networking Status
Docker now supports both single-host and multi-host networking this means that both containers on the same Docker host and containers on different Docker hosts can connect with each other with native docker network support.
For multi-host networking support, docker is using overlay net继续阅读 »