Java file cutting and splicing, java development interview skills

Convert the path to a file object, and then calculate how many blocks will be divided: File file = filePath.toFile(); int howManyParts = (int) Math.ceil(file.length() / (double)filePieceSize); Initialize the input / output stream, output error information, and return false,Get current directory: DataInputStream fileReader = n ...

Added by kamasheto on Tue, 04 Jan 2022 20:52:32 +0200

C + + based IO

01.C + + type conversion (understand) Static conversion: be used for Class hierarchy Base class (parent class) and Derived class Conversion of pointers or references between (subclasses) Used for conversion between basic data types, such as converting int to char and char to int. The security of this transformation should also be guaranteed ...

Added by Browzer on Tue, 04 Jan 2022 20:35:50 +0200

Java keywords -- static, final

static keyword Static keyword, expressed as "static and global". Resources (variables or methods) modified by static can be called directly through the class name without instantiation 1. The resources declared by static can only be initialized once, and the initialization is completed after the whole program is compiled and b ...

Added by jarcoal on Tue, 04 Jan 2022 19:13:05 +0200

Design pattern review

Fragmentary knowledge points of design pattern 1. Two themes of design pattern: system reuse and system expansion 2. Design pattern is generally used to solve the problem of different appearance of the same problem 3. Software model is the bridge between software development engineers and software analysis designers 4. Design patterns are d ...

Added by kevisazombie on Tue, 04 Jan 2022 17:48:20 +0200

Surpass Day5 - Java Object Oriented Creation and Use 1

Catalog 1. Members/Instances/Object Variables, Instances (Objects) 1.1 Basic Properties of Objects 1.2 Member variables, instance variables, static variables (class variables), local variables 2. Creation and use of objects 2.1 Definitions of objects and references 2.2 Object Creation 2.3 JVM Three Memories 2.4 Object Access 2.5 Instan ...

Added by mdl on Tue, 04 Jan 2022 16:14:09 +0200

framework learning notes Day12 --- spring MVC

Restful Style Introduction WebAPI If a URL returns data instead of HTML, the URL is a web API (web interface) Restful A way to access the web API in the Rest style Restful style ① Different CRUD operations adopt different request modes② The background response data is in JSON format HiddenHttpMethodFilter filter summary The ...

Added by fr0mat on Tue, 04 Jan 2022 15:55:19 +0200

[Spring transaction details] - 2 Considerations for transaction application

preface Go on [detailed explanation of Spring transactions] - 1 Case demonstration of transaction propagation In this article, let's take a look at the specific use of transactions. It is very simple to start transaction management through Spring. Two methods are supported by default, one is programmatic transaction and the other is decla ...

Added by DyslexicDog on Tue, 04 Jan 2022 15:42:46 +0200

How to implement full link call log tracking in SpringBoot? This method is called elegance

A previous article briefly introduced MDC. This time, we will have an in-depth understanding of MDC in combination with specific cases and specific problems in production. Introduction to MDC 1. Introduction: MDC (Mapped Diagnostic Context) is a function provided by log4j, logback and log4j2 to facilitate logging under multi-threaded conditi ...

Added by JD-AM on Tue, 04 Jan 2022 15:38:43 +0200

Underline, double underline in Python

Single and double underscores have their own meanings in Python variable names and method names. Some are only used as conventions to prompt developers; Others have special meaning for Python interpreters. In general, there are several situations: Front single underline:_ varPost single underline: var_Leading double underline:__ varDouble und ...

Added by cupboy on Tue, 04 Jan 2022 15:33:08 +0200

Switch to Python Full Stack Lessons (Note 3)

Say nothing but applause! Applause is the feeling in my heart that blogging every day is really awesome Luckily I don't have any fans, no one rushes, just lazy! Hahaha, write the third article ---------------------------------------------------------------------------------------------------------------------- Chapter V The main p ...

Added by lisnaskea on Tue, 04 Jan 2022 14:02:12 +0200