码迷,mamicode.com
首页 > 全部 > 周排行
jsp中验证用户是否以post方式提交
在项目中有时需要验证用户是否以post方式提交。下面是验证源码: public boolean checkMethod(String method) { if (request.getMethod().equalsIgnoreCase(method)) { return true; } else { ...
分类:Web程序   时间:2014-04-29 13:34:20    阅读次数:350
NYOJ 135 取石子(二)
NYOJ 135 取石子(二)...
分类:其他好文   时间:2014-04-29 13:23:20    阅读次数:159
Leetcode:Add Binary 二进制相加
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 思路同十进制的大数相加。代码如下: class Solution { public: string addBinary(string a, str...
分类:其他好文   时间:2014-04-29 13:12:20    阅读次数:328
NYOJ 23 取石子(一)
NYOJ 23 取石子(一)...
分类:其他好文   时间:2014-04-29 13:41:20    阅读次数:164
STL 之 multimap 源码剖析
/* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, ...
分类:其他好文   时间:2014-04-29 13:13:21    阅读次数:309
IOS UITextView加上placeholder
UITextView上如何加上类似于UITextField的placeholder呢,其实在UITextView上加上一个UILabel,然后再实现 - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text这个代理方法就可以了。 ...
分类:移动开发   时间:2014-04-29 13:42:21    阅读次数:337
Win32 线程的创建&信号量临界资源&事件对象
背景: 写了个程序,主要实现的功能为主线程创建两个子线程,之后主线程进入等待事件的循环。子线程1对临界资源cnt的值减2并输出cnt的值。子线程2对cnt的值加1并输出cnt的值,且当cnt为50的时候触发事件对象hend_even,子进程2退出。主线程收到hend_even后杀死子线程1,之后进入scanf阻塞。。。 代码示例: #include #include DWORD WIN...
分类:编程语言   时间:2014-04-29 13:31:21    阅读次数:377
STL 之 map 源码剖析
/* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, ...
分类:其他好文   时间:2014-04-29 13:28:21    阅读次数:398
NYOJ 562 盒子游戏
NYOJ 562 盒子游戏...
分类:其他好文   时间:2014-04-29 13:17:21    阅读次数:311
hdu 1047 Integer Inquiry(高精度数)
hdu 1047 高精度加法模板(用 string写的)...
分类:其他好文   时间:2014-04-29 13:28:21    阅读次数:236
struts2错误验证
在登陆的时候一般要用错误验证功能。效果如图: 在action层的写法: this.addActionError("用户名或密码错误");在jsp页面上取值: 记得在jsp页面添加就可以了...
分类:其他好文   时间:2014-04-29 13:18:21    阅读次数:342
正则表达式
今天Mayuyu要与大家来学习正则表达式,正则表达式是一个非常有用的工具,它的强大之处就在于处理文本匹配。   说白了正则表达式就是以一种模式去匹配给定文本中所有符合这一模式的字符串,比如[A-Za-z]\w+的含义是第一 个字符必须是字母,它的后面至少跟有一个或者更多由字母或者数字组成的字符。   那么Mayuyu将来一一介绍在正则表达式中常见的特殊字符。   1.  |表示一个或...
分类:其他好文   时间:2014-04-29 13:47:21    阅读次数:314
JS计算网页停留时间
JS计算网页停留时间...
分类:Web程序   时间:2014-04-29 13:36:21    阅读次数:256
ZOJ 2588 Burning Bridges 求无向图桥 边双连通裸题
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1588 #include #include #include #include #include using namespace std; #define N 10050 #define M 200005 int n,m;//n个点 m条边 struct Edge{...
分类:其他好文   时间:2014-04-29 13:25:21    阅读次数:383
php和js对数据库图片进行等比缩放
JS 对某图片的等比缩放 代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 最新javascript自动按比例显示图片,按比例压缩图片显示 function AutoResizeImage(maxWidth,max...
分类:数据库   时间:2014-04-29 13:14:22    阅读次数:440
Windows下搭建objective C开发环境
最近打算针对iPhone、iPod touch和iPad开发一些应用,所以,需要开始学习Objective C(苹果推出的类似C语言的开发语言)。由于苹果的自我封闭的产业链发展模式(从芯片、机器、开发语言、终端产品、服务)的限制,要想开发针对苹果 iPhone等产品的应用程序,就需要用Mac机器,在Xcode的IDE上使用Objective C语言开发。Mac机器就不用说了,那比PC机器要贵不少(...
分类:Windows程序   时间:2014-04-29 13:43:22    阅读次数:567
分布式消息系统Jafka入门指南
分布式消息系统Jafka入门指南作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs一、JafkaMQ简介JafkaMQ是一个分布式的发布/订阅消息系统,它是Apache Kafka的Java移植版。2013年11月28日,JafkaMQ发布了1.2.3版。JafkaMQ的特征如下:1)消息持久化到磁盘的算法时间复杂度为O(1),即使是TB级的消息存储,也能...
分类:其他好文   时间:2014-04-29 13:32:22    阅读次数:278
Timus 1642. 1D Maze迷宫
1D people lived in a 1D country. Everything in the country was one-dimensional, and everything was simple and clear: just one axis and two directions — forward and backward. Even a 1D world has proble...
分类:其他好文   时间:2014-04-29 13:44:22    阅读次数:284
在view扣除正方形
- (void)drawRect:(CGRect)rect { [super drawRect:rect]; CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(ctx, .3, .3, .3, .1); CGContextFillRect(ctx, self.boun...
分类:其他好文   时间:2014-04-29 13:33:22    阅读次数:284
leetcode day6 -- String to Integer (atoi) && Best Time to Buy and Sell Stock I II III
1、 ?? String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yours...
分类:其他好文   时间:2014-04-29 13:22:22    阅读次数:341
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!