QA Official

FCN Image Semantic Segmentation

https://qaofficial.com/post/2019/04/25/68664-fcn-image-semantic-segmentation.html 2019-04-25
Welcome to course center of Artificial Intelligence Research Network studyai.com ----------------------------------------------------------------------------------- FCN Image Semantic Segmentation-Testing and Training

HTML+JavaScript Displays Current Time

https://qaofficial.com/post/2019/04/25/68805-html-javascript-displays-current-time.html 2019-04-25
HTML: <div id="timeShow"></div> JavaScript: var t=null; t=setTimeout(time,1000); //设置定时器,一秒刷新一次 function time(){ clearTimeout(t); //清楚定时器 dt=new Date(); var y=dt.getYear()+1900; var m=dt.getMonth()+1; var d=dt.getDate(); var weekday=["星期日","

Linux View Port Usage Status and Close Port Method

https://qaofficial.com/post/2019/04/25/68844-linux-view-port-usage-status-and-close-port-method.html 2019-04-25
Premise: First of all, you must know that the port does not exist independently, it is attached to the process.When a process is opened, its corresponding port is opened, and when the process is closed, the port is closed.The next time a process opens again, the corresponding port will also open again.It should not be understood as shutting down a port, but a port can be disabled. 1. You can use "

Netty Introduction (with Video Tutorial)

https://qaofficial.com/post/2019/04/25/68735-netty-introduction-with-video-tutorial.html 2019-04-25
Netty is an asynchronous event-driven network application framework for rapid development of maintainable high-performance protocol servers and clients. Netty is a NIO client server framework that can quickly and easily develop network applications such as protocol servers and clients.It greatly simplifies the network programming process, such as TCP and UDP socket servers. " Fast and Simple" does not mean that the generated applications will suffer from maintainability or performance problems.

Netty Programming Advanced

https://qaofficial.com/post/2019/04/25/68711-netty-programming-advanced.html 2019-04-25
Long Connection: It will not be disconnected immediately after connection.Mobile message push MQ Short connection: the connection is disconnected after transmission.(http protocol) Sticking packets: send multiple packets together. Unpacking: Disassemble a packet into multiple packets and send them separately. Resolution: 1. The message is fixed in length, the message size is fixed in length, and insufficient spaces are filled. The sender and the receiver follow the same agreement, thus not only sticking packets but also distinguishing messages with fixed length through receiver programming.

Netty&amp;#x27;s Concurrent Programming Practice 1: Correct Use of Locks

https://qaofficial.com/post/2019/04/25/68732-nettyamp#x27s-concurrent-programming-practice-1-correct-use-of-locks.html 2019-04-25
Many developers who have just come into contact with multi-thread programming realize that concurrent access to variable variables requires locking, but lack of understanding of the scope, timing and coordination of locking often leads to some problems.The following author will combine Netty's code to explain this knowledge. Open ForkJoinTask and we will learn some skills in multithreading synchronization and collaboration.The first is to block a task when the condition is not met, and continue to execute until the condition is met.

SFS Travel Businessman Problem

https://qaofficial.com/post/2019/04/25/68811-sfs-travel-businessman-problem.html 2019-04-25
SFS hung gurobi to solve TSP problem. the number of free tickets is limited.  Below is the core code.  public static void Run() { SolverContext context = SolverContext.GetContext(); context.ClearModel(); Model model = context.CreateModel(); // Parameters Set city = new Set(Domain.IntegerNonnegative, "city"); Parameter dist = new Parameter(Domain.Real, "dist", city, city); var arcs = from p1 in data from p2 in data select new Arc { City1 = p1.

command Learning Notes

https://qaofficial.com/post/2019/04/25/42164-command-learning-notes.html 2019-04-25
command Definition: Encapsulates requests into objects so that different requests, queues, or logs can be used to parameterize other objects. Command mode also supports revocable operations.Command mode achieves the purpose of encapsulating objects at runtime, just as factory encapsulates objects at creation time.He can complete the decoupling of the action request and the execution role. His purpose is to complete the extension without modifying the calling code when the command continues to expand, embody the design rules, and prevent a large number of if esle from appearing on the client.

netty primer hello world

https://qaofficial.com/post/2019/04/25/68714-netty-primer-hello-world.html 2019-04-25
1. Dependent jar Package <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.8.Final</version> </dependency> 2. Server Code public class NettyServer { public void start(int port) throws Exception { ServerBootstrap strap = new ServerBootstrap(); EventLoopGroup boosGroup = new NioEventLoopGroup(); EventLoopGroup workerGroup = new NioEventLoopGroup(); try { strap.group(boosGroup, workerGroup). channel(NioServerSocketChannel.class). option(ChannelOption.SO_BACKLOG, 1024). childHandler(new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast(new NettyServerHandler()); } }); ChannelFuture future=strap.bind(port).sync(); future.channel().closeFuture().sync(); }finally { boosGroup.shutdownGracefully(); workerGroup.shutdownGracefully(); } } public

python Parses Data from Text Files

https://qaofficial.com/post/2019/04/25/68822-python-parses-data-from-text-files.html 2019-04-25
Prepare Data: Before parsing data from text and inputting features into the classifier, the data format to be processed must be changed to a format acceptable to the classifier.The code and explanation are as follows: def file2matrix(filename): fr = open(filename) arrayOLines = fr.realines() returnMat = zeros((numbersOfLines,3)) classLabelVector = [] index = 0 for line in arrayOLines: line = line.strip()#The strip () function removes white space from a line listFromLine = line.