Tag:Time meeting

  • Read write lock

    Time:2021-9-17

    ReadWriteLock import java.util.HashMap; import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; /** *An exclusive lock (write lock) can only be held by one thread at a time *Shared lock (read lock) multiple threads can occupy at the same time * ReadWriteLock *Read read can coexist *Read write cannot coexist *Write write can coexist […]

  • Springboot gets all URL paths

    Time:2021-7-30

    I need to capture all URLs when I do permission control. Because I need the request type, I filter some URLs without request type. I don’t say much and code them. Configuration @Slf4j public class RolePolicyConfig { private final WebApplicationContext context; @Autowired public RolePolicyConfig(WebApplicationContext context) { this.context = context; } @PostConstruct public void methodInit() { […]

  • 5-RocketMQ-NameServer

    Time:2021-7-26

    Routing meta information Nameserver routing implementation class: org.apache.rocketmq.namesrv.routeinfo.routeinfomanager. Before understanding routing registration, let’s first look at what information nameserver stores. private final HashMap<String/* topic */, List<QueueData>> topicQueueTable; private final HashMap<String/* brokerName */, BrokerData> brokerAddrTable; private final HashMap<String/* clusterName */, Set<String/* brokerName */>> clusterAddrTable; private final HashMap<String/* brokerAddr */, BrokerLiveInfo> brokerLiveTable; private final HashMap<String/* brokerAddr */, […]

  • The problem of httprunner running error: base URL missed

    Time:2021-7-13

    Running error report in httprunner Code writing:     When this segment of YML file is running, an error will appear     When this error occurs, base_ URL format error, just modify the base_ The location of the URL   Run the YML file after modifying the location     Run successfully  

  • Simple configuration of CentOS 7 docker firewall

    Time:2021-7-6

    Disable firewalld service systemctl disable firewalld systemctl stop firewalld Install iptables firewall service yum install iptables-services Create iptables configuration script cat >> /usr/local/bin/fired.sh <<‘EOF’ #!/bin/bash iptables -F iptables -X iptables -Z iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -i eth0 […]

  • Using channel to realize communication (message queue) between corollaries in spool

    Time:2021-6-23

    passageway Coroutine\ChannelUsing local memory, memory is isolated between different processes. It can only be carried out in different processes of the same processpushandpopOperation. Co::set([‘hook_flags’=> SWOOLE_HOOK_ALL]); Co\run(function(){ //Set a channel with a capacity of 1 $chan = new Swoole\Coroutine\Channel(1); Swoole\Coroutine::create(function () use ($chan) { for($i = 0; $i < 100000; $i++) { co::sleep(1.0); //Write data to […]

  • Notes on C / C + + Programming: what should we do when the C + + data type exceeds the valid range?

    Time:2021-6-16

    First, let’s consider the following procedure. 1) The program shows what happens when we cross the ‘char’ range:   Will this code print “a” until it becomes 226? The answer is an indefinite loop, because the “a” here is declared as a character and its valid range is – 128 to + 127. When “a” […]

  • Description method [dead loop]

    Time:2021-3-5

    #import “MaTsonga .h” @implementation MaTsonga -(NSString *)description{ return [NSString stringWithFormat:@”{name:%@,age:%i}”,self.name,self.age]; } @end #import “MaTsonga .h” int main(int argc, const char * argv[]) { MaTsonga *ma=[[MaTsonga alloc]init]; ma.name= @”Is it like being silly”; ma.age=24; Nslog (@ “% @”, MA); // the object description method will be called to return the corresponding description information return 0; } […]

  • Install mmdetection

    Time:2021-3-4

    Mmdetection is a deep learning and object detection code base based on python. It contains fast RCNN, Yolo, SSD and other mainstream object detection algorithm codes and trained models. It is convenient for us to study the object detection algorithm. The installation steps of mmdetection are as follows: 1. Create a CONDA environment and activate […]

  • [10 MINS/DAY] CSS Transition

    Time:2021-2-11

    CSS transitionsProvides a way to control animation speed when changing CSS properties. It can make property change a process that lasts for a period of time, rather than taking effect immediately. For example, changing the color of an element from white to black usually takes effect immediately. After using CSS transitions, the color of the […]

  • React render is rendered twice, one is the original state data, and the other is the newly acquired data

    Time:2021-2-1

    There is a problem in the project. After the dispath action, the render will render the data of the state twice, one is the original state, and the other is the newly acquired state, as shown in the figure belowThis is because the react rendering mechanism causes the original state data to be automatically obtained […]

  • Notes on flutter (33) — gesture recognition of gesturedetector

    Time:2020-12-25

    If you need to reprint, please indicate the source:Notes on flutter (33) — gesture recognition of gesturedetector This essay mainly records the learning content of gesturedetector gesture recognition, including recognition of click, double-click, long press, component drag and zoom processing. Click, double-click and long press Let’s take a look at demo. It’s very simple. Gesturedetector […]