std::tie in c++

std::tie(a, b, c) constructs a tuple object whose elements are references to the arguments. This allows a set of objects to act as a ...

In blog, c++, Aug 16, 2019

Build your website with Jekyll

Why you need a personal website? Blog everything you like and share them with your friends Show your products online and extend you...

Read More

All Stories

std::tie in c++

std::tie(a, b, c) constructs a tuple object whose elements are references to the arguments. This allows a set of objects to act as a tuple, which is especially useful to unpack tuple ...

In blog, c++, Aug 16, 2019

Ethereum p2p network c++ implementation

Ethereum p2p network is based on Kademlia protocol over UDP. For each peer, TCP connect session is established after capatibility handshake.

In blog, c++, Aug 16, 2019

Regular expressions in modern c++

Regular expression allows you to use wildcards and patterns to search and replace characters in strings. In principle, you can do the following operations with regular expressions: M...

In blog, c++, Aug 07, 2019

Enable git over http

Usually, you push your changes to remote repository by git or ssh protocol, but in case, e.g. in my company office, these protocols are blocked for security consideration. In the foll...

In tutorial, git, Aug 07, 2019

strlen at compile time

You have a class with a name, and you need to calculate its size and allocate memory for it, how to do this?```c++class A{public: static constexpr const char* const name = “Class A...

In blog, c++, Aug 06, 2019

Build your website with Jekyll

Why you need a personal website? Blog everything you like and share them with your friends Show your products online and extend your business Make money with your website by aderti...

In tutorial, website, Aug 06, 2019

Timestamp in c++

Sometimes, timestamp is useful and important for a received message, a triggered event or just a print log. How can we get and print timestamp like this 2019-08-06 09:19:25.256 in mod...

In blog, c++, Aug 05, 2019