base64 encoding and decoding of JS

Unicode problem solving There is a small pit that only supports ASCII. If you call btoa("Chinese"), an error will be reported: Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. DOMString in browser is UTF-16 encoding. If the input strin ...

Posted by sukanya.paul on Sun, 05 Apr 2020 22:49:35 -0700

Update UI across processes through AIDL

I. overview This article will work with you to learn about AIDL implementation of cross process update UI.  The requirement is: there are two activities in the same application, MainActivity and TempActivity, which are not in the same process. Now we need to change the view in MainActivity through TempActivity, that is, to modify the disp ...

Posted by pluginbaby on Sun, 05 Apr 2020 22:39:29 -0700

Linux command -- file

File is used to view file types. Different from Windows system, Linux system does not reflect the file type through the file name, so you need to use the file command to confirm. [admin@local ~]$ file exe exe: Bourne-Again shell script text executable As above, use the file command to view the type of exe file, whic ...

Posted by kanikilu on Sun, 05 Apr 2020 15:50:44 -0700

Layout in android

Android learning layout and component summary Layout in android LinearLayout linear layout RelativeLayout GridLayout grid layout FrameLayout frame layout TableLayout table layout PercentFrameLayout percentage frame layout PercentRelativeLayout percentage relative layout Absolute layout In the above layout, the most ...

Posted by getmukesh on Sun, 05 Apr 2020 11:33:57 -0700

A detailed explanation of common modules in python

1.time module import time s = time.localtime() # Convert the time into the formatted time, and obtain the struct time format such as mm / DD / yyyy through time.struct_time(tm_year=2018, tm_mon=3, tm_mday=11, tm_hour=19, tm_min=53, tm_sec=31, tm_wday=6, tm_yday=70, tm_isdst=0) s=time.gmtime() #UTC time zone s=time.time() # Returns the cur ...

Posted by pattyb on Sun, 05 Apr 2020 10:08:38 -0700

iOS reflection mechanism: the use of objc property

iOS reflection mechanism: the use of objc property Objc ﹣ property ﹣ t is often used in actual development, for example, it is necessary to obtain the property of a registered class, or judge the type of property, or automatically assign a value to the property after obtaining the property, etc Here is an example of ...

Posted by plapeyre on Sun, 05 Apr 2020 00:02:49 -0700

Android studio production welcome interface and Application Icon

Preface Hello, I'm Vic. Today I'll give you an overview of Android studio's production welcome interface and application icons. I hope you like it Welcome interface and Application Icon This project uses Android Studio 3.0.1 as a development tool activity_splash.xml An activity_splash.xml layout file is created. To welcome the ...

Posted by 758 on Sat, 04 Apr 2020 19:18:39 -0700

033 remote execution command

Execute command on serverIt seems that there is no module to execute the command before. Now it is added import subprocess obj = subprocess.Popen('dir',shell=True,stdout=subprocess.PIPE) #Get an object. The command is in front, shell The script can be executed, stdout Set a process pipeline. There are actually two processes, one is the main p ...

Posted by rdog157h on Sat, 04 Apr 2020 15:55:01 -0700

java Web session Technology (cookie)

java Web(cookie) session Technology Set xml configuration information <!-- ************************** --> Create a select -- > < servlet name > demo05 < / servlet name > <! -- 2. Name select -- > < servlet class > come. Lanou3g. Demo05 < / servlet class > &l ...

Posted by seodevhead on Sat, 04 Apr 2020 11:11:53 -0700

Android creates local folders, creates local files, and accesses local files

Before this, you need to obtain read-write access to the memory. Add the following in AndroidManifest.xml: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> <uses-permission android:nam ...

Posted by silviuchingaru on Sat, 04 Apr 2020 06:01:33 -0700