Tag:serialize

  • Comparison between Microsoft’s serialize and newtonsoft’s serializeobject

    Time:2022-7-31

    Microsoft’s serialization and deserialization components have been out for several years. When they first came out, they made various roast. Recently, in optimizing the code, I compared Microsoft’s serialize with newtonsoft’s serializeobject. I feel that Microsoft’s serialization components can be used in most scenarios, and newtonsoft’s third party may be abandoned by me. There are […]

  • serialVersionUID

    Time:2022-7-30

    serialVersionUID JavaBean objects are stored in the JVM heap memory. In order to persist and transmit JavaBean objects, serialization and deserialization are introduced. Serialization: willJavaBean objects are converted into storable (memory hard disk) and transmitted (binary bytes are transmitted on the network) Deserialization: the above operationReverse to JavaBean。 In order to avoid exceptions during conversion: […]

  • Bowen dry goods | using Apache pulsar in kotlin

    Time:2022-7-29

    About Apache pulsarApache pulsar is a top-level project of the Apache Software Foundation. It is a native distributed message flow platform for the next generation cloud. It integrates message, storage and lightweight functional computing. It adopts a separate architecture design of computing and storage, supports multi tenancy, persistent storage, multi machine room cross regional data […]

  • Spring boot date and time processing summary, well written..

    Time:2022-7-21

    Source:https://juejin.im/post/5e6281… In the project, the localdatetime series is used as the data type of time in dto, but springmvc always reports an error after receiving the parameter. In order to configure the global time type conversion, the following processing method is tried. Note: This article is based on springboot2 If the X test fails to […]

  • Structure II

    Time:2022-7-16

    1.3.14 anonymous fields of structures A struct allows its member fields to be declared without field names but only types. Such fields without names are called anonymous fields.   //Person structure person type type Person struct { string int } func main() { p1 := Person{ “pprof.cn”, 18, } fmt.Printf(“%#v\n”, p1) //main.Person{string:”pprof.cn”, int:18} fmt.Println(p1.string, p1.int) […]

  • Two integration methods of redis in spring series

    Time:2022-7-15

    In our work, when we use distributed cache, the first choice is redis. Today we will introduce how springboot integrates redis, using jedis and spring data redis respectively. 1、 Integrate with jedis 1. Increase dependency <!– Spring boot starter web is not necessary. Here is for testing — > <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> […]

  • ViewModel of Android jetpack architecture component (III)

    Time:2022-7-11

    Introduction to ViewModel In the early Android development, because the application is relatively small and the page is relatively simple, we will put the data request, page UI processing and data loading into the activity or fragment. However, with the iteration of the project, this development method becomes more and more cumbersome, and it is […]

  • Module injection method based on ABP

    Time:2022-7-7

    ABP’s module injection is very good, but ABP is too bloated. Individual modules or functions cannot be extracted and used alone, so I want to implement a module injection method myself. The module injection principle of ABP is to scan all DLL modules for batch injection when the program starts. The following is the implementation […]

  • Python deserialization

    Time:2022-7-5

    Python use of deserialization function pickle. Dump (obj, file): serialize the object and save it to a file pickle. Load (file): read the file and deserialize the serialized content in the file into an object pickle. Dumps (obj): serialize objects into byte streams in string format pickle. Loads (bytes_obj): deserialize byte streams in string format […]

  • Several implementation methods of Android serialization

    Time:2022-6-22

    1、 Serializable serialization Serializable is a serialization method provided by Java. Its use is very simple. Serialization can be realized only by implementing the serializable interface public interface Serializable { } 1.serializable use import java.io.Serializable; public class Person implements Serializable { //If it is not defined, the system will automatically generate a //Generally speaking, we […]

  • Grpc application practice: (I) Introduction

    Time:2022-6-18

    Series of articles: Grpc application practice: (I) Introduction GRC application practice: (II) GRC environment construction and simple demo GRP application practice: (III) GRP four request modes We will introduce the most popular RPC framework in the go language: grpc, and take you to explore its corresponding technology stack. First, we need to understand RPC, then […]

  • Talk about singleton mode and several implementations again

    Time:2022-6-16

    catalogue 1、 What about singleton mode 2、 Classic single thread single instance 3、 Classic double locking multithreading singleton (jdk5-jdk7 continue to apply) 4、 Multithreaded singleton after jdk8 4.1 synchronized to lightweight lock 4.2 using the initialization feature of static inner classes 5、 Is there any way to make the singleton mode not singleton? 6、 Enumeration […]