WordPress 4.3 Uncaught TypeError Cannot read property WordCounter[转载]

WordPress4.3正式版已经发布了,该版本被命名为Billie。

 

但是更新至WordPress 4.3 “Billie”后,Chrome网页控制台提示:Uncaught TypeError: Cannot read property ‘WordCounter‘ of undefined,添加媒体和添加锚文本链接时都无法弹出。本以为是浏览器禁止弹出,清除浏览器缓存,恢复默认设置都没有解决,还会提示失败。后来发现问题是使用中文翻译导致,文章页无法添加媒体和链接。正是由于这个原因,导致后续js加载失败。
解决办法:强制重新下载翻译或删掉出现问题的语言文件。
1、删除wp-content下的languages目录,重新到更新页面,更新翻译。更新页面是
http://你的域名/wp-admin/update-core.php或者另外一个办法,使用FTP工具,在languages目录下,把
zh_CN-word-count.dev.js
zh_CN-word-count.js删掉。
好像旧版本升级出现的历史遗留问题,从WP4.0开始用好像就不会有这个问题。
zh_CN-word-count*是在WP4.0开始就不再更新了。zh_CN.php最后一次更新日子是WP4.2,主要增加对一些多媒体的支持和ICP备案号填写(仅对WordPress自带主题有效)。
此次发布的WordPress4.3版本对WordPress的“自定义”功能有了一些非常好的更新,同时也更新了一下安全性的问题。更新后网站后台管理操作更加流畅,写文章可以使用Markdown,并且提升了密码安全性,总体体验非常好。

原文来自:http://www.codebye.com/wordpress-4-3-uncaught-typeerror-cannot-read-property-wordcounter.html

Chrome浏览器更新DNS缓存 Chrome Clear DNS Cache

Chrome浏览器自身带有dns缓存,即便主机上的dns缓存已经更新,Chrome可能还访问的是原来的解析。所以需要清除一下Chrome自身的缓存。方法如下:

1、在Chrome地址栏输入:chrome://net-internals/#dns

2、点右上角的按钮,会出现下拉菜单,点clear cache即可。

chrome-clear-dns-cache

JSTL JavaScript 冲突 HTTP Status 500 – Unable to compile class for JSP

以前也碰到过这样的问题,有些js写在jsp视图中,就报错,那时候没有找到原因,就直接把js放到外部文件中进行引用了。这次花了点时间去琢磨了一下。

首先申明:我这个解决方案并不适用所有出现该问题的,这只是导致该问题出现的一种原因,所以如果不适合你,请勿怪,非常感谢。

具体的报错如下:

HTTP Status 500  Unable to compile class for JSP

type Exception report

message Unable to compile class for JSP

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:677)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)

	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
	org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	com.renyiwei.web.filter.XssFilter.doFilter(XssFilter.java:27)
	org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
root cause

java.lang.ArrayIndexOutOfBoundsException
java.lang.System.arraycopy(Native Method)
org.gjt.xpp.impl.tokenizer.Tokenizer.next(Tokenizer.java:1274)
org.gjt.xpp.impl.pullparser.PullParser.next(PullParser.java:392)
org.gjt.xpp.sax2.Driver.parseSubTree(Driver.java:415)
org.gjt.xpp.sax2.Driver.parse(Driver.java:310)
javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:194)
org.apache.taglibs.standard.tlv.JstlFmtTLV.validate(JstlFmtTLV.java:134)
org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:776)
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1882)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1851)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:218)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)

	org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	com.renyiwei.web.filter.XssFilter.doFilter(XssFilter.java:27)
	org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.70 logs.

Apache Tomcat/7.0.70

HTTP_Status_500_Unable_to_compile_class_for_JSP

Debug过程:

Google了很久,网上说jstl包的缘故,我也进行更换,发现没有解决问题。然后把jsp单独拿出来放一个空项目中跑,是可以的。在空项目中把所有的包放进去,会出现问题,确定是导入的包的问题。根据报错日志和对包的排查,最后发现去掉pull-parser-2.jar这个jar包之后,页面显示就正常了。

解决方案:

这个pull-parser-2.jar是被dom4j依赖的,所以我更换了该包的版本,问题得到解决。

