Tag:count

  • [springboot DB series] hyperloglog of redis advanced features

    Time:2021-10-25

    [springboot DB series] hyperloglog of redis advanced features The hyperloglog algorithm uses very little space to achieve relatively large data level statistics; For example, during the introduction of bitmap, we talked about the statistics of daily life. When the amount of data reaches millions, the best storage method is hyperloglog. This paper will introduce the […]

  • Rust programming video tutorial (Advanced) – 013 using RC reference counting smart pointer

    Time:2021-10-17

    Video address Headline address:https://www.ixigua.com/i677586170644791348…Station B address:https://www.bilibili.com/video/av81202308/ Source address GitHub address:https://github.com/anonymousGiga/learn_rus… Explanation content 1. Consider needsB and C share the ownership of A. how to realize itExample 1: using box implementation enum List { Cons(i32, Box<List>), Nil, } use crate::List::{Cons, Nil}; fn main() { let a = Cons(5, Box::new(Cons(10, Box::new(Nil)))); let b = Cons(3, Box::new(a)); let […]

  • Rust programming video tutorial (Advanced) – 015_ 1 reference cycle

    Time:2021-10-13

    Video address Headline address:https://www.ixigua.com/i677586170644791348…Station B address:https://www.bilibili.com/video/av81202308/ Source address GitHub address:https://github.com/anonymousGiga/learn_rus… Explanation content Reference loop to make two lists point to each other. The example code is as follows: use std::rc::Rc; use std::cell::RefCell; use crate::List::{Cons, Nil}; #[derive(Debug)] enum List { Cons(i32, RefCell<Rc<List>>), Nil, } impl List { fn tail(&self) -> Option<&RefCell<Rc<List>>> { match self { Cons(_, […]

  • Talk about Flink’s triggers

    Time:2021-10-5

    order This paper mainly studies flick’s triggers Trigger flink-streaming-java_2.11-1.7.0-sources.jar!/org/apache/flink/streaming/api/windowing/triggers/Trigger.java @PublicEvolving public abstract class Trigger<T, W extends Window> implements Serializable { private static final long serialVersionUID = -4104633972991191369L; public abstract TriggerResult onElement(T element, long timestamp, W window, TriggerContext ctx) throws Exception; public abstract TriggerResult onProcessingTime(long time, W window, TriggerContext ctx) throws Exception; public abstract TriggerResult onEventTime(long […]

  • SQL server creates a primary key auto increment column. We can use

    Time:2021-10-5

    SQL 588988 server creates a primary key auto increment column. We can use “id int identity (1,1) not null primary key” to create it in one step, while Oracle creates a primary key auto increment column, which is different from SQL server. The steps are a little more complex, as follows: –1. Create tableCREATE TABLE […]

  • What does PHP’s reference count mean?

    Time:2021-9-29

    What is reference counting In the data structure of PHP, reference count refers to each variable. In addition to saving their types and values, two additional contents are saved, one is whether the current variable is referenced, and the other is the number of references. Why save two more contents? For garbage collection (GC), of […]

  • IOS development interview only needs to know these, and the technology basically passes the customs! (memory management)

    Time:2021-9-26

    1、 In   How to detect memory leakage in obj-c? What ways do you know? At present, I know the following ways · Memory Leaks · Alloctions · Analyse · Debug Memory Graph · MLeaksFinder There are two main types of leaked memory: · Laek  MemoryThis is forgetting   ReleaseMemory leaked by operation. · Abandon  MemoryThis […]

  • How does Python manage memory?

    Time:2021-9-16

    Python mainly manages memory through reference counting and memory pool mechanism. 1、 Reference counting mechanism Python internally uses reference counting (recording how many references an object has) to keep track of objects in memory. When an object is created, the reference count of the object is increased by 1; When an object is destroyed, the […]

  • Leetcode: 1160. Spelling words

    Time:2021-9-10

    thinking Maintain an array with a capacity of 26, traverse the character chars and count each letterThen use this counting table to compare each word in words. If you encounter the corresponding letter, it will be – 1If it encounters 0, it will jump out and the length will not be calculated. If the whole […]

  • 014 learn the drop of the persistent linked list of rust through the linked list

    Time:2021-8-8

    introduce Video address:www.bilibili.com/video/av78062009/Relevant source code:github.com/anonymousGiga/Rust-link… Details In this section, we implement the drop of a persistent linked list. When we implemented the drop of variable linked list before, we used loop to recycle. If we adopt a unified method here, it will not work, because we share through RC here. We must wait for the […]

  • 015 learn the use of rust through linked list arc

    Time:2021-8-7

    introduce Video address:www.bilibili.com/video/av78062009/Relevant source code:github.com/anonymousGiga/Rust-link… Details The linked list we implemented in the previous section is non thread safe, because the modification of RC reference count is not atomic. If we want to modify it to thread safe, we need to use arc, and the type must implement send and sync.We need to change RC […]

  • [activities that babies can understand] [30 day leetcoding challenge] day 7

    Time:2021-8-3

    Hi, everyone, I’m Zhang Xiaozhu. Welcome to the 30 day leetcoding challenge, a special article in the “baby can understand” series. This is an official little activity of leetcode. It can be seen on the official website that from April 1, the official will choose a question every day, and you can get a little […]