Tag:c

  • Design mode 8——– filter mode

    Time:2019-10-23

    Filter mode The Filter Pattern or Criteria Pattern is a design Pattern that allows developers to Filter a set of objects using different Criteria and join them in a decoupled manner through logical operations. This type of design pattern is a structural pattern that combines multiple standards to produce a single standard. implementation We will […]

  • [algorithm] algorithm diagram note _ hash table

    Time:2019-10-23

    The time complexity of linear search is O(n), binary search is O(logn), is there any search with time complexity of O(1)? Yes, of course. That’s the hash table. The hash function Hash function “maps input to number”. It must meet some requirements. It has to be consistent. For the same input, the output must be […]

  • Data structure and algorithm

    Time:2019-10-22

    Max subseqsum Time complexity: t (n) = O (N3) int MaxSubSeqSum(int arrays[],int length){ int i,j,k,thisSum=0,maxSum=0; for(i=0;i<length;i++){ for(j=i;j<length;j++){ thisSum=0; for(k=i;k<=j;k++){ thisSum+=arrays[k]; } if(thisSum>maxSum)maxSum=thisSum; }; } return maxSum; } Max subseqsum Time complexity: t (n) = O (N2) int MaxSubSeqSum(int arrays[],int length){ int i,j,thisSum=0,maxSum=0; For (I = 0; I < length; I + +) {// I is […]

  • 2019 write up

    Time:2019-10-21

    Preface Liver a day, finally hit the third, record.It’s really a good dish~~~~ Reverse baby_reverse The encryption function is as follows int __fastcall encode(const char *a1, __int64 a2) { char v3[32]; // [rsp+10h] [rbp-70h] char v4[32]; // [rsp+30h] [rbp-50h] char v5[36]; // [rsp+50h] [rbp-30h] int v6; // [rsp+74h] [rbp-Ch] int v7; // [rsp+78h] [rbp-8h] int […]

  • C. how to generate tokens and cookies based on user information

    Time:2019-10-21

    In projects with separate front and back ends, the process of requesting interfaces is generally as follows: User login with username and password The information is correct, and the interface returns token To request the interface that needs to be logged in for verification, put the token into the header to request the interface together. […]

  • Design mode 9 — combination mode

    Time:2019-10-21

    Combination mode Composite pattern, also called partial overall pattern, is used to treat a group of similar objects as a single object. The combination pattern combines objects according to the tree structure to represent the part and the whole level. This type of design pattern belongs to structural pattern, which creates a tree structure of […]

  • The first and second problems of jsoncpp Library

    Time:2019-10-20

    JSON is a data format commonly used in data exchange. C + + standard library does not contain any implementation of JSON standard, so we need to rely on some third-party libraries, jsoncpp is a common library. Because jsoncpp is often used in work, it is found that there are many problems in this library. […]

  • Wechat domain name encryption and anti sealing technology and skills

    Time:2019-10-20

    Some companies and enterprises like to make web page sharing links, and then let people share them to wechat groups, friend circles and other places for publicity, but sometimes they encounter the situation that sharing links are blocked by wechat and cannot be accessed. If the website wants to promote in wechat, it will be […]

  • Operating system learning 1: NETCORE implements simple processor call to simulate multiprogramming

    Time:2019-10-19

    Preface In channel programming, several processes are always in ready state at the same time. In order to make each process in the system run in an orderly manner, a certain scheduling strategy must be selected to select a process occupying the processor. In this experiment, we designed an algorithm to simulate single processor scheduling, […]

  • Is CAD mobile easy to use? How to open a building drawing quickly?

    Time:2019-10-19

    Is CAD mobile easy to use? How to open a building drawing quickly? In fact, mobile phones are indispensable for everyone now. In fact, in addition to chatting and communication, various social game software apps and so on, mobile phones are also a convenient way to work. If we receive a CAD construction drawing file […]

  • Design mode 10 ——- decorator mode

    Time:2019-10-19

    Decorator mode Decorator pattern allows you to add new functionality to an existing object without changing its structure. This type of design pattern belongs to structural pattern, which is a wrapper for existing classes. This pattern creates a decoration class to wrap the original class, and provides additional functions while maintaining the integrity of class […]

  • What do I talk about when I talk about iterators?

    Time:2019-10-19

    Hua xiamaoyu: as I said before, I’m very interested in the integration of programming language and other disciplines, but I also missed that I’m also interested in the comparative study of Python and other programming languages. Therefore, I always hope to gather some students with other language foundation to discuss the common topic of language […]