Java interview questions (basic part)

1、Can a.Java source file include multiple classes (not internal classes)? What are the restrictions?     There can be multiple classes, but only one public class, and the public class name must be consistent with the file name. 2、JavaDo you have goto?   javaThe reserved word is not used in Java now. 3、Let’s talk about the difference between &amp and & &amp.     &And & amp; & amp; can be used as logic and operators, representing logic and (and), when the result of the expression on both sides of the operator is true, the entire operation re...

JS advanced — — the way to generate random small squares

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>title</title> <style> .map { width: 800px; height: 600px; background-color: #CCC; position: relative; } </style> </head> <body> <div class="map"></div> <script src="common.js"></script> <script> //Generating random number objects (function (window) { function Random() { } Random.prototype.getRandom = function (min, max) { ...

Jquery Syntax error, unrecognized expression: solution

Question: The HTML content of the template is converted to jQuery times’s following error: Syntax error, unrecognized expression: Operation code: var linkUl = $(“#linkUl”), listHeight;$(this.linkTemplate).appendTo(linkUl); The modified operation code: var linkUl = $(“#linkUl”), listHeight;$($.parseHTML(this.linkTemplate, document, true)).appendTo(linkUl); Reason: jQuery 1.9 * starts with parseHTML, the HTML content in script, which must be converted to use for security. Otherwise, it will not be able to resolve the error of HTML content. Usage: $($.parseHTML(...

Python: C expansion initial experience

Preface Using Python undoubtedly reduces many rule constraints and development costs, allowing us to focus more on logic than syntax. But gains and losses, development efficiency improved, but has brought operational performance problems, so it is often pursued by other schools of thunder. As a pythoner, we are also very sad, blame us. Fortunately, God closed one of our doors, but he opened another window for us, because the bottom layer was written in C, so we could rewrite some of the more performance-hungry features, or modules, in C, and then import XXXXXX seamlessly.Combination. Even if ...

A loose list of algorithm diagrams

The fifth chapter tellsHash table,It is implemented as a dictionary in Python and consists of hash functions and arrays. It has the advantages of both arrays and linked lists, avoiding duplication, and can simulate mapping relations. hash table implementation Hash function + array to achieve the hash table conflict Different inputs are mapped to the same output, which is conflict. How to handle conflicts? Create a linked list on the same output. fill factor” The hash table contains the number of elements / positions, and the fill factor measures how many positions in the hash ta...

Linux view machine CPU core number

CPUTotal core = physical CPU number * the number of cores per physical CPU.Total logical CPU = physical CPU number * the number of cores per physical CPU * the number of super threads.   Let’s look at what CPU stands for. Many physical CPU, CPU communicate through the bus, the efficiency is relatively low, as follows: Multi-core CPU, different cores communicate through L2 cache, storage and peripherals communicate with CPU via bus, as follows: Multi-core hyperthreading, each core has two logical processing units, two cores share a core of resources, as follows: From what I’...

About liunx machine offline environment (NETCORE) Nuget packet migration problem

First of all, the nuget offline environment can’t load third-party nuget packages, so I’m using nuget to cache files (right or recommend using your own nuget server and publishing it properly, just for emergencies) We all know that the dotnet restore of a project is a command to clarify the dependencies of a project, and the restore command relies on the project. assets. JSON file under the obj directory under the project directory to clarify the dependencies. Let’s start with a diagram that shows the directories of the liunx environment and the window environment nuget pac...

HTTP common status codes

Common HTTP status codes: 2″ (the request succeeds) indicates that the request status code is successfully processed. 200 (success) server” has successfully processed the request. Usually, this means that the server provides the requested web page.   201 (created) request succeeded and the server created a new resource.  202″ (accepted) server has accepted the request, but it has not been processed.   203 (unauthorized information) server has successfully processed the request, but the information returned may come from another source.   204 (no content) server success...