access

在nginx日志的access log中记录post请求的参数值

你。 提交于 2020-02-04 00:33:18
背景:有时程序偶出现参数少了或没有提交到下一个链接Url里后出现问题,如何查呢,最好的办法是在 nginx 上的加post参数,以定位到问题才有可能对某个UIR的代码出现的问题进行排查。 og_format access '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent $request_body "$http_referer" "$http_user_agent" $http_x_forwarded_for'; access_log logs/test.access.log access; 注意放的位置在http里:nginx: [warn] the "log_format" directive may be used only on "http" level in /usr/local/nginx/conf/vhost/xxx.conf:59 nginx.conf http里定义:wwwlog log_format wwwlog '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent"

#4700. Access

爷,独闯天下 提交于 2020-02-03 17:31:49
题目描述 题解 今天明明没什么难题还打得这么烂可见我太菜了 考虑一个被access过的树,如果把一些没有经历过虚实边转化的虚边删去的话,那我们可以发现剩下的虚边条数对应的就是这棵树被access过的最小次数-1 于是可以考虑dp: f u , i f_{u,i} f u , i ​ 表示 u u u 子树内有i条经历了虚实边转化的虚边,考虑转移的时候要注意 u u u 这个点最多连结一个实儿子。特殊的,一棵树是空的也要特殊处理。 代码 # include <bits/stdc++.h> using namespace std ; const int N = 10005 , M = 505 , P = 998244353 ; int n , m , hd [ N ] , sz [ N ] , V [ N << 1 ] , nx [ N << 1 ] , t , f [ N ] [ M ] , s , g [ N ] [ M ] [ 2 ] , G [ M ] [ 2 ] ; void add ( int u , int v ) { nx [ ++ t ] = hd [ u ] ; V [ hd [ u ] = t ] = v ; } void dfs ( int u , int fr ) { sz [ u ] = g [ u ] [ 0 ] [ 0 ] = 1 ; for ( int

asp.net webapi 跨域问题解决 No 'Access-Control-Allow-Origin' header i

老子叫甜甜 提交于 2020-02-03 01:10:12
一、基础解决方案(基础配置) 通过Ajax调用web api路径时报错: No 'Access-Control-Allow-Origin' header is present on the requested resource. C#自带的web api并不能支持跨域访问,如果需要,可以更改配置来实现。 1、更改Web.config文件,加上如下代码 <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*"/> <add name="Access-Control-Allow-Headers" value="Content-Type,Token" /> <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" /> </customHeaders> </httpProtocol> 2、然后需要配置Global.asax文件 插入如下代码: /// <summary> /// 配置Ajax跨域访问 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void

新项目从svn检出报文件找不到的参考解决办法

吃可爱长大的小学妹 提交于 2020-02-01 12:21:12
1. 右键项目 -> 属性 ->java bulid path-> jre System Library- 》 access rules- 》 resolution 选择 accessible ,下面填上 ** 点击确定即可!!! 2. 在 MyEclipse 中编写 Java 代码时,用到了 BASE64Decoder , import sun.misc.BASE64Decoder ;可是 Eclipse 提示: Access restriction: The type BASE64Decoder is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar 解决方案 1 (推荐): 只需要在 project build path 中先移除 JRE System Library ,再添加库 JRE System Library ,重新编译后就一切正常了。 解决方案

npm install -g bower 报错 WARN checkPermissions Missing write access to /usr/local/lib/node_modules

时光怂恿深爱的人放手 提交于 2020-02-01 07:15:30
npm install -g bower 报错 npm install -g bower npm WARN deprecated bower@1.8.8: We don 't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/ npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access ' /usr/local/lib/node_modules ' npm ERR! [Error: EACCES: permission denied, access '

apache2.4配置虚拟目录和虚拟主机

风流意气都作罢 提交于 2020-02-01 05:24:09
#找到C:/Windows/System32/drivers/etc 中hosts文件,增加如下代码 127.0.0.1 www.baibai.com #找到D:\myphp2017\Apache24\conf\http.conf 文件,取消注释下面这句话 #74行删掉前面的#号 LoadModule access_compat_module modules/mod_access_compat.so #下面的是配置虚拟主机 #step1 启用 httpd-vhosts.conf #找到D:\myphp2017\Apache24\conf\http.conf 文件,取消注释下面这句话 #505行 Include conf/extra/httpd-vhosts.conf #step2 在 httpd-vhosts.conf 文件中做配置 #找到D:\myphp2017\Apache24\conf/extra中httpd-vhosts.conf文件,在文件末尾加如下代码 <VirtualHost *:80> #以下路径为你的php、html的所在位置 DocumentRoot "D:/myphp2017/blog/php/" ServerName www.baibai.com DirectoryIndex denglu2.php   <Directory "D:/myphp2017

