Android click the button to turn off the screen
Sometimes we see some pad of control equipment in some hotels. When we click the close button, we will turn off the device and turn off the pad screen. Today, we will try to realize the function of clicking the button to turn off the screen.
1. Create an XML folder under res and a resource file of lock_screen.xml. The source ...
Posted by bonekrusher on Thu, 02 Apr 2020 07:55:25 -0700
Using Python + regular expression to deal with java functions
Objectives:
Extract function information in java code (function name, function return value, function return value type, function parameter)
thinking
1. Match function header (public static void name())
Normal function headers start with public or private or protected+
Not all functions have static - \ s ...
Posted by hoboman on Thu, 02 Apr 2020 07:40:20 -0700
CountDownTimer source code analysis
Countdown function, for example: send SMS verification code countdown.
1 public class CountDownTimerActivity extends Activity {
2
3 private Button mSend;
4 private SendCountMessage mCountMessage;
5
6 @Override
7 protected void onCreate(Bundle savedInstanceState) {
8 super.onCreate(savedInstanceState);
9 ...
Posted by mattyj10 on Thu, 02 Apr 2020 06:11:51 -0700
Summary of five ways to use Toast
As for Toast, I'm sure you are familiar with it. Here's a summary. There are five ways to use Toast:
Default style
Custom location
Custom picture
Fully custom layout
Use in other threads
All right, no more nonsense, just look at the code
1. first, add 5 buttons in the activity.xml file to click the event to pop up the Toast ...
Posted by rocram16 on Thu, 02 Apr 2020 02:32:09 -0700
Using freemarker to save the ecrats picture to word
Using freemarker to save the ecrats picture to word
In a business in an existing field, it is often necessary to make statistics on a kind of data, generate echarts charts and export them with corresponding description materials:
Save eckarts locally
java reads pictures for base64 encoding
Making freemarker templates ...
Posted by Pixelsize on Thu, 02 Apr 2020 01:33:02 -0700
Android imitation Alipay numeric keypad
brief introduction
In some apps with payment function, the password can only be a pure number. Although we can specify that the EditText input box can only be a number, in order to provide user experience, we tend to use a custom pure number keyboard.
Effect of this paper:
Customize KeyboardView
Implementation steps:
...
Posted by rationalrabbit on Wed, 01 Apr 2020 11:56:38 -0700
[daily] Go language Bible -- JSON exercise 2
Exercise 4.12: the popular web comic service xkcd also provides a JSON interface. For example, an https://xkcd.com/571/info.0.json request will return a detailed description of the 571 number that many people love. Download each link (only once) and create an offline index. Write an xkcd tool that uses these offline indexes to print the URL ...
Posted by vigour on Wed, 01 Apr 2020 07:44:17 -0700
Implementing Http server in Golang and parsing header parameters and form parameters
In HTTP service, header parameters and form parameters are often used. This article is mainly to practice how to parse the parameters and form parameters in the header of HTTP request in Go language. The specific code is as follows:
package server
import (
"net/http"
"strconv"
"fmt"
)
func HttpStart(port int) {
http.HandleFunc(" ...
Posted by KCAstroTech on Wed, 01 Apr 2020 05:54:39 -0700
Python web crawler practice (2): crawling novel website novel
Python web crawler practice (2)
1, Demand analysis
Crawling a novel from a novel website
Two, steps
target data
website
page
Analysis data loading process Analyze the url corresponding to the target data
Download data
Cleaning, processing data
Data persistence
Key point: analyze the url corresponding to t ...
Posted by MrCool on Wed, 01 Apr 2020 02:13:11 -0700
nodejs learning notes (1) - web crawler
Unconsciously, I have been developing nodejs for more than a year. I learned a lot in the process and forgot a lot, so I still insist on leaving some content in the blog for later reference.
This article mainly realizes a simple website crawler function, grabs the website inside picture as well as the content.
Before grabbing, the modules of SU ...
Posted by ubunken on Tue, 31 Mar 2020 23:04:57 -0700