<dependency>
 <groupId>pull−parser</groupId>
 <artifactId>pull−parser</artifactId>
 <version>2.1.10</version>
 </dependency>

 <dependency>
 <groupId>org.dom4j</groupId>
 <artifactId>dom4j</artifactId>
 <version>2.0.0−RC1</version>
 </dependency>

mac10.12 安装 pyqt5.8.2

1、下载源码和程序:

PyQt5 :http://www.riverbankcomputing.co.uk/software/pyqt/download5

sip :http://www.riverbankcomputing.co.uk/software/sip/download

Qt5:http://qt-project.org/downloads

2、安装 sip


tar -zxvf sip-4.19.2.tar.gz
cd sip-4.19.2
python configure.py
make
sudo make install

3、安装xcode

app store里面可以下载安装

4、安装Qt5

这步很简单,加载dmg镜像,双击就好

5、安装Pyqt5


tar -zxvf PyQt5_gpl-5.8.2.tar.gz
cd PyQt5_gpl-5.8.2
sudo python configure.py -q /Users/renyiwei/Qt5.8.0/5.8/clang_64/bin/qmake -d /Library/Python/2.7/site-packages/ --sip /System/Library/Frameworks/Python.framework/Versions/2.7/bin/sip --verbose
sudo make
sudo make install

6、问题

问题1:Project ERROR: Could not resolve SDK path for ‘macosx’
解决办法

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

macOS 10.12:Could not resolve SDK Path for ‘macosx’

尝试了网上的方法,在/Users/username/Qt5.8.0/5.8/clang_64/mkspecs/qdevice.pri 中添加!host_build:QMAKE_MAC_SDK = macosx10.12,问题没有得到解决,通过在命令行运行如下命令,问题解决,供大家参考!

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

 

I’m running Qt 5.7.1 on Mac OS 10.12.2.

None of the above answers involving adding !host_build:QMAKE_MAC_SDK = macosx10.12 to a file worked for me.

What did work was a small reconfigure on the XCode side of things as described here, the key step being entering

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

in the command line.

What caused the problem for me was that I installed the XCode command line tools before installing XCode itself which apparently makes it hard for Qt to find the Mac OS SDK.

来自:http://stackoverflow.com/questions/26320677/error-could-not-resolve-sdk-path-for-macosx10-8

centos7通过yum安装apache+mysql(mariadb)+php

一、Apache配置

1、设置apache自动启动

systemctl enable httpd

2、启动apace

systemctl start httpd

3、配置apache监听ipv4

修改/etc/httpd/conf/httpd.conf的Listen:

Listen 0.0.0.0:80

1、安装mariadb

MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可。开发这个分支的原因之一是:甲骨文公司收购了MySQL后,有将MySQL闭源的潜在风险,因此社区采用分支的方式来避开这个风险。MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能轻松成为MySQL的代替品。。


[root@localhost ~]# yum install mariadb-server mariadb

mariadb数据库的相关命令是:

systemctl start mariadb  #启动MariaDB

systemctl stop mariadb  #停止MariaDB

systemctl restart mariadb  #重启MariaDB

systemctl enable mariadb  #设置开机启动

2、设为自动启动


[root@localhost ~]#systemctl enable mariadb

3、启动数据库

[root@localhost ~]# systemctl start mariadb

4、修改root密码

4.1、可以通过命令mysql_secure_installation进行设置


[root@localhost ~]# mysql_secure_installation

4.2、也可以通过下面方法进行修改root密码


[root@localhost ~]# mysql -u root -p
MariaDB [(none)]> use mysql;
#设置root密码
MariaDB [mysql]> update users set password=password('新密码') where user='root';
#更新权限
MariaDB [mysql]> flush privileges;

BCM94352Z 黑苹果10.12.3驱动 macOS Sierra驱动

1、硬件信息

主板:Gigabyte/技嘉 B150N Phoenix-WIFI 凤凰MINI主板

CPU:i3-6100

硬盘:intel 600p

2、软件信息

系统版本:macOS Sierra(10.12.3)

引导软件:Clover r3766

3、网卡驱动步骤

自带Intel无线网卡,无法驱动,从网上买了“博通BCM94352Z 802.11AC ngff 千兆无线网卡+蓝牙4.0”换下原配无线网卡,目前三卡均以驱动成功。

3.1、下载RehabMan-FakePCIID-2017-0109.zip

下载地址 https://bitbucket.org/RehabMan/os-x-fake-pci-id/downloads/

