• Summary of front-end written test questions in winter 2020


    Original address:Some excellent interview questions [4] Recently, I interviewed some companies and got some offers. Instead of recording concept questions, I only recorded coding questions.In their spare time, young friends can do these exercises. A number that appears only once Summary interval Achieve traffic light effect Array de duplication Return excel table column name Detect […]

  • Talk about redistoken


    order This article mainly studies redistoken RedisToken resp-server-0.16.0/src/main/java/com/github/tonivade/resp/protocol/RedisToken.java public interface RedisToken { RedisToken NULL_STRING = string((SafeString) null); RedisToken RESPONSE_OK = status(“OK”); RedisTokenType getType(); <T> T accept(RedisTokenVisitor<T> visitor); static RedisToken nullString() { return NULL_STRING; } static RedisToken responseOk() { return RESPONSE_OK; } static RedisToken string(SafeString str) { return new StringRedisToken(str); } static RedisToken string(String str) { […]

  • Talk about redistokenvisitor


    order This article mainly studies redistokenvisitor RedisTokenVisitor resp-server-0.16.0/src/main/java/com/github/tonivade/resp/protocol/RedisTokenVisitor.java public interface RedisTokenVisitor<T> { T array(ArrayRedisToken token); T status(StatusRedisToken token); T string(StringRedisToken token); T integer(IntegerRedisToken token); T error(ErrorRedisToken token); T unknown(UnknownRedisToken token); static <T> LambdaRedisTokenVisitor.Builder<T> builder() { return new LambdaRedisTokenVisitor.Builder<>(); } } The redistokenvisitor interface defines array, status, string, integer, error and unknown methods, and provides a […]

  • Considerations for executing batch curl request scripts


    Generate curl requests through the shell and execute them in batches as follows awk -F, ‘NR>1{print $(NF-1)}’ orders | awk ‘{print “curl http://localhost:8080/orders?orderSeq=”$0″&token=a059a61d7e9211e6a22b4437e6d0648e”}’ curl http://localhost:8080/orders?orderSeq=1234567890&token=a059a61d7e9211e6a22b4437e6d0648e awk -F, ‘NR>1{print $(NF-1)}’ orders | awk ‘{print “curl http://localhost:8080/orders?orderSeq=”$0″&token=a059a61d7e9211e6a22b4437e6d0648e”}’ | sh #But an error is reported HTTP Status 400 – Required String parameter ‘token’ is not present #It is […]

  • Talk about claudib’s importrdb


    order This article mainly studies the importrdb of clausdb importRDB claudb-1.7.1/src/main/java/com/github/tonivade/claudb/DBServerState.java public class DBServerState { //…… public void importRDB(InputStream input) throws IOException { RDBInputStream rdb = new RDBInputStream(input); Map<Integer, Map<DatabaseKey, DatabaseValue>> load = rdb.parse(); for (Map.Entry<Integer, Map<DatabaseKey, DatabaseValue>> entry : load.entrySet()) { databases.get(entry.getKey()).overrideAll(ImmutableMap.from(entry.getValue())); } } //…… } The importrdb method creates an rdbinputstream, and then […]

  • Overview of the basic composition of HTML web pages


    The information in web pages is mainly text. In web pages, you can set text properties by font, size, color, shading, border, etc. The text here refers to the text, not the text in the picture. In web page making, the text can be easily set to various fonts and sizes. However, it is recommended […]

  • Deep understanding of computer operating system


    Deep understanding of computer operating system Download addresshttps://pan.baidu.com/s/1VHk464FLIFXvw8DuRBa0rw Scan the QR code below to follow the official account reply 100146 to obtain the sharing codeThe catalogue structure of this book is as follows: Chapter 1 computer system roaming 11.1 information is bit + context 11.2 the program is translated into different formats by other programs […]

  • Talk about claudib’s databasecleaner


    order This article mainly studies the database cleaner of claudib DatabaseCleaner claudb-1.7.1/src/main/java/com/github/tonivade/claudb/data/DatabaseCleaner.java public class DatabaseCleaner { private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseCleaner.class); private final DBServerContext server; private final DBConfig config; private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); public DatabaseCleaner(DBServerContext server, DBConfig config) { this.server = server; this.config = config; } public void start() { executor.scheduleWithFixedDelay(this::clean, […]

  • Analysis of 2022 TIANTI competition


    L1-1 I want to win today (5 points) Title Description code #include using namespace std; int main() { cout << “I’m gonna win! Today!” << endl; cout << “2022-04-23” << endl; return 0; } L1-2 kinds of diamonds (5 points) Title Description code #include using namespace std; int main() { int n , v; cin […]

  • 2021 impressed me deeply & wonderful bug / defect / problem record


    Since November 2021, this article has experienced some impressive and wonderful bugs. The more you summarize, the more you grow! Common progressContinuous updateI also hope the bosses will give more suggestions image.png Conclusion: I didn’t think of relevance. I thought it would be ok if the test would not report an error according to the […]

  • Talk about clausdb’s masterreplication


    order This paper mainly studies the masterreplication of claudib MasterReplication claudb-1.7.1/src/main/java/com/github/tonivade/claudb/replication/MasterReplication.java public class MasterReplication implements Runnable { private static final Logger LOGGER = LoggerFactory.getLogger(MasterReplication.class); private static final String SELECT_COMMAND = “SELECT”; private static final String PING_COMMAND = “PING”; private static final int TASK_DELAY = 2; private final DBServerContext server; private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); […]

  • Redis learning notes – (4) – set


    Previous: redis learning notes – (3) – use of hyperlogs (HLL) 4.1 set: lucky draw sadd key member [member…]Add element to collection smembers keyList all members srandmember key countRandomly select count members from the set of keys, but do not remove them; spop key countRandomly select count members from the set of keys and remove […]