Tag Archives: ProgrammerAH

Android learning — cannot resolve symbol ‘EditText‘

EditText editText =(EditText)findViewById(R。 id.editText ); in “((R id.editText ))”Error cannot resolve symbol ‘EditText’

Today, there was an error when learning from the Android Studio development document. When starting another activity and building an intent, https://developer.android.google.cn/training/basics/firstapp/starting-activity#java

 public void sendMessage(View view) {
        Intent intent = new Intent(this, DisplayMessageActivity.class);
        EditText editText = (EditText) findViewById(R.id.editText);
        String message = editText.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message);
        startActivity(intent);
    }

Solution, view activity_ main.xml , text edit box section

<EditText
    android:id="@+id/editTextTextPersonName3"

Change the EditText in the SendMessage method to the corresponding, I’m here edittexttextpersonname3, as shown in the figure

public void sendMessage(View view) {
        Intent intent = new Intent(this, DisplayMessageActivity.class);
        EditText editText = (EditText) findViewById(R.id.editTextTextPersonName3);
        String message = editText.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message);
        startActivity(intent);
    }

The meaning of escape character is’ ^] ‘prompted by telnet under linux / Unix

In Linux / Unix, you will be prompted to escape character is’ ^] ‘

This prompt means that pressing Ctrl +] will call out the command line of Telnet. After the telnet command comes out, you can execute the telnet command. For example, exit telnet is quit

Other common telnet command function description:

Close close the current connection logout force to exit the remote user and close the connection display display the parameters of the current operation mode try to enter the command line mode or character mode open connect to a site quit telnetsend send special characters set set the parameters of the current operation unset reset the current operation parameters status print status information Toggle switch the operation parameters SLC change special characters Character status auth on / off confirmation Z suspend telnetenviron change environment variable? Display help information

Dataframe to numpy.ndarray Related issues of

Originally, we tried to use SVM algorithm to classify and predict the data, but we found that there are many problems in SVM model.fit The data in () must be numpy.ndarray Type of data, so start with numpy.ndarray The data of (data) will turn into valueerror: sequence too large; cannot be greater than 32. This problem is not easy to solve. Later found through numpy.array (data) can be converted directly into numpy.ndarray Type of data.

Solution to can’t bind to local 8600 for debugger

1 change the port to 8601 (don’t want to kill the process that occupies 8600 port, if 8600 port is occupied by other processes that you open, such as Android studio, consul, etc.)

Open eclipse window – & gt; preferences – & gt; Android – & gt; DDMS:

Set Base local debugger port to “8601”Check the box that says “Use ADBHOST” and the value should be “127.0.0.1”              

2 CMD to kill the process occupying port 8600 (it can kill the process occupying port 8600)

netstat -aon|findstr 8600

taskkill /pid 12836-t -f

 

 

“NPM err! Error: eperm: operation not permitted” problem solving

Solution of “NPM err! Error: eperm: operation not permitted”

 

Error occurred when NPM running Vue cli to create project under Windows system

npm ERR! Windows_ NT 10.0.14393
npm ERR! argv “C:\\Program Files\\nodejs\\ node.exe ” “C:\\Program Files\\nodejs\\node_ modules\\npm\\bin\\npm- cli.js ” “uninstall” “express” “-g”
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! path C:\Program Files\nodejs\node_ cache\_ locks
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node_ cache\_ locks’
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node_ cache\_ locks’
npm ERR!     at Error (native)
npm ERR!   errno: -4048,
npm ERR!   code: ‘EPERM’,
npm ERR!   syscall: ‘mkdir’,
npm ERR!   path: ‘C:\\Program Files\\nodejs\\node_ cache\\_ locks’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\admin\npm- debug.log
 

 

The key point is: operation not permitted.

 

Solution: use Win + X, select the command prompt (administrator), and run the command in it.
 

“ XX.app ”It is damaged and cannot be opened. You should move it to the wastebasket.

    MacOS Mojave 10.14 and the following systems:
    open the terminal.app, enter the following command and enter, enter the power on password and enter
    sudo spctl -- Master disable

    MacOS Catalina 10.15 system:
    open terminal.app, enter the following command and enter, enter the power on password and enter
    sudo xattr - Rd com.apple.quarantine Space software path
    such as Sketch.app
    sudo xattr -rd com.apple.quarantine /Applications/ Sketch.app
    Software path acquisition: drag the software into the “terminal app” to obtain the path

    MacOS Catalina 10.15.4 system:
    if the software exits unexpectedly after updating the 10.15.4 system, you can sign the software according to the following method
    1. Open the “terminal app” and enter the following command:
    Xcode select -- install
    2. Sign the software
    open the terminal tool and enter and execute the following command:
    sudo codesign -- force -- deep -- sign- (application path)

Latex bold, italics

Latex bold, italics

Show upright text: textup {text}
Italians: textit {text}
slated: Italians: textsl {text}
show small upper case text: textsc {text}
medium weight: textmd {text}
bold command: textbf {text}
default: textnormal {text}

Invalid normalized color error in unity

For example,
Color C = new color (0xf2, 0xff, 0xff);
is used label.color = c;

Compile without error, open the interface will report the above error. This is because the values of R, G, B and a in the color construction method range from 0 to 1. The value range of color32 construction method is 0 to 255, so it needs to be changed to

Color c = new Color32(0xF2,0xFF,0xFF);