一:hello,world程序
public class Hello
extends HttpServlet {
public voiddoGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException,IOException {
PrintWriter...
分类:
其他好文 时间:
2015-08-04 15:49:25
阅读次数:
99
这道题唯一的难度大概就是看懂题。。
我一开始i.e. aSi + aSi+1 + ... + aSi+ni ki resp.看错了,推不出公式。后来看了别人正确的题意才,知道是很简单的东西。
这里复制wangjian8006的题意在下面:
现在假设有一个这样的序列,S={a1,a2,a3,a4...ai...at}
其中ai=a*si,其实这句可以忽略不看...
分类:
其他好文 时间:
2015-07-31 01:29:07
阅读次数:
171
resp.setCharacterEncoding("UTF-8"); //resp.setHeader("content-type","text/html;charset=UTF-8"); resp.setContentType("text/html;charset=utf-8");
分类:
Web程序 时间:
2015-07-23 21:42:44
阅读次数:
119
1.将数据库的数据保存到文本文件中:context.Response.ContentType = "text/plain";//增加另存为功能//增加Content-Disposition是告诉浏览器,这个返回的内容是"附件形式",要给用户保存,filename是建议的文件名context.Resp...
分类:
其他好文 时间:
2015-07-21 12:31:08
阅读次数:
121
这个是原代码:System.Net.WebClientwc =newSystem.Net.WebClient();wc.OpenRead("http://patrickkroft.com/mp3/Pearl.mp3");Int64bytes_total=Convert.ToInt64(wc.Resp...
controller代码:
@RequestMapping(value = "/cmpSts/{cmpId}", method = RequestMethod.GET)
public ResponseEntity cmpSts(@PathVariable int cmpId,
HttpServletRequest request, HttpServletResponse resp...
分类:
编程语言 时间:
2015-07-17 19:03:05
阅读次数:
224
avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x01avrdude: stk500_recv(): programme...
分类:
其他好文 时间:
2015-07-11 19:55:15
阅读次数:
173
只需要两步:
1、定义一个Filter:
public class NoCacheFilter implements Filter{
@Override
public void destroy(){
}
@Override
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain cha...
分类:
其他好文 时间:
2015-07-05 16:44:02
阅读次数:
115
在官网中http://redis.io/clients有许多已经实现好的redis client;有需要可以参考一下。
其实前一篇http://blog.csdn.net/yitouhan/article/details/46612925 redis client protocol 解析,我已经对RESP做主要的解析。
下面是解析RESP的所有函数,其中对外函数是RedisProtoc...
分类:
其他好文 时间:
2015-07-01 14:11:28
阅读次数:
117
在官网http://redis.io/topics/protocol有对redis通信协议有做说明。
基于下面的一些原因,我想解析redis client protocol:
1、足够了解通信协议,有助于做出更好的系统设计。
2、学习RESP的设计思想,不仅能扩展我的思维,也许将来能应用于我的代码中。
3、因为有些人想将redis client直接并入自己已有的系统中;包括我在内。这个...
分类:
其他好文 时间:
2015-06-24 00:47:13
阅读次数:
169