You could have written less if else

“… He thinks that Blub language is enough, and then his thinking has been assimilated by Blub language "- Paul Graham, hackers and painters > preface I don't like the shuttle if/else statement in business code. It's complex and bloated. At least in terms of aesthetic feeling, swit ...

Posted by webtech123 on Fri, 19 Jun 2020 05:21:57 -0700

LayoutInflater and its source code analysis in Android Development

The infilate method of layoutinflate is a common method used in Android development, but its parameters make many beginners feel headache. I don't know what they represent respectively. This paper makes a summary combining with several other blogs. The inflater method has the following four overloaded m ...

Posted by .evo. on Mon, 15 Jun 2020 21:11:15 -0700

Summary of usage of meta tags in HTML5

< meta > tags in front-end interfaces of major websites on June 11, 2020 The meet object represents an element of HTML and provides meta information of HTML elements, such as description, keyword, refresh rate. Object properties: Content sets or returns the content attribute of an element h ...

Posted by nova912 on Wed, 10 Jun 2020 23:28:36 -0700

Getting started with python: crawling through pictures, articles and web pages

1, First, let's see how Python can simply crawl the web page1. Preparation The beautiful soup4 and chardet modules used in the project belong to the three-party extension package. If not, please install pip by yourself. I use pycharm to do the installation. Next, I will simply use pycharm to install chardet and beautiful soup4 Follow the steps ...

Posted by suspect on Sat, 23 May 2020 22:08:21 -0700

Task 25 - first reptile test

First question: use the requests library to visit Baidu homepage 20 times, and return the length of his text and content attributes.   1 # -*- coding: utf-8 -*- 2 """ 3 Created on Tue May 19 10:12:16 2020 4 5 @author: 49594 6 """ 7 8 import requests 9 url = "https://www.baidu.com/" 10 for i in range(20): 11 try: 12 rest ...

Posted by RDx321 on Tue, 19 May 2020 07:45:21 -0700

UglifyJs problem in vue packaging

Today, I'm going to pack a vue project that I've been working on recently. I'll run it to the test environment and test it by the way, but it appears when I don't want to pack it ERROR in static/js/vendor.6ee331eab7d8c9bf1876.js from UglifyJs Unexpected token name «i», expected punc «;» [static/js/vendor.6ee331eab7d8 ...

Posted by pulkit123 on Mon, 18 May 2020 08:45:29 -0700

java Concurrent programming-CountDownLatch and Cyclic Barrier differences in internal implementation and scenarios

Preface CountDownLatch and Cyclic Barrier are two important tool classes for concurrent java programming. They are widely used in many multithreaded concurrent or parallel scenarios.However, each has its own emphasis on the internal implementation and use scenarios. Internal implementation differences The former relies more on classical AQS m ...

Posted by phpconnect on Sun, 17 May 2020 12:13:23 -0700

JQuery Getting Started+js Library File Sharing

data Links: https://pan.baidu.com/s/1aHUnfPcs1VJAas5zj5abQA Extraction code: b1hb Include the js library files needed for this section, as well as the api documentation for JQuery What JQuery jQuery is a fast and concise JavaScript framework, which is another excellent JavaScript code base (or JavaScript framework) after Prototype.jQuery was d ...

Posted by GirishR on Tue, 05 May 2020 12:58:12 -0700

Java Multithreaded Recording (Including Cases)

Threads are the execution units of programs, execution paths.Is the most basic unit of CPU used by programs Multithreaded -- Programs have multiple execution paths to improve usage of application processes The more threads in the process, the higher the probability of seizing CPU execution rights.Thread execution is random   How Java programs w ...

Posted by bogdan on Mon, 04 May 2020 23:59:15 -0700

JavaScript object Array,Map,Set use

for (int i = 0; I < 3; I + +) {/ / [focus on three times] Before we explain the usage of each object, we must pay attention to the compatibility of the browser when using JavaScript objects! Especially the version of IE!!!! } To view the specific API, please check JavaScript object Here is the specific API introduction! Please refer to ...

Posted by Shane10101 on Mon, 04 May 2020 20:38:42 -0700