Thumbnail library for java image processing (watermark, thumbnail)

Thumbnail is a library for generating thumbnails for a smoother Java interface. It simplifies the thumbnail process from the existing image files and thumbnails of image objects provided by API. Two or three lines of code can generate thumbnails from existing images, and allows fine-tuning thumbnail generation, while maintaining the minimum amo ...

Posted by Loran on Mon, 04 Nov 2019 17:11:10 +0100

HBase custom MapReduce

Transfer of HBase table data In the Hadoop phase, the MR task we wrote has two classes: Mapper and Reducer. In HBase, we need to inherit two classes: TableMapper and TableReducer. Objective: to migrate part of the data in the fruit table to the fruit_mr table through MR Step 1. Build the ReadFruitMapper class to read the data in the fruit ta ...

Posted by brooky on Sun, 03 Nov 2019 19:16:43 +0100

Java Concurrent Programming: addWorker method of ThreadPoolExecutor

From: https://blog.csdn.net/u011637069/article/details/79593114 addWorker method The source code is relatively long and looks bluff. In fact, I did two things. 1) only use cyclic CAS operation to increase the number of threads by 1; 2) create a new thread and enable it. The source code is as follows: private boolean addWorker (Run ...

Posted by ksb24930 on Sun, 03 Nov 2019 15:32:00 +0100

[Python trial ox blade] cycle

1. Fibonacci series Fibonacci series, the first two items of the series are 1, and each item after is the sum of the first two items. #!/usr/bin/env python3 a, b = 0, 1 while b < 100: print(b) a, b = b, a + b The default print output will automatically wrap the line. If you do not want to wrap the line, you can replace the line brea ...

Posted by smalband on Sun, 03 Nov 2019 14:07:29 +0100

The use of Java regular expression

The java.util.regex package mainly includes the following three classes:   Pattern class:   The Pattern object is a compiled representation of a regular expression. The Pattern class does not have a common constructor. To create a Pattern object, you must first call its public static compilation method, which returns a Pattern object. This ...

Posted by nadz on Sun, 03 Nov 2019 09:50:12 +0100

Go dependency management tool dep

https://segmentfault.com/a/1190000013561841 Go dependency management tool Go dependency management tool Environmental requirements Golang >= 1.9 Dep Current version: dep: version : devel build date : git hash : go version : go1.10 go compiler : gc platform : linux/amd64 Last release is v0.4.1 install go ...

Posted by Youko on Sun, 03 Nov 2019 07:53:25 +0100

MySQL percona toolkit -- Pt OSC execute SQL command

PT OSC execution log In the DROP COLUMN operation for table tb004 with data volume of 100000, the PT OSC tool log is: Operation, tries, wait: analyze_table, 10, 1 copy_rows, 10, 0.25 create_triggers, 10, 1 drop_triggers, 10, 1 swap_tables, 10, 1 update_foreign_keys, 10, 1 Altering `db001`.`tb004`... Creating new table... ...

Posted by KiwiDave on Sun, 03 Nov 2019 06:30:47 +0100

Bellman Ford & & detailed explanation of SPFA algorithm

Dijkstra runs fast on the positive weight graph, but it can't solve the shortest path with negative weight, as shown in the following figure: The result of Dijkstra's running is (with 1 as the origin): 0.212 6 14; But the result of manual calculation, dist[4], is obviously 5. Why does this happen? The reason is obvious. Dijkstra thinks that ...

Posted by TRUSTINWEB on Sun, 03 Nov 2019 05:56:04 +0100

Sparse array of data structure

Sparse array Basic introduction When most of the elements in an array are 0, or an array with the same value, a sparse array can be used to hold the array. The processing method of sparse array is as follows: 1. How many rows and columns are there in the record array? How many different values are there 2. Record the columns and values of ...

Posted by rtpmatt on Sun, 03 Nov 2019 04:26:57 +0100

Tutorial of using ebean

Since 2018, we have been accumulating server related technologies. In the company, from a client programmer, he actively requests to do server tasks, hoping to take the opportunity to improve his application ability of server technology. In private, we have been studying the related technologies of vert.x. however, the company uses php + yii so ...

Posted by rheroux on Sat, 02 Nov 2019 22:07:18 +0100