Tag:Reciprocal

  • Volume? Can there be big guys who engage in open source packaging tools?

    Time:2022-6-1

    Recently,Parcel2releasebeta3Version. The biggest update of this version is to replace theJSCompiler, fromBabelReplace withSWC, which makes the overall compilation speed 10x times faster than before. SWCYesRustWrittenJSCompiler, the goal is to replaceBabel。 His author was born in 1997강동윤, he wroteswcI am a sophomore. Parcel tired by speed In order to work with packing tools, big brotherWebpackDifferentiated competition,ParceltakeZero […]

  • Redis learning notes – (5) – list (stack / queue / blocking queue)

    Time:2022-5-6

    Previous: redis learning notes – (4) – set List related commands: lpush/rpush/lpop/rpop/brpop/blpop 5.1 stack = lpush + lpop (in and out of the same end) lpush+lpop 127.0.0.1:6379> lpush juc synchronized volatile aqs thread (integer) 4 127.0.0.1:6379 > lpop JUC # last in, first out “thread” 127.0.0.1:6379 > lpop JUC # penultimate “aqs” 127.0.0.1:6379 > lpop […]

  • Talk about claudib’s list command

    Time:2022-5-1

    order This paper mainly studies the list command of claudib LeftPushCommand claudb-1.7.1/src/main/java/com/github/tonivade/claudb/command/list/LeftPushCommand.java @Command(“lpush”) @ParamLength(2) @ParamType(DataType.LIST) public class LeftPushCommand implements DBCommand { @Override public RedisToken execute(Database db, Request request) { ImmutableList<SafeString> values = request.getParams().asList().tail().reverse(); DatabaseValue result = db.merge(safeKey(request.getParam(0)), list(values), (oldValue, newValue) -> list(newValue.getList().appendAll(oldValue.getList()))); return RedisToken.integer(result.size()); } } Leftpushcommand implements the dbcommand interface. Its execute method extracts […]

  • Query all data of the penultimate date in the table

    Time:2021-11-7

    To query all employees on the penultimate entry date in the employee table, employees on the same day should be considered, so useFind out the penultimate date first, and then use this date to query all equal employee information SELECT * FROM `employees` WHERE `hire_date` = ( SELECT DISTINCT `hire_date` FROM `employees` ORDER BY `hire_date` […]

  • 34. Bubble sort

    Time:2021-3-11

    Reference website https://visualgo.net/ Bubble sort: Compare the two numbers in pairs Before < after, the latter one continues to compare with the next one Before > after, switch positions, and then compare with the next one After the first round of comparison, the position of the last number can be determined The second round is […]

  • Implementation of reduce method

    Time:2021-2-6

    Implementation of reduce method Array.prototype._reduce = function (fn, initial) { //If there is an initial value, note that the initial value is passed to undefined or null, and there is no initial value, but null means there is a value let hasInitial = initial != undefined //If there is an initial value, the loop starts […]

  • Java: put odd numbers on the left and even numbers on the right in one-dimensional array

    Time:2020-7-9

    Algorithm idea Compare the first number, if it is odd, judge the second number; if the second number is even, judge the penultimate number is even, then judge the penultimate number is odd, then complete the exchange, and reduce the value judged next time. The efficiency of the algorithm is n package com.itheima.kuihuabaodian; import java.util.Scanner; […]

  • [Leetcode-09] 9. Palindrome Number

    Time:2020-2-28

    Subject requirements Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Determines whether an integer is a palindrome. Palindromes are integers that are read in the same positive (left to right) and reverse (right to left) order.Link: https://leetcode-cn.com/probl Example Input: 121 Output: true Input: […]