今天在做项目的时候 需要往api中发送一个json格式的对象,但是怎么改都不行,当然,使用的vue 的 http方法。 而且,开始使用时 vue-resource中post请求时的一个坑,vue-resource中post发送的数据默认以request payload的形式,而一般我们使用的都是fo ...
分类:
其他好文 时间:
2017-08-30 19:46:00
阅读次数:
891
1. iis 如果放在反向代理后面,日志里的c-ip是反向代理服务器的ip,不是真正用户的ip,想要记录用户的ip要做两件事。 一。在反向代理设置X-Forwarded-For段,以下为nginx下的配置示例: server { location { …… proxy_set_header X-Fo ...
分类:
其他好文 时间:
2017-08-29 14:16:48
阅读次数:
250
# # encode 编码# # python3### # bytes str 的函数都可以用### name='海角' # 字符串 unicode## new_name=name.encode('utf-8') # bytes类型 utf-8# print(type(new_name))## fo ...
分类:
其他好文 时间:
2017-08-23 14:50:53
阅读次数:
127
做技术和人生一样,哪有什么做不到,只有想不到。 乍一看你以为我在开玩笑呢。百度过,没有这种操作。 没有就不能实现了吗 /坏笑 华丽丽分割线 localStorage是存储在客户端的,道理上讲和服务端八竿子打不着,除非用ajax。但我就是要用表单,因为有时候上传大文件到服务端要用form提交的,而fo ...
分类:
编程语言 时间:
2017-08-18 23:34:08
阅读次数:
832
百度一下,自己也想了一下,有一种简单,无脑的方式分享给你: <input ng-model="start" id="start" placeholder="开始日期" style="width:156px;" class="form-control date-picker" data-date-fo ...
分类:
Web程序 时间:
2017-08-16 20:16:17
阅读次数:
205
转载请说明出处:http://www.cnblogs.com/zaifeng0108/p/7364355.html 1985:Richard Stallman GNU: GNU is Not Unix. GPL: General Public License FSF:Free Software Fo ...
分类:
其他好文 时间:
2017-08-15 12:35:29
阅读次数:
178
解释一下Linux上free命令的输出。 下面是free的运行结果,一共有4行。为了方便说明,我加上了列号。这样可以把free的输出看成一个二维数组FO(Free Output)。例如: FO[2][1] = 24677460 FO[3][2] = 10321516 1 2 3 4 5 61 tot ...
分类:
系统相关 时间:
2017-08-14 11:30:02
阅读次数:
204
function doFormatMoney($money){ $tmp_money = strrev($money); $format_money = "¥"; //后缀 /**例子:10,000,000 ¥ **/ for($i = 3;$i<strlen($money);$i+=3){ $fo ...
分类:
其他好文 时间:
2017-08-13 18:06:03
阅读次数:
181
C/C++做大数问题真是累啊有木有。。。总结点模板,在遇见就直接套 大数+大数: string sum(string s1,string s2) { if(s1.length()<s2.length()) { string temp=s1; s1=s2; s2=temp; } int i,j; fo ...
分类:
其他好文 时间:
2017-08-13 16:55:08
阅读次数:
177
求GCD 线性筛求[1,n]的质数 1 bool isprime[1000]; 2 int prime[100],tot; 3 void pri(int n) 4 { 5 tot = 0; 6 memset(isprime,true,sizeof(isprime)); 7 int i,j; 8 fo ...
分类:
编程语言 时间:
2017-08-10 10:27:37
阅读次数:
197