Tag:source code

  • Rust programming video tutorial (Advanced) – 011_ 2. Custom box

    Time:2021-10-22

    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 Custom smart pointer mybox: implement deref trait//+++++++Error code+++++++++++++++++ struct MyBox<T>(T); impl<T> MyBox<T> { fn new(x: T) -> MyBox<T> { MyBox(x) } } fn main() { let x = 5; let y = MyBox::new(x); assert_eq!(5, x); assert_eq!(5, *y); } //+++++++++Correct code++++++++++++++++ //Implement deref train […]

  • Collection operation of reading zepto source code

    Time:2021-10-22

    The following chapters will interpret the following in zeptodomRelated methods, that is, the source code$.fnObject. The zepto source code series has been posted on GitHub. Welcome to star:reading-zepto Source version The source code of this article iszepto1.2.0 .forEach() forEach: emptyArray.forEach Because zepto’sdomCollection is an array of classes, so here we simply copy the arrayforEachmethod. concreteforEachSee […]

  • Compile a GCC cross compilation tool chain from scratch

    Time:2021-10-21

    In order to avoid coupling with the host compilation system, many SDKs and software that need to be associated with customers will provide their own tool chain or require the customer’s system to meet some tool chain requirements. The advantages of an independent toolchain are as follows: one   Don’t worry about the host operating […]

  • Map mobile application practice — server construction

    Time:2021-10-21

    In the last article, we talked aboutDjango haystack elasticsearch environment preparation, then the actual combat~~ The official has a simple document describing space search——Spatial Search There’s onlySolrandElasticSearchYes, of course, we don’t need such complex features. Create Django app named NX, and the directory structure is as follows . |______init__.py |____api.py |____models.py |____search_indexes.py |____templates | |____search […]

  • Read a little webpack-001 every day

    Time:2021-10-21

    Read a little webpack every day Day-01-webpack entry NPM package we can usepackage.jsonQuickly locate the package information file in the package to the entry file of the package throughwebpackPackage information formainField can get the entirewebpackThe entrance location of the project islib/index.js Entry file Each module of the project is integrated through dynamic import in the […]

  • Mybatis source code analysis (6): execute SQL

    Time:2021-10-21

    After obtaining sqlsession, the next step is to execute SQL User user=sqlSession.selectOne(“last.soul.mapper.UserMapper.selectById”,map); The main function of defaultsqlsession is to add, delete, modify and query functions and their overloading methods. In terms of query, the select method will be called in the end, and then modified into selectone, selectmap, etc. the code is as follows: /** […]

  • Single step debugging and source code analysis of ngrx store createselector

    Time:2021-10-20

    Source code: import { Component } from ‘@angular/core’; import { createSelector } from ‘@ngrx/store’; export interface State { counter1: number; counter2: number; } export const selectCounter1 = (state: State) => state.counter1; export const selectCounter2 = (state: State) => state.counter2; export const selectTotal = createSelector( selectCounter1, selectCounter2, (counter1, counter2) => counter1 + counter2 ); // selectTotal […]

  • Super fast file search tool AG

    Time:2021-10-20

    preface AG is a tool similar to ACK and grep to search for corresponding keywords in files.Officials listed several reasons for choosing it: It is faster than ack (not on the same order of magnitude as grep) It ignores matching files in. Gitignore and. Hgignore If there are files you want to ignore, you need […]

  • React source code analysis 9. Diff algorithm

    Time:2021-10-20

    React source code analysis 9. Diff algorithm Video course (efficient learning): enter the course Course Directory: 1. Introduction and interview questions 2. Design concept of react 3. React source code architecture 4. Source directory structure and debugging 5. JSX & Core API 6. Legacy and concurrent mode entry functions 7. Fiber architecture 8. Render stage […]

  • WPF’s road to customs clearance

    Time:2021-10-20

    First of all, I would like to explain two points. First, I am interested in desktop development (it is not recommended to learn client-side development simply by looking for a job). Second, the style of WPF is much better than WinForm (because customization is very free). Basically, except for 3D images and related animation effects, […]

  • Spring learning record

    Time:2021-10-19

    1. Two cores: AOP aspect oriented programming: extension function is not implemented by modifying source code; IOC: control reversal; Firstly, the underlying implementation principle of IOC uses technologies: (1) XML configuration file (2) Dom4j parsing XML (3) engineering design pattern (4) reflection Secondly, there are three methods of bean instantiation, which mainly use calling the […]

  • Rust programming video tutorial (Advanced) – 012_ 2 call drop in advance.

    Time:2021-10-18

    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 Discard the value early through STD:: MEM:: drop. When cleaning in advance is required, instead of directly calling the drop method, the STD:: MEM:: drop method is called, for example: struct Dog { name: String, } //The following is a drop trait implementation […]