QT captures keyboard input and displays the input shortcut key combinations, and solves the problem that some key combinations (such as Ctrl+Shift+letters) cannot be recognized in the Linux environment

Recently I am working on a QT project, which requires identifying keyboard input keys to generate shortcut keys. There is a class QKeySequenceEdit in QT. Using this, you can directly obtain keyboard input. However, if you want to filter out the keys you do not want to recognize, you must rewrite it. ThekeyPressEvent(QKeyEvent *e) function. […]

Switches and routers realize the division of different network segments, communication between different vlans, and specify combinations of vlans for network communication.

Switches and routers implement the division of different network segments, communication between different vlans, and designated combinations of vlans for network communication. I recommend a very easy-to-use free online tool for drawing: https://www.processon.com/i/5f58a647e658155997003a46 1. Examples of network requirements 1. Assume that there are three PCs A, B, and C, which need to be on different […]

[C++ code] Backtracking, subsets, combinations, full arrangements, deduplication – Code Random Notes

Title: Split palindrome string Given a string s, please split s into some substrings so that each substring is a palindrome string. Returns all possible splitting options for s. Palindrome string is a string that reads the same when read forward or backward. In the for (int i = startIndex; i < s.size(); i + […]

Implement the action recognition driver on the OS that supports single-click, double-click, long press, and super long press combinations of multiple keys.

I just want to implement a key parsing function on the freertos platform. I would like to share my ideas with you. Considering that it may be transplanted to other platforms in the future, I have separated the driver platform. General idea Considering that the product has low power consumption requirements, it is not suitable […]

R language uses Cartesian product and ggvenn() function to draw the Venn distribution diagram of N*N*N*N color combinations

library(ggvenn) set.seed(20190708) genes <- paste(“gene”,1:1000,sep=””) x <- list( A = sample(genes,300), B = sample(genes,525), C = sample(genes,440), D = sample(genes,350) ) ggvenn( x, fill_color = c(“aliceblue”, “slateblue”, “springgreen”, “thistle”), stroke_size = 0.5, set_name_size = 4 ) According to the Cartesian product principle, the color of each partition of the Venn diagram should be different, which […]

R language draws the famous house X network connectivity graph with complete color combinations

library(igraph) library(RColorBrewer) g3 <- make_graph(“HouseX”)%>%set_vertex_attr(“color”, value = brewer.pal(5,”Set3″)) V(g3)$name <- letters[1:5] plot(g3) g3 <- make_graph(“HouseX”)%>%set_vertex_attr(“color”, value = brewer.pal(5,”Set2″)) g3 <- make_graph(“HouseX”)%>%set_vertex_attr(“color”, value = brewer.pal(5,”Set1″)) g3 <- make_graph(“HouseX”)%>%set_vertex_attr(“color”, value = brewer.pal(5,”Pastel1″)) g3 <- make_graph(“HouseX”)%>%set_vertex_attr(“color”, value = brewer.pal(5,”Pastel2″)) g3 <- make_graph(“HouseX”)%>%set_vertex_attr(“color”, value = brewer.pal(5,”Paired”)) g3 <- make_graph(“HouseX”)%>%set_vertex_attr(“color”, value = brewer.pal(5,”Dark2″)) g3 <- make_graph(“HouseX”)%>%set_vertex_attr(“color”, value = brewer.pal(5,”Accent”)) g3 […]