Python 3 standard library: hmac password information signature and verification

1. Signature and verification of hmac password information HMAC algorithm can be used to verify the integrity of information, which may be passed between applications, or stored in a place where there may be a security threat. The basic idea is to generate a cryptographic hash of real data and provide a shared secret key. The resulting hash is ...

Posted on Sat, 28 Mar 2020 22:54:06 -0700 by hamzatki

Use of third-party BottomBar

Address: https://github.com/roughike/BottomBar Usage: compile 'com. Roughike: bottom bar: 2.0.2' Use in layout <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.an ...

Posted on Fri, 27 Mar 2020 11:41:01 -0700 by luminous

Use intent to return data to explain the previous activity instance (use onBackPressed() to return data to solve the previous activity problem)

1. Add controls to the layout of FirstActivity: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" androi ...

Posted on Fri, 27 Mar 2020 10:19:41 -0700 by rockyracoon

Android bottom navigation bar open source library

There are many open source libraries about the bottom navigation bar, except for the Design/BottomNavigationView and BottomBar bottom navigation bar , here are a few, which are relatively simple. classification NavBar AHBottomNavigation BottomNavigationBar BottomNavigationViewEx Bott ...

Posted on Fri, 27 Mar 2020 09:52:44 -0700 by reaper7861

linux rpc case helloworld

Client code #include<stdio.h> #include<rpc/rpc.h> #include<string.h> #include<stdlib.h> #define PROGNUM 12345 #define PROGVER 1 #define PROGPRO 1 #define size 10 char* real_invoke(char *a) { static char b[20]={0}; if( strcmp(a,"hello") == 0) { memcpy(b,"world",6); return b; ...

Posted on Fri, 27 Mar 2020 07:09:56 -0700 by lady_bug

day13 anonymous function

Supplementary knowledge points: def func(*args): for i in args: for j in i: yield i print(list(func('asdf',(1,2,3)))) #List adds all the elements in the generator to the list. #Simplify the above functions: def func(*args): for i in args: yield from i #The inner circulation is optimized and the operatio ...

Posted on Fri, 27 Mar 2020 06:46:53 -0700 by matbennett

https certificate application process (for nginx)

https certificate application process Abstract In the last article Build linux server completely This paper introduces the whole process of a server from the empty operating system to the last application accessing through https. The last article is relatively simple when it introduces the application of https. Here is a special article to desc ...

Posted on Thu, 26 Mar 2020 09:13:42 -0700 by ronnimallouk

android -------- custom control (4)

The first part introduces a simple case of custom control. This article mainly introduces how to customize some properties of custom control.   General steps for using custom attributes in Android: Define declare styleable, add attr Get custom properties using TypedArray Set to View   Custom attributes exist in the / value/attr.xml f ...

Posted on Wed, 25 Mar 2020 08:00:01 -0700 by aneesme

Project deployment of server

First, create two scripts build.sh and control.sh under the root directory of the project. Build.sh is used to build the project, and control.sh is used to start and stop the project: build.sh: #!/bin/bash export JAVA_HOME=/usr/local/jdk1.8.0_65 export PATH=$JAVA_HOME/bin:$PATH mvn clean package -Dmaven.test.skip=true ret=$? if [ $ret -n ...

Posted on Tue, 24 Mar 2020 07:41:01 -0700 by 7awaka

2020Python exercise 14 - decorator

@2020.3.23 After class exercise - decorator 1: Write the function, (the time of function execution is simulated by time.sleep(n)) import time def index(x,y): time.sleep(3) print('index %s %s' %(x,y)) index(111,222)   2: Write decorator to add statistical time to function import time def index(x,y): start=time ...

Posted on Mon, 23 Mar 2020 07:56:58 -0700 by johnoc