3.2、将FakePCIID.kext和FakePCIID_Broadcom_WiFi.kext安装到S/L/E下,或者放到Clover的kext对应系统版本的kext文件夹下

3.3、在Clover的配置文件config.plist中添加如下配置



Comment
change 15 port limit to 26 in XHCI kext (100-Series-10.12)
Find

g710////EA==

Name
AppleUSBXHCIPCI
Replace

g710////Gw==



Comment
AirPortBrcm4360 - fcvo, 10.12.x (credit the-darkvoid)
Disabled

Find

gflSqgAAdSk=

Name
AirPortBrcm4360
Replace

gflSqgAAZpA=


4、蓝牙驱动步骤

4.1、下载RehabMan-BrcmPatchRAM-2016-0705.zip

下载地址:https://bitbucket.org/RehabMan/os-x-fake-pci-id/downloads/
 

4.2、安装BrcmPatchRAM2.kext和BrcmFirmwareRepo.kext到S/L/E或者放到CLOVER对应系统版本的kext文件夹下

4.3、在Clover配置文件config.plist中添加如下配置项



Find

SIX/dEdIiwc=

Name
IOBluetoothFamily
Replace

Qb4PAAAA60Q=


4.4、重启应该就可以了!

Mac mini

Mac系统下如何挂在samba到本地路径

MOUNT_SMBFS(8)            BSD System Manager's Manual           MOUNT_SMBFS(8)

NAME
     mount_smbfs -- mount a shared resource from an SMB file server

SYNOPSIS
     mount_smbfs [-N] [-o options] [-d mode] [-f mode] [-h] //[domain;][user[:password]@]server[/share] path

DESCRIPTION
     The mount_smbfs command mounts a share from a remote server using SMB/CIFS protocol.

     The options are as follows:

     -N      Do not ask for a password.  At run time, mount_smbfs reads the ~/Library/Preferences/nsmb.conf
             file for additional configuration parameters and a password.  If no password is found,
             mount_smbfs prompts for it.

     -o      Options passed to mount(2) are specified with the -o option followed by a comma separated
             string of options. See the mount(8) man page for possible options and their meanings. Addi-tional Additional
             tional options supported by the mount_smbfs are as follows:

             nobrowse
                     Indicate to the Carbon subsystem that this volume is not to be displayed to the user.

             automounted
                     Set flags on the mountpoint to indicate that the volume has been mounted by the auto-mounter. automounter.
                     mounter.

             nostreams
                     Don't use NTFS Streams even if they are supported by the server.

             soft    Make the mount soft.  Fail file system calls after a number of seconds.

             nonotification
                     Turn off using notifications for this volume.

     -f mode, -d mode
             Specify permissions that should be assigned to files and directories.  The values must be spec-ified specified
             ified as octal numbers.  Default value for the file mode is taken from mount point, default
             value for the directory mode adds execute permission where the file mode gives read permission.

             Note that these permissions can differ from the rights granted by SMB server.

     -h      Prints a help message, much like the SYNOPSIS above.

     //[domain;][user[password]@] server[/share]
             The mount_smbfs command will use server as the NetBIOS name of remote computer, user as the
             remote user name and share as the resource name on a remote server.  Domain and/or password may
             be specified here.  If user is omitted the logged in user id will be used.  Omitting share is
             an error when mount_smbfs is run from the command line, otherwise a browsing dialogue is pre-sented. presented.
             sented.

     path    Path to mount point.

FILES
     nsmb.conf  Keeps static parameters for connections and other information.  See man nsmb.conf for
                details.

EXAMPLES
     This example shows the proper url to use to mount the share PUBLIC from the SMB server myserver :

           mkdir /smb/public
           mount -t smbfs //username:userpass@myserver/PUBLIC /smb/public

     This example shows the proper url to use to mount the share PUBLIC from the SMB server myserver as
     guest:

           mkdir /smb/public
           mount -t smbfs //guest:@myserver/PUBLIC /smb/public
     Note: You should always use the system mount command and never call mount_smbfs directly.

SEE ALSO
     mount(2), nsmb.conf(5), mount(8), umount(8)

BUGS
     Please report bugs to Apple.

AUTHORS
     Boris Popov <bp@butya.kz>, <bp@FreeBSD.org>

FreeBSD                         March 10, 2000                         FreeBSD