Golang Protocol Buffers data format tutorial
In this article, we introduce how to use Protocol Buffers data format in Golang applications. Including the definition of Protocol Buffers and the advantages compared with traditional xml and json, and practicing through several examples.
Protocol Buffers data format
Protocol Buffers is a data format launched by Google. We know that json/xm ...
Posted by Nicholas Reed on Sun, 27 Feb 2022 12:22:51 +0100
First acquaintance of C language
First acquaintance of C language
The video comes from station b Geng Bo is just to serve as a learning note... No intention of embezzlement
1. Write c language code:
1. Create project 2. Create files 3. Execute Ctrl + F5
#include "stdio.h"
int main()
{
printf("hello world/n");
return 0;
}
4. Set linker:
5. Set line number: 6.
//inc ...
Posted by kimberlc on Sun, 27 Feb 2022 10:30:48 +0100
[Django backend] wechat applet post requests to return 403 or 500 solutions
Django is simply used to provide the back-end interface for wechat applet. I am responsible for the back-end interface and my classmates are responsible for the front-end. We tested that there is no problem with the get request, but when sending the post request, the return values received by the front-end are always 500 and 403. (PS: if you wa ...
Posted by rel on Sun, 27 Feb 2022 10:08:32 +0100
Simulation of common string functions and memory functions
@[TOC] (directory)
catalogue
Purpose of this chapter
strlen Simulation Implementation
Implementation of strcmp simulation
Implementation of strcat simulation
strcpy Simulation Implementation
Implementation of STR simulation
Implementation of strncmp simulation
Implementation of strncat simulation
Implementation of strncpy simulation
...
Posted by IRON FART on Sun, 27 Feb 2022 09:36:45 +0100
[golang object oriented programming]
1, Three characteristics of object-oriented programming - encapsulation
1) Introduction 2) Quick start cases
package model
type person struct{
Name string
age int
salary float64
}
//Equivalent to constructor
func NewStudent(name string)*person{
return &person{
Name:name,
}
func (p *person)SetAge(age int){
if age>0&& ...
Posted by Drachlen on Sun, 27 Feb 2022 06:11:16 +0100
[fundamentals of C language 11: string function and memory function] string function simulation, character function explanation and memory function simulation
String function
The processing of characters and strings in C language is very frequent, but C language itself has no string type. Strings are usually placed in constant strings or character arrays. A constant string applies to string functions that do not modify it
/*
* character string
* - A string of characters ending with '\ 0'. 0 is th ...
Posted by Mr. R on Sun, 27 Feb 2022 05:17:39 +0100
Section 7 of C + + after the initial stage - polymorphism
Our task in this section is to find out the polymorphism
catalogue
1, Concept of polymorphism
2, Override (overwrite) of virtual function:
3, override and final in C++11
Keyword override:
Keyword: final
Comparison: overload, overwrite (override), hide (redefine)
4, Abstract class
concept
Interface inheritance and implementation inhe ...
Posted by futurshox on Sun, 27 Feb 2022 04:05:10 +0100
LRU and LFU algorithms (page replacement algorithm)
Difference between LRU and LFUBoth LRU and LFU are page replacement algorithms for memory management.LRU: Least Recently Used (longest time) elimination algorithm. LRU is the page that has not been used for the longest time.LFU: Least Frequently Used. LFU is the page that has been used the least times in a period of time.exampleSuppose the peri ...
Posted by whatwhat123 on Sun, 27 Feb 2022 03:47:14 +0100
[Java object-oriented] String, String Constant Pool, String initialization, intern method, common methods of String (interception)
String
Used in Java
java.lang.String class represents string:
Before Java 9, the bottom layer used char [] to store character data Starting from Java 9, the bottom layer uses byte [] to store character dataAll String literals (such as "abc") are instances of the String classOnce a String object is created, its character content ...
Posted by smsulliva on Sun, 27 Feb 2022 03:30:51 +0100
Let's talk about several scenarios and solutions for the failure of transaction annotation @ Transactional
Introduction to Transactional failure scenarios
When the modifier of the first Transactional annotation annotation method is non-public, @ Transactional annotation will not work. For example, the following code.
Define an incorrect @ Transactional annotation implementation and modify a default accessor method
/**
* @author zhoujy
**/
@Comp ...
Posted by zicco on Sun, 27 Feb 2022 02:03:48 +0100