查找wordpress数据库密码

查找mariadb数据库密码

查找wp-config.php这个文件,找到password就可以

# find -name wp-config.php
./var/www/html/wordpress/wp-config.php
# vi ./var/www/html/wordpress/wp-config.php

while用法

When condition is true, which include the result(true or false) of operator like 'not equal(!=)' or 'less than(<)'or 'greater than or equal to(>=)', the statement after colon will be executed.

When we use function input, the function will return string type, so if we want compare result with number, we can use str() to convert number to string and int() to convert string to int.

message = input('if you input 0,then everthing is over')
i = 1
while message != str(0) and i <=10 :
    print(str(i)+' '+message)
    i +=1

cv2.destroyAllWindows()出错

Jupyter's error can not be solved immediately, however when I run the script in terminal, error message is here:

.../Study/learningOC[15:52]python3 cameraFrames.py
Showing camera feed. Click window or press any key to stop.
Traceback (most recent call last):
  File "...Study/learningOC/cameraFrames.py", line 19, in <module>
    cv2.destroyAllWindows('MyWindow')
SystemError: <built-in function destroyAllWindows> returned NULL without setting an error

Therefore I check the demo code:

import cv2

clicked = False
def onMouse(event, x, y, flags, param):
    global clicked
    if event == cv2.EVENT_LBUTTONUP:
        clicked = True

cameraCapture = cv2.VideoCapture(0)
cv2.namedWindow('MyWindow')
cv2.setMouseCallback('MyWindow', onMouse)

print('Showing camera feed. Click window or press any key to stop.')
success, frame = cameraCapture.read()
while success and cv2.waitKey(1) == -1 and not clicked:
    cv2.imshow('MyWindow',frame)
    success, frame = cameraCapture.read()

#cv2.destroyAllWindows('MyWindow')
cv2.destroyAllWindows()
cameraCapture.release()

After deleting the arguments 'MyWidows' in destroyAllWindows, the script is running well.