Android uses ViewPager to implement APP's guide page and dot

The display effect on the simulator is as follows: The general idea and code are as follows: 1. First, create a layout file, <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_widt ...

Posted by bhawap on Fri, 10 Jan 2020 16:12:17 +0100

Transfer of values between Activity and Activity,Activity and Fragment,Fragment and Fragment

1, Value passing between Activity and Activity First create two activities, one is MainActivity and the other is SecondActivity Then add a Button in activity main.xml, the code is as follows: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app ...

Posted by TheHyipSite on Mon, 06 Jan 2020 07:35:23 +0100

Python data analysis and mining learning notes (1) basic usage of numpy and pandas modules

I. basic usage of numpy module: numpy module can process data efficiently and provide array support. Many modules rely on it, such as panda, scipy, matplotlib, etc., so this module is the foundation. (1) import: import numpy (2) create one dimension and two dimension arrays: #Create a one-dimensional array x=numpy.array([" ...

Posted by dustbuster on Sun, 15 Dec 2019 17:54:32 +0100

Interpretation of React source code [2] update and creation

May your future be pure and bright, like your lovely eyes at the moment. ——Pushkin WeChat public number "JavaScript whole stack" Nuggets master of oneness Master of oneness by bilibilibili Source Github address: https://github.com/Walker-Leee/react-learn-code-v16.12.0 We have explored the origin of species, and we have ...

Posted by torrentmasta on Fri, 13 Dec 2019 18:21:05 +0100

Android Jetpack architecture component - detailed explanation of Navigation in the pit

This article starts with WeChat public's "Android development tour". Welcome to pay more attention to get more dry goods. Preface Navigation is a direct translation of navigation, which is one of Android Jetpack components, making single Activity application the preferred architecture. The jump of Fragment page in the application is h ...

Posted by BRAINDEATH on Wed, 11 Dec 2019 10:14:30 +0100

python foundation concurrent programming 02

Concurrent programming Two methods of subprocess recycling join() allows the main process to wait for the end of the subprocess and reclaim the subprocess resources. The main process then ends and reclaims the resources from multiprocessing import Process import time def task(name): print(f'Child process{name}: starting......') time ...

Posted by tekrscom on Wed, 11 Dec 2019 02:57:55 +0100

Android uses fragment ation to implement the bottom title bar (Github template open source)

In Android development, a very important layout is the bottom Title bar. With the bottom Title bar, we have the framework of the whole software UI development. Generally speaking, the layout of the whole software starts from the bottom Title bar, then other modules are written to form a complete software, so how can we write a bottom label?Titl ...

Posted by Noctule on Sat, 07 Dec 2019 12:50:30 +0100

How to get screen size in pixels in Android

I've created some custom elements that I want to programmatically place in the top right corner (top edge n pixels, right edge m pixels). Therefore, I need to get the screen width and height, and then set the position: int px = screenWidth - m; int py = screenHeight - n; How do I get screen width and screen height in the main activity? ...

Posted by dmcentire on Fri, 06 Dec 2019 01:37:48 +0100

On js method of calculating the width of non equal width font

Prepare a container First, insert an absolute container outside the body to avoid redrawing: const svgWidthTestContainer = document.createElement('svg'); svgWidthTestContainer.setAttribute('id', 'svgWidthTest'); svgWidthTestContainer.style.cssText = ` position: absolute; width: 500px; height: 500px; left: -1000px; top: -1000px; vis ...

Posted by Vizionz on Mon, 02 Dec 2019 02:01:20 +0100

Operation of basic (15) slice of golang

square-gopher.png slice operation Slice-Bread-Step-27.jpg slice add element s := arr[2:6] fmt.Println(cap(s)) //6 fmt.Println(len(s)) //4 s1 := s[3:5] fmt.Println("s = ",s) fmt.Println("s1 = ",s1) s2 := append(s1,10) s3 := append(s2,11) s5 := append(s3,12) s2, s3, s5 = [5 6 10] [5 6 10 ...

Posted by tullmejs on Sat, 30 Nov 2019 10:24:19 +0100