021.3 IO stream - byte stream - FileInputStream read byte

Contents: file reading method, reading method example, value of buf in read(buf) method, byte stream buffer object - improve reading speed/// File reading method: fis.read(), fis.read(buf), see the example for details Example: file read - read the file and display it public class FileInputStreamDemo { public static void main(String[] args) ...

Posted on Mon, 30 Mar 2020 09:15:50 -0700 by quiksilver

Java 8 stream syntax usage

import java.util.ArrayList; import java.util.Arrays; import java.util.IntSummaryStatistics; import java.util.List; import java.util.Random; import java.util.stream.Collectors; import java.util.Map; public class Java8Tester { public static void main(String args[]){ System.out.println("Use Java 7: "); // Eval ...

Posted on Mon, 30 Mar 2020 07:40:37 -0700 by jaapoost

GPUImage source code analysis of Meiyan heavyweight Technology

When it comes to GPU based image processing and real-time filter, you will surely think of the famous GPUImage. This project really provides a lot of convenience for the follow-up development, and basic image processing tools are all available. But learning from GPUImage's project structure can help us a lot. GPUImage project structure GPUImage ...

Posted on Mon, 30 Mar 2020 06:57:16 -0700 by scottshane

Solving monotonic operators in infix expressions

Expressions are often handled in compilers or script interpreters, where monocular operators require special handling: plus+, minus-, bitwise negation~, logical negation!; In particular, in the case of mixed monotonic and binary operators, such as plus+, minus-and plus+, minus-binary operators are easily confused. In fact, when you look caref ...

Posted on Sun, 29 Mar 2020 19:15:30 -0700 by agentsmith

LeetCode 1162. Map analysis

My LeetCode: https://leetcode-cn.com/u/ituring/ My LeetCode brush Title source [GitHub]: https://github.com/izhoujie/Algorithmcii LeetCode 1162. Map analysis subject You now have a Map (Grid) grid of size N x N on which each Zone (Cell) is marked with 0 and 1.Among them, 0 represents the ocean and 1 represents the land. Do you know which ocea ...

Posted on Sun, 29 Mar 2020 10:18:28 -0700 by tsilenzio

Implementation, cluster submission and operation of wordcount in mapReduce

This example implements the statistics of the number of words in all files in a directory in hdfs. Three java classes are used: WordcountMapper is responsible for the reputation mapTask WordcountReducer is responsible for the reputation ReduceTask WordcountDriver is responsible for submitting tasks to yarn.   Related code Mapper packag ...

Posted on Sun, 29 Mar 2020 09:02:12 -0700 by tech603

Use of Druid connection pool

Druid introduction Druid is Alibaba's open-source database connection pool. As a rising star, Druid has higher performance than dbcp and c3p0, and is used more and more widely.     druid benefits High performance. The performance is much higher than dbcp and c3p0. As long as it is a database supported by jdbc, Druid supports it and has good su ...

Posted on Sun, 29 Mar 2020 07:58:17 -0700 by gowni

ScrollView and ListView slide conflict handling

First, I learned the skill of recording Gif When ScrollView and ListView are nested, there will be sliding conflicts, which will cause ListView to fail to slide. Many people on the Internet have proposed a solution to this problem: calculate the height of each ListView Item, and then rewrite the onMeasure method. But in this w ...

Posted on Sun, 29 Mar 2020 07:26:28 -0700 by jmaker

Java Concurrent Programming (03): multithread concurrent access, synchronous control

Source code: GitHub point here || GitEE point here 1, Concurrent problems When multithreading learning, the first complex problem to face is the access to variables in concurrent mode. If you don't understand the internal process and reasons, there will often be a problem: the variable value after thread processing is not what you want, and yo ...

Posted on Sun, 29 Mar 2020 06:03:59 -0700 by royalsolo

java uses JDBC to connect to mysql database

Personal home page: https://zhangquan1995.github.io Here the JDK version of java is 1.8.0X and the mysql version is 5.7. mysql has a user name of root and a password of zhang110. Download JDBC driver Download the JDBC driver mysql-connector-java-5.1.46.zip and unzip it to the installation directory of Java (any path will ...

Posted on Sat, 28 Mar 2020 10:54:47 -0700 by lalov1