• Java handwritten redis from scratch


    preface Realizing redis from scratch in Java (1) how to realize fixed size cache? Realization of redis from scratch in Java (3) principle of redis expiration How to restart memory data without losing? Implementation of redis from scratch in Java We have implemented several basic features of redis, among which another implementation method is mentioned […]

  • Handwritten call and apply together


    1. What are call and apply Portal:Understanding and using apply() and call() in JSAs for why handwritten code, not only for the interview, but also to help us better understand the logic of the code, the best way to go deep into the principle. 2. Handwritten call Writing a call method is the same as […]

  • The most practical bookmark on the front end


    preface The front-end has developed rapidly in recent years. It’s time to form a knowledge map of the front-end knowledge and see what you know and what you don’t know;Through this article, we will have a systematic understanding of the front end;Bookmark address, welcome star, you can directly git clone down, through Google’s top right […]

  • How to forge handwritten MNIST dataset in Python Gan


    1、 MNIST dataset The MNIST data set is the handwritten numeral in the figure above. 2、 Gan principle (generation countermeasure network) Gan network consists of two parts: one is generator (g), the other is discriminator (d) At the beginning, G is composed of noises that obey certain distributions (such as Gaussian distribution). The generated images […]

  • Front end interview Dachang handwritten source code series (Part one)


    Nowadays, the requirement of front-end siege lion is higher and higher, and the common API can not meet the rapid development of front-end. At present, most companies require interviewers to write down the principles of common front-end APIs, so as to prove your understanding of this knowledge point. Next, I will list the common handwritten […]

  • An example of MNIST handwritten numeral recognition and classification by using LSTM in Python


    The code is as follows. I think the most important thing for beginners is to learn the format of RNN reading data. # -*- coding: utf-8 -*- “”” Created on Tue Oct 9 08:53:25 2018 @author: www “”” import sys sys.path.append(‘..’) import torch import datetime from torch.autograd import Variable from torch import nn from torch.utils.data […]

  • Interview handwritten code list


    Anti chattering function const debounce = (fn, wait) => { let _ = ” return (…arg) => { clearTimeout(_) _ = setTimeout(() => { fn.apply(this, arg) }, wait) } } input.addEventListener(“input”, debounce(ajax, 1000)); Throttling function const throttle = (fn, s) => { let a = +new Date(), _ return (…arg) => { let b = +new Date() – a if (b > s) { _ = setTimeout(() => { fn(arg); _ = ” }, s) a = +new Date() } } } input.addEventListener(“input”, throttle(ajax, 1000)); Deep copy (solve circular reference) function clone(target, map = new WeakMap()) { if (typeof target === ‘object’) { let cloneTarget = Array.isArray(target) ? [] : […]

  • Handwritten instanceof and new


    Handwritten instanceof Instanceof checks whether there is a prototype in the prototype chain of the target object that is the same as the prototype of the specified object, Whether two prototypes are equal or not is determined by = = = strictly equal. function myInstanceof(obj, obj2) { let proto = obj.__proto__; let prototype = obj2.prototype; […]

  • No service wasm, wasm reference, wasm runtime – webassembly weekly 0902


    To join the webassembly Chinese group, please go to the end of the article Editor’s note: there’s a lot of webassembly news this week! WebAssembly Serverless Rust + WebAssembly This article shows you how to use rust + webassembly to create server less applications for machine learning and data visualization. embed-wasm Embedded wasm crite allows […]

  • Warm cold “spring” front-end interview questions come


    Coordinates: Shenzhen Objective: to improve the technology Topics may be biased toward technical management and architects Handwritten source code (written on paper, scan generated code to run directly) I think it’s very necessary. The human eye can judge whether JS code is running wrong or not. The ability to eliminate bugs is the key. Handwritten […]

  • React — Redux


    1、 How to use Redux The use of Linux is similar to that of usereducer (please seeRe learning react — context / reducer(one article) // store.ts import { createStore, applyMiddleware, combineReducers } from ‘redux’; Import logger from ‘Redux logger’; // Middleware Import chunk from ‘Redux chunk’; // Middleware export interface IState { name: string, age: […]

  • Es9 (2)—— Promise.finally


    catalog How to operate promise? Want to know all about promise? Es6-learning landscape How to operate promise? usePromise.finally, regardless of executionthenstillcatchWill be implementedfinallyThe body of functions inside. For example, a pop-up window can be usedresolveandrejectSave the values of the variables separately,But in the endfinallyTo control the pop-up window. Here’s an example of the code: const […]