hive 的开窗函数sum() over() 函数

依然范特西╮ 提交于 2020-01-31 11:38:27
窗口分析函数 sum() over() : 可以实现在窗口中进行逐行累加 测试数据: 这个是网上比较经典的案例了 2: jdbc:hive2://hadoop-03:10000> select * from t_access_amount; +----------------------+------------------------+-------------------------+--+ | t_access_amount.uid | t_access_amount.month | t_access_amount.amount | +----------------------+------------------------+-------------------------+--+ | A | 2015-01 | 33 | | A | 2015-02 | 10 | | A | 2015-03 | 20 | | B | 2015-01 | 30 | | B | 2015-02 | 15 | | B | 2015-03 | 45 | | C | 2015-01 | 30 | | C | 2015-02 | 40 | | C | 2015-03 | 30 | +----------------------+------------------------+----------

微信公众号获取用户地理位置

五迷三道 提交于 2020-01-31 10:37:20
很久没搞微信的js-sdk了, 搞了一下午, 刷新页面老是失败, 没想到结合经验给大家展示下获取用户地理位置 第一步:登录微信公众号https://mp.weixin.qq.com 首先先设置最基本的配置(这一步大家应该都会) 第二步:点击公众平台右上角展开点击功能设置 配置网页授权域名 填写项目所使用的的域名并将文件下载放到项目根目录 然后在配置js安全域名同样将要下载的txt文件放到项目目录也可以是二级目录, 如果放到二级目录域名后面要就目录路径哦 保存之后: 第三步: 公众号左边栏,开发->子栏目:接口权限 开启用户获取地理位置 第四步:先在php服务端配置好js-sdk所需要的参数:appId, timestamp , noceStr, signature , jsApiList function getSignPackage($appId,$appSecret) { $jsapiTicket = getJsApiTicket($appId,$appSecret); // 注意 URL 一定要动态获取,不能 hardcode. $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http

mysql链接报错1045:Access denied for user root@localhost解决方法

China☆狼群 提交于 2020-01-30 20:44:35
安装了mysql5,本地连接没有问题,但是通过局域网的其他电脑连接报错1045:Access denied for user root@localhost 网上搜索到的解决方法(亲测可以解决上述问题):      一:停止MySQL服务        在mysql的安装目录,输入命令net stop mysql      二:跳过验证        在my.ini里面68行(随便选位置)添加 skip_grant_tables 然后保存关闭      三:重启mysql并登陆mysql        命令:net start mysql(启动)           mysql -uroot -pmysql(登陆)      四:修改密码        命令:use mysql            update MySQL.user set authentication_string= password( 'PASSWORD') where user= 'root'; 注:命令中的PASSWORD换成自己需要设置的密码            flush privileges; 刷新配置           exit ;(退出服务)      五:打开my.ini文件,删除刚才添加的最后一行的内容,保存并关闭文件。然后在命令行用net stop mysql和net start

006-解决ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)【转】

≡放荡痞女 提交于 2020-01-30 12:51:04
本文转载自: https://blog.csdn.net/hua1011161696/article/details/80666025 解决方案: 步骤一:关闭数据库服务端mysqld程序 两种方式: ①快捷键 windows + R ;输入 services.msc ; 找到MySQL 停止其服务(前提是你之前已经把MySQL加入了系统服务中) ②在命令行程序中;注意需要以管理员权限运行cmd程序,不然无法关闭mysqld进程 >>tasklist |findstr mysqld 这行命令可以用来查看mysqld是否在运行,在运行中则可以查到它的PID >>taskkill /F /PID xxxx xxxx是从前面一条命令得到的PID值 步骤二:跳过权限登录MySQL 服务器端 在cmd中执行 mysqld --skip-grant-tables >>mysqld --skip-grant-tables 此时cmd程序会阻塞,关闭cmd程序 然后重新以管理员权限运行cmd 然后在cmd命令行中输入 mysql 就能连接上MySQL 服务器端了 >>mysql 然后可以通过sql语句 :SELECT * from mysql.user\G; 来查看服务器端所有的用户信息,重点查看User、Password、authentication_string这三项。这条语句非常关键。