题目链接在字符串a中查找字符串b出现的次数...貌似不可以用a.count()附上代码:1 a =
raw_input().strip()2 b = raw_input().strip()3 cnt = 0;4 for i in
xrange(len(a)):5 cnt += 1 if a....
分类:
其他好文 时间:
2014-05-14 04:13:06
阅读次数:
308
题目链接集合操作附上代码:1 M = int(input())2 m = set(map(int,
raw_input().strip().split()))3 N = int(input())4 n = set(map(int,
raw_input().strip().split()))5 tmp...
分类:
其他好文 时间:
2014-05-14 03:33:12
阅读次数:
289
You are given annxn2D matrix representing an
image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this
in-place?思路:先将矩阵转置,然后将第一列与最后...
分类:
其他好文 时间:
2014-05-14 03:09:35
阅读次数:
225
html{filter:expression(document.execCommand("BackgroundImageCache",false,true))_background-image:url(about:blank);_background-attachment:fixed}body,di...
分类:
Web程序 时间:
2014-05-14 02:10:02
阅读次数:
281
1. java层面的Surface
对于Surface我们的认识主要是android的类Surface, android的文档描述Surface是“Handle onto a raw buffer
that is being managed by the screen compositor”,这个描...
分类:
移动开发 时间:
2014-05-14 01:43:20
阅读次数:
9126
1. 批量改变文件内容://批量改变输出文件内容#include #include #include
using namespace std;int main(){ ifstream input("D:pos_img.txt"); ofstream
output("D:pos_image...
分类:
编程语言 时间:
2014-05-13 22:29:37
阅读次数:
458
今天用到图上验证码的功能,在网上找到ThinkPHP的以下代码: Public function verify(){
import('think.Image');
Image::buildImageVerify();
}添加到Controller中,通过地址“http://localhost/index.php/passport/index/verify”来访问,却提示以下错误:Cla...
分类:
Web程序 时间:
2014-05-13 14:43:19
阅读次数:
449
Android开发中我们会经常遇到图片过多或操作不当造成Out
of Memory异常,有时虽然是解决了这个问题但却会影响程序的运行效率,例如:当用户在快速滑动滚动条的过程中,我们程序在仍在艰难的加载服务器端的图片,这样给用户造成了极不好的体验。其实网络上关于图片的异步加载和缓存的讲解很多,但是其实,写一个这方面的程序还是比较麻烦的,要考虑多线程,缓存,内存溢出等很多方面,针对这一广大开发者都...
分类:
移动开发 时间:
2014-05-13 13:36:52
阅读次数:
359
下面是HTML文件用于上传3个文件
ACTION="Upload.asp">
Image
Text
Source Code
Archive
上传程序(Upload.asp):
Set Upload = Server.CreateObject("Persits.Upload.1")
...
分类:
其他好文 时间:
2014-05-13 00:21:11
阅读次数:
270