Tag:c

  • Using STL queue to realize thread safe queue

    Time:2020-7-10

    brief introduction Recently, a friend asked about thread safe queues. In this paper, the queue container based on STL realizes thread safe queue, which can produce and consume multithreads. At the same time, with the boost based circular_ Compared with the ring buffer implemented by buffer, the performance is slightly better (less than 5% in […]

  • Introduction to audio and video – 01 – understanding RGB

    Time:2020-7-9

    Contents of audio and video introductory articles Introduction to RGB RGB color mode is a kind of color standard in industry. It can get all kinds of colors by changing the red (R), green (g) and blue (b) channels as well as their superposition It is the color representing the three channels of red, green […]

  • C + + stack class template implementation code

    Time:2020-7-9

    Recently, we reviewed the data structure, involving the implementation of the stack. Through the class template, we can make the storage data type of the stack more flexible. Here is the implementation code of the stack: #ifndef MYSTACK_H #define MYSTACK_H #include <iostream> using namespace std; template <typename T> class MyStack { public: MyStack(int size); ~MyStack(); […]

  • Solutions to structural performance problems in C ා 7.2

    Time:2020-7-9

    preface In some cases where the readonly keyword is used, the C ා compiler creates a defensive copy of the structure. Although this problem is well known and documented, it is still worth re examining because it is related to several characteristics of C ා 7.2. The use of the in and ref readonly keywords […]

  • (16) Where is the text box? -HZHControls

    Time:2020-7-9

    Official website http://www.hzhcontrols.com premise Has been in the industry for 7,8 years, has always wanted to do a set of beautiful custom controls, so there is a series of articles. GitHub:https://github.com/kwwwvagaa/NetWinformControl Code cloud: https://gitee.com/kwwwvagaa/net_ winform_ custom_ control.git If you think the writing is OK, please click a star to support it Welcome to discuss: Penguins […]

  • Design pattern 2: Abstract Factory Pattern

    Time:2020-7-8

    Abstract factory pattern Abstract factory pattern is to create other factories around a super factory. This super factory is also called the factory of other factories. This type of design pattern is a creative pattern, which provides an optimal way to create objects. In the abstract factory pattern, an interface is the factory responsible for […]

  • C + + using linked list template class to achieve simple queue

    Time:2020-7-8

    This example for you to share the C + + use of linked list template class to achieve a specific code for your reference, the specific content is as follows Design idea:The template class is declared and implemented in myqueue. H. Firstly, the structure of the node is defined, including data and pointer field. In […]

  • How to use C ා code to create shortcut file

    Time:2020-7-8

    preface A shortcut is a special file with the extension LNK. There are many ways to create shortcuts. First, let’s take a look at what shortcuts are. Right click the shortcut and select the Properties menu. In the General tab of the pop-up property dialog box, you can see that the file type is shortcut […]

  • C ා s Commission case

    Time:2020-7-8

    C ා delegate implementation (delegate) does not say much. Go directly to the code and see the comments in the code: namespace Delegate { Delegate void dgsayihi (string name); // declare delegation delegate void DGDo(string name); class Program { static void Main(string[] args) { DGSayiHi sayhi = new DGSayiHi(SayChineseHi); DGSayiHi sayhi2 = new DGSayiHi(SayEnglishHi); Sayhi […]

  • Analysis of del of redis command

    Time:2020-7-7

    baiyan Command syntax Command meaning: delete the value corresponding to a keyCommand format: DEL [key1 key2 …] Command actual combat: 127.0.0.1:6379> del key1 (integer) 1 Return value: the number of deleted keys Source code analysis First, we open a redis client and use the port of GDB – P redis server. Since the processing function […]

  • Design mode 3 — singleton mode

    Time:2020-7-7

    Singleton mode Singleton pattern is one of the simplest design patterns. This type of design pattern is a creative pattern, which provides an optimal way to create objects. This pattern involves a single class that is responsible for creating its own objects while ensuring that only a single object is created. This class provides a […]

  • Summary of SQL basic syntax for C ා

    Time:2020-7-7

    “Blog move”Original address: CSDN original publication time: September 25, 2016 SQLite3, which is currently used in Visual Studio 2015 platform, will be summarized later. 1. Use nuget to add SQLite library In Visual Studio 2015, select Tools > nuget package manager > manage solution nuget package Retrieve “SQLite” in this interface. Select and install one […]