Bunny's Code Burrow

this is a JS world


  • Home

  • About

  • Archives

  • Tags

  • Search

interview css+html

Posted on 2020-02-17

Interview CSS HTML

1.CSS盒模型

box-sizing:conent-box;
box-sizing:border-box;

2.Html5的新特性

  • 标签语义化:header,footer,nav,aside,article,去掉了frame 和frameset,新增了表单元素,提交表单的时候验证输入值是否满足email的格式input type=”email” name=”email”;url:提交表单的时候验证输入值是否满足url的格式input type=”url” name=”url”;number:根据你的设置提供选择数字的功能,其中min为最小值,max为最大值,value为默认值,step为点击箭头时数字的变化量,max、min、step、value均可不写,目前某些浏览器还不支持。input type=”number” name=”number” min=2 max=100 step=5 value=”15”
Read more »

chrome web worker

Posted on 2020-01-31

Chrome with Webworker

If I try to use web workers through a JavaScript file, Chrome throws an error -

Uncaught SecurityError: Failed to create a worker: script at '(path)/worker.js' cannot be accessed from origin 'null'.

The solution is to set up a python server in this path.

python -m http.server 8888

Then it works fine.

wordpress migrate

Posted on 2020-01-17

Wordpress Migration

After server migration only the homepage works. Every single link gave a Not Found.

Solution
1.Settings > Permalinks, Change to plain

Read more »

how to update RevSlider plugin after updating to PHP7

Posted on 2019-12-23

How to update RevSlider Plugin after updating to PHP7

After updating to PHP7, login to the admin of wordpress, there would be an error as follows:

revslider\inc_php\framework\base_admin.class.php on line 73

The solution is to go to the file and update in the line 22 as follows:

    private static $menuRole = self::ROLE_ADMIN;
//private static $arrMetaBoxes = "";    

how to reset password in local wordpress

Posted on 2019-12-23

How to rest password in local wordpress

In this situation, the local machine does not have the access to send email to reset the password.Luckily we hava the access to the database. Update the password of your “user_pass” =”5d41402abc4b2a76b9719d911017c592”,which is MD5=”hello”. Then go to the wp-admin and login under the user which just updated the password.
After login, reset your password again.

how to increase the memory limit of wordpress

Posted on 2019-12-20

How to increase the memory limit of wordpress

First thing first!!Backup the file before changing it!!!!

Edit your .htaccess file
If you don’t have access to PHP.ini try adding this to an end of .htaccess file:

php_value memory_limit 256M

how to restore wordpress

Posted on 2019-12-11

How to restore wordpress after hacking

First thing to do after you set up a wordpress website is to backup!!!

  1. Install the plugin of backup,such as UpdraftPlus
  2. Install the plugin of any high rating security plugin from wordpress, if possible, purchase the pro one, sometimes the price is valuble.
  3. If the website is badly hacked, then the best and fast way is to set a clean and new wordpress and imported the data.
  4. Export data from original phpMyAdmin,the fast and simple way to generate SQL.Remember the database name and Charset,which later would be used to import to the new one.
  5. Download the same version of wordpress,copy the files under “wordpress” and paste into wamp\www\wp
  6. Go to localhost\wp\wp-admin, then install the brand new one.
  7. Remember to set up the database name and Prefix the same as the previous one.
  8. Finish the installation of the new wordpress website.
  9. Import the SQL of previous database.If error, do not click the second option,rembember to new the database first and the database name and charset should be the same as the previous one.
  10. Refresh the page of website, it would show that you have already install the wordpress so just login.
  11. Then go the post and pages, check if there is any strange code,then delete them The best way to view them is in class edit instead of Elementor.
  12. Scan the new website by some high rating security plugins and backup.
  13. Learn how to use Elementor to same the template of your website design: Go the the arrow close to “update”, save the page as template. Go to your elementor Tools choose Regenerate CSS Sync Library

  14. Then install the auto update plugin and attempt login plugin.

JS interview

Posted on 2019-12-09

JS interveiw

Basic:

  1. String
  2. Number
  3. Boolean
  4. undefined
  5. null
  6. symbol

complex

  1. Object
  2. Array
  3. Function
  4. RegExp
  5. Date
  6. Error
    Read more »

how to install Python3

Posted on 2019-11-15

How to install Python3

1.Download the latest version of Python and install it
2.In order to connect python with database, some libs need to be installed

pip install pyodbc
ip install PyMySQL

For Python3 on windows you might have issue like “error Microsoft Visual C++ 14.0 is required”
Install using any ONE of these choices:
Microsoft Build Tools for Visual Studio.
Select: Workloads → C++ build tools.

Other errors might like “PYODBC–Data source name not found and no default driver specified” try to “cnxn = pyodbc.connect(‘DRIVER={ODBC Driver 13 for SQL Server}” instead of ‘DRIVER={SQL Server}’

how to install docker to Ubuntu

Posted on 2019-09-19

How to install docker to Ubuntu

To install Docker Engine - Community, you need the 64-bit version of one of these Ubuntu versions:

Disco 19.04

Cosmic 18.10

Bionic 18.04 (LTS)

Xenial 16.04 (LTS)

To check the verion of your Ubuntu system,by

$sudo lsb_release -a

Uninstall old versions
Older versions of Docker were called docker, docker.io , or docker-engine. If these are installed, uninstall them:

$ sudo apt-get remove docker docker-engine docker.io containerd runc

Install Docker Engine - Community

SET UP THE REPOSITORY

Update the apt package index:

$ sudo apt-get update

Install packages to allow apt to use a repository over HTTPS:

$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

Add Docker’s official GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Verify that you now have the key with the fingerprint

9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88

by searching for the last 8 characters of the fingerprint.

$ sudo apt-key fingerprint 0EBFCD88

pub   rsa4096 2017-02-22 [SCEA]
  9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
sub   rsa4096 2017-02-22 [S]

Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/    ubuntu \
   $(lsb_release -cs) \
   stable"

INSTALL DOCKER ENGINE - COMMUNITY

Update the apt package index.

$ sudo apt-get update

Install the latest version of Docker Engine - Community and containerd, or go to the next step to install a specific version:

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

List the versions available in your repo:

$ apt-cache madison docker-ce

However,if you don’t want to choose, just use $ sudo apt-get install docker-ce would install the latest version

Verify that Docker Engine - Community is installed correctly by running the hello-world image.

$ sudo docker run hello-world

Enjoy

1…678…16
Jenny Zeng

Jenny Zeng

Loving code ,especially javascript, React Native

155 posts
37 tags
GitHub Linkedin
© 2020 Jenny Zeng
Powered by Hexo
Theme - NexT.Pisces