Scala Actor concurrent programming WordCount

Scala Actor concurrent programming WordCount Demand: Write a stand-alone WordCount with actor concurrent programming, take multiple files as input, summarize multiple tasks after calculation, and get the final result. General steps: 1. Continuously receive messages through loop +react 2. Using case class sample cla ...

Posted by php_b34st on Sat, 04 Apr 2020 09:28:51 -0700

Sword finger offer question 9: Fibonacci series

Title Description Topic 1: we all know Fibonacci series. Now you need to input an integer n. please output the nth item of Fibonacci series. N<=39 Topic 2: a frog can jump up one or two steps at a time. Find out how many ways the frog can jump to an n-level step. Experimental platform: Niu Ke LAN Topic 1 On niu ...

Posted by dfego on Sat, 04 Apr 2020 08:57:38 -0700

json string formatting

Recently, when docking with a third-party system, we need to save their request parameters, but that long string of json is not easy to read, so we want to format it. There are many tools, but I want to make one for myself. At the beginning of the implementation, a lot of judgment was used, and the logic was very convoluted. Later, I remembere ...

Posted by DiceyJono on Sat, 04 Apr 2020 07:00:01 -0700

My Spring Cloud:Zipkin Service Tracking

1. Overview *Why should we have service tracking? There are many services in the distributed system calling each other, and the invocation relationship is complex. If there is a problem, we will have a lot of work when we do problem investigation or optimize the architecture. At this time, we need to be able to accurately track each network re ...

Posted by madcat on Sat, 04 Apr 2020 03:23:40 -0700

Developing web project with eclispe

1. After opening eclipse, create a new web project: new -- dynamic web project Click Finish to finish the new project! Adjust font size: window -- preferences Select basic, web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-i ...

Posted by jack5100nv on Sat, 04 Apr 2020 03:19:53 -0700

kibana starts reporting an error Elasticsearch cluster did not respond w

kibana start error Elasticsearch cluster did not respond with license information This error reporting environment is an ES cluster composed of four elastic search servers. The versions are all elk7.1.0. There are many online documents for specific installation steps.Use cdh1 as the master, cdh2, cdh3, and cdh4 as the datanode nodes. After the ...

Posted by LAMP on Sat, 04 Apr 2020 02:01:12 -0700

Technical guy: I'm going, you're still using try-catch-finally

Second Brother, the one you wrote before I'll switch The article is so interesting that after reading it, you still haven't finished. Would you like to write another one?Although using Java 13 syntax, it is not very friendly to older versions.But who can guarantee that Java won't get another major update, like Java 8, that Java 6 will be s ...

Posted by nbalog on Sat, 04 Apr 2020 01:35:39 -0700

Deep understanding of ServiceLoader class and SPI mechanism

Recently, we are reconstructing projects ourselves. In order to meet the 82 principle (I hope 80% of businesses can be fixed by exhausting, and only 20% of businesses allow special definitions), after fixing some standard processes, for example, we have enlarged the capability of atomic services. When we enlarge the capability of atomic service ...

Posted by alexinjamestown on Sat, 04 Apr 2020 01:02:54 -0700

The way of configuration management under Android: apk signature correlation

How to generate apk signature key file # Build key method: sub='/C=CN/ST=ShangHai/L=ShangHai/O=example/OU=CM/CN=example/emailAddress=buildfarm@example.com' for key in platform shared media testkey;do ./development/tools/make_key $key "$sub" done How to re sign an apk The command is as follows: java -Xmx2048m -ja ...

Posted by SmokyBarnable on Fri, 03 Apr 2020 22:53:48 -0700

session expired, intercept ajax request and jump to login page

1. Method 1: 1.1 use filter and ajax setup to intercept ajax and jump to the login page 1 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 2 throws IOException, ServletException { 3 4 HttpServletResponse hresponse = (HttpServletResponse)response; 5 HttpServletRequest hr ...

Posted by steelaz on Fri, 03 Apr 2020 21:40:17 -0700