型号:151SK lenovo
最近深度清理后,发现鼠标的控制面板管理touchpad标签页不见了,touchpad无法禁用,一直在打字过程中光标乱飞。
找了lenovo的151sk的驱动页面,找了对应的touchpad驱动,不好用。
这个是显示win10的,也不是针对151sk的,但是实际测试可用:
ce0j06af.exe
每天一点点
型号:151SK lenovo
最近深度清理后,发现鼠标的控制面板管理touchpad标签页不见了,touchpad无法禁用,一直在打字过程中光标乱飞。
找了lenovo的151sk的驱动页面,找了对应的touchpad驱动,不好用。
这个是显示win10的,也不是针对151sk的,但是实际测试可用:
ce0j06af.exe
git hook 是一种很有用的方式。
一般的实现就是在本地开启一个监听hook url的http server,然后对url进行处理。
因为很多服务器都有nginx作为web server,所以我们优先考虑如何利用nginx。
一般网上比较多的推荐是用nginx的衍生版本openresty,通过lua来实现。
这里记录一个简单的思路:
通过nginx的lacation来匹配hook url特征,然后产生特定的access 或者error日志,然后通过脚本监控日志的变化,来判断是否有hook消息触发。这样nginx是现成的,且实现方法是无阻塞的,只要实现个一直监控文件大小的脚本就可以了,非常简单。
location /xxx/xxx/x {
return 200 "xxx";
access_log /xxx.log;
}
这里需要确认hook的触发是成功access还是失败error,才能正确的触发日志文件.
这个脚本负责日志变化时,执行我们的git hook动作。
#!/bin/sh
# 要监控的文件
mfile=/xxx.log
#启动一个循环,定时检查文件是否存在
while true; do
#监控文件大小
fsize=`stat -c "%s" $mfile`
if [ $fsize != 1 ]; then
echo "">$mfile
echo "log file update"
#TODO:需要的逻辑放这里
...
fi
sleep 5
done
脚本好了,然后就是要设置开机启动,否则服务器重启后,hook就失效了。
开机启动,有很多办法设置,比如最简单的rc.local脚本
存档文章。原始链接:https://www.cnblogs.com/Jimmy1988/p/7485133.html
PS: 只有当系统调用或者调用lib函数时出错,才会置位errno!
查看系统中所有的errno所代表的含义,可以采用如下的代码:
/* Function: obtain the errno string
* char *strerror(int errno)
*/
#include <stdio.h>
#include <string.h> //for strerror()
//#include <errno.h>
int main()
{
int tmp = 0;
for(tmp = 0; tmp <=256; tmp++)
{
printf("errno: %2d\t%s\n",tmp,strerror(tmp));
}
return 0;
}
输出信息如下:
errno: 0 Success
errno: 1 Operation not permitted
errno: 2 No such file or directory
errno: 3 No such process
errno: 4 Interrupted system call
errno: 5 Input/output error
errno: 6 No such device or address
errno: 7 Argument list too long
errno: 8 Exec format error
errno: 9 Bad file descriptor
errno: 10 No child processes
errno: 11 Resource temporarily unavailable
errno: 12 Cannot allocate memory
errno: 13 Permission denied
errno: 14 Bad address
errno: 15 Block device required
errno: 16 Device or resource busy
errno: 17 File exists
errno: 18 Invalid cross-device link
errno: 19 No such device
errno: 20 Not a directory
errno: 21 Is a directory
errno: 22 Invalid argument
errno: 23 Too many open files in system
errno: 24 Too many open files
errno: 25 Inappropriate ioctl for device
errno: 26 Text file busy
errno: 27 File too large
errno: 28 No space left on device
errno: 29 Illegal seek
errno: 30 Read-only file system
errno: 31 Too many links
errno: 32 Broken pipe
errno: 33 Numerical argument out of domain
errno: 34 Numerical result out of range
errno: 35 Resource deadlock avoided
errno: 36 File name too long
errno: 37 No locks available
errno: 38 Function not implemented
errno: 39 Directory not empty
errno: 40 Too many levels of symbolic links
errno: 41 Unknown error 41
errno: 42 No message of desired type
errno: 43 Identifier removed
errno: 44 Channel number out of range
errno: 45 Level 2 not synchronized
errno: 46 Level 3 halted
errno: 47 Level 3 reset
errno: 48 Link number out of range
errno: 49 Protocol driver not attached
errno: 50 No CSI structure available
errno: 51 Level 2 halted
errno: 52 Invalid exchange
errno: 53 Invalid request descriptor
errno: 54 Exchange full
errno: 55 No anode
errno: 56 Invalid request code
errno: 57 Invalid slot
errno: 58 Unknown error 58
errno: 59 Bad font file format
errno: 60 Device not a stream
errno: 61 No data available
errno: 62 Timer expired
errno: 63 Out of streams resources
errno: 64 Machine is not on the network
errno: 65 Package not installed
errno: 66 Object is remote
errno: 67 Link has been severed
errno: 68 Advertise error
errno: 69 Srmount error
errno: 70 Communication error on send
errno: 71 Protocol error
errno: 72 Multihop attempted
errno: 73 RFS specific error
errno: 74 Bad message
errno: 75 Value too large for defined data type
errno: 76 Name not unique on network
errno: 77 File descriptor in bad state
errno: 78 Remote address changed
errno: 79 Can not access a needed shared library
errno: 80 Accessing a corrupted shared library
errno: 81 .lib section in a.out corrupted
errno: 82 Attempting to link in too many shared libraries
errno: 83 Cannot exec a shared library directly
errno: 84 Invalid or incomplete multibyte or wide character
errno: 85 Interrupted system call should be restarted
errno: 86 Streams pipe error
errno: 87 Too many users
errno: 88 Socket operation on non-socket
errno: 89 Destination address required
errno: 90 Message too long
errno: 91 Protocol wrong type for socket
errno: 92 Protocol not available
errno: 93 Protocol not supported
errno: 94 Socket type not supported
errno: 95 Operation not supported
errno: 96 Protocol family not supported
errno: 97 Address family not supported by protocol
errno: 98 Address already in use
errno: 99 Cannot assign requested address
errno: 100 Network is down
errno: 101 Network is unreachable
errno: 102 Network dropped connection on reset
errno: 103 Software caused connection abort
errno: 104 Connection reset by peer
errno: 105 No buffer space available
errno: 106 Transport endpoint is already connected
errno: 107 Transport endpoint is not connected
errno: 108 Cannot send after transport endpoint shutdown
errno: 109 Too many references: cannot splice
errno: 110 Connection timed out
errno: 111 Connection refused
errno: 112 Host is down
errno: 113 No route to host
errno: 114 Operation already in progress
errno: 115 Operation now in progress
errno: 116 Stale file handle
errno: 117 Structure needs cleaning
errno: 118 Not a XENIX named type file
errno: 119 No XENIX semaphores available
errno: 120 Is a named type file
errno: 121 Remote I/O error
errno: 122 Disk quota exceeded
errno: 123 No medium found
errno: 124 Wrong medium type
errno: 125 Operation canceled
errno: 126 Required key not available
errno: 127 Key has expired
errno: 128 Key has been revoked
errno: 129 Key was rejected by service
errno: 130 Owner died
errno: 131 State not recoverable
errno: 132 Operation not possible due to RF-kill
errno: 133 Memory page has hardware error
errno: 134~255 unknown error!
Linux中,在头文件 /usr/include/asm-generic/errno-base.h 对基础常用errno进行了宏定义:
#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Try again */
#define ENOMEM 12 /* Out of memory */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */
#define EBUSY 16 /* Device or resource busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* File table overflow */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Not a typewriter */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Math argument out of domain of func */
#define ERANGE 34 /* Math result not representable */
#endif
在 /usr/include/asm-asm-generic/errno.h 中,对剩余的errno做了宏定义:
#ifndef _ASM_GENERIC_ERRNO_H
#define _ASM_GENERIC_ERRNO_H
#include <asm-generic/errno-base.h>
#define EDEADLK 35 /* Resource deadlock would occur */
#define ENAMETOOLONG 36 /* File name too long */
#define ENOLCK 37 /* No record locks available */
#define ENOSYS 38 /* Function not implemented */
#define ENOTEMPTY 39 /* Directory not empty */
#define ELOOP 40 /* Too many symbolic links encountered */
#define EWOULDBLOCK EAGAIN /* Operation would block */
#define ENOMSG 42 /* No message of desired type */
#define EIDRM 43 /* Identifier removed */
#define ECHRNG 44 /* Channel number out of range */
#define EL2NSYNC 45 /* Level 2 not synchronized */
#define EL3HLT 46 /* Level 3 halted */
#define EL3RST 47 /* Level 3 reset */
#define ELNRNG 48 /* Link number out of range */
#define EUNATCH 49 /* Protocol driver not attached */
#define ENOCSI 50 /* No CSI structure available */
#define EL2HLT 51 /* Level 2 halted */
#define EBADE 52 /* Invalid exchange */
#define EBADR 53 /* Invalid request descriptor */
#define EXFULL 54 /* Exchange full */
#define ENOANO 55 /* No anode */
#define EBADRQC 56 /* Invalid request code */
#define EBADSLT 57 /* Invalid slot */
#define EDEADLOCK EDEADLK
#define EBFONT 59 /* Bad font file format */
#define ENOSTR 60 /* Device not a stream */
#define ENODATA 61 /* No data available */
#define ETIME 62 /* Timer expired */
#define ENOSR 63 /* Out of streams resources */
#define ENONET 64 /* Machine is not on the network */
#define ENOPKG 65 /* Package not installed */
#define EREMOTE 66 /* Object is remote */
#define ENOLINK 67 /* Link has been severed */
#define EADV 68 /* Advertise error */
#define ESRMNT 69 /* Srmount error */
#define ECOMM 70 /* Communication error on send */
#define EPROTO 71 /* Protocol error */
#define EMULTIHOP 72 /* Multihop attempted */
#define EDOTDOT 73 /* RFS specific error */
#define EBADMSG 74 /* Not a data message */
#define EOVERFLOW 75 /* Value too large for defined data type */
#define ENOTUNIQ 76 /* Name not unique on network */
#define EBADFD 77 /* File descriptor in bad state */
#define EREMCHG 78 /* Remote address changed */
#define ELIBACC 79 /* Can not access a needed shared library */
#define ELIBBAD 80 /* Accessing a corrupted shared library */
#define ELIBSCN 81 /* .lib section in a.out corrupted */
#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
#define ELIBEXEC 83 /* Cannot exec a shared library directly */
#define EILSEQ 84 /* Illegal byte sequence */
#define ERESTART 85 /* Interrupted system call should be restarted */
#define ESTRPIPE 86 /* Streams pipe error */
#define EUSERS 87 /* Too many users */
#define ENOTSOCK 88 /* Socket operation on non-socket */
#define EDESTADDRREQ 89 /* Destination address required */
#define EMSGSIZE 90 /* Message too long */
#define EPROTOTYPE 91 /* Protocol wrong type for socket */
#define ENOPROTOOPT 92 /* Protocol not available */
#define EPROTONOSUPPORT 93 /* Protocol not supported */
#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
#define EPFNOSUPPORT 96 /* Protocol family not supported */
#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
#define EADDRINUSE 98 /* Address already in use */
#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
#define ENETDOWN 100 /* Network is down */
#define ENETUNREACH 101 /* Network is unreachable */
#define ENETRESET 102 /* Network dropped connection because of reset */
#define ECONNABORTED 103 /* Software caused connection abort */
#define ECONNRESET 104 /* Connection reset by peer */
#define ENOBUFS 105 /* No buffer space available */
#define EISCONN 106 /* Transport endpoint is already connected */
#define ENOTCONN 107 /* Transport endpoint is not connected */
#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
#define ETOOMANYREFS 109 /* Too many references: cannot splice */
#define ETIMEDOUT 110 /* Connection timed out */
#define ECONNREFUSED 111 /* Connection refused */
#define EHOSTDOWN 112 /* Host is down */
#define EHOSTUNREACH 113 /* No route to host */
#define EALREADY 114 /* Operation already in progress */
#define EINPROGRESS 115 /* Operation now in progress */
#define ESTALE 116 /* Stale file handle */
#define EUCLEAN 117 /* Structure needs cleaning */
#define ENOTNAM 118 /* Not a XENIX named type file */
#define ENAVAIL 119 /* No XENIX semaphores available */
#define EISNAM 120 /* Is a named type file */
#define EREMOTEIO 121 /* Remote I/O error */
#define EDQUOT 122 /* Quota exceeded */
#define ENOMEDIUM 123 /* No medium found */
#define EMEDIUMTYPE 124 /* Wrong medium type */
#define ECANCELED 125 /* Operation Canceled */
#define ENOKEY 126 /* Required key not available */
#define EKEYEXPIRED 127 /* Key has expired */
#define EKEYREVOKED 128 /* Key has been revoked */
#define EKEYREJECTED 129 /* Key was rejected by service */
/* for robust mutexes */
#define EOWNERDEAD 130 /* Owner died */
#define ENOTRECOVERABLE 131 /* State not recoverable */
#define ERFKILL 132 /* Operation not possible due to RF-kill */
#define EHWPOISON 133 /* Memory page has hardware error */
#endif
头文件:
函数原型:
void perror(const char *s)
参数:
s: 字符串提示符
输出形式:
const char *s: strerror(errno) //提示符:发生系统错误的原因
返回值:
无返回值
2). 字符串显示错误信息 / strerror
作用:
将错误码以字符串的信息显示出来
头文件:
函数原型:
char *strerror(int errnum);
参数:
errnum: 即errno
返回值:
返回错误码字符串信息
windows中通过免安装eclipse工具包,编译时部分日志:
make[1]: 杩涘叆鐩綍鈥?/home/w600/project/w600_sdk/app鈥?
make[1]: 绂诲紑鐩綍鈥?/home/w600/project/w600_sdk/app鈥?
make[1]: 杩涘叆鐩綍鈥?/home/w600/project/w600_sdk/demo鈥?
make[2]: 杩涘叆鐩綍鈥?/home/w600/project/w600_sdk/demo/console鈥?
make[2]: 绂诲紑鐩綍鈥?/home/w600/project/w600_sdk/demo/console鈥?
make[1]: 绂诲紑鐩綍鈥?/home/w600/project/w600_sdk/demo鈥?
make[1]: 杩涘叆鐩綍鈥?/home/w600/project/w600_sdk/platform/boot/gcc鈥?
make[1]: 绂诲紑鐩綍鈥?/home/w600/project/w600_sdk/platform/boot/gcc鈥?
首先根据make[1]在全工程搜索,根据搜出的内容对比,大概知道乱码的部分内容是“进入目录”和“离开目录”, 尾部的是中文的双引号。所以基本可以知道内容是对的,只是UTF8的中文支持问题了。
window--> perferences-->General-->Appearance-->Cllors and Fonts-->c/c++:
c/c++ build console text font
淘了个D-EJ785,来听一些买来的唱片CD。
没有关机键,按下停止键(实心方块)后,就相当于关机了,可以进行CD或者电池操作。
G-PROTECTION:防止声音跳动,这个一般是机器震动后者光盘划伤造成。
AVLS:AVLS即自动音量限制系统的简称。它的作用就是:控制音量,避免用户在使用耳机收听音乐时因音量过大而导致听力受损。设定为limit时,保护听力,限制最大音量。
1:单首播放
SHUF:随机播放
PGM:按照喜欢顺序播放
BASS1/2:加强的低音模式,BASS2比BASS1低音强
NSUserDefaults可以理解为本地的key-value数据库,类似sqlite的本地数据库的作用。
例子:
[[NSUserDefaults standardUserDefaults] boolForKey:kWifiOptimizeSwitch];
api:
/// -stringForKey: is equivalent to -objectForKey:, except that it will convert NSNumber values to their NSString representation. If a non-string non-number value is found, nil will be returned.
- (nullable NSString *)stringForKey:(NSString *)defaultName;
/// -arrayForKey: is equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray.
- (nullable NSArray *)arrayForKey:(NSString *)defaultName;
/// -dictionaryForKey: is equivalent to -objectForKey:, except that it will return nil if the value is not an NSDictionary.
- (nullable NSDictionary<NSString *, id> *)dictionaryForKey:(NSString *)defaultName;
/// -dataForKey: is equivalent to -objectForKey:, except that it will return nil if the value is not an NSData.
- (nullable NSData *)dataForKey:(NSString *)defaultName;
/// -stringForKey: is equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray<NSString *>. Note that unlike -stringForKey:, NSNumbers are not converted to NSStrings.
- (nullable NSArray<NSString *> *)stringArrayForKey:(NSString *)defaultName;
/*!
-integerForKey: is equivalent to -objectForKey:, except that it converts the returned value to an NSInteger. If the value is an NSNumber, the result of -integerValue will be returned. If the value is an NSString, it will be converted to NSInteger if possible. If the value is a boolean, it will be converted to either 1 for YES or 0 for NO. If the value is absent or can't be converted to an integer, 0 will be returned.
*/
- (NSInteger)integerForKey:(NSString *)defaultName;
/// -floatForKey: is similar to -integerForKey:, except that it returns a float, and boolean values will not be converted.
- (float)floatForKey:(NSString *)defaultName;
/// -doubleForKey: is similar to -integerForKey:, except that it returns a double, and boolean values will not be converted.
- (double)doubleForKey:(NSString *)defaultName;
/*!
-boolForKey: is equivalent to -objectForKey:, except that it converts the returned value to a BOOL. If the value is an NSNumber, NO will be returned if the value is 0, YES otherwise. If the value is an NSString, values of "YES" or "1" will return YES, and values of "NO", "0", or any other string will return NO. If the value is absent or can't be converted to a BOOL, NO will be returned.
*/
- (BOOL)boolForKey:(NSString *)defaultName;
/*!
-URLForKey: is equivalent to -objectForKey: except that it converts the returned value to an NSURL. If the value is an NSString path, then it will construct a file URL to that path. If the value is an archived URL from -setURL:forKey: it will be unarchived. If the value is absent or can't be converted to an NSURL, nil will be returned.
*/
- (nullable NSURL *)URLForKey:(NSString *)defaultName API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
看api,可以看到支持多种数据类型的获取
例子:
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
[userDefault setBool:senderSwitch.on forKey:kWifiOptimizeSwitch];
api:
/// -setInteger:forKey: is equivalent to -setObject:forKey: except that the value is converted from an NSInteger to an NSNumber.
- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName;
/// -setFloat:forKey: is equivalent to -setObject:forKey: except that the value is converted from a float to an NSNumber.
- (void)setFloat:(float)value forKey:(NSString *)defaultName;
/// -setDouble:forKey: is equivalent to -setObject:forKey: except that the value is converted from a double to an NSNumber.
- (void)setDouble:(double)value forKey:(NSString *)defaultName;
/// -setBool:forKey: is equivalent to -setObject:forKey: except that the value is converted from a BOOL to an NSNumber.
- (void)setBool:(BOOL)value forKey:(NSString *)defaultName;
/// -setURL:forKey is equivalent to -setObject:forKey: except that the value is archived to an NSData. Use -URLForKey: to retrieve values set this way.
- (void)setURL:(nullable NSURL *)url forKey:(NSString *)defaultName API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
同样支持各种数据的set。
说明:在set了后,数据其实还在内存数据结构中。还没有持久化到本地存储。
-synchronize is deprecated and will be marked with the API_DEPRECATED macro in a future release.
-synchronize blocks the calling thread until all in-progress set operations have completed. This is no longer necessary. Replacements for previous uses of -synchronize depend on what the intent of calling synchronize was. If you synchronized...
- ...before reading in order to fetch updated values: remove the synchronize call
- ...after writing in order to notify another program to read: the other program can use KVO to observe the default without needing to notify
- ...before exiting in a non-app (command line tool, agent, or daemon) process: call CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication)
- ...for any other reason: remove the synchronize call
object c 中的UITableView 可以实现灵活的列表内容效果。列表的内容可以是多种类型元素。
- (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView {
NSInteger num =[self.settingCellTitles count]+1;
return num;
}
- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0) {
return 1;
} else {
NSInteger num =[[self.settingCellTitles objectAtIndex:section-1] count];
return num;
}
}
因为可以是一个section多个rows,也可能是多个sections,相当于一维数组和二维数组的区别。
对于一维数组获取row index:
[[_settingCellModes objectAtIndex:indexPath.row] integerValue];
对于二维数组:
[[[self.settingCellModes objectAtIndex:indexPath.section-1] objectAtIndex:indexPath.row] integerValue];
主要就是先获取indexPath.section对应的section,而一维是直接
indexPath.row。
Warning: mysqli_connect(): (HY000/2002): No such file or directory
更新完php7.4 后,再访问wordpress后,出现了上述的错误(开启DEBUG)。
登录mysql 后,通过status命令产看mysql socket:
UNIX socket: /tmp/mysql.sock
# php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
pdo_mysql.default_socket
mysqli.default_socket
通过上面的过程,发现phpinfo页面和mysql实际的socket文件不一致,于是修改php.ini:
pdo_mysql.default_socket=/tmp/mysql.sock
mysqli.default_socket=/tmp/mysql.sock
或者修改my.cnf中相关:
[client]
socket=/tmp/mysql.sock
[mysqld]
socket=/tmp/mysql.sock
更新php到7.4后,在wordpress面板仍然提示php版本为7.1,通过或 php -v命令确认7.4更新成功,让人疑惑。
既然确认是php-fpm的问题,最简单的就是通过yum来更新php对应的php-fpm,更新后在检查,确认版本已经变成7.4。
寻找一款简单部署的工具,可以将服务上的文件通过页面列表展示,从而方面下载,有其他功能更好。
一款开源,开箱即用的好工具,github repo:
https://github.com/DirectoryLister/DirectoryLister
done!
出现错误时,无法通过admin页面登录到后台面板,而且页面的错误提示也有限,无法确认具体问题。这个时候,只能通过ssh来尝试解决。
开启wordpress 调试:
https://wordpress.org/support/article/debugging-in-wordpress/
只需修改 wp-config.php中下面的开关就可以在页面看到进一步的调试信息:
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
这样我们就能在页面看到想象的错误提示。
当发现是插件错误导致时,因为此时已经无法登录后台的插件管理页面,这时,直接删除wp-content目录下对应的插件目录就可以,这时wordpress会检测插件失效,从而跳过插件代码逻辑。
如果还有其他问题,可以进一步结合php nginx等日志进一步分析。
keil警告:enumerated type mixed with another type
枚举成员被赋值成数值或者宏,宏很容易被混淆成枚举,不易发现,仔细检查下每个枚举成员的值。
最近在体验unraid。打算装一个windows,用来运行一些window专有或者体验好的软件。因为开始各种装不上,所以期间参考文章,体验了了灯大的精简img,发现实在用不下去,所以还是研究自己怎么装。
以下文章为自己的的安装过程,因为硬件或者版本可能会有差异,请读者自行消化。
个人建议下载微软的原版,具体自行搜索。
按照类似的配置正常应该能进入window的那个窗口的界面,显示进入了安装引导过程,如果没有反应或者其他错误,请尝试更改Bus类型,和vDisk。如果安装中断,那么会导致再次启动直接启动系统无法成功,请删除vDisk,重新创建。
安装中常见的问题,在正常按照引导进入安装界面过程时,无法找到磁盘,解决方案是安装虚拟io驱动,分别选择以下驱动,并进行下一步:
Balloon
NetKVM
vioserial
viostor(一定要最后加载这个驱动)
然后就看到你分配的容量的虚拟磁盘了,然后正常分区和格式化就可以正常安装了。
再安装成功进入windows界面后,建议安装驱动盘中的qemu-ga-x64.msi
默认没有开启时,通过run 访问smb访问时,会提示:
Fix can’t access this shared folder because your organization’s security policies
开启方法:
From your left hand side click on the Lanman workstation, Now you can see the Enable insecure guest logons policy on your right hand side.
open Gpedit and click on the policy settings
Double click on it to open the Policy settings. Change the Policy setting to Enable and click on apply and OK.
Fix can’t access this shared folder using Gpedit
周末整理电子垃圾,发现自己需要一条sata的电源线,来进行外置sata的的测试。但是没有现成的线,只能自己改装一条了。
不同配件的sata电源线会有差异,5pin或者4pin,5pin的是包含3.3V的完整配置,4pin的没有3.3V。
一般是
黄 黑 黑 红
或者
黄 黑 红 黑
如下图:
sata标准的定义如下:
根据上面的定义可以得知:
黄色:12V
黑色:reserved ,实际用万用表测试是GND
红色:5V
黑色:GND
因为有的线没有3.3V,所以可以看到很多转换板上都是要增加1117之类的LDO转化芯片,就是为了实现5V转3.3V。
几个月前就完成了阿里云sdk的移植和集成,基本流程跑通,就继续干别的了,今天王正式产品中集成,发现还是费了些时间回想当时整个过程的一些细节,所以今天就详细记录下,争取下次再更一步节省时间。
目前合宙air724ug由于flash空间的分布和设计,目前的ota只支持app的升级,无法支持整机core+app的升级。所以这也就是下面的步骤中,生成差分版本时,基线是core。
运行./xxx.bat fota=app hex⽬录下会⽣成只升级APP的新版本
运行./xxx.bat fota=core hex⽬录下会⽣成只升级CORE的新版本
运行./xxx.bat fota=all hex⽬录下会⽣成APP+CORE的新版本
这里需要借助合宙的在线工具:http://doc.openluat.com/chafen
然后将生成的文件下载下来。
需要说明的是,差分出来的文件时比直接用fota=app生成的bin要大的,也就是说明这个差分中还有一些版本结构配置相关的数据,并不是把app扣出来而已。
路径:物联网平台/监控运维/OTA 升级
https://iot.console.aliyun.com/ota/list
这里不展开,如有需要,日后再单独开篇。
目前的代码是直接移植的alifota SDK,需要自己是移植和适配必要的接口,目前我手里的是已经移植和调试过的,今天主要记录相关的关机日志路径,便于日后定位问题和熟悉过程。
当我们使用letsencrypt时,我们会使用renew来自动续期免费证书,从而实现永久的免费证书使用。
在某些域名的重定向场景,我们通过 location和proxy方式将某一个子域名重定向到新的子域名下。这种情况下我们的https证书一般是挂在原域名下的,但是因为我们是从根域名就重定向了,这就导致letsencrypt在renew过程中验证webroot会失败,因为域名的访问是走proxy路径的。
我们给letsencrypt专门配置一个对应子域名能web访问的路径,并且将配置项放在前面,因为nginx的location是按照顺序匹配的,一旦达成就会退出location过程,所以就实现了对letsencrypt路径专门做映射管理的目的。
letsencrypt的check路径如下:
https://xxx.xxx.com/.well-known/acme-challenge/xxxx
所以我们的nginx location 路径配置如下
location /.well-known/ {
root /xxxxx;
}
其中的root路径就是子域名所对应的可访问web本地路径,这个路径是专门为了renew创建的。这样就保证了letsencrypt的renew同时保证了子域名的其他业务路径正常proxy。
ssh config:
Host xxx
HostName xxx
User xxx
ForwardAgent yes
IdentityFile xxx
IdentityFile 不是合成的ppk文件
settings.json相关配置
"remote.SSH.showLoginTerminal": true,
"remote.SSH.configFile": "C:\\Users\\xxx\\.ssh\\config",
"remote.SSH.useLocalServer": false,
"remote.autoForwardPorts": false,
"remote.SSH.remotePlatform": {
"xxx": "linux"
},
"remote.SSH.path": "D:\\Program Files\\Git\\usr\\bin\\ssh.exe"
注意: